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

class PatientLabOrders {
  int actualDoctorRate;
  String clinicDescription;
  String clinicDescriptionEnglish;
  Null clinicDescriptionN;
  int clinicID;
  int doctorID;
  String doctorImageURL;
  String doctorName;
  String doctorNameEnglish;
  Null doctorNameN;
  int doctorRate;
  String doctorTitle;
  int gender;
  String genderDescription;
  String invoiceNo;
  bool isActiveDoctorProfile;
  bool isDoctorAllowVedioCall;
  bool isExecludeDoctor;
  bool isInOutPatient;
  String isInOutPatientDescription;
  String isInOutPatientDescriptionN;
  bool isRead;
  String nationalityFlagURL;
  int noOfPatientsRate;
  DateTime orderDate;
  String orderNo;
  String patientID;
  String projectID;
  String projectName;
  Null projectNameN;
  String qR;
  String setupID;
  List<String> speciality;
  bool isLiveCareAppointment;
  PatientLabOrders(
      {this.actualDoctorRate,
      this.clinicDescription,
      this.clinicDescriptionEnglish,
      this.clinicDescriptionN,
      this.clinicID,
      this.doctorID,
      this.doctorImageURL,
      this.doctorName,
      this.doctorNameEnglish,
      this.doctorNameN,
      this.doctorRate,
      this.doctorTitle,
      this.gender,
      this.genderDescription,
      this.invoiceNo,
      this.isActiveDoctorProfile,
      this.isDoctorAllowVedioCall,
      this.isExecludeDoctor,
      this.isInOutPatient,
      this.isInOutPatientDescription,
      this.isInOutPatientDescriptionN,
      this.isRead,
      this.nationalityFlagURL,
      this.noOfPatientsRate,
      this.orderDate,
      this.orderNo,
      this.patientID,
      this.projectID,
      this.projectName,
      this.projectNameN,
      this.qR,
      this.setupID,
      this.speciality,this.isLiveCareAppointment});

  PatientLabOrders.fromJson(Map<String, dynamic> json) {
    actualDoctorRate = json['ActualDoctorRate'];
    clinicDescription = json['ClinicDescription']?? json['ClinicName'];
    clinicDescriptionEnglish = json['ClinicDescriptionEnglish'];
    clinicDescriptionN = json['ClinicDescriptionN'];
    clinicID = json['ClinicID'];
    doctorID = json['DoctorID'];
    doctorImageURL = json['DoctorImageURL'];
    doctorName = json['DoctorName'];
    doctorNameEnglish = json['DoctorNameEnglish'];
    doctorNameN = json['DoctorNameN'];
    doctorRate = json['DoctorRate'];
    doctorTitle = json['DoctorTitle'];
    gender = json['Gender'];
    genderDescription = json['GenderDescription'];
    invoiceNo = json['InvoiceNo'].toString();
    isActiveDoctorProfile = json['IsActiveDoctorProfile'];
    isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall'];
    isExecludeDoctor = json['IsExecludeDoctor'];
    isInOutPatient = json['IsInOutPatient'];
    isInOutPatientDescription = json['IsInOutPatientDescription'];
    isInOutPatientDescriptionN = json['IsInOutPatientDescriptionN'];
    isRead = json['IsRead'];
    nationalityFlagURL = json['NationalityFlagURL'];
    noOfPatientsRate = json['NoOfPatientsRate'];
    orderDate = DateUtils.convertStringToDate(json['OrderDate']);
    orderNo = json['OrderNo'].toString();
    patientID = json['PatientID'].toString();
    projectID = json['ProjectID'].toString();
    projectName = json['ProjectName'];
    projectNameN = json['ProjectNameN'];
    qR = json['QR'];
    setupID = json['SetupID'];
    isLiveCareAppointment = json['IsLiveCareAppointment'];
   // speciality = json['Speciality'].cast<String>();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['ActualDoctorRate'] = this.actualDoctorRate;
    data['ClinicDescription'] = this.clinicDescription;
    data['ClinicDescriptionEnglish'] = this.clinicDescriptionEnglish;
    data['ClinicDescriptionN'] = this.clinicDescriptionN;
    data['ClinicID'] = this.clinicID;
    data['DoctorID'] = this.doctorID;
    data['DoctorImageURL'] = this.doctorImageURL;
    data['DoctorName'] = this.doctorName;
    data['DoctorNameEnglish'] = this.doctorNameEnglish;
    data['DoctorNameN'] = this.doctorNameN;
    data['DoctorRate'] = this.doctorRate;
    data['DoctorTitle'] = this.doctorTitle;
    data['Gender'] = this.gender;
    data['GenderDescription'] = this.genderDescription;
    data['InvoiceNo'] = this.invoiceNo;
    data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile;
    data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall;
    data['IsExecludeDoctor'] = this.isExecludeDoctor;
    data['IsInOutPatient'] = this.isInOutPatient;
    data['IsInOutPatientDescription'] = this.isInOutPatientDescription;
    data['IsInOutPatientDescriptionN'] = this.isInOutPatientDescriptionN;
    data['IsRead'] = this.isRead;
    data['NationalityFlagURL'] = this.nationalityFlagURL;
    data['NoOfPatientsRate'] = this.noOfPatientsRate;
    data['OrderDate'] = this.orderDate;
    data['OrderNo'] = this.orderNo;
    data['PatientID'] = this.patientID;
    data['ProjectID'] = this.projectID;
    data['ProjectName'] = this.projectName;
    data['ProjectNameN'] = this.projectNameN;
    data['QR'] = this.qR;
    data['SetupID'] = this.setupID;
    data['Speciality'] = this.speciality;
    data['IsLiveCareAppointment'] = this.isLiveCareAppointment;
    return data;
  }
}

class PatientLabOrdersList {
  String filterName = "";
  List<PatientLabOrders> patientLabOrdersList = List();

  PatientLabOrdersList(
      {this.filterName, PatientLabOrders patientDoctorAppointment}) {
    patientLabOrdersList.add(patientDoctorAppointment);
  }
}
