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

class DiabtecPatientResult {
  String? chartMonth;
  var chartYear;
  DateTime? dateChart;
  var description;
  var descriptionN;
  int? diabtecAvarage;
  bool? isActive;
  int? lineItemNo;
  var listMonth;
  var listWeek;
  int? measured;
  String? measuredDesc;
  var monthAverageResult;
  int? patientID;
  var remark;
  var resultDesc;
  dynamic resultValue;
  String? unit;
  var weekAverageResult;
  String? weekDesc;
  var yearAverageResult;

  DiabtecPatientResult(
      {this.chartMonth,
      this.chartYear,
      this.dateChart,
      this.description,
      this.descriptionN,
      this.diabtecAvarage,
      this.isActive,
      this.lineItemNo,
      this.listMonth,
      this.listWeek,
      this.measured,
      this.measuredDesc,
      this.monthAverageResult,
      this.patientID,
      this.remark,
      this.resultDesc,
      this.resultValue,
      this.unit,
      this.weekAverageResult,
      this.weekDesc,
      this.yearAverageResult});

  DiabtecPatientResult.fromJson(Map<String, dynamic> json) {
    chartMonth = json['ChartMonth'];
    chartYear = json['ChartYear'];
    dateChart = DateUtil.convertStringToDate(json['DateChart']);
    description = json['Description'];
    descriptionN = json['DescriptionN'];
    diabtecAvarage = json['DiabtecAvarage'];
    isActive = json['IsActive'];
    lineItemNo = json['LineItemNo'];
    listMonth = json['List_Month'];
    listWeek = json['List_Week'];
    measured = json['Measured'];
    measuredDesc = json['MeasuredDesc'];
    monthAverageResult = json['MonthAverageResult'];
    patientID = json['PatientID'];
    remark = json['Remark'];
    resultDesc = json['ResultDesc'];
    resultValue = json['ResultValue'];
    unit = json['Unit'];
    weekAverageResult = json['WeekAverageResult'];
    weekDesc = json['WeekDesc'];
    yearAverageResult = json['YearAverageResult'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['ChartMonth'] = this.chartMonth;
    data['ChartYear'] = this.chartYear;
    data['DateChart'] = DateUtil.convertDateToString(this.dateChart!);
    data['Description'] = this.description;
    data['DescriptionN'] = this.descriptionN;
    data['DiabtecAvarage'] = this.diabtecAvarage;
    data['IsActive'] = this.isActive;
    data['LineItemNo'] = this.lineItemNo;
    data['List_Month'] = this.listMonth;
    data['List_Week'] = this.listWeek;
    data['Measured'] = this.measured;
    data['MeasuredDesc'] = this.measuredDesc;
    data['MonthAverageResult'] = this.monthAverageResult;
    data['PatientID'] = this.patientID;
    data['Remark'] = this.remark;
    data['ResultDesc'] = this.resultDesc;
    data['ResultValue'] = this.resultValue;
    data['Unit'] = this.unit;
    data['WeekAverageResult'] = this.weekAverageResult;
    data['WeekDesc'] = this.weekDesc;
    data['YearAverageResult'] = this.yearAverageResult;
    return data;
  }
}
