import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; class TriageInformationRequest { double versionID; int channel; int languageID; String iPAdress; String sessionID; int patientID; String tokenID; String generalid; int patientOutSA; int patientTypeID; int patientType; int projectID; ERTriageInformation eRTriageInformation; HospitalsModel selectedHospital; TriageInformationRequest( {this.versionID, this.channel, this.languageID, this.iPAdress, this.sessionID, this.patientID, this.tokenID, this.generalid, this.patientOutSA, this.patientTypeID, this.patientType, this.projectID, this.eRTriageInformation,this.selectedHospital}); TriageInformationRequest.fromJson(Map json) { versionID = json['VersionID']; channel = json['Channel']; languageID = json['LanguageID']; iPAdress = json['IPAdress']; sessionID = json['SessionID']; patientID = json['PatientID']; tokenID = json['TokenID']; generalid = json['generalid']; patientOutSA = json['PatientOutSA']; patientTypeID = json['PatientTypeID']; patientType = json['PatientType']; projectID = json['ProjectID']; eRTriageInformation = json['ERTriageInformation'] != null ? new ERTriageInformation.fromJson(json['ERTriageInformation']) : null; } Map toJson() { final Map data = new Map(); data['VersionID'] = this.versionID; data['Channel'] = this.channel; data['LanguageID'] = this.languageID; data['IPAdress'] = this.iPAdress; data['SessionID'] = this.sessionID; data['PatientID'] = this.patientID; data['TokenID'] = this.tokenID; data['generalid'] = this.generalid; data['PatientOutSA'] = this.patientOutSA; data['PatientTypeID'] = this.patientTypeID; data['PatientType'] = this.patientType; data['ProjectID'] = this.projectID; if (this.eRTriageInformation != null) { data['ERTriageInformation'] = this.eRTriageInformation.toJson(); } return data; } } class ERTriageInformation { String notes; String chiefComplaint; int patientId; int projectId; int riskScore; List checklist; ERTriageInformation( {this.notes, this.chiefComplaint, this.patientId, this.projectId, this.riskScore, this.checklist}); ERTriageInformation.fromJson(Map json) { notes = json['Notes']; chiefComplaint = json['ChiefComplaint']; patientId = json['PatientId']; projectId = json['ProjectId']; riskScore = json['RiskScore']; if (json['checklist'] != null) { checklist = new List(); json['checklist'].forEach((v) { checklist.add(new Checklist.fromJson(v)); }); } } Map toJson() { final Map data = new Map(); data['Notes'] = this.notes; data['ChiefComplaint'] = this.chiefComplaint; data['PatientId'] = this.patientId; data['ProjectId'] = this.projectId; data['RiskScore'] = this.riskScore; if (this.checklist != null) { data['checklist'] = this.checklist.map((v) => v.toJson()).toList(); } return data; } } class Checklist { int isSelected; int parameterCode; int parameterGroup; int parameterType; int score; Checklist( {this.isSelected, this.parameterCode, this.parameterGroup, this.parameterType, this.score}); Checklist.fromJson(Map json) { isSelected = json['IsSelected']; parameterCode = json['ParameterCode']; parameterGroup = json['ParameterGroup']; parameterType = json['ParameterType']; score = json['Score']; } Map toJson() { final Map data = new Map(); data['IsSelected'] = this.isSelected; data['ParameterCode'] = this.parameterCode; data['ParameterGroup'] = this.parameterGroup; data['ParameterType'] = this.parameterType; data['Score'] = this.score; return data; } }