class InsuranceApprovalInPatientModel {
  String? setupID;
  int? projectID;
  int? approvalNo;
  int? status;
  String? approvalDate;
  int? patientType;
  int? patientID;
  int? companyID;
  bool? subCategoryID;
  int? doctorID;
  int? clinicID;
  int? approvalType;
  int? inpatientApprovalSubType;
  dynamic isApprovalOnGross;
  String? companyApprovalNo;
  dynamic progNoteOrderNo;
  String? submitOn;
  String? receiptOn;
  String? expiryDate;
  int? admissionNo;
  int? admissionRequestNo;
  String? approvalStatusDescption;
  dynamic approvalStatusDescptionN;
  dynamic remarks;
  List<ApporvalDetails>? apporvalDetails;
  String? clinicName;
  dynamic companyName;
  String? doctorName;
  String? projectName;
  int? totaUnUsedCount;
  int? unUsedCount;
  String? doctorImage;

  InsuranceApprovalInPatientModel(
      {this.setupID,
      this.projectID,
      this.approvalNo,
      this.status,
      this.approvalDate,
      this.patientType,
      this.patientID,
      this.companyID,
      this.subCategoryID,
      this.doctorID,
      this.clinicID,
      this.approvalType,
      this.inpatientApprovalSubType,
      this.isApprovalOnGross,
      this.companyApprovalNo,
      this.progNoteOrderNo,
      this.submitOn,
      this.receiptOn,
      this.expiryDate,
      this.admissionNo,
      this.admissionRequestNo,
      this.approvalStatusDescption,
      this.approvalStatusDescptionN,
      this.remarks,
      this.apporvalDetails,
      this.clinicName,
      this.companyName,
      this.doctorName,
      this.projectName,
      this.totaUnUsedCount,
      this.unUsedCount,
      this.doctorImage});

  InsuranceApprovalInPatientModel.fromJson(Map<String, dynamic> json) {
    setupID = json['SetupID'];
    doctorImage = json['DoctorImageURL'];
    projectID = json['ProjectID'];
    approvalNo = json['ApprovalNo'];
    status = json['Status'];
    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'];
    isApprovalOnGross = json['IsApprovalOnGross'];
    companyApprovalNo = json['CompanyApprovalNo'];
    progNoteOrderNo = json['ProgNoteOrderNo'];
    submitOn = json['SubmitOn'];
    receiptOn = json['ReceiptOn'];
    expiryDate = json['ExpiryDate'];
    admissionNo = json['AdmissionNo'];
    admissionRequestNo = json['AdmissionRequestNo'];
    approvalStatusDescption = json['ApprovalStatusDescption'];
    approvalStatusDescptionN = json['ApprovalStatusDescptionN'];
    remarks = json['Remarks'];
    if (json['ApporvalDetails'] != null) {
      apporvalDetails = <ApporvalDetails>[];
      json['ApporvalDetails'].forEach((v) {
        apporvalDetails!.add(new ApporvalDetails.fromJson(v));
      });
    }
    clinicName = json['ClinicName'];
    companyName = json['CompanyName'];
    doctorName = json['DoctorName'];
    projectName = json['ProjectName'];
    totaUnUsedCount = json['TotaUnUsedCount'];
    unUsedCount = json['UnUsedCount'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['SetupID'] = this.setupID;
    data['DoctorImageURL'] = this.doctorImage;
    data['ProjectID'] = this.projectID;
    data['ApprovalNo'] = this.approvalNo;
    data['Status'] = this.status;
    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['IsApprovalOnGross'] = this.isApprovalOnGross;
    data['CompanyApprovalNo'] = this.companyApprovalNo;
    data['ProgNoteOrderNo'] = this.progNoteOrderNo;
    data['SubmitOn'] = this.submitOn;
    data['ReceiptOn'] = this.receiptOn;
    data['ExpiryDate'] = this.expiryDate;
    data['AdmissionNo'] = this.admissionNo;
    data['AdmissionRequestNo'] = this.admissionRequestNo;
    data['ApprovalStatusDescption'] = this.approvalStatusDescption;
    data['ApprovalStatusDescptionN'] = this.approvalStatusDescptionN;
    data['Remarks'] = this.remarks;
    if (this.apporvalDetails != null) {
      data['ApporvalDetails'] = this.apporvalDetails!.map((v) => v.toJson()).toList();
    }
    data['ClinicName'] = this.clinicName;
    data['CompanyName'] = this.companyName;
    data['DoctorName'] = this.doctorName;
    data['ProjectName'] = this.projectName;
    data['TotaUnUsedCount'] = this.totaUnUsedCount;
    data['UnUsedCount'] = this.unUsedCount;
    return data;
  }
}

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

  ApporvalDetails(
      {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});

  ApporvalDetails.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;
  }
}
