class PostPrescriptionReqModel {
  String? vidaAuthTokenID;
  int? clinicID;
  int? episodeID;
  int? appointmentNo;
  int? patientMRN;
  List<PrescriptionRequestModel>? prescriptionRequestModel;

  PostPrescriptionReqModel(
      {this.vidaAuthTokenID,
      this.clinicID,
      this.episodeID,
      this.appointmentNo,
      this.patientMRN,
      this.prescriptionRequestModel});

  PostPrescriptionReqModel.fromJson(Map<String, dynamic> json) {
    vidaAuthTokenID = json['VidaAuthTokenID'];
    clinicID = json['ClinicID'];
    episodeID = json['EpisodeID'];
    appointmentNo = json['AppointmentNo'];
    patientMRN = json['PatientMRN'];
    if (json['prescriptionRequestModel'] != null) {
      prescriptionRequestModel = <PrescriptionRequestModel>[];
      json['prescriptionRequestModel'].forEach((v) {
        prescriptionRequestModel!.add(new PrescriptionRequestModel.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['VidaAuthTokenID'] = this.vidaAuthTokenID;
    data['ClinicID'] = this.clinicID;
    data['EpisodeID'] = this.episodeID;
    data['AppointmentNo'] = this.appointmentNo;
    data['PatientMRN'] = this.patientMRN;
    if (this.prescriptionRequestModel != null) {
      data['prescriptionRequestModel'] =
          this.prescriptionRequestModel!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class PrescriptionRequestModel {
  int? itemId;
  String? doseStartDate;
  int? duration;
  double? dose;
  int? doseUnitId;
  int? route;
  int? frequency;
  int? doseTime;
  bool? covered;
  bool? approvalRequired;
  String? remarks;
  String? icdcode10Id;

  PrescriptionRequestModel({
    this.itemId,
    this.doseStartDate,
    this.duration,
    this.dose,
    this.doseUnitId,
    this.route,
    this.frequency,
    this.doseTime,
    this.covered,
    this.approvalRequired,
    this.remarks,
    this.icdcode10Id,
  });

  PrescriptionRequestModel.fromJson(Map<String, dynamic> json) {
    itemId = json['itemId'];
    doseStartDate = json['doseStartDate'];
    duration = json['duration'];
    dose = json['dose'];
    doseUnitId = json['doseUnitId'];
    route = json['route'];
    frequency = json['frequency'];
    doseTime = json['doseTime'];
    covered = json['covered'];
    approvalRequired = json['approvalRequired'];
    remarks = json['remarks'];
    icdcode10Id = json['icdcode10Id'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['itemId'] = this.itemId;
    data['doseStartDate'] = this.doseStartDate;
    data['duration'] = this.duration;
    data['dose'] = this.dose;
    data['doseUnitId'] = this.doseUnitId;
    data['route'] = this.route;
    data['frequency'] = this.frequency;
    data['doseTime'] = this.doseTime;
    data['covered'] = this.covered;
    data['approvalRequired'] = this.approvalRequired;
    data['remarks'] = this.remarks;
    data['icdcode10Id'] = this.icdcode10Id;
    return data;
  }
}
