diff --git a/lib/core/service/patient_medical_file/radiology/radiology_service.dart b/lib/core/service/patient_medical_file/radiology/radiology_service.dart index df646ca9..f10f2253 100644 --- a/lib/core/service/patient_medical_file/radiology/radiology_service.dart +++ b/lib/core/service/patient_medical_file/radiology/radiology_service.dart @@ -9,19 +9,14 @@ class RadiologyService extends BaseService { List finalRadiologyList = List(); String url = ''; - Future getRadImageURL( - {int invoiceNo, - int lineItem, - int projectId, - @required PatiantInformtion patient}) async { + Future getRadImageURL({int invoiceNo, int lineItem, int projectId, @required PatiantInformtion patient}) async { hasError = false; final Map body = new Map(); body['InvoiceNo'] = invoiceNo; body['LineItemNo'] = lineItem; body['ProjectID'] = projectId; - await baseAppClient.postPatient(GET_RAD_IMAGE_URL, patient: patient, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.postPatient(GET_RAD_IMAGE_URL, patient: patient, onSuccess: (dynamic response, int statusCode) { url = response['Data']; }, onFailure: (String error, int statusCode) { hasError = true; @@ -29,24 +24,22 @@ class RadiologyService extends BaseService { }, body: body); } - Future getPatientRadOrders(PatiantInformtion patient, - {isInPatient = false}) async { + Future getPatientRadOrders(PatiantInformtion patient, {isInPatient = false}) async { String url = GET_PATIENT_ORDERS; final Map body = new Map(); if (isInPatient) { url = GET_IN_PATIENT_ORDERS; body['ProjectID'] = patient.projectId; } - + finalRadiologyList.clear(); hasError = false; - await baseAppClient.postPatient(url, patient: patient, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.postPatient(url, patient: patient, onSuccess: (dynamic response, int statusCode) { finalRadiologyList = []; String label = "ListRAD"; if (isInPatient) { label = "List_GetRadOreders"; } - if(response[label] == null || response[label].length == 0){ + if (response[label] == null || response[label].length == 0) { label = "FinalRadiologyList"; } response[label].forEach((radiology) { diff --git a/lib/screens/patients/profile/lab_result/labs_home_page.dart b/lib/screens/patients/profile/lab_result/labs_home_page.dart index dfc1a1e8..48c35952 100644 --- a/lib/screens/patients/profile/lab_result/labs_home_page.dart +++ b/lib/screens/patients/profile/lab_result/labs_home_page.dart @@ -29,7 +29,6 @@ class _LabsHomePageState extends State { bool isInpatient; bool isFromLiveCare; - @override void didChangeDependencies() { super.didChangeDependencies(); @@ -66,8 +65,7 @@ class _LabsHomePageState extends State { SizedBox( height: 12, ), - if (model.patientLabOrdersList.isNotEmpty && - patient.patientStatusType != 43) + if (model.patientLabOrdersList.isNotEmpty && patient.patientStatusType != 43) Padding( padding: const EdgeInsets.all(8.0), child: Column( @@ -87,8 +85,7 @@ class _LabsHomePageState extends State { ], ), ), - if (patient.patientStatusType != null && - patient.patientStatusType == 43) + if (patient.patientStatusType != null && patient.patientStatusType == 43) Padding( padding: const EdgeInsets.all(8.0), child: Column( @@ -108,8 +105,7 @@ class _LabsHomePageState extends State { ], ), ), - if ((patient.patientStatusType != null && - patient.patientStatusType == 43) || + if ((patient.patientStatusType != null && patient.patientStatusType == 43) || (isFromLiveCare && patient.appointmentNo != null)) AddNewOrder( onTap: () { @@ -146,37 +142,26 @@ class _LabsHomePageState extends State { width: 20, height: 160, decoration: BoxDecoration( - color: model.patientLabOrdersList[index] - .isLiveCareAppointment + color: model.patientLabOrdersList[index].isLiveCareAppointment ? Colors.red[900] - : !model.patientLabOrdersList[index] - .isInOutPatient + : !model.patientLabOrdersList[index].isInOutPatient ? Colors.black : Color(0xffa9a089), borderRadius: BorderRadius.only( - topLeft: projectViewModel.isArabic? Radius.circular(0):Radius.circular(8), - bottomLeft: projectViewModel.isArabic? Radius.circular(0):Radius.circular(8), - topRight: projectViewModel.isArabic? Radius.circular(8):Radius.circular(0), - bottomRight: projectViewModel.isArabic? Radius.circular(8):Radius.circular(0) - ), + topLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8), + bottomLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8), + topRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0), + bottomRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0)), ), child: RotatedBox( quarterTurns: 3, child: Center( child: Text( - model.patientLabOrdersList[index] - .isLiveCareAppointment - ? TranslationBase.of(context) - .liveCare - .toUpperCase() - : !model.patientLabOrdersList[index] - .isInOutPatient - ? TranslationBase.of(context) - .inPatientLabel - .toUpperCase() - : TranslationBase.of(context) - .outpatient - .toUpperCase(), + model.patientLabOrdersList[index].isLiveCareAppointment + ? TranslationBase.of(context).liveCare.toUpperCase() + : !model.patientLabOrdersList[index].isInOutPatient + ? TranslationBase.of(context).inPatientLabel.toUpperCase() + : TranslationBase.of(context).outpatient.toUpperCase(), style: TextStyle(color: Colors.white), ), )), @@ -190,24 +175,18 @@ class _LabsHomePageState extends State { page: LaboratoryResultPage( patientLabOrders: model.patientLabOrdersList[index], patient: patient, - isInpatient:isInpatient, + isInpatient: isInpatient, arrivalType: arrivalType, patientType: patientType, ), ), ), - doctorName: - model.patientLabOrdersList[index].doctorName, - invoiceNO: - ' ${model.patientLabOrdersList[index].invoiceNo}', - profileUrl: model - .patientLabOrdersList[index].doctorImageURL, - branch: - model.patientLabOrdersList[index].projectName, - clinic: model - .patientLabOrdersList[index].clinicDescription, - appointmentDate: - model.patientLabOrdersList[index].orderDate.add(Duration(days: 1)), + doctorName: model.patientLabOrdersList[index].doctorName, + invoiceNO: ' ${model.patientLabOrdersList[index].invoiceNo}', + profileUrl: model.patientLabOrdersList[index].doctorImageURL, + branch: model.patientLabOrdersList[index].projectName, + clinic: model.patientLabOrdersList[index].clinicDescription, + appointmentDate: model.patientLabOrdersList[index].orderDate, orderNo: model.patientLabOrdersList[index].orderNo, isShowTime: false, ), @@ -216,8 +195,7 @@ class _LabsHomePageState extends State { ), ), ), - if (model.patientLabOrdersList.isEmpty && - patient.patientStatusType != 43) + if (model.patientLabOrdersList.isEmpty && patient.patientStatusType != 43) Center( child: Column( crossAxisAlignment: CrossAxisAlignment.center, diff --git a/pubspec.lock b/pubspec.lock index e2215d0c..0229e774 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -664,7 +664,7 @@ packages: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0-nullsafety.4" mime: dependency: transitive description: @@ -956,7 +956,7 @@ packages: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.1" + version: "1.10.0-nullsafety.2" sticky_headers: dependency: "direct main" description: @@ -1154,5 +1154,5 @@ packages: source: hosted version: "2.2.1" sdks: - dart: ">=2.10.0 <2.11.0" + dart: ">=2.10.0 <=2.11.0-213.1.beta" flutter: ">=1.22.0 <2.0.0"