From 764578f28e673d34fac963c2f7ea3fb386b7808e Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Sun, 23 May 2021 14:34:25 +0300 Subject: [PATCH 1/2] procedure changes --- lib/core/viewModel/procedure_View_model.dart | 3 ++- lib/screens/procedures/ProcedureCard.dart | 7 ++++--- lib/screens/procedures/procedure_screen.dart | 11 ++++------- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/lib/core/viewModel/procedure_View_model.dart b/lib/core/viewModel/procedure_View_model.dart index 3bdd676f..4411f7b5 100644 --- a/lib/core/viewModel/procedure_View_model.dart +++ b/lib/core/viewModel/procedure_View_model.dart @@ -60,6 +60,8 @@ class ProcedureViewModel extends BaseViewModel { Future getProcedure({int mrn, String patientType}) async { hasError = false; + await getDoctorProfile(); + doctorProfile.doctorID; //_insuranceCardService.clearInsuranceCard(); setState(ViewState.Busy); await _procedureService.getProcedure(mrn: mrn); @@ -289,7 +291,6 @@ class ProcedureViewModel extends BaseViewModel { } } - getPatientLabOrdersResults( {PatientLabOrders patientLabOrder, String procedure, diff --git a/lib/screens/procedures/ProcedureCard.dart b/lib/screens/procedures/ProcedureCard.dart index 3448d0be..d998ca58 100644 --- a/lib/screens/procedures/ProcedureCard.dart +++ b/lib/screens/procedures/ProcedureCard.dart @@ -28,6 +28,7 @@ class ProcedureCard extends StatelessWidget { this.patient, this.doctorID, }) : super(key: key); + @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); @@ -253,9 +254,9 @@ class ProcedureCard extends StatelessWidget { fontSize: 12, ), ), - if (entityList.categoryID == 2 || - entityList.categoryID == 4 && - doctorID == entityList.doctorID) + if ((entityList.categoryID == 2 || + entityList.categoryID == 4) && + doctorID == entityList.doctorID) InkWell( child: Icon(DoctorApp.edit), onTap: onTap, diff --git a/lib/screens/procedures/procedure_screen.dart b/lib/screens/procedures/procedure_screen.dart index 986d3cc1..b6bd705a 100644 --- a/lib/screens/procedures/procedure_screen.dart +++ b/lib/screens/procedures/procedure_screen.dart @@ -92,9 +92,7 @@ class ProcedureScreen extends StatelessWidget { fontSize: 13, ), AppText( - TranslationBase - .of(context) - .procedure, + TranslationBase.of(context).procedure, bold: true, fontSize: 22, ), @@ -102,15 +100,14 @@ class ProcedureScreen extends StatelessWidget { ), ), if ((patient.patientStatusType != null && - patient.patientStatusType == 43) || + patient.patientStatusType == 43) || (isFromLiveCare && patient.appointmentNo != null)) InkWell( onTap: () { Navigator.push( context, MaterialPageRoute( - builder: (context) => - AddProcedureHome( + builder: (context) => AddProcedureHome( patient: patient, model: model, )), @@ -192,7 +189,7 @@ class ProcedureScreen extends StatelessWidget { // 'You Cant Update This Procedure'); }, patient: patient, - doctorID: doctorNameP, + doctorID: model.doctorProfile.doctorID, ), ), if (model.state == ViewState.ErrorLocal || From 73cf681e9dbc94a6b2b054bb3013773991af52d9 Mon Sep 17 00:00:00 2001 From: mosazaid Date: Sun, 23 May 2021 17:18:23 +0300 Subject: [PATCH 2/2] lab-result-special --- lib/config/config.dart | 4 ++-- .../lab_order/labs_service.dart | 7 +++++-- .../PatientMedicalReportService.dart | 2 ++ .../lab_result/laboratory_result_page.dart | 16 ++++++++++------ .../lab_result/laboratory_result_widget.dart | 8 ++++---- lib/widgets/shared/doctor_card.dart | 9 ++++++--- 6 files changed, 29 insertions(+), 17 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index f1d642eb..638ff134 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -4,8 +4,8 @@ const MAX_SMALL_SCREEN = 660; const ONLY_NUMBERS = "[0-9]"; const ONLY_LETTERS = "[a-zA-Z &'\"]"; const ONLY_DATE = "[0-9/]"; -// const BASE_URL = 'https://hmgwebservices.com/'; -const BASE_URL = 'https://uat.hmgwebservices.com/'; +const BASE_URL = 'https://hmgwebservices.com/'; +// const BASE_URL = 'https://uat.hmgwebservices.com/'; const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh"; const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList"; const PATIENT_PROGRESS_NOTE_URL = diff --git a/lib/core/service/patient_medical_file/lab_order/labs_service.dart b/lib/core/service/patient_medical_file/lab_order/labs_service.dart index d7fc3aab..c7bb9a78 100644 --- a/lib/core/service/patient_medical_file/lab_order/labs_service.dart +++ b/lib/core/service/patient_medical_file/lab_order/labs_service.dart @@ -105,13 +105,16 @@ class LabsService extends BaseService { await baseAppClient.postPatient(url, patient: patient, onSuccess: (dynamic response, int statusCode) { - // patientLabSpecialResult.clear(); - labResultList.clear(); + patientLabSpecialResult = []; + labResultList = []; if (isInpatient) { response['List_GetLabNormal'].forEach((hospital) { labResultList.add(LabResult.fromJson(hospital)); }); + response['List_GetLabSpecial'].forEach((hospital) { + patientLabSpecialResult.add(PatientLabSpecialResult.fromJson(hospital)); + }); } else { response['ListPLR'].forEach((lab) { labResultList.add(LabResult.fromJson(lab)); diff --git a/lib/core/service/patient_medical_file/medical_report/PatientMedicalReportService.dart b/lib/core/service/patient_medical_file/medical_report/PatientMedicalReportService.dart index 6e00b890..aa81e8a6 100644 --- a/lib/core/service/patient_medical_file/medical_report/PatientMedicalReportService.dart +++ b/lib/core/service/patient_medical_file/medical_report/PatientMedicalReportService.dart @@ -11,7 +11,9 @@ class PatientMedicalReportService extends BaseService { Future getMedicalReportList(PatiantInformtion patient) async { hasError = false; Map body = Map(); + await getDoctorProfile(); body['AdmissionNo'] = patient.admissionNo; + body['SetupID'] = doctorProfile.setupID; await baseAppClient.postPatient(PATIENT_MEDICAL_REPORT_GET_LIST, onSuccess: (dynamic response, int statusCode) { diff --git a/lib/screens/patients/profile/lab_result/laboratory_result_page.dart b/lib/screens/patients/profile/lab_result/laboratory_result_page.dart index e54a3782..4670e2d1 100644 --- a/lib/screens/patients/profile/lab_result/laboratory_result_page.dart +++ b/lib/screens/patients/profile/lab_result/laboratory_result_page.dart @@ -30,13 +30,17 @@ class _LaboratoryResultPageState extends State { @override Widget build(BuildContext context) { return BaseView( - onModelReady: (model) => model.getLaboratoryResult( - invoiceNo: widget.patientLabOrders.invoiceNo, - clinicID: widget.patientLabOrders.clinicID, - projectID: widget.patientLabOrders.projectID, - orderNo: widget.patientLabOrders.orderNo, + // onModelReady: (model) => model.getLaboratoryResult( + // invoiceNo: widget.patientLabOrders.invoiceNo, + // clinicID: widget.patientLabOrders.clinicID, + // projectID: widget.patientLabOrders.projectID, + // orderNo: widget.patientLabOrders.orderNo, + // patient: widget.patient, + // isInpatient: widget.patientType == "1"), + onModelReady: (model) => model.getPatientLabResult( + patientLabOrder: widget.patientLabOrders, patient: widget.patient, - isInpatient: widget.patientType == "1"), + isInpatient: widget.patientType =="1"), builder: (_, model, w) => AppScaffold( isShowAppBar: true, appBar: PatientProfileHeaderWhitAppointmentAppBar( diff --git a/lib/screens/patients/profile/lab_result/laboratory_result_widget.dart b/lib/screens/patients/profile/lab_result/laboratory_result_widget.dart index bc6fcbcb..1bdc49cf 100644 --- a/lib/screens/patients/profile/lab_result/laboratory_result_widget.dart +++ b/lib/screens/patients/profile/lab_result/laboratory_result_widget.dart @@ -45,10 +45,10 @@ class _LaboratoryResultWidgetState extends State { Widget build(BuildContext context) { projectViewModel = Provider.of(context); return BaseView( - onModelReady: (model) => model.getPatientLabResult( - patientLabOrder: widget.patientLabOrder, - patient: widget.patient, - isInpatient: widget.isInpatient), + // onModelReady: (model) => model.getPatientLabResult( + // patientLabOrder: widget.patientLabOrder, + // patient: widget.patient, + // isInpatient: widget.isInpatient), builder: (_, model, w) => NetworkBaseView( baseViewModel: model, child: Container( diff --git a/lib/widgets/shared/doctor_card.dart b/lib/widgets/shared/doctor_card.dart index 2a98a381..faa4379a 100644 --- a/lib/widgets/shared/doctor_card.dart +++ b/lib/widgets/shared/doctor_card.dart @@ -139,6 +139,7 @@ class DoctorCard extends StatelessWidget { ), if (clinic != null) Row( + crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( TranslationBase.of(context).clinic + @@ -146,9 +147,11 @@ class DoctorCard extends StatelessWidget { color: Colors.grey[500], fontSize: 14, ), - AppText( - clinic, - fontSize: 14, + Expanded( + child: AppText( + clinic, + fontSize: 14, + ), ) ], ),