import 'package:doctor_app_flutter/utils/date-utils.dart';

class FinalRadiology {
  dynamic setupID;
  dynamic projectID;
  dynamic patientID;
  dynamic invoiceLineItemNo;
  dynamic invoiceNo;
  dynamic invoiceNo_VP;
  dynamic doctorID;
  dynamic clinicID;
  DateTime? orderDate;
  DateTime? reportDate;
  dynamic reportData;
  dynamic imageURL;
  dynamic procedureID;
  dynamic appodynamicmentNo;
  dynamic dIAPacsURL;
  bool? isRead;
  dynamic readOn;
  var admissionNo;
  bool? isInOutPatient;
  dynamic actualDoctorRate;
  dynamic clinicDescription;
  dynamic dIAPACSURL;
  dynamic doctorImageURL;
  dynamic doctorName;
  dynamic doctorRate;
  dynamic doctorTitle;
  dynamic gender;
  dynamic genderDescription;
  bool? isActiveDoctorProfile;
  bool? isExecludeDoctor;
  dynamic isInOutPatientDescription;
  dynamic isInOutPatientDescriptionN;
  dynamic nationalityFlagURL;
  dynamic noOfPatientsRate;
  dynamic orderNo;
  dynamic projectName;
  dynamic qR;
  dynamic reportDataHTML;
  dynamic reportDataTextdynamic;
  List<dynamic>? speciality;
  bool? isCVI;
  bool? isRadMedicalReport;
  bool? isLiveCareAppodynamicment;
  bool? isRecordFromVidaPlus;
  dynamic invoiceType;

  FinalRadiology(
      {this.setupID,
      this.projectID,
      this.patientID,
      this.invoiceLineItemNo,
      this.invoiceNo,
      this.invoiceNo_VP,
      this.doctorID,
      this.clinicID,
      this.orderDate,
      this.reportDate,
      this.reportData,
      this.imageURL,
      this.procedureID,
      this.appodynamicmentNo,
      this.dIAPacsURL,
      this.isRead,
      this.readOn,
      this.admissionNo,
      this.isInOutPatient,
      this.actualDoctorRate,
      this.clinicDescription,
      this.dIAPACSURL,
      this.doctorImageURL,
      this.doctorName,
      this.doctorRate,
      this.doctorTitle,
      this.gender,
      this.genderDescription,
      this.isActiveDoctorProfile,
      this.isExecludeDoctor,
      this.isInOutPatientDescription,
      this.isInOutPatientDescriptionN,
      this.nationalityFlagURL,
      this.noOfPatientsRate,
      this.orderNo,
      this.projectName,
      this.qR,
      this.reportDataHTML,
      this.reportDataTextdynamic,
      this.speciality,
      this.isCVI,
      this.isRadMedicalReport,
      this.isLiveCareAppodynamicment,
      this.isRecordFromVidaPlus,
      this.invoiceType});

  FinalRadiology.fromJson(Map<dynamic, dynamic> json) {
    try {
      setupID = json['SetupID'];
      projectID = json['ProjectID'];
      patientID = json['PatientID'];
      invoiceLineItemNo = json['InvoiceLineItemNo'];
      invoiceNo = json['InvoiceNo'];
      invoiceNo_VP = json['InvoiceNo_VP'];
      doctorID = json['DoctorID'];
      clinicID = json['ClinicID'];
      orderDate = AppDateUtils.convertStringToDate(json['OrderDate']);
      reportDate = AppDateUtils.convertStringToDate(json['ReadOn'] == null ? json['OrderDate'] : json['ReadOn']);
      reportData = json['ReportData'];
      imageURL = json['ImageURL'];
      procedureID = json['ProcedureID'];
      appodynamicmentNo = json['AppodynamicmentNo'];
      dIAPacsURL = json['DIAPacsURL'];
      isRead = json['IsRead'];
      readOn = json['ReadOn'];
      admissionNo = json['AdmissionNo'];
      isInOutPatient = json['IsInOutPatient'];
      actualDoctorRate = json['ActualDoctorRate'];
      clinicDescription = json['ClinicDescription'] ?? json['ClinicName'];
      dIAPACSURL = json['DIA_PACS_URL'];
      doctorImageURL = json['DoctorImageURL'];
      doctorName = json['DoctorName'];
      doctorRate = json['DoctorRate'];
      doctorTitle = json['DoctorTitle'];
      gender = json['Gender'];
      genderDescription = json['GenderDescription'];
      isActiveDoctorProfile = json['IsActiveDoctorProfile'];
      isExecludeDoctor = json['IsExecludeDoctor'];
      isInOutPatientDescription = json['IsInOutPatientDescription'];
      isInOutPatientDescriptionN = json['IsInOutPatientDescriptionN'];
      nationalityFlagURL = json['NationalityFlagURL'];
      noOfPatientsRate = json['NoOfPatientsRate'];
      orderNo = json['OrderNo'];
      projectName = json['ProjectName'];
      qR = json['QR'];
      isLiveCareAppodynamicment = json['IsLiveCareAppointment'];
      reportDataHTML = json['ReportDataHTML'];
      reportDataTextdynamic = json['ReportDataTextdynamic'];
      //  speciality = json['Speciality'].cast<dynamic>();
      isCVI = json['isCVI'];
      isRadMedicalReport = json['isRadMedicalReport'];
      isRecordFromVidaPlus = json['IsRecordFromVidaPlus'];
      invoiceType = json["InvoiceType"];
    }
    catch (e) {
      print(e);
    }
  }

  Map<dynamic, dynamic> toJson() {
    final Map<dynamic, dynamic> data = new Map<dynamic, dynamic>();
    data['SetupID'] = this.setupID;
    data['ProjectID'] = this.projectID;
    data['PatientID'] = this.patientID;
    data['InvoiceLineItemNo'] = this.invoiceLineItemNo;
    data['InvoiceNo'] = this.invoiceNo;
    data['InvoiceNo_VP'] = this.invoiceNo_VP;
    data['DoctorID'] = this.doctorID;
    data['ClinicID'] = this.clinicID;
    data['OrderDate'] = this.orderDate;
    data['ReportData'] = this.reportData;
    data['ImageURL'] = this.imageURL;
    data['ProcedureID'] = this.procedureID;
    data['AppodynamicmentNo'] = this.appodynamicmentNo;
    data['DIAPacsURL'] = this.dIAPacsURL;
    data['IsRead'] = this.isRead;
    data['ReadOn'] = this.readOn;
    data['AdmissionNo'] = this.admissionNo;
    data['IsInOutPatient'] = this.isInOutPatient;
    data['ActualDoctorRate'] = this.actualDoctorRate;
    data['ClinicDescription'] = this.clinicDescription;
    data['DIA_PACS_URL'] = this.dIAPACSURL;
    data['DoctorImageURL'] = this.doctorImageURL;
    data['DoctorName'] = this.doctorName;
    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['IsInOutPatientDescription'] = this.isInOutPatientDescription;
    data['IsInOutPatientDescriptionN'] = this.isInOutPatientDescriptionN;
    data['NationalityFlagURL'] = this.nationalityFlagURL;
    data['NoOfPatientsRate'] = this.noOfPatientsRate;
    data['OrderNo'] = this.orderNo;
    data['ProjectName'] = this.projectName;
    data['QR'] = this.qR;
    data['ReportDataHTML'] = this.reportDataHTML;
    data['ReportDataTextdynamic'] = this.reportDataTextdynamic;
    data['Speciality'] = this.speciality;
    data['isCVI'] = this.isCVI;
    data['isRadMedicalReport'] = this.isRadMedicalReport;
    data['IsRecordFromVidaPlus'] = this.isRecordFromVidaPlus;
    data["InvoiceType"] = invoiceType;
    return data;
  }
}

class FinalRadiologyList {
  dynamic filterName = "";
  List<FinalRadiology> finalRadiologyList = [];

  FinalRadiologyList({this.filterName, required FinalRadiology finalRadiology}) {
    finalRadiologyList.add(finalRadiology);
  }
}
