class MedicalFileModel {
  List<EntityList>? entityList;
  dynamic statusMessage;

  MedicalFileModel({this.entityList, this.statusMessage});

  MedicalFileModel.fromJson(Map<String, dynamic> json) {
    if (json['entityList'] != null) {
      entityList = <EntityList>[];
      json['entityList'].forEach((v) {
        entityList!.add(new EntityList.fromJson(v));
      });
    }
    statusMessage = json['statusMessage'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.entityList != null) {
      data['entityList'] = this.entityList!.map((v) => v.toJson()).toList();
    }
    data['statusMessage'] = this.statusMessage;
    return data;
  }
}

class EntityList {
  List<Timelines>? timelines;

  EntityList({this.timelines});

  EntityList.fromJson(Map<String, dynamic> json) {
    if (json['Timelines'] != null) {
      timelines = <Timelines>[];
      json['Timelines'].forEach((v) {
        timelines!.add(new Timelines.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.timelines != null) {
      data['Timelines'] = this.timelines!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class Timelines {
  int? clinicId;
  String? clinicName;
  String? date;
  int? doctorId;
  String? doctorImage;
  String? doctorName;
  int? encounterNumber;
  String? encounterType;
  int? projectID;
  String? projectName;
  String? setupID;
  List<TimeLineEvents>? timeLineEvents;

  Timelines(
      {this.clinicId,
      this.clinicName,
      this.date,
      this.doctorId,
      this.doctorImage,
      this.doctorName,
      this.encounterNumber,
      this.encounterType,
      this.projectID,
      this.projectName,
      this.setupID,
      this.timeLineEvents});

  Timelines.fromJson(Map<String, dynamic> json) {
    clinicId = json['ClinicId'];
    clinicName = json['ClinicName'];
    date = json['Date'];
    doctorId = json['DoctorId'];
    doctorImage = json['DoctorImageURL'];
    doctorName = json['DoctorName'];
    encounterNumber = json['EncounterNumber'];
    encounterType = json['EncounterType'];
    projectID = json['ProjectID'];
    projectName = json['ProjectName'];
    setupID = json['SetupID'];
    if (json['TimeLineEvents'] != null) {
      timeLineEvents = <TimeLineEvents>[];
      json['TimeLineEvents'].forEach((v) {
        timeLineEvents!.add(new TimeLineEvents.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['ClinicId'] = this.clinicId;
    data['ClinicName'] = this.clinicName;
    data['Date'] = this.date;
    data['DoctorId'] = this.doctorId;
    data['DoctorImageURL'] = this.doctorImage;
    data['DoctorName'] = this.doctorName;
    data['EncounterNumber'] = this.encounterNumber;
    data['EncounterType'] = this.encounterType;
    data['ProjectID'] = this.projectID;
    data['ProjectName'] = this.projectName;
    data['SetupID'] = this.setupID;
    if (this.timeLineEvents != null) {
      data['TimeLineEvents'] = this.timeLineEvents!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class TimeLineEvents {
  List<dynamic>? admissions;
  String? colorClass;
  List<Consulations>? consulations;

  TimeLineEvents({this.admissions, this.colorClass, this.consulations});

  TimeLineEvents.fromJson(Map<String, dynamic> json) {
    colorClass = json['ColorClass'];
    if (json['Consulations'] != null) {
      consulations = <Consulations>[];
      json['Consulations'].forEach((v) {
        consulations!.add(new Consulations.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();

    data['ColorClass'] = this.colorClass;
    if (this.consulations != null) {
      data['Consulations'] = this.consulations!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class Consulations {
  int? admissionNo;
  String? appointmentDate;
  int? appointmentNo;
  String? appointmentType;
  String? clinicID;
  String? clinicName;
  int? doctorID;
  String? doctorName;
  String? endTime;
  String? episodeDate;
  int? episodeID;
  int? patientID;
  int? projectID;
  String? projectName;
  String? remarks;
  String? setupID;
  String? startTime;
  String? visitFor;
  String? visitType;
  String? dispalyName;
  List<LstAssessments>? lstAssessments;
  List<LstPhysicalExam>? lstPhysicalExam;
  List<LstProcedure>? lstProcedure;
  List<LstMedicalHistory>? lstMedicalHistory;
  List<LstCheifComplaint>? lstCheifComplaint;

  Consulations(
      {this.admissionNo,
      this.appointmentDate,
      this.appointmentNo,
      this.appointmentType,
      this.clinicID,
      this.clinicName,
      this.doctorID,
      this.doctorName,
      this.endTime,
      this.episodeDate,
      this.episodeID,
      this.patientID,
      this.projectID,
      this.projectName,
      this.remarks,
      this.setupID,
      this.startTime,
      this.visitFor,
      this.visitType,
      this.dispalyName,
      this.lstAssessments,
      this.lstPhysicalExam,
      this.lstProcedure,
      this.lstMedicalHistory,
      this.lstCheifComplaint});

  Consulations.fromJson(Map<String, dynamic> json) {
    admissionNo = json['AdmissionNo'];
    appointmentDate = json['AppointmentDate'];
    appointmentNo = json['AppointmentNo'];
    appointmentType = json['AppointmentType'];
    clinicID = json['ClinicID'];
    clinicName = json['ClinicName'];
    doctorID = json['DoctorID'];
    doctorName = json['DoctorName'];
    endTime = json['EndTime'];
    episodeDate = json['EpisodeDate'];
    episodeID = json['EpisodeID'];
    patientID = json['PatientID'];
    projectID = json['ProjectID'];
    projectName = json['ProjectName'];
    remarks = json['Remarks'];
    setupID = json['SetupID'];
    startTime = json['StartTime'];
    visitFor = json['VisitFor'];
    visitType = json['VisitType'];
    dispalyName = json['dispalyName'];
    if (json['lstAssessments'] != null) {
      lstAssessments = <LstAssessments>[];
      json['lstAssessments'].forEach((v) {
        lstAssessments!.add(new LstAssessments.fromJson(v));
      });
    }
    if (json['lstCheifComplaint'] != null) {
      lstCheifComplaint = <LstCheifComplaint>[];
      json['lstCheifComplaint'].forEach((v) {
        lstCheifComplaint!.add(new LstCheifComplaint.fromJson(v));
      });
    }
    if (json['lstPhysicalExam'] != null) {
      lstPhysicalExam = <LstPhysicalExam>[];
      json['lstPhysicalExam'].forEach((v) {
        lstPhysicalExam!.add(new LstPhysicalExam.fromJson(v));
      });
    }
    if (json['lstProcedure'] != null) {
      lstProcedure = <LstProcedure>[];
      json['lstProcedure'].forEach((v) {
        lstProcedure!.add(new LstProcedure.fromJson(v));
      });
    }
    if (json['lstMedicalHistory'] != null) {
      lstMedicalHistory = <LstMedicalHistory>[];
      json['lstMedicalHistory'].forEach((v) {
        lstMedicalHistory!.add(new LstMedicalHistory.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['AdmissionNo'] = this.admissionNo;
    data['AppointmentDate'] = this.appointmentDate;
    data['AppointmentNo'] = this.appointmentNo;
    data['AppointmentType'] = this.appointmentType;
    data['ClinicID'] = this.clinicID;
    data['ClinicName'] = this.clinicName;
    data['DoctorID'] = this.doctorID;
    data['DoctorName'] = this.doctorName;
    data['EndTime'] = this.endTime;
    data['EpisodeDate'] = this.episodeDate;
    data['EpisodeID'] = this.episodeID;
    data['PatientID'] = this.patientID;
    data['ProjectID'] = this.projectID;
    data['ProjectName'] = this.projectName;
    data['Remarks'] = this.remarks;
    data['SetupID'] = this.setupID;
    data['StartTime'] = this.startTime;
    data['VisitFor'] = this.visitFor;
    data['VisitType'] = this.visitType;
    data['dispalyName'] = this.dispalyName;
    if (this.lstAssessments != null) {
      data['lstAssessments'] = this.lstAssessments!.map((v) => v.toJson()).toList();
    }
    if (this.lstCheifComplaint != null) {
      data['lstCheifComplaint'] = this.lstCheifComplaint!.map((v) => v.toJson()).toList();
    }
    if (this.lstPhysicalExam != null) {
      data['lstPhysicalExam'] = this.lstPhysicalExam!.map((v) => v.toJson()).toList();
    }
    if (this.lstProcedure != null) {
      data['lstProcedure'] = this.lstProcedure!.map((v) => v.toJson()).toList();
    }
    if (this.lstMedicalHistory != null) {
      data['lstMedicalHistory'] = this.lstMedicalHistory!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class LstCheifComplaint {
  int? appointmentNo;
  String? cCDate;
  String? chiefComplaint;
  String? currentMedication;
  int? episodeID;
  String? hOPI;
  int? patientID;
  String? patientType;
  int? projectID;
  String? projectName;
  String? setupID;
  String? dispalyName;

  LstCheifComplaint(
      {this.appointmentNo,
      this.cCDate,
      this.chiefComplaint,
      this.currentMedication,
      this.episodeID,
      this.hOPI,
      this.patientID,
      this.patientType,
      this.projectID,
      this.projectName,
      this.setupID,
      this.dispalyName});

  LstCheifComplaint.fromJson(Map<String, dynamic> json) {
    appointmentNo = json['AppointmentNo'];
    cCDate = json['CCDate'];
    chiefComplaint = json['ChiefComplaint'];
    currentMedication = json['CurrentMedication'];
    episodeID = json['EpisodeID'];
    hOPI = json['HOPI'];
    patientID = json['PatientID'];
    patientType = json['PatientType'];
    projectID = json['ProjectID'];
    projectName = json['ProjectName'];
    setupID = json['SetupID'];
    dispalyName = json['dispalyName'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['AppointmentNo'] = this.appointmentNo;
    data['CCDate'] = this.cCDate;
    data['ChiefComplaint'] = this.chiefComplaint;
    data['CurrentMedication'] = this.currentMedication;
    data['EpisodeID'] = this.episodeID;
    data['HOPI'] = this.hOPI;
    data['PatientID'] = this.patientID;
    data['PatientType'] = this.patientType;
    data['ProjectID'] = this.projectID;
    data['ProjectName'] = this.projectName;
    data['SetupID'] = this.setupID;
    data['dispalyName'] = this.dispalyName;
    return data;
  }
}

class LstAssessments {
  int? appointmentNo;
  String? condition;
  String? description;
  int? episodeID;
  String? iCD10;
  int? patientID;
  String? patientType;
  int? projectID;
  String? projectName;
  String? remarks;
  String? setupID;
  String? type;
  String? dispalyName;

  LstAssessments(
      {this.appointmentNo,
      this.condition,
      this.description,
      this.episodeID,
      this.iCD10,
      this.patientID,
      this.patientType,
      this.projectID,
      this.projectName,
      this.remarks,
      this.setupID,
      this.type,
      this.dispalyName});

  LstAssessments.fromJson(Map<String, dynamic> json) {
    appointmentNo = json['AppointmentNo'];
    condition = json['Condition'];
    description = json['Description'];
    episodeID = json['EpisodeID'];
    iCD10 = json['ICD10'];
    patientID = json['PatientID'];
    patientType = json['PatientType'];
    projectID = json['ProjectID'];
    projectName = json['ProjectName'];
    remarks = json['Remarks'];
    setupID = json['SetupID'];
    type = json['Type'];
    dispalyName = json['dispalyName'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['AppointmentNo'] = this.appointmentNo;
    data['Condition'] = this.condition;
    data['Description'] = this.description;
    data['EpisodeID'] = this.episodeID;
    data['ICD10'] = this.iCD10;
    data['PatientID'] = this.patientID;
    data['PatientType'] = this.patientType;
    data['ProjectID'] = this.projectID;
    data['ProjectName'] = this.projectName;
    data['Remarks'] = this.remarks;
    data['SetupID'] = this.setupID;
    data['Type'] = this.type;
    data['dispalyName'] = this.dispalyName;
    return data;
  }
}

class LstPhysicalExam {
  String? abnormal;
  int? appointmentNo;
  int? episodeID;
  String? examDesc;
  String? examID;
  String? examType;
  int? patientID;
  String? patientType;
  int? projectID;
  String? projectName;
  String? remarks;
  String? setupID;
  String? dispalyName;

  LstPhysicalExam(
      {this.abnormal,
      this.appointmentNo,
      this.episodeID,
      this.examDesc,
      this.examID,
      this.examType,
      this.patientID,
      this.patientType,
      this.projectID,
      this.projectName,
      this.remarks,
      this.setupID,
      this.dispalyName});

  LstPhysicalExam.fromJson(Map<String, dynamic> json) {
    abnormal = json['Abnormal'];
    appointmentNo = json['AppointmentNo'];
    episodeID = json['EpisodeID'];
    examDesc = json['ExamDesc'];
    examID = json['ExamID'];
    examType = json['ExamType'];
    patientID = json['PatientID'];
    patientType = json['PatientType'];
    projectID = json['ProjectID'];
    projectName = json['ProjectName'];
    remarks = json['Remarks'];
    setupID = json['SetupID'];
    dispalyName = json['dispalyName'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['Abnormal'] = this.abnormal;
    data['AppointmentNo'] = this.appointmentNo;
    data['EpisodeID'] = this.episodeID;
    data['ExamDesc'] = this.examDesc;
    data['ExamID'] = this.examID;
    data['ExamType'] = this.examType;
    data['PatientID'] = this.patientID;
    data['PatientType'] = this.patientType;
    data['ProjectID'] = this.projectID;
    data['ProjectName'] = this.projectName;
    data['Remarks'] = this.remarks;
    data['SetupID'] = this.setupID;
    data['dispalyName'] = this.dispalyName;
    return data;
  }
}

class LstProcedure {
  int? appointmentNo;
  int? episodeID;
  String? orderDate;
  int? patientID;
  String? patientType;
  String? procName;
  String? procedureId;
  int? projectID;
  String? projectName;
  String? setupID;
  String? dispalyName;
  String? cptCode;

  LstProcedure(
      {this.appointmentNo, this.episodeID, this.orderDate, this.patientID, this.patientType, this.procName, this.procedureId, this.projectID, this.projectName, this.setupID, this.dispalyName, this.cptCode});

  LstProcedure.fromJson(Map<String, dynamic> json) {
    appointmentNo = json['AppointmentNo'];
    episodeID = json['EpisodeID'];
    orderDate = json['OrderDate'];
    patientID = json['PatientID'];
    patientType = json['PatientType'];
    procName = json['ProcName'];
    procedureId = json['ProcedureId'];
    projectID = json['ProjectID'];
    projectName = json['ProjectName'];
    setupID = json['SetupID'];
    dispalyName = json['dispalyName'];
    cptCode = json['CptCode'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['AppointmentNo'] = this.appointmentNo;
    data['EpisodeID'] = this.episodeID;
    data['OrderDate'] = this.orderDate;
    data['PatientID'] = this.patientID;
    data['PatientType'] = this.patientType;
    data['ProcName'] = this.procName;
    data['ProcedureId'] = this.procedureId;
    data['ProjectID'] = this.projectID;
    data['ProjectName'] = this.projectName;
    data['SetupID'] = this.setupID;
    data['dispalyName'] = this.dispalyName;
    data['CptCode'] = this.dispalyName;
    return data;
  }
}

class LstMedicalHistory {
  int? appointmentNo;
  String? checked;
  int? episodeID;
  String? history;
  int? patientID;
  String? patientType;
  int? projectID;
  String? projectName;
  String? remarks;
  String? setupID;
  String? dispalyName;

  LstMedicalHistory({this.appointmentNo, this.checked, this.episodeID, this.history, this.patientID, this.patientType, this.projectID, this.projectName, this.remarks, this.setupID, this.dispalyName});

  LstMedicalHistory.fromJson(Map<String, dynamic> json) {
    appointmentNo = json['AppointmentNo'];
    checked = json['Checked'];
    episodeID = json['EpisodeID'];
    history = json['History'];
    patientID = json['PatientID'];
    patientType = json['PatientType'];
    projectID = json['ProjectID'];
    projectName = json['ProjectName'];
    remarks = json['Remarks'];
    setupID = json['SetupID'];
    dispalyName = json['dispalyName'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['AppointmentNo'] = this.appointmentNo;
    data['Checked'] = this.checked;
    data['EpisodeID'] = this.episodeID;
    data['History'] = this.history;
    data['PatientID'] = this.patientID;
    data['PatientType'] = this.patientType;
    data['ProjectID'] = this.projectID;
    data['ProjectName'] = this.projectName;
    data['Remarks'] = this.remarks;
    data['SetupID'] = this.setupID;
    data['dispalyName'] = this.dispalyName;
    return data;
  }
}
