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

class PostPhysicalExamRequestModel {
  List<ListHisProgNotePhysicalVM> listHisProgNotePhysicalVM;

  PostPhysicalExamRequestModel({this.listHisProgNotePhysicalVM});

  PostPhysicalExamRequestModel.fromJson(Map<String, dynamic> json) {
    if (json['listHisProgNotePhysicalVM'] != null) {
      listHisProgNotePhysicalVM = new List<ListHisProgNotePhysicalVM>();
      json['listHisProgNotePhysicalVM'].forEach((v) {
        listHisProgNotePhysicalVM
            .add(new ListHisProgNotePhysicalVM.fromJson(v));
      });
    }
  }

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

class ListHisProgNotePhysicalVM {
  int episodeId;
  int appointmentNo;
  int examType;
  int examId;
  int patientMRN;
  bool isNormal;
  bool isAbnormal;
  String remarks;
  int createdBy;
  String createdOn;
  int editedBy;
  String editedOn;
  bool notExamined;
  MasterKeyModel masterDescription;

  ListHisProgNotePhysicalVM(
      {this.episodeId,
        this.appointmentNo,
        this.examType,
        this.examId,
        this.patientMRN,
        this.isNormal,
        this.isAbnormal,
        this.remarks,
        this.createdBy,
        this.createdOn,
        this.editedBy,
        this.editedOn,
        this.notExamined,
        this.masterDescription});

  ListHisProgNotePhysicalVM.fromJson(Map<String, dynamic> json) {
    episodeId = json['episodeId'];
    appointmentNo = json['appointmentNo'];
    examType = json['examType'];
    examId = json['examId'];
    patientMRN = json['patientMRN'];
    isNormal = json['isNormal'];
    isAbnormal = json['isAbnormal'];
    remarks = json['remarks'];
    createdBy = json['createdBy'];
    createdOn = json['createdOn'];
    editedBy = json['editedBy'];
    editedOn = json['editedOn'];
    notExamined = json['notExamined'];
    masterDescription = json['masterDescription'] != null
        ? new MasterKeyModel.fromJson(json['masterDescription'])
        : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['episodeId'] = this.episodeId;
    data['appointmentNo'] = this.appointmentNo;
    data['examType'] = this.examType;
    data['examId'] = this.examId;
    data['patientMRN'] = this.patientMRN;
    data['isNormal'] = this.isNormal;
    data['isAbnormal'] = this.isAbnormal;
    data['remarks'] = this.remarks;
    data['createdBy'] = this.createdBy;
    data['createdOn'] = this.createdOn;
    data['editedBy'] = this.editedBy;
    data['editedOn'] = this.editedOn;
    data['notExamined'] = this.notExamined;
    if (this.masterDescription != null) {
      data['masterDescription'] = this.masterDescription.toJson();
    }
    return data;
  }
}