class AdmissionRequest {
  late int? patientMRN;
  late int? admitToClinic;
  late bool? isPregnant;
  late int pregnancyWeeks;
  late int pregnancyType;
  late int noOfBabies;
  late int? mrpDoctorID;
  late String? admissionDate;
  late int? expectedDays;
  late int? admissionType;
  late int admissionLocationID;
  late int roomCategoryID;
  late int? wardID;
  late bool? isSickLeaveRequired;
  late String sickLeaveComments;
  late bool isTransport;
  late String transportComments;
  late bool isPhysioAppointmentNeeded;
  late String physioAppointmentComments;
  late bool isOPDFollowupAppointmentNeeded;
  late String opdFollowUpComments;
  late bool? isDietType;
  late int? dietType;
  late String? dietRemarks;
  late bool isPhysicalActivityModification;
  late String physicalActivityModificationComments;
  late int orStatus;
  late String? mainLineOfTreatment;
  late int? estimatedCost;
  late String? elementsForImprovement;
  late bool isPackagePatient;
  late String complications;
  late String otherDepartmentInterventions;
  late String otherProcedures;
  late String pastMedicalHistory;
  late String pastSurgicalHistory;
  late List<dynamic>? admissionRequestDiagnoses;
  late List<dynamic>? admissionRequestProcedures;
  late int? appointmentNo;
  late int? episodeID;
  late 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.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'];
    expectedDays = json['expectedDays'];
    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'];
    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['expectedDays'] = this.expectedDays;
    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['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;
  }
}
