// TODO : it have to be changed. class PatiantInformtion { PatiantInformtion? patientDetails; int? genderInt; dynamic age; String? appointmentDate; dynamic appointmentNo; dynamic appointmentType; String? arrivalTime; String? arrivalTimeD; int? callStatus; dynamic callStatusDisc; int? callTypeID; String? clientRequestID; String? clinicName; String? consoltationEnd; String? consultationNotes; int? appointmentTypeId; String? arrivedOn; int? clinicGroupId; String? companyName; dynamic dischargeStatus; dynamic doctorDetails; int? doctorId; String? endTime; int? episodeNo; int? fallRiskScore; bool? isSigned; int? medicationOrders; String? mobileNumber; String? nationality; int? projectId; int? clinicId; dynamic patientId; String? doctorName; String? doctorNameN; String? firstName; String? middleName; String? lastName; String? firstNameN; String? middleNameN; String? lastNameN; String? fullName; String? fullNameN; int? gender; String? dateofBirth; String? nationalityId; String? emailAddress; String? patientIdentificationNo; int? patientType; int? patientMRN; String? admissionNo; String? admissionDate; String? createdOn; String? roomId; String? bedId; String? nursingStationId; String? description; String? clinicDescription; String? clinicDescriptionN; String? nationalityName; String? nationalityNameN; String? genderDescription; String? nursingStationName; String? startTime; String? visitType; String? nationalityFlagURL; int? patientStatus; int? patientStatusType; int? visitTypeId; String? startTimes; String? dischargeDate; int? status; int? vcId; String? voipToken; PatiantInformtion( {this.patientDetails, this.projectId, this.clinicId, this.doctorId, this.patientId, this.doctorName, this.doctorNameN, this.firstName, this.middleName, this.lastName, this.firstNameN, this.middleNameN, this.lastNameN, this.gender, this.dateofBirth, this.nationalityId, this.mobileNumber, this.emailAddress, this.patientIdentificationNo, this.patientType, this.admissionNo, this.admissionDate, this.createdOn, this.roomId, this.bedId, this.nursingStationId, this.description, this.clinicDescription, this.clinicDescriptionN, this.nationalityName, this.nationalityNameN, this.age, this.genderDescription, this.nursingStationName, this.appointmentDate, this.startTime, this.appointmentNo, this.arrivalTime, this.arrivalTimeD, this.callStatus, this.callStatusDisc, this.callTypeID, this.clientRequestID, this.clinicName, this.consoltationEnd, this.consultationNotes, this.appointmentType, this.appointmentTypeId, this.arrivedOn, this.clinicGroupId, this.companyName, this.dischargeStatus, this.doctorDetails, this.endTime, this.episodeNo, this.fallRiskScore, this.genderInt, this.isSigned, this.medicationOrders, this.nationality, this.patientMRN, this.visitType, this.fullName, this.fullNameN, this.nationalityFlagURL, this.patientStatusType, this.patientStatus, this.visitTypeId, this.startTimes, this.dischargeDate, this.status, this.vcId, this.voipToken}); PatiantInformtion.fromJson(Map json) { try { patientDetails = json['patientDetails'] != null ? new PatiantInformtion.fromJson( json['patientDetails']) : null; projectId = json["ProjectID"] ?? json["projectID"]; clinicId = json["ClinicID"] ?? json["clinicID"]; doctorId = json["DoctorID"] ?? json["doctorID"]; patientId = json["PatientID"] != null ? json["PatientID"] is String ? int?.parse(json["PatientID"]) : json["PatientID"] : json["patientID"] ?? json['patientMRN'] ?? json['PatientMRN']; doctorName = json["DoctorName"] ?? json["doctorName"]; doctorNameN = json["DoctorNameN"] ?? json["doctorNameN"]; firstName = json["FirstName"] ?? json["firstName"]; middleName = json["MiddleName"] ?? json["middleName"]; lastName = json["LastName"] ?? json["lastName"]; firstNameN = json["FirstNameN"] ?? json["firstNameN"]; middleNameN = json["MiddleNameN"] ?? json["middleNameN"]; lastNameN = json["LastNameN"] ?? json["lastNameN"]; gender = json["Gender"] != null ? json["Gender"] is String ? int?.parse(json["Gender"]) : json["Gender"] : json["gender"]; fullName = json["fullName"] ?? json["fullName"] ?? json["PatientName"]; fullNameN = json["fullNameN"] ?? json["fullNameN"] ?? json["PatientName"]; dateofBirth = json["DateofBirth"] ?? json["dob"] ?? json['DateOfBirth']; nationalityId = json["NationalityID"] ?? json["nationalityID"]; mobileNumber = json["MobileNumber"] ?? json["mobileNumber"]; emailAddress = json["EmailAddress"] ?? json["emailAddress"]; patientIdentificationNo = json["PatientIdentificationNo"] ?? json["patientIdentificationNo"]; //TODO make 7 dynamic when the backend retrun it in patient arrival patientType = json["PatientType"] ?? json["patientType"] ?? 1; admissionNo = json["AdmissionNo"] ?? json["admissionNo"]; admissionDate = json["AdmissionDate"] ?? json["admissionDate"]; createdOn = json["CreatedOn"] ?? json["CreatedOn"]; roomId = json["RoomID"] ?? json["roomID"]; bedId = json["BedID"] ?? json["bedID"]; nursingStationId = json["NursingStationID"] ?? json["nursingStationID"]; description = json["Description"] ?? json["description"]; clinicDescription = json["ClinicDescription"] ?? json["clinicDescription"]; clinicDescriptionN = json["ClinicDescriptionN"] ?? json["clinicDescriptionN"]; nationalityName = json["NationalityName"] ?? json["nationalityName"] ?? json['NationalityName']; nationalityNameN = json["NationalityNameN"] ?? json["nationalityNameN"] ?? json['NationalityNameN']; age = json["Age"] ?? json["age"]; genderDescription = json["GenderDescription"]; nursingStationName = json["NursingStationName"]; appointmentDate = json["AppointmentDate"] ?? ''; startTime = json["startTime"] ?? json['StartTime']; appointmentNo = json['appointmentNo'] ?? json['AppointmentNo']; appointmentType = json['appointmentType']; appointmentTypeId = json['appointmentTypeId'] ?? json['appointmentTypeid']; arrivedOn = json['ArrivedOn'] ?? json['arrivedOn'] ?? json['ArrivedOn']; clinicGroupId = json['clinicGroupId']; companyName = json['companyName']; dischargeStatus = json['dischargeStatus']; doctorDetails = json['doctorDetails']; endTime = json['endTime']; episodeNo = json['episodeNo'] ?? json['EpisodeID'] ?? json['EpisodeNo']; fallRiskScore = json['fallRiskScore']; isSigned = json['isSigned']; medicationOrders = json['medicationOrders']; nationality = json['nationality'] ?? json['NationalityNameN']; patientMRN = json['patientMRN'] ?? json['PatientMRN'] ?? (json["PatientID"] != null ? int?.parse(json["PatientID"].toString()) : json["patientID"] != null ? int?.parse( json["patientID"].toString()) : json["patientId"] != null ? int ?.parse(json["patientId"].toString()) : ''); visitType = json['visitType'] ?? json['visitType'] ?? json['visitType']; nationalityFlagURL = json['NationalityFlagURL'] ?? json['NationalityFlagURL']; patientStatusType = json['patientStatusType'] ?? json['PatientStatusType']; visitTypeId = json['visitTypeId'] ?? json['visitTypeId'] ?? json['visitTypeid']; startTimes = json['StartTime'] ?? json['StartTime']; dischargeDate = json['DischargeDate']; status = json['Status']; vcId = json['VC_ID']; arrivalTime = json['ArrivalTime']; arrivalTimeD = json['ArrivalTimeD']; callStatus = json['CallStatus']; callStatusDisc = json['CallStatusDisc']; callTypeID = json['CallTypeID']; clientRequestID = json['ClientRequestID']; clinicName = json['ClinicName']; consoltationEnd = json['ConsoltationEnd']; consultationNotes = json['ConsultationNotes']; patientStatus = json['PatientStatus']; voipToken = json['VoipToken']; } catch (e) { print(e); } } }