You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
doctor_app_flutter/lib/models/my_referred_patient_model.dart

222 lines
7.4 KiB
Dart

import 'dart:convert';
import 'package:doctor_app_flutter/util/helpers.dart';
MyReferredPatientModel myReferredPatientModelFromJson(String str) => MyReferredPatientModel.fromJson(json.decode(str));
String myReferredPatientModelToJson(MyReferredPatientModel data) => json.encode(data.toJson());
class MyReferredPatientModel {
MyReferredPatientModel({
this.projectId,
this.lineItemNo,
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.mobileNumber,
this.emailAddress,
this.patientIdentificationNo,
this.patientType,
this.admissionNo,
this.admissionDate,
this.roomId,
this.bedId,
this.nursingStationId,
this.description,
this.nationalityName,
this.nationalityNameN,
this.clinicDescription,
this.clinicDescriptionN,
this.referralDoctor,
this.referringDoctor,
this.referralClinic,
this.referringClinic,
this.referralStatus,
this.referralDate,
this.referringDoctorRemarks,
this.referredDoctorRemarks,
this.referralResponseOn,
this.priority,
this.frequency,
this.maxResponseTime,
this.dischargeDate,
this.age,
this.frequencyDescription,
this.genderDescription,
this.isDoctorLate,
this.isDoctorResponse,
this.nursingStationName,
this.priorityDescription,
this.referralClinicDescription,
this.referralDoctorName,
});
int projectId;
int lineItemNo;
int doctorId;
int patientId;
String doctorName;
dynamic doctorNameN;
String firstName;
String middleName;
String lastName;
dynamic firstNameN;
dynamic middleNameN;
dynamic lastNameN;
int gender;
String dateofBirth;
String mobileNumber;
String emailAddress;
String patientIdentificationNo;
int patientType;
String admissionNo;
String admissionDate;
String roomId;
String bedId;
dynamic nursingStationId;
dynamic description;
String nationalityName;
dynamic nationalityNameN;
String clinicDescription;
dynamic clinicDescriptionN;
int referralDoctor;
int referringDoctor;
int referralClinic;
int referringClinic;
int referralStatus;
String referralDate;
String referringDoctorRemarks;
String referredDoctorRemarks;
String referralResponseOn;
int priority;
int frequency;
DateTime maxResponseTime;
dynamic dischargeDate;
String age;
String frequencyDescription;
String genderDescription;
bool isDoctorLate;
bool isDoctorResponse;
String nursingStationName;
String priorityDescription;
String referralClinicDescription;
String referralDoctorName;
factory MyReferredPatientModel.fromJson(Map<String, dynamic> json) => MyReferredPatientModel(
projectId: json["ProjectID"],
lineItemNo: json["LineItemNo"],
doctorId: json["DoctorID"],
patientId: json["PatientID"],
doctorName: json["DoctorName"],
doctorNameN: json["DoctorNameN"],
firstName: json["FirstName"],
middleName: json["MiddleName"],
lastName: json["LastName"],
firstNameN: json["FirstNameN"],
middleNameN: json["MiddleNameN"],
lastNameN: json["LastNameN"],
gender: json["Gender"],
dateofBirth: json["DateofBirth"],
mobileNumber: json["MobileNumber"],
emailAddress: json["EmailAddress"],
patientIdentificationNo: json["PatientIdentificationNo"],
patientType: json["PatientType"],
admissionNo: json["AdmissionNo"],
admissionDate: json["AdmissionDate"],
roomId: json["RoomID"],
bedId: json["BedID"],
nursingStationId: json["NursingStationID"],
description: json["Description"],
nationalityName: json["NationalityName"],
nationalityNameN: json["NationalityNameN"],
clinicDescription: json["ClinicDescription"],
clinicDescriptionN: json["ClinicDescriptionN"],
referralDoctor: json["ReferralDoctor"],
referringDoctor: json["ReferringDoctor"],
referralClinic: json["ReferralClinic"],
referringClinic: json["ReferringClinic"],
referralStatus: json["ReferralStatus"],
referralDate: json["ReferralDate"],
referringDoctorRemarks: json["ReferringDoctorRemarks"],
referredDoctorRemarks: json["ReferredDoctorRemarks"],
referralResponseOn: json["ReferralResponseOn"],
priority: json["Priority"],
frequency: json["Frequency"],
maxResponseTime: Helpers.convertStringToDate(json['MAXResponseTime']),//json["MAXResponseTime"],
dischargeDate: json["DischargeDate"],
age: json["Age"],
frequencyDescription: json["FrequencyDescription"],
genderDescription: json["GenderDescription"],
isDoctorLate: json["IsDoctorLate"],
isDoctorResponse: json["IsDoctorResponse"],
nursingStationName: json["NursingStationName"],
priorityDescription: json["PriorityDescription"],
referralClinicDescription: json["ReferralClinicDescription"],
referralDoctorName: json["ReferralDoctorName"],
);
Map<String, dynamic> toJson() => {
"ProjectID": projectId,
"LineItemNo": lineItemNo,
"DoctorID": doctorId,
"PatientID": patientId,
"DoctorName": doctorName,
"DoctorNameN": doctorNameN,
"FirstName": firstName,
"MiddleName": middleName,
"LastName": lastName,
"FirstNameN": firstNameN,
"MiddleNameN": middleNameN,
"LastNameN": lastNameN,
"Gender": gender,
"DateofBirth": dateofBirth,
"MobileNumber": mobileNumber,
"EmailAddress": emailAddress,
"PatientIdentificationNo": patientIdentificationNo,
"PatientType": patientType,
"AdmissionNo": admissionNo,
"AdmissionDate": admissionDate,
"RoomID": roomId,
"BedID": bedId,
"NursingStationID": nursingStationId,
"Description": description,
"NationalityName": nationalityName,
"NationalityNameN": nationalityNameN,
"ClinicDescription": clinicDescription,
"ClinicDescriptionN": clinicDescriptionN,
"ReferralDoctor": referralDoctor,
"ReferringDoctor": referringDoctor,
"ReferralClinic": referralClinic,
"ReferringClinic": referringClinic,
"ReferralStatus": referralStatus,
"ReferralDate": referralDate,
"ReferringDoctorRemarks": referringDoctorRemarks,
"ReferredDoctorRemarks": referredDoctorRemarks,
"ReferralResponseOn": referralResponseOn,
"Priority": priority,
"Frequency": frequency,
"MAXResponseTime": maxResponseTime,
"DischargeDate": dischargeDate,
"Age": age,
"FrequencyDescription": frequencyDescription,
"GenderDescription": genderDescription,
"IsDoctorLate": isDoctorLate,
"IsDoctorResponse": isDoctorResponse,
"NursingStationName": nursingStationName,
"PriorityDescription": priorityDescription,
"ReferralClinicDescription": referralClinicDescription,
"ReferralDoctorName": referralDoctorName,
};
}