You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
RSGDoctorApp/lib/core/model/admissionRequest/admission-request.dart

206 lines
7.9 KiB
Dart

class AdmissionRequest {
int? patientMRN;
int? admitToClinic;
bool? isPregnant;
int? pregnancyWeeks;
int? pregnancyType;
int? noOfBabies;
int? mrpDoctorID;
String? admissionDate;
String? expectedadmissionDate;
int? expectedDays;
int? intendedLengthOfStayId;
int? admissionType;
int? admissionLocationID;
int? roomCategoryID;
int? wardID;
bool? isSickLeaveRequired;
String? sickLeaveComments;
bool? isTransport;
String? transportComments;
bool? isPhysioAppointmentNeeded;
String? physioAppointmentComments;
bool? isOPDFollowupAppointmentNeeded;
String? opdFollowUpComments;
bool? isDietType;
int? dietType;
String? dietRemarks;
String? diagnosis;
bool? isPhysicalActivityModification;
String? physicalActivityModificationComments;
int? orStatus;
String? mainLineOfTreatment;
int? estimatedCost;
String? elementsForImprovement;
bool? isPackagePatient;
String? complications;
String? otherDepartmentinterventions;
String? otherProcedures;
String? pastMedicalHistory;
String? pastSurgicalHistory;
List<dynamic>? admissionRequestDiagnoses;
List<dynamic>? admissionRequestProcedures;
int? appointmentNo;
int? episodeID;
int? admissionRequestNo;
AdmissionRequest(
{this.patientMRN,
this.admitToClinic,
this.isPregnant,
this.pregnancyWeeks = 0,
this.pregnancyType = 0,
this.noOfBabies = 0,
this.mrpDoctorID,
this.admissionDate,
this.expectedDays,
this.admissionType,
this.admissionLocationID = 0,
this.roomCategoryID = 0,
this.wardID,
this.isSickLeaveRequired,
this.sickLeaveComments = "",
this.isTransport = false,
this.transportComments = "",
this.isPhysioAppointmentNeeded = false,
this.physioAppointmentComments = "",
this.isOPDFollowupAppointmentNeeded = false,
this.opdFollowUpComments = "",
this.isDietType,
this.dietType,
this.dietRemarks,
this.diagnosis,
this.isPhysicalActivityModification = false,
this.physicalActivityModificationComments = "",
this.orStatus = 1,
this.mainLineOfTreatment,
this.estimatedCost,
this.elementsForImprovement,
this.isPackagePatient = false,
this.complications = "",
this.otherDepartmentinterventions = "",
this.otherProcedures = "",
this.pastMedicalHistory = "",
this.pastSurgicalHistory = "",
this.admissionRequestDiagnoses,
this.admissionRequestProcedures,
this.appointmentNo,
this.episodeID,
this.admissionRequestNo});
AdmissionRequest.fromJson(Map<String, dynamic> json) {
patientMRN = json['patientMRN'];
admitToClinic = json['admitToClinic'];
isPregnant = json['isPregnant'];
pregnancyWeeks = json['pregnancyWeeks'];
pregnancyType = json['pregnancyType'];
noOfBabies = json['noOfBabies'];
mrpDoctorID = json['mrpDoctorID'];
admissionDate = json['admissionDate'];
expectedadmissionDate = json['expectedAdmissionDate'];
expectedDays = json['expectedDays'];
intendedLengthOfStayId = json['intendedLengthOfStayId'];
admissionType = json['admissionType'];
admissionLocationID = json['admissionLocationID'];
roomCategoryID = json['roomCategoryID'];
wardID = json['wardID'];
isSickLeaveRequired = json['isSickLeaveRequired'];
sickLeaveComments = json['sickLeaveComments'];
isTransport = json['isTransport'];
transportComments = json['transportComments'];
isPhysioAppointmentNeeded = json['isPhysioAppointmentNeeded'];
physioAppointmentComments = json['physioAppointmentComments'];
isOPDFollowupAppointmentNeeded = json['isOPDFollowupAppointmentNeeded'];
opdFollowUpComments = json['opdFollowUpComments'];
isDietType = json['isDietType'];
dietType = json['dietType'];
dietRemarks = json['dietRemarks'];
diagnosis = json['diagnosis'];
isPhysicalActivityModification = json['isPhysicalActivityModification'];
physicalActivityModificationComments = json['physicalActivityModificationComments'];
orStatus = json['orStatus'];
mainLineOfTreatment = json['mainLineOfTreatment'];
estimatedCost = json['estimatedCost'];
elementsForImprovement = json['elementsForImprovement'];
isPackagePatient = json['isPackagePatient'];
complications = json['complications'];
otherDepartmentinterventions = json['otherDepartmentInterventions'];
otherProcedures = json['otherProcedures'];
pastMedicalHistory = json['pastMedicalHistory'];
pastSurgicalHistory = json['pastSurgicalHistory'];
if (json['admissionRequestDiagnoses'] != null) {
admissionRequestDiagnoses = [];
json['admissionRequestDiagnoses'].forEach((v) {
admissionRequestDiagnoses!.add(v);
// admissionRequestDiagnoses
// .add(new AdmissionRequestDiagnoses.fromJson(v));
});
}
if (json['admissionRequestProcedures'] != null) {
admissionRequestProcedures = [];
json['admissionRequestProcedures'].forEach((v) {
admissionRequestProcedures!.add(v);
// admissionRequestProcedures
// .add(new AdmissionRequestProcedures.fromJson(v));
});
}
appointmentNo = json['appointmentNo'];
episodeID = json['episodeID'];
admissionRequestNo = json['admissionRequestNo'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['patientMRN'] = this.patientMRN;
data['admitToClinic'] = this.admitToClinic;
data['isPregnant'] = this.isPregnant;
data['pregnancyWeeks'] = this.pregnancyWeeks;
data['pregnancyType'] = this.pregnancyType;
data['noOfBabies'] = this.noOfBabies;
data['mrpDoctorID'] = this.mrpDoctorID;
data['admissionDate'] = this.admissionDate;
data['expectedAdmissionDate'] = this.expectedadmissionDate;
data['expectedDays'] = this.expectedDays;
data['intendedLengthOfStayId'] = this.intendedLengthOfStayId;
data['admissionType'] = this.admissionType;
data['admissionLocationID'] = this.admissionLocationID;
data['roomCategoryID'] = this.roomCategoryID;
data['wardID'] = this.wardID;
data['isSickLeaveRequired'] = this.isSickLeaveRequired;
data['sickLeaveComments'] = this.sickLeaveComments;
data['isTransport'] = this.isTransport;
data['transportComments'] = this.transportComments;
data['isPhysioAppointmentNeeded'] = this.isPhysioAppointmentNeeded;
data['physioAppointmentComments'] = this.physioAppointmentComments;
data['isOPDFollowupAppointmentNeeded'] = this.isOPDFollowupAppointmentNeeded;
data['opdFollowUpComments'] = this.opdFollowUpComments;
data['isDietType'] = this.isDietType;
data['dietType'] = this.dietType;
data['dietRemarks'] = this.dietRemarks;
data['diagnosis'] = this.diagnosis;
data['isPhysicalActivityModification'] = this.isPhysicalActivityModification;
data['physicalActivityModificationComments'] = this.physicalActivityModificationComments;
data['orStatus'] = this.orStatus;
data['mainLineOfTreatment'] = this.mainLineOfTreatment;
data['estimatedCost'] = this.estimatedCost;
data['elementsForImprovement'] = this.elementsForImprovement;
data['isPackagePatient'] = this.isPackagePatient;
data['complications'] = this.complications;
data['otherDepartmentInterventions'] = this.otherDepartmentinterventions;
data['otherProcedures'] = this.otherProcedures;
data['pastMedicalHistory'] = this.pastMedicalHistory;
data['pastSurgicalHistory'] = this.pastSurgicalHistory;
if (this.admissionRequestDiagnoses != null) {
data['admissionRequestDiagnoses'] = this.admissionRequestDiagnoses;
// this.admissionRequestDiagnoses.map((v) => v.toJson()).toList();
}
if (this.admissionRequestProcedures != null) {
data['admissionRequestProcedures'] = this.admissionRequestProcedures!.map((v) => v.toJson()).toList();
}
data['appointmentNo'] = this.appointmentNo;
data['episodeID'] = this.episodeID;
data['admissionRequestNo'] = this.admissionRequestNo;
return data;
}
}