import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';

class MySelectedAssessment {
  MasterKeyModel selectedICD;
  MasterKeyModel selectedDiagnosisCondition;
  MasterKeyModel selectedDiagnosisType;
  String remark;
  int appointmentId;
  int createdBy;
  String createdOn;
  int doctorID;
  String doctorName;
  String icdCode10ID;

  MySelectedAssessment(
      {this.selectedICD,
      this.selectedDiagnosisCondition,
      this.selectedDiagnosisType,
      this.remark, this.appointmentId, this.createdBy,
        this.createdOn,
        this.doctorID,
        this.doctorName,
        this.icdCode10ID});

  MySelectedAssessment.fromJson(Map<String, dynamic> json) {
    selectedICD = json['selectedICD'] != null
        ? new MasterKeyModel.fromJson(json['selectedICD'])
        : null;
    selectedDiagnosisCondition = json['selectedDiagnosisCondition'] != null
        ? new MasterKeyModel.fromJson(json['selectedDiagnosisCondition'])
        : null;
    selectedDiagnosisType = json['selectedDiagnosisType'] != null
        ? new MasterKeyModel.fromJson(json['selectedDiagnosisType'])
        : null;
    remark = json['remark'];
    appointmentId = json['appointmentId'];
    createdBy = json['createdBy'];
    createdOn = json['createdOn'];
    doctorID = json['doctorID'];
    doctorName = json['doctorName'];
    icdCode10ID = json['icdCode10ID'];
  }

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

    if (this.selectedICD != null) {
      data['selectedICD'] = this.selectedICD.toJson();
    }
    if (this.selectedDiagnosisCondition != null) {
      data['selectedICD'] = this.selectedDiagnosisCondition.toJson();
    }
    if (this.selectedDiagnosisType != null) {
      data['selectedICD'] = this.selectedDiagnosisType.toJson();
    }
    data['remark'] = this.remark;
    data['appointmentId'] = this.appointmentId;
    data['createdBy'] = this.createdBy;
    data['createdOn'] = this.createdOn;
    data['doctorID'] = this.doctorID;
    data['doctorName'] = this.doctorName;
    data['icdCode10ID'] = this.icdCode10ID;
    return data;
  }
}
