class PostAssessmentRequestModel {
  int? patientMRN;
  int? appointmentNo;
  int? episodeId;
  String? createdByName;
  int? createdBy;
  List<IcdCodeDetails>? icdCodeDetails;

  PostAssessmentRequestModel({this.patientMRN, this.appointmentNo, this.episodeId, this.createdByName, this.createdBy, this.icdCodeDetails});

  PostAssessmentRequestModel.fromJson(Map<String, dynamic> json) {
    patientMRN = json['PatientMRN'];
    appointmentNo = json['AppointmentNo'];
    episodeId = json['EpisodeID'];
    createdByName = json['CreatedByName'];
    createdBy = json['CreatedBy'];
    if (json['icdCodeDetails'] != null) {
      icdCodeDetails = <IcdCodeDetails>[];
      json['icdCodeDetails'].forEach((v) {
        icdCodeDetails!.add(new IcdCodeDetails.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['PatientMRN'] = this.patientMRN;
    data['AppointmentNo'] = this.appointmentNo;
    data['EpisodeID'] = this.episodeId;
    data['CreatedByName'] = this.createdByName;
    data['CreatedBy'] = this.createdBy;
    if (this.icdCodeDetails != null) {
      data['icdCodeDetails'] = this.icdCodeDetails!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class IcdCodeDetails {
  String? icdcode10Id;
  int? conditionId;
  int? diagnosisTypeId;
  bool? complexDiagnosis;
  String? remarks;

  IcdCodeDetails({this.icdcode10Id, this.conditionId, this.diagnosisTypeId, this.complexDiagnosis, this.remarks});

  IcdCodeDetails.fromJson(Map<String, dynamic> json) {
    icdcode10Id = json['icdcode10Id'];
    conditionId = json['conditionId'];
    diagnosisTypeId = json['diagnosisTypeId'];
    complexDiagnosis = json['complexDiagnosis'];
    remarks = json['remarks'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['icdcode10Id'] = this.icdcode10Id;
    data['conditionId'] = this.conditionId;
    data['diagnosisTypeId'] = this.diagnosisTypeId;
    data['complexDiagnosis'] = this.complexDiagnosis;
    data['remarks'] = this.remarks;
    return data;
  }
}
