import 'package:diplomaticquarterapp/uitl/date_uitl.dart';

class SickLeave {
  String setupID;
  int projectID;
  int patientID;
  int patientType;
  int clinicID;
  int doctorID;
  int requestNo;
  DateTime requestDate;
  int sickLeaveDays;
  int appointmentNo;
  int admissionNo;
  int actualDoctorRate;
  DateTime appointmentDate;
  String clinicName;
  String doctorImageURL;
  String doctorName;
  int doctorRate;
  String doctorTitle;
  int gender;
  String genderDescription;
  bool isActiveDoctorProfile;
  bool isDoctorAllowVedioCall;
  bool isExecludeDoctor;
  bool isInOutPatient;
  String isInOutPatientDescription;
  String isInOutPatientDescriptionN;
  int noOfPatientsRate;
  Null patientName;
  String projectName;
  String qR;
  List<String> speciality;
  bool isLiveCareAppointment;
  int status;

  SickLeave(
      {this.setupID,
        this.projectID,
        this.patientID,
        this.patientType,
        this.clinicID,
        this.doctorID,
        this.requestNo,
        this.requestDate,
        this.sickLeaveDays,
        this.appointmentNo,
        this.admissionNo,
        this.actualDoctorRate,
        this.appointmentDate,
        this.clinicName,
        this.doctorImageURL,
        this.doctorName,
        this.doctorRate,
        this.doctorTitle,
        this.gender,
        this.genderDescription,
        this.isActiveDoctorProfile,
        this.isDoctorAllowVedioCall,
        this.isExecludeDoctor,
        this.isInOutPatient,
        this.isInOutPatientDescription,
        this.isInOutPatientDescriptionN,
        this.noOfPatientsRate,
        this.patientName,
        this.projectName,
        this.qR,
        this.speciality,this.isLiveCareAppointment, this.status});

  SickLeave.fromJson(Map<String, dynamic> json) {
    setupID = json['SetupID'];
    projectID = json['ProjectID'];
    patientID = json['PatientID'];
    patientType = json['PatientType'];
    clinicID = json['ClinicID'];
    doctorID = json['DoctorID'];
    requestNo = json['RequestNo'];
    requestDate = DateUtil.convertStringToDate(json['RequestDate']);
    sickLeaveDays = json['SickLeaveDays'];
    appointmentNo = json['AppointmentNo'];
    admissionNo = json['AdmissionNo'];
    actualDoctorRate = json['ActualDoctorRate'];
    appointmentDate = DateUtil.convertStringToDate(json['AppointmentDate']);
    clinicName = json['ClinicName'];
    doctorImageURL = json['DoctorImageURL'];
    doctorName = json['DoctorName'];
    doctorRate = json['DoctorRate'];
    doctorTitle = json['DoctorTitle'];
    gender = json['Gender'];
    genderDescription = json['GenderDescription'];
    isActiveDoctorProfile = json['IsActiveDoctorProfile'];
    isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall'];
    isExecludeDoctor = json['IsExecludeDoctor'];
    isInOutPatient = json['IsInOutPatient'];
    isInOutPatientDescription = json['IsInOutPatientDescription'];
    isInOutPatientDescriptionN = json['IsInOutPatientDescriptionN'];
    noOfPatientsRate = json['NoOfPatientsRate'];
    patientName = json['PatientName'];
    projectName = json['ProjectName'];
    qR = json['QR'];
    status = json['Status'];
    isLiveCareAppointment = json['IsLiveCareAppointment'];
    if(json['Speciality']!=null)
    speciality = json['Speciality'].cast<String>();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['SetupID'] = this.setupID;
    data['ProjectID'] = this.projectID;
    data['PatientID'] = this.patientID;
    data['PatientType'] = this.patientType;
    data['ClinicID'] = this.clinicID;
    data['DoctorID'] = this.doctorID;
    data['RequestNo'] = this.requestNo;
    data['RequestDate'] =  DateUtil.convertDateToString(requestDate);
    data['SickLeaveDays'] = this.sickLeaveDays;
    data['AppointmentNo'] = this.appointmentNo;
    data['AdmissionNo'] = this.admissionNo;
    data['ActualDoctorRate'] = this.actualDoctorRate;
    data['AppointmentDate'] = this.appointmentDate;
    data['ClinicName'] = this.clinicName;
    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['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall;
    data['IsExecludeDoctor'] = this.isExecludeDoctor;
    data['IsInOutPatient'] = this.isInOutPatient;
    data['IsInOutPatientDescription'] = this.isInOutPatientDescription;
    data['IsInOutPatientDescriptionN'] = this.isInOutPatientDescriptionN;
    data['NoOfPatientsRate'] = this.noOfPatientsRate;
    data['PatientName'] = this.patientName;
    data['ProjectName'] = this.projectName;
    data['QR'] = this.qR;
    data['Status'] = this.status;
    data['Speciality'] = this.speciality;
    return data;
  }
}
