import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart';

class RequestSendPrescriptionEmail {
  String appointmentDate;
  double versionID;
  int channel;
  int languageID;
  String iPAdress;
  String generalid;
  int patientOutSA;
  String sessionID;
  bool isDentalAllowedBackend;
  int deviceTypeID;
  int patientID;
  String tokenID;
  int patientTypeID;
  int patientType;
  String to;
  String dateofBirth;
  String patientIditificationNum;
  String patientMobileNumber;
  String patientName;
  String setupID;
  String clinicName;
  String doctorName;
  int doctorID;
  int projectID;
  List<PrescriptionReport> listPrescriptions;

  RequestSendPrescriptionEmail(
      {this.appointmentDate,
      this.versionID,
      this.channel,
      this.languageID,
      this.iPAdress,
      this.generalid,
      this.patientOutSA,
      this.sessionID,
      this.isDentalAllowedBackend,
      this.deviceTypeID,
      this.patientID,
      this.tokenID,
      this.patientTypeID,
      this.patientType,
      this.to,
      this.dateofBirth,
      this.patientIditificationNum,
      this.patientMobileNumber,
      this.patientName,
      this.setupID,
      this.clinicName,
      this.doctorName,
      this.projectID,
      this.doctorID});

  RequestSendPrescriptionEmail.fromJson(Map<String, dynamic> json) {
    appointmentDate = json['AppointmentDate'];
    versionID = json['VersionID'];
    channel = json['Channel'];
    languageID = json['LanguageID'];
    iPAdress = json['IPAdress'];
    generalid = json['generalid'];
    patientOutSA = json['PatientOutSA'];
    sessionID = json['SessionID'];
    isDentalAllowedBackend = json['isDentalAllowedBackend'];
    deviceTypeID = json['DeviceTypeID'];
    patientID = json['PatientID'];
    tokenID = json['TokenID'];
    patientTypeID = json['PatientTypeID'];
    patientType = json['PatientType'];
    to = json['To'];
    dateofBirth = json['DateofBirth'];
    patientIditificationNum = json['PatientIditificationNum'];
    patientMobileNumber = json['PatientMobileNumber'];
    patientName = json['PatientName'];
    setupID = json['SetupID'];
    clinicName = json['ClinicName'];
    doctorName = json['DoctorName'];
    projectID = json['ProjectID'];
    doctorID = json['DoctorID'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['AppointmentDate'] = this.appointmentDate;
    data['VersionID'] = this.versionID;
    data['Channel'] = this.channel;
    data['LanguageID'] = this.languageID;
    data['IPAdress'] = this.iPAdress;
    data['generalid'] = this.generalid;
    data['PatientOutSA'] = this.patientOutSA;
    data['SessionID'] = this.sessionID;
    data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
    data['DeviceTypeID'] = this.deviceTypeID;
    data['PatientID'] = this.patientID;
    data['TokenID'] = this.tokenID;
    data['PatientTypeID'] = this.patientTypeID;
    data['PatientType'] = this.patientType;
    data['To'] = this.to;
    data['DateofBirth'] = this.dateofBirth;
    data['PatientIditificationNum'] = this.patientIditificationNum;
    data['PatientMobileNumber'] = this.patientMobileNumber;
    data['PatientName'] = this.patientName;
    data['SetupID'] = this.setupID;
    if (this.listPrescriptions != null) {
      data['ListPrescriptions'] =
          this.listPrescriptions.map((v) => v.toJson()).toList();
    }
    data['ClinicName'] = this.clinicName;
    data['DoctorName'] = this.doctorName;
    data['ProjectID'] = this.projectID;
    data['DoctorID'] = this.doctorID;
    return data;
  }
}
