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

class ActivePrescriptionReport {
  dynamic address;
  int? appointmentNo;
  dynamic clinic;
  dynamic companyName;
  int? days;
  dynamic doctorName;
  int? doseDailyQuantity;
  String? frequency;
  int? frequencyNumber;

  // List<int> image;
  // String imageExtension;
  // dynamic imageSRCUrl;
  String? imageString;

  // dynamic imageThumbUrl;
  dynamic isCovered;
  String? itemDescription;
  int? itemID;
  DateTime? orderDate;
  int? patientID;
  dynamic patientName;
  dynamic phoneOffice1;
  dynamic prescriptionQR;
  int? prescriptionTimes;
  dynamic productImage;
  String? productImageBase64;
  String? productImageString;
  int? projectID;
  dynamic projectName;
  dynamic remarks;
  String? route;
  String? sKU;
  int? scaleOffset;
  DateTime? startDate;

  ActivePrescriptionReport(
      {this.address,
      this.appointmentNo,
      this.clinic,
      this.companyName,
      this.days,
      this.doctorName,
      this.doseDailyQuantity,
      this.frequency,
      this.frequencyNumber,
      // this.image,
      // this.imageExtension,
      // this.imageSRCUrl,
      this.imageString,
      // this.imageThumbUrl,
      this.isCovered,
      this.itemDescription,
      this.itemID,
      this.orderDate,
      this.patientID,
      this.patientName,
      this.phoneOffice1,
      this.prescriptionQR,
      this.prescriptionTimes,
      this.productImage,
      this.productImageBase64,
      this.productImageString,
      this.projectID,
      this.projectName,
      this.remarks,
      this.route,
      this.sKU,
      this.scaleOffset,
      this.startDate});

  ActivePrescriptionReport.fromJson(Map<String, dynamic> json) {
    address = json['Address'];
    appointmentNo = json['AppointmentNo'];
    clinic = json['Clinic'];
    companyName = json['CompanyName'];
    days = json['Days'];
    doctorName = json['DoctorName'];
    doseDailyQuantity = json['DoseDailyQuantity'];
    frequency = json['Frequency'];
    frequencyNumber = json['FrequencyNumber'];
    // image = json['Image'].cast<int>();
    // imageExtension = json['ImageExtension'];
    // imageSRCUrl = json['ImageSRCUrl'];
    imageString = json['ImageString'];
    // imageThumbUrl = json['ImageThumbUrl'];
    isCovered = json['IsCovered'];
    itemDescription = json['ItemDescription'];
    itemID = json['ItemID'];
    orderDate = DateUtil.convertStringToDate(json['OrderDate']);
    patientID = json['PatientID'];
    patientName = json['PatientName'];
    phoneOffice1 = json['PhoneOffice1'];
    prescriptionQR = json['PrescriptionQR'];
    prescriptionTimes = json['PrescriptionTimes'];
    productImage = json['ProductImage'];
    productImageBase64 = json['ProductImageBase64'];
    productImageString = json['ProductImageString'];
    projectID = json['ProjectID'];
    projectName = json['ProjectName'];
    remarks = json['Remarks'];
    route = json['Route'];
    sKU = json['SKU'];
    scaleOffset = json['ScaleOffset'];
    startDate = DateUtil.convertStringToDate(json['StartDate']);
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['Address'] = this.address;
    data['AppointmentNo'] = this.appointmentNo;
    data['Clinic'] = this.clinic;
    data['CompanyName'] = this.companyName;
    data['Days'] = this.days;
    data['DoctorName'] = this.doctorName;
    data['DoseDailyQuantity'] = this.doseDailyQuantity;
    data['Frequency'] = this.frequency;
    data['FrequencyNumber'] = this.frequencyNumber;
    // data['Image'] = this.image;
    // data['ImageExtension'] = this.imageExtension;
    // data['ImageSRCUrl'] = this.imageSRCUrl;
    data['ImageString'] = this.imageString;
    // data['ImageThumbUrl'] = this.imageThumbUrl;
    data['IsCovered'] = this.isCovered;
    data['ItemDescription'] = this.itemDescription;
    data['ItemID'] = this.itemID;
    data['OrderDate'] = this.orderDate;
    data['PatientID'] = this.patientID;
    data['PatientName'] = this.patientName;
    data['PhoneOffice1'] = this.phoneOffice1;
    data['PrescriptionQR'] = this.prescriptionQR;
    data['PrescriptionTimes'] = this.prescriptionTimes;
    data['ProductImage'] = this.productImage;
    data['ProductImageBase64'] = this.productImageBase64;
    data['ProductImageString'] = this.productImageString;
    data['ProjectID'] = this.projectID;
    data['ProjectName'] = this.projectName;
    data['Remarks'] = this.remarks;
    data['Route'] = this.route;
    data['SKU'] = this.sKU;
    data['ScaleOffset'] = this.scaleOffset;
    data['StartDate'] = this.startDate;
    return data;
  }
}
