import 'package:doctor_app_flutter/util/helpers.dart';

class PrescriptionReportForInPatient {
  int admissionNo;
  int authorizedBy;
  Null bedNo;
  String comments;
  int createdBy;
  String createdByName;
  Null createdByNameN;
  String createdOn;
  String direction;
  int directionID;
  Null directionN;
  String dose;
  int editedBy;
  Null iVDiluentLine;
  int iVDiluentType;
  Null iVDiluentVolume;
  Null iVRate;
  Null iVStability;
  String itemDescription;
  int itemID;
  int lineItemNo;
  int locationId;
  int noOfDoses;
  int orderNo;
  int patientID;
  String pharmacyRemarks;
  DateTime prescriptionDatetime;
  int prescriptionNo;
  String processedBy;
  int projectID;
  int refillID;
  String refillType;
  Null refillTypeN;
  int reviewedPharmacist;
  Null roomId;
  String route;
  int routeId;
  Null routeN;
  Null setupID;
  DateTime startDatetime;
  int status;
  String statusDescription;
  Null statusDescriptionN;
  DateTime stopDatetime;
  int unitofMeasurement;
  String unitofMeasurementDescription;
  Null unitofMeasurementDescriptionN;

  PrescriptionReportForInPatient(
      {this.admissionNo,
        this.authorizedBy,
        this.bedNo,
        this.comments,
        this.createdBy,
        this.createdByName,
        this.createdByNameN,
        this.createdOn,
        this.direction,
        this.directionID,
        this.directionN,
        this.dose,
        this.editedBy,
        this.iVDiluentLine,
        this.iVDiluentType,
        this.iVDiluentVolume,
        this.iVRate,
        this.iVStability,
        this.itemDescription,
        this.itemID,
        this.lineItemNo,
        this.locationId,
        this.noOfDoses,
        this.orderNo,
        this.patientID,
        this.pharmacyRemarks,
        this.prescriptionDatetime,
        this.prescriptionNo,
        this.processedBy,
        this.projectID,
        this.refillID,
        this.refillType,
        this.refillTypeN,
        this.reviewedPharmacist,
        this.roomId,
        this.route,
        this.routeId,
        this.routeN,
        this.setupID,
        this.startDatetime,
        this.status,
        this.statusDescription,
        this.statusDescriptionN,
        this.stopDatetime,
        this.unitofMeasurement,
        this.unitofMeasurementDescription,
        this.unitofMeasurementDescriptionN});

  PrescriptionReportForInPatient.fromJson(Map<String, dynamic> json) {
    admissionNo = json['AdmissionNo'];
    authorizedBy = json['AuthorizedBy'];
    bedNo = json['BedNo'];
    comments = json['Comments'];
    createdBy = json['CreatedBy'];
    createdByName = json['CreatedByName'];
    createdByNameN = json['CreatedByNameN'];
    createdOn = json['CreatedOn'];
    direction = json['Direction'];
    directionID = json['DirectionID'];
    directionN = json['DirectionN'];
    dose = json['Dose'];
    editedBy = json['EditedBy'];
    iVDiluentLine = json['IVDiluentLine'];
    iVDiluentType = json['IVDiluentType'];
    iVDiluentVolume = json['IVDiluentVolume'];
    iVRate = json['IVRate'];
    iVStability = json['IVStability'];
    itemDescription = json['ItemDescription'];
    itemID = json['ItemID'];
    lineItemNo = json['LineItemNo'];
    locationId = json['LocationId'];
    noOfDoses = json['NoOfDoses'];
    orderNo = json['OrderNo'];
    patientID = json['PatientID'];
    pharmacyRemarks = json['PharmacyRemarks'];
    prescriptionDatetime = Helpers.convertStringToDate(json['PrescriptionDatetime']);
    prescriptionNo = json['PrescriptionNo'];
    processedBy = json['ProcessedBy'];
    projectID = json['ProjectID'];
    refillID = json['RefillID'];
    refillType = json['RefillType'];
    refillTypeN = json['RefillTypeN'];
    reviewedPharmacist = json['ReviewedPharmacist'];
    roomId = json['RoomId'];
    route = json['Route'];
    routeId = json['RouteId'];
    routeN = json['RouteN'];
    setupID = json['SetupID'];
    startDatetime = Helpers.convertStringToDate(json['StartDatetime']) ;
    status = json['Status'];
    statusDescription = json['StatusDescription'];
    statusDescriptionN = json['StatusDescriptionN'];
    stopDatetime = Helpers.convertStringToDate(json['StopDatetime']);
    unitofMeasurement = json['UnitofMeasurement'];
    unitofMeasurementDescription = json['UnitofMeasurementDescription'];
    unitofMeasurementDescriptionN = json['UnitofMeasurementDescriptionN'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['AdmissionNo'] = this.admissionNo;
    data['AuthorizedBy'] = this.authorizedBy;
    data['BedNo'] = this.bedNo;
    data['Comments'] = this.comments;
    data['CreatedBy'] = this.createdBy;
    data['CreatedByName'] = this.createdByName;
    data['CreatedByNameN'] = this.createdByNameN;
    data['CreatedOn'] = this.createdOn;
    data['Direction'] = this.direction;
    data['DirectionID'] = this.directionID;
    data['DirectionN'] = this.directionN;
    data['Dose'] = this.dose;
    data['EditedBy'] = this.editedBy;
    data['IVDiluentLine'] = this.iVDiluentLine;
    data['IVDiluentType'] = this.iVDiluentType;
    data['IVDiluentVolume'] = this.iVDiluentVolume;
    data['IVRate'] = this.iVRate;
    data['IVStability'] = this.iVStability;
    data['ItemDescription'] = this.itemDescription;
    data['ItemID'] = this.itemID;
    data['LineItemNo'] = this.lineItemNo;
    data['LocationId'] = this.locationId;
    data['NoOfDoses'] = this.noOfDoses;
    data['OrderNo'] = this.orderNo;
    data['PatientID'] = this.patientID;
    data['PharmacyRemarks'] = this.pharmacyRemarks;
    data['PrescriptionDatetime'] = this.prescriptionDatetime;
    data['PrescriptionNo'] = this.prescriptionNo;
    data['ProcessedBy'] = this.processedBy;
    data['ProjectID'] = this.projectID;
    data['RefillID'] = this.refillID;
    data['RefillType'] = this.refillType;
    data['RefillTypeN'] = this.refillTypeN;
    data['ReviewedPharmacist'] = this.reviewedPharmacist;
    data['RoomId'] = this.roomId;
    data['Route'] = this.route;
    data['RouteId'] = this.routeId;
    data['RouteN'] = this.routeN;
    data['SetupID'] = this.setupID;
    data['StartDatetime'] = this.startDatetime;
    data['Status'] = this.status;
    data['StatusDescription'] = this.statusDescription;
    data['StatusDescriptionN'] = this.statusDescriptionN;
    data['StopDatetime'] = this.stopDatetime;
    data['UnitofMeasurement'] = this.unitofMeasurement;
    data['UnitofMeasurementDescription'] = this.unitofMeasurementDescription;
    data['UnitofMeasurementDescriptionN'] = this.unitofMeasurementDescriptionN;
    return data;
  }
}
