From 9aecc6fbdb9b046c96e5623822b65574d452b978 Mon Sep 17 00:00:00 2001 From: mosazaid Date: Thu, 22 Apr 2021 13:28:38 +0300 Subject: [PATCH] add lap results to inpatient and some changes on patient profile --- lib/core/model/labs/lab_result.dart | 6 +- lib/core/model/labs/patient_lab_orders.dart | 8 +- .../request_patient_lab_special_result.dart | 2 +- lib/core/service/labs_service.dart | 69 ++++-- lib/core/viewModel/labs_view_model.dart | 23 +- lib/core/viewModel/procedure_View_model.dart | 2 +- .../profile/lab_result/LabResultWidget.dart | 206 ++++++++++-------- .../lab_result/laboratory_result_page.dart | 40 ++-- .../lab_result/laboratory_result_widget.dart | 29 ++- .../profile/lab_result/labs_home_page.dart | 3 - ...-profile-header-new-design_in_patient.dart | 3 +- ...rofile_medical_info_widget_in_patient.dart | 7 +- 12 files changed, 249 insertions(+), 149 deletions(-) diff --git a/lib/core/model/labs/lab_result.dart b/lib/core/model/labs/lab_result.dart index 2deb13f3..1c09696b 100644 --- a/lib/core/model/labs/lab_result.dart +++ b/lib/core/model/labs/lab_result.dart @@ -47,10 +47,10 @@ class LabResult { lineItemNo = json['LineItemNo']; maleInterpretativeData = json['MaleInterpretativeData']; notes = json['Notes']; - packageID = json['PackageID']; + packageID = json['PackageID'].toString(); patientID = json['PatientID']; - projectID = json['ProjectID']; - referanceRange = json['ReferanceRange']; + projectID = json['ProjectID'].toString(); + referanceRange = json['ReferenceRange'] ?? json['ReferanceRange']; resultValue = json['ResultValue']; sampleCollectedOn = json['SampleCollectedOn']; sampleReceivedOn = json['SampleReceivedOn']; diff --git a/lib/core/model/labs/patient_lab_orders.dart b/lib/core/model/labs/patient_lab_orders.dart index 07044b0e..62eac5cc 100644 --- a/lib/core/model/labs/patient_lab_orders.dart +++ b/lib/core/model/labs/patient_lab_orders.dart @@ -85,7 +85,7 @@ class PatientLabOrders { doctorTitle = json['DoctorTitle']; gender = json['Gender']; genderDescription = json['GenderDescription']; - invoiceNo = json['InvoiceNo']; + invoiceNo = json['InvoiceNo'].toString(); isActiveDoctorProfile = json['IsActiveDoctorProfile']; isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall']; isExecludeDoctor = json['IsExecludeDoctor']; @@ -96,9 +96,9 @@ class PatientLabOrders { nationalityFlagURL = json['NationalityFlagURL']; noOfPatientsRate = json['NoOfPatientsRate']; orderDate = DateUtils.convertStringToDate(json['OrderDate']); - orderNo = json['OrderNo']; - patientID = json['PatientID']; - projectID = json['ProjectID']; + orderNo = json['OrderNo'].toString(); + patientID = json['PatientID'].toString(); + projectID = json['ProjectID'].toString(); projectName = json['ProjectName']; projectNameN = json['ProjectNameN']; qR = json['QR']; 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 bdeb3930..b48cf0e1 100644 --- a/lib/core/model/labs/request_patient_lab_special_result.dart +++ b/lib/core/model/labs/request_patient_lab_special_result.dart @@ -65,7 +65,7 @@ class RequestPatientLabSpecialResult { data['OrderNo'] = this.orderNo; data['SetupID'] = this.setupID; data['ProjectID'] = this.projectID; - data['ClinicID'] = this.clinicID; + data['ClinicID'] = this.clinicID ?? 0; data['VersionID'] = this.versionID; data['Channel'] = this.channel; data['LanguageID'] = this.languageID; diff --git a/lib/core/service/labs_service.dart b/lib/core/service/labs_service.dart index ecfc96a1..6ea6e6cf 100644 --- a/lib/core/service/labs_service.dart +++ b/lib/core/service/labs_service.dart @@ -12,16 +12,30 @@ import 'base/base_service.dart'; class LabsService extends BaseService { List patientLabOrdersList = List(); - Future getPatientLabOrdersList(PatiantInformtion patient) async { + Future getPatientLabOrdersList( + PatiantInformtion patient, bool isArrived) async { hasError = false; Map body = Map(); - body['isDentalAllowedBackend'] = false; - await baseAppClient.postPatient(GET_Patient_LAB_ORDERS, patient: patient, + String url = ""; + if (isArrived) { + body['isDentalAllowedBackend'] = false; + url = GET_Patient_LAB_ORDERS; + } else { + url = GET_PATIENT_LAB_OREDERS; + } + + await baseAppClient.postPatient(url, patient: patient, onSuccess: (dynamic response, int statusCode) { patientLabOrdersList.clear(); - response['ListPLO'].forEach((hospital) { - patientLabOrdersList.add(PatientLabOrders.fromJson(hospital)); - }); + if (isArrived) { + response['ListPLO'].forEach((hospital) { + patientLabOrdersList.add(PatientLabOrders.fromJson(hospital)); + }); + } else { + response['List_GetLabOreders'].forEach((hospital) { + patientLabOrdersList.add(PatientLabOrders.fromJson(hospital)); + }); + } }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; @@ -40,42 +54,65 @@ class LabsService extends BaseService { int clinicID, String invoiceNo, String orderNo, - PatiantInformtion patient}) async { + PatiantInformtion patient, + bool isInpatient = false}) async { hasError = false; + + Map body = Map(); _requestPatientLabSpecialResult.projectID = projectID; _requestPatientLabSpecialResult.clinicID = clinicID; _requestPatientLabSpecialResult.invoiceNo = invoiceNo; _requestPatientLabSpecialResult.orderNo = orderNo; + body = _requestPatientLabSpecialResult.toJson(); - await baseAppClient.postPatient(GET_Patient_LAB_SPECIAL_RESULT, - patient: patient, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.postPatient(GET_Patient_LAB_SPECIAL_RESULT, patient: patient, + onSuccess: (dynamic response, int statusCode) { patientLabSpecialResult.clear(); + response['ListPLSR'].forEach((hospital) { patientLabSpecialResult.add(PatientLabSpecialResult.fromJson(hospital)); }); + }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; - }, body: _requestPatientLabSpecialResult.toJson()); + }, body: body); } Future getPatientLabResult( - {PatientLabOrders patientLabOrder, PatiantInformtion patient}) async { + {PatientLabOrders patientLabOrder, PatiantInformtion patient, bool isInpatient}) async { hasError = false; + + String url = ""; + if (isInpatient) { + url = GET_PATIENT_LAB_RESULTS; + } else { + url = GET_Patient_LAB_RESULT; + } + Map body = Map(); body['InvoiceNo'] = patientLabOrder.invoiceNo; body['OrderNo'] = patientLabOrder.orderNo; body['isDentalAllowedBackend'] = false; body['SetupID'] = patientLabOrder.setupID; body['ProjectID'] = patientLabOrder.projectID; - body['ClinicID'] = patientLabOrder.clinicID; - await baseAppClient.postPatient(GET_Patient_LAB_RESULT, patient: patient, + body['ClinicID'] = patientLabOrder.clinicID ?? 0; + + await baseAppClient.postPatient(url, patient: patient, onSuccess: (dynamic response, int statusCode) { patientLabSpecialResult.clear(); labResultList.clear(); - response['ListPLR'].forEach((lab) { - labResultList.add(LabResult.fromJson(lab)); - }); + + if(isInpatient){ + response['List_GetLabNormal'].forEach((hospital) { + labResultList.add(LabResult.fromJson(hospital)); + }); + }else { + response['ListPLR'].forEach((lab) { + labResultList.add(LabResult.fromJson(lab)); + }); + } + }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; diff --git a/lib/core/viewModel/labs_view_model.dart b/lib/core/viewModel/labs_view_model.dart index 43851649..020a6184 100644 --- a/lib/core/viewModel/labs_view_model.dart +++ b/lib/core/viewModel/labs_view_model.dart @@ -28,7 +28,7 @@ class LabsViewModel extends BaseViewModel { void getLabs(PatiantInformtion patient) async { setState(ViewState.Busy); - await _labsService.getPatientLabOrdersList(patient); + await _labsService.getPatientLabOrdersList(patient, true); if (_labsService.hasError) { error = _labsService.error; setState(ViewState.Error); @@ -89,7 +89,6 @@ class LabsViewModel extends BaseViewModel { List labResultLists = List(); List get labResultListsCoustom { - return labResultLists; } @@ -98,14 +97,16 @@ class LabsViewModel extends BaseViewModel { int clinicID, String invoiceNo, String orderNo, - PatiantInformtion patient}) async { + PatiantInformtion patient, + bool isInpatient}) async { setState(ViewState.Busy); await _labsService.getLaboratoryResult( invoiceNo: invoiceNo, orderNo: orderNo, projectID: projectID, clinicID: clinicID, - patient: patient); + patient: patient, + isInpatient: isInpatient); if (_labsService.hasError) { error = _labsService.error; setState(ViewState.Error); @@ -114,9 +115,11 @@ class LabsViewModel extends BaseViewModel { } } - getPatientLabResult({PatientLabOrders patientLabOrder,PatiantInformtion patient}) async { + getPatientLabResult( + {PatientLabOrders patientLabOrder, PatiantInformtion patient, bool isInpatient}) async { setState(ViewState.Busy); - await _labsService.getPatientLabResult(patientLabOrder: patientLabOrder,patient: patient); + await _labsService.getPatientLabResult( + patientLabOrder: patientLabOrder, patient: patient, isInpatient: isInpatient); if (_labsService.hasError) { error = _labsService.error; setState(ViewState.Error); @@ -149,10 +152,14 @@ class LabsViewModel extends BaseViewModel { } getPatientLabOrdersResults( - {PatientLabOrders patientLabOrder, String procedure,PatiantInformtion patient}) async { + {PatientLabOrders patientLabOrder, + String procedure, + PatiantInformtion patient}) async { setState(ViewState.Busy); await _labsService.getPatientLabOrdersResults( - patientLabOrder: patientLabOrder, procedure: procedure,patient: patient); + patientLabOrder: patientLabOrder, + procedure: procedure, + patient: patient); if (_labsService.hasError) { error = _labsService.error; setState(ViewState.Error); diff --git a/lib/core/viewModel/procedure_View_model.dart b/lib/core/viewModel/procedure_View_model.dart index 0d0b41ef..d35b2c14 100644 --- a/lib/core/viewModel/procedure_View_model.dart +++ b/lib/core/viewModel/procedure_View_model.dart @@ -228,7 +228,7 @@ class ProcedureViewModel extends BaseViewModel { void getLabs(PatiantInformtion patient,{bool isArrived}) async { setState(ViewState.Busy); - await _labsService.getPatientLabOrdersList(patient); + await _labsService.getPatientLabOrdersList(patient, isArrived); if (_labsService.hasError) { error = _labsService.error; if(isArrived) diff --git a/lib/screens/patients/profile/lab_result/LabResultWidget.dart b/lib/screens/patients/profile/lab_result/LabResultWidget.dart index 9bdd712c..c63f5bdf 100644 --- a/lib/screens/patients/profile/lab_result/LabResultWidget.dart +++ b/lib/screens/patients/profile/lab_result/LabResultWidget.dart @@ -11,15 +11,23 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; - class LabResultWidget extends StatelessWidget { - final String filterName; final List patientLabResultList; final PatientLabOrders patientLabOrder; final PatiantInformtion patient; - LabResultWidget({Key key, this.filterName, this.patientLabResultList, this.patientLabOrder, this.patient}) : super(key: key); + final bool isInpatient; + + LabResultWidget( + {Key key, + this.filterName, + this.patientLabResultList, + this.patientLabOrder, + this.patient, + this.isInpatient}) + : super(key: key); ProjectViewModel projectViewModel; + @override Widget build(BuildContext context) { projectViewModel = Provider.of(context); @@ -29,31 +37,32 @@ class LabResultWidget extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - AppText(filterName), - InkWell( - onTap: () { - Navigator.push( - context, - FadePage( - page: FlowChartPage( - filterName: filterName, - patientLabOrder: patientLabOrder, - patient: patient, + if (!isInpatient) + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + AppText(filterName), + InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: FlowChartPage( + filterName: filterName, + patientLabOrder: patientLabOrder, + patient: patient, + ), ), - ), - ); - }, - child: AppText( - TranslationBase.of(context).showMoreBtn, - textDecoration: TextDecoration.underline, - color: Colors.blue, + ); + }, + child: AppText( + TranslationBase.of(context).showMoreBtn, + textDecoration: TextDecoration.underline, + color: Colors.blue, + ), ), - ), - ], - ), + ], + ), Row( children: [ Expanded( @@ -61,7 +70,8 @@ class LabResultWidget extends StatelessWidget { child: Center( child: AppText( TranslationBase.of(context).description, - color: Colors.black,bold: true, + color: Colors.black, + bold: true, ), ), ), @@ -69,68 +79,87 @@ class LabResultWidget extends StatelessWidget { Expanded( child: Container( child: Center( - child: AppText(TranslationBase.of(context).value, color: Colors.black,bold: true,), + child: AppText( + TranslationBase.of(context).value, + color: Colors.black, + bold: true, + ), ), ), ), Expanded( child: Container( child: Center( - child: AppText(TranslationBase.of(context).range, color: Colors.black,bold: true,), + child: AppText( + TranslationBase.of(context).range, + color: Colors.black, + bold: true, + ), ), ), ) ], ), - SizedBox(height: 7,), - Divider(color: Colors.black,thickness: 1,), - SizedBox(height: 12,), - ...List.generate(patientLabResultList.length, (index) => Column( - children: [ - Row( - children: [ - Expanded( - child: Container( - padding: EdgeInsets.all(10), - color: Colors.white, - child: Center( - child: AppText( - '${patientLabResultList[index].testCode}\n'+ - patientLabResultList[index].description, - textAlign: TextAlign.center, - ), - ), - ), - ), - Expanded( - child: Container( - padding: EdgeInsets.all(10), - color: Colors.white, - child: Center( - child: AppText( - patientLabResultList[index].resultValue+" "+patientLabResultList[index].uOM, - textAlign: TextAlign.center, - ), - ), - ), - ), - Expanded( - child: Container( - padding: EdgeInsets.all(10), - color: Colors.white, - child: Center( - child: AppText( - patientLabResultList[index].referanceRange, - textAlign: TextAlign.center, - ), + SizedBox( + height: 7, + ), + Divider( + color: Colors.black, + thickness: 1, + ), + SizedBox( + height: 12, + ), + ...List.generate( + patientLabResultList.length, + (index) => Column( + children: [ + Row( + children: [ + Expanded( + child: Container( + padding: EdgeInsets.all(10), + color: Colors.white, + child: Center( + child: AppText( + '${patientLabResultList[index].testCode}\n' + + patientLabResultList[index].description, + textAlign: TextAlign.center, + ), + ), + ), + ), + Expanded( + child: Container( + padding: EdgeInsets.all(10), + color: Colors.white, + child: Center( + child: AppText( + patientLabResultList[index].resultValue + + " " + + "${patientLabResultList[index].uOM ?? ""}", + textAlign: TextAlign.center, + ), + ), + ), + ), + Expanded( + child: Container( + padding: EdgeInsets.all(10), + color: Colors.white, + child: Center( + child: AppText( + patientLabResultList[index].referanceRange, + textAlign: TextAlign.center, + ), + ), + ), + ), + ], ), - ), - ), - ], - ), - Divider(), - ], - )) + Divider(), + ], + )) // Table( // border: TableBorder.symmetric( // inside: BorderSide(width: 2.0, color: Colors.grey[300],style: BorderStyle.solid), @@ -141,7 +170,8 @@ class LabResultWidget extends StatelessWidget { ), ); } - List fullData(List labResultList,context) { + + List fullData(List labResultList, context) { List tableRow = []; tableRow.add( TableRow( @@ -150,18 +180,27 @@ class LabResultWidget extends StatelessWidget { child: Center( child: AppText( TranslationBase.of(context).description, - color: Colors.black,bold: true, + color: Colors.black, + bold: true, ), ), ), Container( child: Center( - child: AppText(TranslationBase.of(context).value, color: Colors.black,bold: true,), + child: AppText( + TranslationBase.of(context).value, + color: Colors.black, + bold: true, + ), ), ), Container( child: Center( - child: AppText(TranslationBase.of(context).range, color: Colors.black,bold: true,), + child: AppText( + TranslationBase.of(context).range, + color: Colors.black, + bold: true, + ), ), ), ], @@ -189,7 +228,7 @@ class LabResultWidget extends StatelessWidget { color: Colors.white, child: Center( child: AppText( - lab.resultValue+" "+lab.uOM, + lab.resultValue + " " + lab.uOM, textAlign: TextAlign.center, ), ), @@ -213,7 +252,4 @@ class LabResultWidget extends StatelessWidget { }); return tableRow; } - } - - 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 0d8b1749..4a5a768d 100644 --- a/lib/screens/patients/profile/lab_result/laboratory_result_page.dart +++ b/lib/screens/patients/profile/lab_result/laboratory_result_page.dart @@ -18,7 +18,13 @@ class LaboratoryResultPage extends StatefulWidget { final PatiantInformtion patient; final String patientType; final String arrivalType; - LaboratoryResultPage({Key key, this.patientLabOrders, this.patient, this.patientType, this.arrivalType}); + + LaboratoryResultPage( + {Key key, + this.patientLabOrders, + this.patient, + this.patientType, + this.arrivalType}); @override _LaboratoryResultPageState createState() => _LaboratoryResultPageState(); @@ -33,15 +39,16 @@ class _LaboratoryResultPageState extends State { clinicID: widget.patientLabOrders.clinicID, projectID: widget.patientLabOrders.projectID, orderNo: widget.patientLabOrders.orderNo, - patient: widget.patient), + patient: widget.patient, + isInpatient: widget.patientType == "1"), builder: (_, model, w) => AppScaffold( isShowAppBar: true, appBar: PatientProfileHeaderWhitAppointmentAppBar( patient: widget.patient, - patientType: widget.patientType??"0", - arrivalType: widget.arrivalType??"0", + patientType: widget.patientType ?? "0", + arrivalType: widget.arrivalType ?? "0", orderNo: widget.patientLabOrders.orderNo, - appointmentDate:widget.patientLabOrders.orderDate, + appointmentDate: widget.patientLabOrders.orderDate, doctorName: widget.patientLabOrders.doctorName, branch: widget.patientLabOrders.projectName, clinic: widget.patientLabOrders.clinicDescription, @@ -53,17 +60,18 @@ class _LaboratoryResultPageState extends State { body: SingleChildScrollView( child: Column( children: [ - ...List.generate(model.patientLabSpecialResult.length, (index) => LaboratoryResultWidget( - onTap: () async { - - }, - billNo: widget.patientLabOrders.invoiceNo, - details: model.patientLabSpecialResult[index].resultDataHTML, - orderNo: widget.patientLabOrders.orderNo, - patientLabOrder: widget.patientLabOrders, - patient: widget.patient, - )), - + ...List.generate( + model.patientLabSpecialResult.length, + (index) => LaboratoryResultWidget( + onTap: () async {}, + billNo: widget.patientLabOrders.invoiceNo, + details: model + .patientLabSpecialResult[index].resultDataHTML, + orderNo: widget.patientLabOrders.orderNo, + patientLabOrder: widget.patientLabOrders, + patient: widget.patient, + isInpatient: widget.patientType == "1", + )), ], ), ), 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 388a4859..8ae1e083 100644 --- a/lib/screens/patients/profile/lab_result/laboratory_result_widget.dart +++ b/lib/screens/patients/profile/lab_result/laboratory_result_widget.dart @@ -20,13 +20,17 @@ class LaboratoryResultWidget extends StatefulWidget { final String orderNo; final PatientLabOrders patientLabOrder; final PatiantInformtion patient; + final bool isInpatient; + const LaboratoryResultWidget( {Key key, this.onTap, this.billNo, this.details, this.orderNo, - this.patientLabOrder, this.patient}) + this.patientLabOrder, + this.patient, + this.isInpatient}) : super(key: key); @override @@ -41,7 +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), + onModelReady: (model) => model.getPatientLabResult( + patientLabOrder: widget.patientLabOrder, + patient: widget.patient, + isInpatient: widget.isInpatient), builder: (_, model, w) => NetworkBaseView( baseViewModel: model, child: Container( @@ -77,9 +84,15 @@ class _LaboratoryResultWidgetState extends State { )), child: Row( children: [ - Expanded(child: Container( - margin: EdgeInsets.only(left: 10, right: 10), - child: AppText(TranslationBase.of(context).generalResult,bold: true,))), + Expanded( + child: Container( + margin: EdgeInsets.only( + left: 10, right: 10), + child: AppText( + TranslationBase.of(context) + .generalResult, + bold: true, + ))), Container( width: 25, height: 25, @@ -115,14 +128,15 @@ class _LaboratoryResultWidgetState extends State { children: [ ...List.generate( model.labResultLists.length, - (index) => LabResultWidget( + (index) => LabResultWidget( patientLabOrder: widget.patientLabOrder, filterName: model .labResultLists[index].filterName, patientLabResultList: model .labResultLists[index] .patientLabResultList, - patient:widget.patient, + patient: widget.patient, + isInpatient: widget.isInpatient, ), ) ], @@ -135,7 +149,6 @@ class _LaboratoryResultWidgetState extends State { SizedBox( height: 10, ), - ], ), ], 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 7e812848..ddb0d3de 100644 --- a/lib/screens/patients/profile/lab_result/labs_home_page.dart +++ b/lib/screens/patients/profile/lab_result/labs_home_page.dart @@ -13,14 +13,11 @@ import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-head import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_expandable_notifier_new.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/doctor_card.dart'; import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; -import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; class LabsHomePage extends StatelessWidget { String patientType; diff --git a/lib/widgets/patients/profile/patient-profile-header-new-design_in_patient.dart b/lib/widgets/patients/profile/patient-profile-header-new-design_in_patient.dart index 0425794b..fe118973 100644 --- a/lib/widgets/patients/profile/patient-profile-header-new-design_in_patient.dart +++ b/lib/widgets/patients/profile/patient-profile-header-new-design_in_patient.dart @@ -9,6 +9,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:intl/intl.dart'; +import 'package:url_launcher/url_launcher.dart'; class PatientProfileHeaderNewDesignInPatient extends StatelessWidget { final PatiantInformtion patient; @@ -77,7 +78,7 @@ class PatientProfileHeaderNewDesignInPatient extends StatelessWidget { margin: EdgeInsets.symmetric(horizontal: 4), child: InkWell( onTap: () { - // should call patient or show mobile number : patient.mobileNumber + launch("tel://" + patient.mobileNumber); }, child: Icon( Icons.phone, diff --git a/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart b/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart index f00c7ce0..7e760b1f 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart @@ -124,7 +124,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget { patient: patient, patientType: patientType, arrivalType: arrivalType, - route: null, + route: MEDICAL_FILE, nameLine1: "Health", //TranslationBase.of(context).medicalReport, nameLine2: "Summery", @@ -135,7 +135,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget { patient: patient, patientType: patientType, arrivalType: arrivalType, - route: null, + route: REFER_PATIENT_TO_DOCTOR, nameLine1: TranslationBase.of(context).referral, nameLine2: TranslationBase.of(context).patient, icon: 'patient/refer_patient.png'), @@ -144,7 +144,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget { patient: patient, patientType: patientType, arrivalType: arrivalType, - route: null, + route: PATIENT_INSURANCE_APPROVALS_NEW, nameLine1: TranslationBase.of(context).insurance, nameLine2: TranslationBase.of(context).approvals, icon: 'patient/vital_signs.png'), @@ -153,6 +153,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget { patient: patient, patientType: patientType, arrivalType: arrivalType, + isDisable: true, route: null, nameLine1: "Discharge", nameLine2: "Summery",