class GetSearchCurrentMedication {
  String? formularyName;
  String? genericFormularyCode;
  String? genericFormularyId;
  int? hospitalGroupId;
  int? hospitalId;
  String? itemType;
  bool? outOfStock;

  GetSearchCurrentMedication(
      {this.formularyName,
        this.genericFormularyCode,
        this.genericFormularyId,
        this.hospitalGroupId,
        this.hospitalId,
        this.itemType,
        this.outOfStock});

  GetSearchCurrentMedication.fromJson(Map<String, dynamic> json) {
    formularyName = json['formularyName'];
    genericFormularyCode = json['genericFormularyCode'];
    genericFormularyId = json['genericFormularyId'];
    hospitalGroupId = json['hospitalGroupId'];
    hospitalId = json['hospitalId'];
    itemType = json['itemType'];
    outOfStock = json['outOfStock'];
  }

  GetSearchCurrentMedication.fromJsonForSearchDrug(Map<String, dynamic> json) {
    formularyName = json['GenericName'];
    genericFormularyCode = json['genericFormularyCode'];
    genericFormularyId = json['ItemId'].toString();
    hospitalGroupId = json['hospitalGroupId'];
    hospitalId = json['hospitalId'];
    itemType = json['itemType'];
    outOfStock = json['outOfStock'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['formularyName'] = this.formularyName;
    data['genericFormularyCode'] = this.genericFormularyCode;
    data['genericFormularyId'] = this.genericFormularyId;
    data['hospitalGroupId'] = this.hospitalGroupId;
    data['hospitalId'] = this.hospitalId;
    data['itemType'] = this.itemType;
    data['outOfStock'] = this.outOfStock;
    return data;
  }
}
