diff --git a/lib/core/model/labs/all_special_lab_result_model.dart b/lib/core/model/labs/all_special_lab_result_model.dart index da183c10..ad78cd4d 100644 --- a/lib/core/model/labs/all_special_lab_result_model.dart +++ b/lib/core/model/labs/all_special_lab_result_model.dart @@ -1,3 +1,5 @@ +import 'lab_result.dart'; + class AllSpecialLabResultModel { dynamic actualDoctorRate; dynamic admissionDate; @@ -51,6 +53,11 @@ class AllSpecialLabResultModel { dynamic status; dynamic statusDesc; String? strOrderDate; + List? FileNameWithExtensionList; + List? UploadedDocuments; + bool? IsLabTestAttachment; // for the attachment icon in the lab result list + dynamic LabAccessionNo; + dynamic FileHash; AllSpecialLabResultModel( {this.actualDoctorRate, @@ -112,9 +119,9 @@ class AllSpecialLabResultModel { appointmentDate = json['AppointmentDate']; appointmentNo = json['AppointmentNo']; appointmentTime = json['AppointmentTime']; - clinicDescription = json['ClinicDescription']; - clinicDescriptionEnglish = json['ClinicDescriptionEnglish']; - clinicDescriptionN = json['ClinicDescriptionN']; + clinicDescription = json['ClinicDescription']??""; + clinicDescriptionEnglish = json['ClinicDescriptionEnglish']??""; + clinicDescriptionN = json['ClinicDescriptionN']??""; clinicID = json['ClinicID']; createdOn = json['CreatedOn']; decimalDoctorRate = json['DecimalDoctorRate']; @@ -146,8 +153,8 @@ class AllSpecialLabResultModel { orderNo = json['OrderNo']; patientID = json['PatientID']; projectID = json['ProjectID']; - projectName = json['ProjectName']; - projectNameN = json['ProjectNameN']; + projectName = json['ProjectName']??""; + projectNameN = json['ProjectNameN']??""; qR = json['QR']; resultData = json['ResultData']; resultDataHTML = json['ResultDataHTML']; @@ -157,6 +164,23 @@ class AllSpecialLabResultModel { status = json['Status']; statusDesc = json['StatusDesc']; strOrderDate = json['StrOrderDate']; + IsLabTestAttachment = json['IsLabTestAttachment'] ?? false; + + LabAccessionNo = json['LabAccessionNo'] ?? json['AccessionNo']; + + if (json['FileNameWithExtensionList'] != null) { + FileNameWithExtensionList = []; + json['FileNameWithExtensionList'].forEach((v) { + if (v["FileNameWithExtension"] != null) FileNameWithExtensionList?.add(v["FileNameWithExtension"]); + }); + } + FileHash = json['FileHash']; + if (json['UploadedDocuments'] != null) { + UploadedDocuments = []; + json['UploadedDocuments'].forEach((v) { + UploadedDocuments!.add(new UploadedDocument.fromJson(v)); + }); + } } Map toJson() { diff --git a/lib/core/model/labs/patient_lab_special_result.dart b/lib/core/model/labs/patient_lab_special_result.dart index 1d224c05..5920bf7e 100644 --- a/lib/core/model/labs/patient_lab_special_result.dart +++ b/lib/core/model/labs/patient_lab_special_result.dart @@ -1,16 +1,24 @@ +import 'lab_result.dart'; + class PatientLabSpecialResult { String? invoiceNo; String? moduleID; String? resultData; String? resultDataHTML; dynamic resultDataTxt; + List? FileNameWithExtensionList; + List? UploadedDocuments; + bool? IsLabTestAttachment; // for the attachment icon in the lab result list PatientLabSpecialResult( {this.invoiceNo, this.moduleID, this.resultData, this.resultDataHTML, - this.resultDataTxt}); + this.resultDataTxt, + this.FileNameWithExtensionList, + this.UploadedDocuments, + this.IsLabTestAttachment}); PatientLabSpecialResult.fromJson(Map json) { invoiceNo = json['InvoiceNo']; @@ -18,6 +26,20 @@ class PatientLabSpecialResult { resultData = json['ResultData']; resultDataHTML = json['ResultDataHTML']; resultDataTxt = json['ResultDataTxt']; + if (json['FileNameWithExtensionList'] != null) { + FileNameWithExtensionList = []; + json['FileNameWithExtensionList'].forEach((v) { + if (v["FileNameWithExtension"] != null) FileNameWithExtensionList?.add(v["FileNameWithExtension"]); + }); + } + if (json['UploadedDocuments'] != null) { + UploadedDocuments = []; + json['UploadedDocuments'].forEach((v) { + UploadedDocuments!.add(new UploadedDocument.fromJson(v)); + }); + } + + IsLabTestAttachment = json['IsLabTestAttachment'] ?? false; } Map toJson() { diff --git a/lib/core/model/labs/request_patient_lab_special_result.dart b/lib/core/model/labs/request_patient_lab_special_result.dart index bac33689..3529e2af 100644 --- a/lib/core/model/labs/request_patient_lab_special_result.dart +++ b/lib/core/model/labs/request_patient_lab_special_result.dart @@ -1,5 +1,6 @@ class RequestPatientLabSpecialResult { String? invoiceNo; + String? invoiceNoVP; String? orderNo; String? setupID; String? projectID; @@ -58,11 +59,13 @@ class RequestPatientLabSpecialResult { tokenID = json['TokenID']; patientTypeID = json['PatientTypeID']; patientType = json['PatientType']; + invoiceNoVP = json['invoiceNoVP']; } Map toJson() { final Map data = new Map(); data['InvoiceNo'] = this.invoiceNo; + data['InvoiceNo_VP'] = this.invoiceNoVP; data['OrderNo'] = this.orderNo; data['SetupID'] = this.setupID; data['ProjectID'] = this.projectID; diff --git a/lib/screens/patients/profile/lab_result/special_result/all_lab_special_result_page.dart b/lib/screens/patients/profile/lab_result/special_result/all_lab_special_result_page.dart index e37d3fc7..2a6de730 100644 --- a/lib/screens/patients/profile/lab_result/special_result/all_lab_special_result_page.dart +++ b/lib/screens/patients/profile/lab_result/special_result/all_lab_special_result_page.dart @@ -154,8 +154,7 @@ class _AllLabSpecialResultState extends State { .resultDataHTML!, patient: patient!, labResult: model.allSpecialLabList[index], - model: model - ), + ), ), ), doctorName: