class InsuranceApprovalModel {
  String setupID;
  int projectID;
  int approvalNo;
  String approvalDate;
  int patientType;
  int patientID;
  int companyID;
  int subCategoryID;
  int doctorID;
  int clinicID;
  int approvalType;
  String inpatientApprovalSubType;
  String validFrom;
  String vaildDays;
  String validTo;
  bool isApprovalOnGross;
  bool isPackage;
  int requestedAmount;
  int actualApprovedAmount;
  int aviliableAmount;
  String companyApprovalNo;
  int progNoteOrderNo;
  String submitOn;
  String receiptOn;
  String remarks1;
  String remarks2;
  int status;
  String feedbackStatusBy;
  String feedbackStatus;
  String feedbackStatusOn;
  int authorizerID;
  String expiryDate;
  int appointmentNo;
  int admissionNo;
  int admissionRequestNo;
  int createdBy;
  String createdOn;
  int editedBy;
  String editedOn;
  String rowVer;
  bool isAddlDiscApplied;
  int inProgressReasonID;
  String extendedBy;
  String extendedOn;
  int subPolicyNo;
  int noOrderAuthorizerID;
  bool isVerbalApproval;
  String subStatus;
  bool isNotificationSend;
  String eApprovalStatus;
  String eApprovalRemarks;
  bool isEmailSentOnDelayApproval;
  int eAuthorizationID;
  InsuranceApprovalDetails apporvalDetails;
  String approvalStatusDescption;
  String clinicName;
  String clinicNameN;
  String companyName;
  String doctorImageURL;
  String doctorName;
  String doctorNameN;
  int doctorRate;
  String doctorTitle;
  int gender;
  String genderDescription;
  bool isActiveDoctorProfile;
  bool isExecludeDoctor;
  bool isInOutPatient;
  String isInOutPatientDescription;
  String isInOutPatientDescriptionN;
  bool isLiveCareAppointment;
  String projectName;
  String projectNameN;
  String qR;
  List<String> speciality;
  String strApprovalDate;
  String strExpiryDate;
  String strSubmitDate;
  int totaUnUsedCount;
  int unUsedCount;

  InsuranceApprovalModel(
      {this.setupID,
      this.projectID,
      this.approvalNo,
      this.approvalDate,
      this.patientType,
      this.patientID,
      this.companyID,
      this.subCategoryID,
      this.doctorID,
      this.clinicID,
      this.approvalType,
      this.inpatientApprovalSubType,
      this.validFrom,
      this.vaildDays,
      this.validTo,
      this.isApprovalOnGross,
      this.isPackage,
      this.requestedAmount,
      this.actualApprovedAmount,
      this.aviliableAmount,
      this.companyApprovalNo,
      this.progNoteOrderNo,
      this.submitOn,
      this.receiptOn,
      this.remarks1,
      this.remarks2,
      this.status,
      this.feedbackStatusBy,
      this.feedbackStatus,
      this.feedbackStatusOn,
      this.authorizerID,
      this.expiryDate,
      this.appointmentNo,
      this.admissionNo,
      this.admissionRequestNo,
      this.createdBy,
      this.createdOn,
      this.editedBy,
      this.editedOn,
      this.rowVer,
      this.isAddlDiscApplied,
      this.inProgressReasonID,
      this.extendedBy,
      this.extendedOn,
      this.subPolicyNo,
      this.noOrderAuthorizerID,
      this.isVerbalApproval,
      this.subStatus,
      this.isNotificationSend,
      this.eApprovalStatus,
      this.eApprovalRemarks,
      this.isEmailSentOnDelayApproval,
      this.eAuthorizationID,
      this.apporvalDetails,
      this.approvalStatusDescption,
      this.clinicName,
      this.clinicNameN,
      this.companyName,
      this.doctorImageURL,
      this.doctorName,
      this.doctorNameN,
      this.doctorRate,
      this.doctorTitle,
      this.gender,
      this.genderDescription,
      this.isActiveDoctorProfile,
      this.isExecludeDoctor,
      this.isInOutPatient,
      this.isInOutPatientDescription,
      this.isInOutPatientDescriptionN,
      this.isLiveCareAppointment,
      this.projectName,
      this.projectNameN,
      this.qR,
      this.speciality,
      this.strApprovalDate,
      this.strExpiryDate,
      this.strSubmitDate,
      this.totaUnUsedCount,
      this.unUsedCount});

  InsuranceApprovalModel.fromJson(Map<String, dynamic> json) {
    setupID = json['SetupID'];
    projectID = json['ProjectID'];
    approvalNo = json['ApprovalNo'];
    approvalDate = json['ApprovalDate'];
    patientType = json['PatientType'];
    patientID = json['PatientID'];
    companyID = json['CompanyID'];
    subCategoryID = json['SubCategoryID'];
    doctorID = json['DoctorID'];
    clinicID = json['ClinicID'];
    approvalType = json['ApprovalType'];
    inpatientApprovalSubType = json['InpatientApprovalSubType'];
    validFrom = json['ValidFrom'];
    vaildDays = json['VaildDays'];
    validTo = json['ValidTo'];
    isApprovalOnGross = json['IsApprovalOnGross'];
    isPackage = json['IsPackage'];
    requestedAmount = json['RequestedAmount'];
    actualApprovedAmount = json['ActualApprovedAmount'];
    aviliableAmount = json['AviliableAmount'];
    companyApprovalNo = json['CompanyApprovalNo'];
    progNoteOrderNo = json['ProgNoteOrderNo'];
    submitOn = json['SubmitOn'];
    receiptOn = json['ReceiptOn'];
    remarks1 = json['Remarks1'];
    remarks2 = json['Remarks2'];
    status = json['Status'];
    feedbackStatusBy = json['FeedbackStatusBy'];
    feedbackStatus = json['FeedbackStatus'];
    feedbackStatusOn = json['FeedbackStatusOn'];
    authorizerID = json['AuthorizerID'];
    expiryDate = json['ExpiryDate'];
    appointmentNo = json['AppointmentNo'];
    admissionNo = json['AdmissionNo'];
    admissionRequestNo = json['AdmissionRequestNo'];
    createdBy = json['CreatedBy'];
    createdOn = json['CreatedOn'];
    editedBy = json['EditedBy'];
    editedOn = json['EditedOn'];
    rowVer = json['RowVer'];
    isAddlDiscApplied = json['IsAddlDiscApplied'];
    inProgressReasonID = json['InProgressReasonID'];
    extendedBy = json['ExtendedBy'];
    extendedOn = json['ExtendedOn'];
    subPolicyNo = json['SubPolicyNo'];
    noOrderAuthorizerID = json['NoOrderAuthorizerID'];
    isVerbalApproval = json['isVerbalApproval'];
    subStatus = json['SubStatus'];
    isNotificationSend = json['IsNotificationSend'];
    eApprovalStatus = json['EApprovalStatus'];
    eApprovalRemarks = json['EApprovalRemarks'];
    isEmailSentOnDelayApproval = json['IsEmailSentOnDelayApproval'];
    eAuthorizationID = json['EAuthorizationID'];
    if (json['ApporvalDetails'] != null) {
      apporvalDetails = InsuranceApprovalDetails.fromJson(json['ApporvalDetails'][0]);
    }
    approvalStatusDescption = json['ApprovalStatusDescption'];
    clinicName = json['ClinicName'];
    clinicNameN = json['ClinicNameN'];
    companyName = json['CompanyName'];
    doctorImageURL = json['DoctorImageURL'];
    doctorName = json['DoctorName'];
    doctorNameN = json['DoctorNameN'];
    doctorRate = json['DoctorRate'];
    doctorTitle = json['DoctorTitle'];
    gender = json['Gender'];
    genderDescription = json['GenderDescription'];
    isActiveDoctorProfile = json['IsActiveDoctorProfile'];
    isExecludeDoctor = json['IsExecludeDoctor'];
    isInOutPatient = json['IsInOutPatient'];
    isInOutPatientDescription = json['IsInOutPatientDescription'];
    isInOutPatientDescriptionN = json['IsInOutPatientDescriptionN'];
    isLiveCareAppointment = json['IsLiveCareAppointment'];
    projectName = json['ProjectName'];
    projectNameN = json['ProjectNameN'];
    qR = json['QR'];
    speciality = json['Speciality'].cast<String>();
    strApprovalDate = json['StrApprovalDate'];
    strExpiryDate = json['StrExpiryDate'];
    strSubmitDate = json['StrSubmitDate'];
    totaUnUsedCount = json['TotaUnUsedCount'];
    unUsedCount = json['UnUsedCount'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['SetupID'] = this.setupID;
    data['ProjectID'] = this.projectID;
    data['ApprovalNo'] = this.approvalNo;
    data['ApprovalDate'] = this.approvalDate;
    data['PatientType'] = this.patientType;
    data['PatientID'] = this.patientID;
    data['CompanyID'] = this.companyID;
    data['SubCategoryID'] = this.subCategoryID;
    data['DoctorID'] = this.doctorID;
    data['ClinicID'] = this.clinicID;
    data['ApprovalType'] = this.approvalType;
    data['InpatientApprovalSubType'] = this.inpatientApprovalSubType;
    data['ValidFrom'] = this.validFrom;
    data['VaildDays'] = this.vaildDays;
    data['ValidTo'] = this.validTo;
    data['IsApprovalOnGross'] = this.isApprovalOnGross;
    data['IsPackage'] = this.isPackage;
    data['RequestedAmount'] = this.requestedAmount;
    data['ActualApprovedAmount'] = this.actualApprovedAmount;
    data['AviliableAmount'] = this.aviliableAmount;
    data['CompanyApprovalNo'] = this.companyApprovalNo;
    data['ProgNoteOrderNo'] = this.progNoteOrderNo;
    data['SubmitOn'] = this.submitOn;
    data['ReceiptOn'] = this.receiptOn;
    data['Remarks1'] = this.remarks1;
    data['Remarks2'] = this.remarks2;
    data['Status'] = this.status;
    data['FeedbackStatusBy'] = this.feedbackStatusBy;
    data['FeedbackStatus'] = this.feedbackStatus;
    data['FeedbackStatusOn'] = this.feedbackStatusOn;
    data['AuthorizerID'] = this.authorizerID;
    data['ExpiryDate'] = this.expiryDate;
    data['AppointmentNo'] = this.appointmentNo;
    data['AdmissionNo'] = this.admissionNo;
    data['AdmissionRequestNo'] = this.admissionRequestNo;
    data['CreatedBy'] = this.createdBy;
    data['CreatedOn'] = this.createdOn;
    data['EditedBy'] = this.editedBy;
    data['EditedOn'] = this.editedOn;
    data['RowVer'] = this.rowVer;
    data['IsAddlDiscApplied'] = this.isAddlDiscApplied;
    data['InProgressReasonID'] = this.inProgressReasonID;
    data['ExtendedBy'] = this.extendedBy;
    data['ExtendedOn'] = this.extendedOn;
    data['SubPolicyNo'] = this.subPolicyNo;
    data['NoOrderAuthorizerID'] = this.noOrderAuthorizerID;
    data['isVerbalApproval'] = this.isVerbalApproval;
    data['SubStatus'] = this.subStatus;
    data['IsNotificationSend'] = this.isNotificationSend;
    data['EApprovalStatus'] = this.eApprovalStatus;
    data['EApprovalRemarks'] = this.eApprovalRemarks;
    data['IsEmailSentOnDelayApproval'] = this.isEmailSentOnDelayApproval;
    data['EAuthorizationID'] = this.eAuthorizationID;
    if (this.apporvalDetails != null) {
      data['ApporvalDetails'] = this.apporvalDetails.toJson;
    }
    data['ApprovalStatusDescption'] = this.approvalStatusDescption;
    data['ClinicName'] = this.clinicName;
    data['ClinicNameN'] = this.clinicNameN;
    data['CompanyName'] = this.companyName;
    data['DoctorImageURL'] = this.doctorImageURL;
    data['DoctorName'] = this.doctorName;
    data['DoctorNameN'] = this.doctorNameN;
    data['DoctorRate'] = this.doctorRate;
    data['DoctorTitle'] = this.doctorTitle;
    data['Gender'] = this.gender;
    data['GenderDescription'] = this.genderDescription;
    data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile;
    data['IsExecludeDoctor'] = this.isExecludeDoctor;
    data['IsInOutPatient'] = this.isInOutPatient;
    data['IsInOutPatientDescription'] = this.isInOutPatientDescription;
    data['IsInOutPatientDescriptionN'] = this.isInOutPatientDescriptionN;
    data['IsLiveCareAppointment'] = this.isLiveCareAppointment;
    data['ProjectName'] = this.projectName;
    data['ProjectNameN'] = this.projectNameN;
    data['QR'] = this.qR;
    data['Speciality'] = this.speciality;
    data['StrApprovalDate'] = this.strApprovalDate;
    data['StrExpiryDate'] = this.strExpiryDate;
    data['StrSubmitDate'] = this.strSubmitDate;
    data['TotaUnUsedCount'] = this.totaUnUsedCount;
    data['UnUsedCount'] = this.unUsedCount;
    return data;
  }
}

class InsuranceApprovalDetails {
  int setupID;
  int projectID;
  int approvalNo;
  int lineItemNo;
  int orderType;
  int procedureID;
  int toothNo;
  int price;
  int approvedAmount;
  String unapprovedPatientShare;
  int waivedAmount;
  String discountType;
  int discountValue;
  String shareType;
  String patientShareTypeValue;
  String companyShareTypeValue;
  String patientShare;
  String companyShare;
  int deductableAmount;
  String disapprovedRemarks;
  int progNoteOrderNo;
  int progNoteLineItemNo;
  String invoiceTransactionType;
  int invoiceNo;
  String procedureName;
  String procedureNameN;
  String status;
  bool isInvoiced;
  String isInvoicedDesc;

  InsuranceApprovalDetails(
      {this.setupID,
      this.projectID,
      this.approvalNo,
      this.lineItemNo,
      this.orderType,
      this.procedureID,
      this.toothNo,
      this.price,
      this.approvedAmount,
      this.unapprovedPatientShare,
      this.waivedAmount,
      this.discountType,
      this.discountValue,
      this.shareType,
      this.patientShareTypeValue,
      this.companyShareTypeValue,
      this.patientShare,
      this.companyShare,
      this.deductableAmount,
      this.disapprovedRemarks,
      this.progNoteOrderNo,
      this.progNoteLineItemNo,
      this.invoiceTransactionType,
      this.invoiceNo,
      this.procedureName,
      this.procedureNameN,
      this.status,
      this.isInvoiced,
      this.isInvoicedDesc});

  InsuranceApprovalDetails.fromJson(Map<String, dynamic> json) {
    setupID = json['SetupID'];
    projectID = json['ProjectID'];
    approvalNo = json['ApprovalNo'];
    lineItemNo = json['LineItemNo'];
    orderType = json['OrderType'];
    procedureID = json['ProcedureID'];
    toothNo = json['ToothNo'];
    price = json['Price'];
    approvedAmount = json['ApprovedAmount'];
    unapprovedPatientShare = json['UnapprovedPatientShare'];
    waivedAmount = json['WaivedAmount'];
    discountType = json['DiscountType'];
    discountValue = json['DiscountValue'];
    shareType = json['ShareType'];
    patientShareTypeValue = json['PatientShareTypeValue'];
    companyShareTypeValue = json['CompanyShareTypeValue'];
    patientShare = json['PatientShare'];
    companyShare = json['CompanyShare'];
    deductableAmount = json['DeductableAmount'];
    disapprovedRemarks = json['DisapprovedRemarks'];
    progNoteOrderNo = json['ProgNoteOrderNo'];
    progNoteLineItemNo = json['ProgNoteLineItemNo'];
    invoiceTransactionType = json['InvoiceTransactionType'];
    invoiceNo = json['InvoiceNo'];
    procedureName = json['ProcedureName'];
    procedureNameN = json['ProcedureNameN'];
    status = json['Status'];
    isInvoiced = json['IsInvoiced'];
    isInvoicedDesc = json['IsInvoicedDesc'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['SetupID'] = this.setupID;
    data['ProjectID'] = this.projectID;
    data['ApprovalNo'] = this.approvalNo;
    data['LineItemNo'] = this.lineItemNo;
    data['OrderType'] = this.orderType;
    data['ProcedureID'] = this.procedureID;
    data['ToothNo'] = this.toothNo;
    data['Price'] = this.price;
    data['ApprovedAmount'] = this.approvedAmount;
    data['UnapprovedPatientShare'] = this.unapprovedPatientShare;
    data['WaivedAmount'] = this.waivedAmount;
    data['DiscountType'] = this.discountType;
    data['DiscountValue'] = this.discountValue;
    data['ShareType'] = this.shareType;
    data['PatientShareTypeValue'] = this.patientShareTypeValue;
    data['CompanyShareTypeValue'] = this.companyShareTypeValue;
    data['PatientShare'] = this.patientShare;
    data['CompanyShare'] = this.companyShare;
    data['DeductableAmount'] = this.deductableAmount;
    data['DisapprovedRemarks'] = this.disapprovedRemarks;
    data['ProgNoteOrderNo'] = this.progNoteOrderNo;
    data['ProgNoteLineItemNo'] = this.progNoteLineItemNo;
    data['InvoiceTransactionType'] = this.invoiceTransactionType;
    data['InvoiceNo'] = this.invoiceNo;
    data['ProcedureName'] = this.procedureName;
    data['ProcedureNameN'] = this.procedureNameN;
    data['Status'] = this.status;
    data['IsInvoiced'] = this.isInvoiced;
    data['IsInvoicedDesc'] = this.isInvoicedDesc;
    return data;
  }
}
