From c8fde6e8694483e369ecd69c3396b9e7b9e278e5 Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Sun, 9 Jan 2022 10:54:30 +0200 Subject: [PATCH 01/41] hide registration service --- lib/screens/home/home_screen.dart | 36 +++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/lib/screens/home/home_screen.dart b/lib/screens/home/home_screen.dart index df810361..27ec03e2 100644 --- a/lib/screens/home/home_screen.dart +++ b/lib/screens/home/home_screen.dart @@ -424,24 +424,24 @@ class _HomeScreenState extends State { }, )); changeColorIndex(); - - patientCards.add(HomePatientCard( - gradient: backgroundColors[colorIndex], - backgroundIconColor: backgroundIconColors[colorIndex], - //TODO Elham* match the of the icon - cardIcon: DoctorApp.arrival_patients, - textColor: textColors[colorIndex], - text: TranslationBase.of(context).registerNewPatient, - onTap: () { - Navigator.push( - context, - FadePage( - page: RegisterPatientPage(), - ), - ); - }, - )); - changeColorIndex(); + //TODO Keep commented + // patientCards.add(HomePatientCard( + // gradient: backgroundColors[colorIndex], + // backgroundIconColor: backgroundIconColors[colorIndex], + // //TODO Elham* match the of the icon + // cardIcon: DoctorApp.arrival_patients, + // textColor: textColors[colorIndex], + // text: TranslationBase.of(context).registerNewPatient, + // onTap: () { + // Navigator.push( + // context, + // FadePage( + // page: RegisterPatientPage(), + // ), + // ); + // }, + // )); + // changeColorIndex(); patientCards.add(HomePatientCard( gradient: backgroundColors[colorIndex], From 810cda1f9b29c2bbbc021ebdef53efc811cf1d10 Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Sun, 9 Jan 2022 10:57:47 +0200 Subject: [PATCH 02/41] fix header --- lib/landing_page.dart | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/lib/landing_page.dart b/lib/landing_page.dart index 89faeb0c..c069e7e7 100644 --- a/lib/landing_page.dart +++ b/lib/landing_page.dart @@ -49,16 +49,13 @@ class _LandingPageState extends State { backgroundColor: HexColor('#FFFFFF'), //textTheme: TextTheme(headline6: TextStyle(color: Colors.white)), title: currentTab != 0 - ? Padding( - padding: const EdgeInsets.only(right: 188,top: 36), - child: AppText( - getText(currentTab), - letterSpacing: -1.44, - fontWeight: FontWeight.w700, - fontSize: 24.0, - color: Color(0xff2B353E), - ), - ) + ? AppText( + getText(currentTab), + letterSpacing: -1.44, + fontWeight: FontWeight.w700, + fontSize: 24.0, + color: Color(0xff2B353E), + ) : SizedBox(), leading: Builder( builder: (BuildContext context) { From da63af6db36b05d7f7710d1c2c537f6c692fe23c Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Sun, 9 Jan 2022 12:09:48 +0200 Subject: [PATCH 03/41] vte assessment --- lib/client/base_app_client.dart | 2 + lib/config/config.dart | 3 + .../vte_assessment_req_model.dart | 22 ++ .../vte_assessment_res_model.dart | 48 ++++ .../profile/vte_assessment_servive.dart | 30 +++ .../profile/vte_assessment_view_model.dart | 37 +++ lib/locator.dart | 4 + lib/routes.dart | 3 + .../profile_gird_for_InPatient.dart | 10 +- .../vte_assessment_screen.dart | 232 ++++++++++++++++++ 10 files changed, 390 insertions(+), 1 deletion(-) create mode 100644 lib/core/model/vte_assessment/vte_assessment_req_model.dart create mode 100644 lib/core/model/vte_assessment/vte_assessment_res_model.dart create mode 100644 lib/core/service/patient/profile/vte_assessment_servive.dart create mode 100644 lib/core/viewModel/profile/vte_assessment_view_model.dart create mode 100644 lib/screens/patients/profile/vte_assessment /vte_assessment_screen.dart diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index 033bc44c..d088fadd 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -64,6 +64,8 @@ class BaseAppClient { body['TokenID'] = token ?? ''; } // body['TokenID'] = "@dm!n" ?? ''; + body['TokenID'] = "@dm!n";///Todo Elham* Return back before the build body.containsKey('TokenID') ? body['TokenID'] : token; + if (!isFallLanguage) { String lang = await sharedPref.getString(APP_Language); if (lang != null && lang == 'ar') diff --git a/lib/config/config.dart b/lib/config/config.dart index 2301eab0..17abf2bf 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -386,6 +386,9 @@ const GET_PENDING_DISCHARGE_SUMMARY = const GET_ALL_DISCHARGE_SUMMARY = "Services/DoctorApplication.svc/REST/DoctorApp_GetDischargeSummary"; +const VTE_ASSESSMENT = + "Services/Patients.svc/REST/INP_GetVTEHistoryByTransactionNo"; + var selectedPatientType = 1; //*********change value to decode json from Dropdown ************ diff --git a/lib/core/model/vte_assessment/vte_assessment_req_model.dart b/lib/core/model/vte_assessment/vte_assessment_req_model.dart new file mode 100644 index 00000000..1f0bd1fa --- /dev/null +++ b/lib/core/model/vte_assessment/vte_assessment_req_model.dart @@ -0,0 +1,22 @@ +class VteAssessmentRequestModel { + String setupID; + int parameterGroup; + int transactionNo; + + VteAssessmentRequestModel( + {this.setupID = "010266", this.parameterGroup = 7, this.transactionNo}); + + VteAssessmentRequestModel.fromJson(Map json) { + setupID = json['SetupID']; + parameterGroup = json['ParameterGroup']; + transactionNo = json['TransactionNo']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['ParameterGroup'] = this.parameterGroup; + data['TransactionNo'] = this.transactionNo; + return data; + } +} diff --git a/lib/core/model/vte_assessment/vte_assessment_res_model.dart b/lib/core/model/vte_assessment/vte_assessment_res_model.dart new file mode 100644 index 00000000..8bd2c441 --- /dev/null +++ b/lib/core/model/vte_assessment/vte_assessment_res_model.dart @@ -0,0 +1,48 @@ +class VteAssessmentResponseModel { + int lineItemNo; + String vTEType; + String ambulationProtocol; + String pharmacology; + String reasonsThrombo; + String riskScore; + int totalScore; + int createdBy; + String createdOn; + + VteAssessmentResponseModel( + {this.lineItemNo, + this.vTEType, + this.ambulationProtocol, + this.pharmacology, + this.reasonsThrombo, + this.riskScore, + this.totalScore, + this.createdBy, + this.createdOn}); + + VteAssessmentResponseModel.fromJson(Map json) { + lineItemNo = json['LineItemNo']; + vTEType = json['VTE_Type']; + ambulationProtocol = json['AmbulationProtocol']; + pharmacology = json['Pharmacology']; + reasonsThrombo = json['ReasonsThrombo']; + riskScore = json['Risk_Score']; + totalScore = json['Total_Score']; + createdBy = json['Created_By']; + createdOn = json['Created_On']; + } + + Map toJson() { + final Map data = new Map(); + data['LineItemNo'] = this.lineItemNo; + data['VTE_Type'] = this.vTEType; + data['AmbulationProtocol'] = this.ambulationProtocol; + data['Pharmacology'] = this.pharmacology; + data['ReasonsThrombo'] = this.reasonsThrombo; + data['Risk_Score'] = this.riskScore; + data['Total_Score'] = this.totalScore; + data['Created_By'] = this.createdBy; + data['Created_On'] = this.createdOn; + return data; + } +} diff --git a/lib/core/service/patient/profile/vte_assessment_servive.dart b/lib/core/service/patient/profile/vte_assessment_servive.dart new file mode 100644 index 00000000..9bfbf288 --- /dev/null +++ b/lib/core/service/patient/profile/vte_assessment_servive.dart @@ -0,0 +1,30 @@ +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/core/model/vte_assessment/vte_assessment_req_model.dart'; +import 'package:doctor_app_flutter/core/model/vte_assessment/vte_assessment_res_model.dart'; +import 'package:doctor_app_flutter/core/service/base/base_service.dart'; +import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryReqModel.dart'; +import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryResModel.dart'; + +class VteAssessmentService extends BaseService { + + List _allDischargeSummaryList = []; + + List get allDischargeSummaryList => + _allDischargeSummaryList; + Future getVteAssessment( + {VteAssessmentRequestModel vteAssessmentRequestModel}) async { + hasError = false; + await baseAppClient.post(VTE_ASSESSMENT, + onSuccess: (dynamic response, int statusCode) { + _allDischargeSummaryList.clear(); + response['INP_VTEHistoryByTransactionNo_List'].forEach( + (v) { + _allDischargeSummaryList.add(VteAssessmentResponseModel.fromJson(v)); + }, + ); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: vteAssessmentRequestModel.toJson()); + } +} diff --git a/lib/core/viewModel/profile/vte_assessment_view_model.dart b/lib/core/viewModel/profile/vte_assessment_view_model.dart new file mode 100644 index 00000000..f03bf07d --- /dev/null +++ b/lib/core/viewModel/profile/vte_assessment_view_model.dart @@ -0,0 +1,37 @@ +import 'package:doctor_app_flutter/core/enum/viewstate.dart'; +import 'package:doctor_app_flutter/core/model/vte_assessment/vte_assessment_req_model.dart'; +import 'package:doctor_app_flutter/core/model/vte_assessment/vte_assessment_res_model.dart'; +import 'package:doctor_app_flutter/core/service/patient/profile/discharge_summary_servive.dart'; +import 'package:doctor_app_flutter/core/service/patient/profile/vte_assessment_servive.dart'; +import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; +import 'package:doctor_app_flutter/locator.dart'; +import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryReqModel.dart'; +import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryResModel.dart'; + +class VteAssessmentViewModel extends BaseViewModel { + bool hasError = false; + VteAssessmentService _dischargeSummaryService = + locator(); + + List get allDisChargeSummaryList => + _dischargeSummaryService.allDischargeSummaryList; + + Future getVteAssessment({ + int patientId, + int admissionNo, + }) async { + VteAssessmentRequestModel vteAssessmentRequestModel = + VteAssessmentRequestModel( + transactionNo: admissionNo); + hasError = false; + setState(ViewState.Busy); + await _dischargeSummaryService.getVteAssessment( + vteAssessmentRequestModel: vteAssessmentRequestModel); + if (_dischargeSummaryService.hasError) { + error = _dischargeSummaryService.error; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } +} diff --git a/lib/locator.dart b/lib/locator.dart index 28f4bfdf..1cd3fa87 100644 --- a/lib/locator.dart +++ b/lib/locator.dart @@ -33,6 +33,7 @@ import 'core/service/patient/patient-doctor-referral-service.dart'; import 'core/service/patient/patientInPatientService.dart'; import 'core/service/patient/patient_service.dart'; import 'core/service/patient/profile/operation_report_servive.dart'; +import 'core/service/patient/profile/vte_assessment_servive.dart'; import 'core/service/patient/referral_patient_service.dart'; import 'core/service/patient_medical_file/admission_request/patient-admission-request-service.dart'; import 'core/service/patient_medical_file/insurance/InsuranceCardService.dart'; @@ -65,6 +66,7 @@ import 'core/viewModel/patient-referral-viewmodel.dart'; import 'core/viewModel/patient-ucaf-viewmodel.dart'; import 'core/viewModel/patient-vital-sign-viewmodel.dart'; import 'core/viewModel/prescriptions_view_model.dart'; +import 'core/viewModel/profile/vte_assessment_view_model.dart'; import 'core/viewModel/radiology_view_model.dart'; import 'core/viewModel/referral_view_model.dart'; import 'core/viewModel/schedule_view_model.dart'; @@ -112,6 +114,7 @@ void setupLocator() { locator.registerLazySingleton(() => PendingOrderService()); locator.registerLazySingleton(() => PatientRegistrationService()); locator.registerLazySingleton(() => DischargeSummaryService()); + locator.registerLazySingleton(() => VteAssessmentService()); /// View Model locator.registerFactory(() => DoctorReplayViewModel()); @@ -144,4 +147,5 @@ void setupLocator() { locator.registerFactory(() => PatientRegistrationViewModel()); locator.registerFactory(() => PendingOrdersViewModel()); locator.registerFactory(() => DischargeSummaryViewModel()); + locator.registerFactory(() => VteAssessmentViewModel()); } diff --git a/lib/routes.dart b/lib/routes.dart index 8f636d74..49b1617a 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -22,6 +22,7 @@ import 'package:doctor_app_flutter/screens/patients/profile/prescriptions/in_pat import 'package:doctor_app_flutter/screens/patients/profile/radiology/radiology_home_page.dart'; import 'package:doctor_app_flutter/screens/patients/profile/referral/refer-patient-screen-in-patient.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/update_soap_index.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/vte_assessment%20/vte_assessment_screen.dart'; import 'package:doctor_app_flutter/screens/prescription/prescriptions_page.dart'; import 'package:doctor_app_flutter/screens/procedures/procedure_screen.dart'; @@ -80,6 +81,7 @@ const String NURSING_PROGRESS_NOTE = 'nursing_progress_note'; const String DIAGNOSIS_FOR_IN_PATIENT = 'get_diagnosis_for_in_patient'; const String DIABETIC_CHART_VALUES = 'get_diabetic_chart_values'; +const String VTE_ASSESSMENT = 'vte_assessment '; const String DISCHARGE_SUMMARY = 'discharge_summary'; //todo: change the routing way. @@ -131,4 +133,5 @@ var routes = { DIAGNOSIS_FOR_IN_PATIENT: (_) => DiagnosisScreen(), ADMISSION_ORDERS: (_) => AdmissionOrdersScreen(), DIABETIC_CHART_VALUES: (_) => DiabeticChart(), + VTE_ASSESSMENT: (_) => VteAssessmentScreen(), }; diff --git a/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart b/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart index 22d784e7..14a54471 100644 --- a/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart +++ b/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart @@ -166,7 +166,15 @@ class ProfileGridForInPatient extends StatelessWidget { DIABETIC_CHART_VALUES, 'assets/images/svgs/profile_screen/diabetic chart.svg', isInPatient: isInpatient, - ), + ) + , + PatientProfileCardModel( + "VTE", + "Assessment", + VTE_ASSESSMENT, + 'assets/images/svgs/profile_screen/diabetic chart.svg', + isInPatient: isInpatient, + ), ]; return Padding( diff --git a/lib/screens/patients/profile/vte_assessment /vte_assessment_screen.dart b/lib/screens/patients/profile/vte_assessment /vte_assessment_screen.dart new file mode 100644 index 00000000..242dab07 --- /dev/null +++ b/lib/screens/patients/profile/vte_assessment /vte_assessment_screen.dart @@ -0,0 +1,232 @@ +import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; +import 'package:doctor_app_flutter/core/model/diagnosis/GetDiagnosisForInPatientRequestModel.dart'; +import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/profile/vte_assessment_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.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/card_with_bg_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); + +class VteAssessmentScreen extends StatefulWidget { + const VteAssessmentScreen({Key key}) : super(key: key); + + @override + _ProgressNoteState createState() => _ProgressNoteState(); +} + +class _ProgressNoteState extends State { + bool isDischargedPatient = false; + AuthenticationViewModel authenticationViewModel; + ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + authenticationViewModel = Provider.of(context); + projectViewModel = Provider.of(context); + final routeArgs = ModalRoute.of(context).settings.arguments as Map; + PatiantInformtion patient = routeArgs['patient']; + if (routeArgs.containsKey('isDischargedPatient')) + isDischargedPatient = routeArgs['isDischargedPatient']; + return BaseView( + onModelReady: (model) => model.getVteAssessment(patientId: patient.patientId, admissionNo: 2016023498 + + //int.parse(patient.admissionNo) + ), + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + backgroundColor: Theme.of(context).scaffoldBackgroundColor, + appBar: PatientProfileAppBar( + patient, + isInpatient: true, + ), + body: model.allDisChargeSummaryList == null || + model.allDisChargeSummaryList.length == 0 + ? Center( + child: ErrorMessage( + error: TranslationBase.of(context).noDataAvailable, + ), + ) + : Container( + color: Colors.grey[200], + child: Column( + children: [ + Expanded( + child: Container( + child: ListView.builder( + itemCount: model.allDisChargeSummaryList.length, + itemBuilder: (BuildContext ctxt, int index) { + return FractionallySizedBox( + widthFactor: 0.95, + child: CardWithBgWidget( + hasBorder: false, + bgColor: Colors.transparent, + widget: Column( + children: [ + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + width: MediaQuery.of(context) + .size + .width * + 0.60, + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Row( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + AppText( + TranslationBase.of( + context) + .createdBy, + fontSize: 12, + ), + + ], + ), + ], + ), + ), + Column( + children: [ + AppText( + model + .allDisChargeSummaryList[ + index] + .createdOn != + null + ? AppDateUtils.getDayMonthYearDateFormatted( + AppDateUtils + .getDateTimeFromServerFormat(model + .allDisChargeSummaryList[ + index] + .createdOn), + isArabic: + projectViewModel + .isArabic, + isMonthShort: true) + : AppDateUtils + .getDayMonthYearDateFormatted( + DateTime.now(), + isArabic: + projectViewModel + .isArabic), + fontWeight: FontWeight.w600, + fontSize: 14, + isCopyable: true, + ), + AppText( + model + .allDisChargeSummaryList[ + index] + .createdOn != + null + ? AppDateUtils.getHour( + AppDateUtils + .getDateTimeFromServerFormat(model + .allDisChargeSummaryList[ + index] + .createdOn)) + : AppDateUtils.getHour( + DateTime.now()), + fontWeight: FontWeight.w600, + fontSize: 14, + isCopyable: true, + ), + ], + crossAxisAlignment: + CrossAxisAlignment.end, + ) + ], + ), + SizedBox( + height: 8, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .icd + + " : ", + fontSize: 12, + ), + Expanded( + child: AppText( + model + .allDisChargeSummaryList[ + index] + .reasonsThrombo, + fontSize: 12, + isCopyable: true, + ), + ), + ]), + SizedBox( + height: 8, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + "Ascii Desc : ", + fontSize: 12, + ), + Expanded( + child: AppText( + model + .allDisChargeSummaryList[ + index] + .riskScore, + fontSize: 12, + isCopyable: true, + ), + ), + ]) + ], + ), + SizedBox( + height: 20, + ), + ], + ), + ), + ); + }), + ), + ), + ], + ), + ), + ), + ); + } +} From 5ed5a266e9e526311bab3379e6504ebac2bb093e Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Sun, 9 Jan 2022 14:20:39 +0200 Subject: [PATCH 04/41] vte assessment fix path --- .../vte_assessment_screen.dart | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename lib/screens/patients/profile/{vte_assessment => vte_assessment}/vte_assessment_screen.dart (100%) diff --git a/lib/screens/patients/profile/vte_assessment /vte_assessment_screen.dart b/lib/screens/patients/profile/vte_assessment/vte_assessment_screen.dart similarity index 100% rename from lib/screens/patients/profile/vte_assessment /vte_assessment_screen.dart rename to lib/screens/patients/profile/vte_assessment/vte_assessment_screen.dart From 406165c34818b1ba3ea511509d95e9ac96cd28df Mon Sep 17 00:00:00 2001 From: RoaaGhali98 Date: Sun, 9 Jan 2022 17:00:45 +0200 Subject: [PATCH 05/41] we fix some issues -in-patient --- lib/client/base_app_client.dart | 1 - lib/config/localized_values.dart | 1 + lib/core/viewModel/profile/vte_assessment_view_model.dart | 2 +- lib/routes.dart | 2 +- lib/util/translations_delegate_base.dart | 2 ++ 5 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index d088fadd..eb0fe42d 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -64,7 +64,6 @@ class BaseAppClient { body['TokenID'] = token ?? ''; } // body['TokenID'] = "@dm!n" ?? ''; - body['TokenID'] = "@dm!n";///Todo Elham* Return back before the build body.containsKey('TokenID') ? body['TokenID'] : token; if (!isFallLanguage) { String lang = await sharedPref.getString(APP_Language); diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 2f44f19a..d6570d74 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -663,6 +663,7 @@ const Map> localizedValues = { "progressNoteSOAP": {"en": "Progress Note", "ar": "ملاحظة التقدم"}, "addProgressNote": {"en": "Add Progress Note", "ar": "أضف ملاحظة التقدم"}, "createdBy": {"en": "Created By :", "ar": "أضيفت عن طريق: "}, + "riskScore": {"en": "Risk Score :", "ar": "درجة المخاطر"}, "editedBy": {"en": "Edited By :", "ar": "عدلت من : "}, "currentMedications": {"en": "Current Medications", "ar": "الأدوية الحالية"}, "noItem": { diff --git a/lib/core/viewModel/profile/vte_assessment_view_model.dart b/lib/core/viewModel/profile/vte_assessment_view_model.dart index f03bf07d..e044bc0c 100644 --- a/lib/core/viewModel/profile/vte_assessment_view_model.dart +++ b/lib/core/viewModel/profile/vte_assessment_view_model.dart @@ -13,7 +13,7 @@ class VteAssessmentViewModel extends BaseViewModel { VteAssessmentService _dischargeSummaryService = locator(); - List get allDisChargeSummaryList => + List get allVteHistoryList => _dischargeSummaryService.allDischargeSummaryList; Future getVteAssessment({ diff --git a/lib/routes.dart b/lib/routes.dart index 49b1617a..8a63ebdc 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -22,7 +22,7 @@ import 'package:doctor_app_flutter/screens/patients/profile/prescriptions/in_pat import 'package:doctor_app_flutter/screens/patients/profile/radiology/radiology_home_page.dart'; import 'package:doctor_app_flutter/screens/patients/profile/referral/refer-patient-screen-in-patient.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/update_soap_index.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/vte_assessment%20/vte_assessment_screen.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/vte_assessment/vte_assessment_screen.dart'; import 'package:doctor_app_flutter/screens/prescription/prescriptions_page.dart'; import 'package:doctor_app_flutter/screens/procedures/procedure_screen.dart'; diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index 6aa9c6c7..86e17e1f 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -1123,6 +1123,8 @@ class TranslationBase { String get createdBy => localizedValues['createdBy'][locale.languageCode]; + String get riskScore => localizedValues['riskScore'][locale.languageCode]; + String get editedBy => localizedValues['editedBy'][locale.languageCode]; String get currentMedications => From 42feae9a2e3727468f8f5373cb137c4764a2b81a Mon Sep 17 00:00:00 2001 From: RoaaGhali98 Date: Mon, 10 Jan 2022 11:16:31 +0200 Subject: [PATCH 06/41] add new medication service --- lib/routes.dart | 7 + .../intervention_medication.dart | 299 ++++++++++++++++++ .../new-medication/new_medication_screen.dart | 119 +++++++ .../profile_gird_for_InPatient.dart | 7 + pubspec.lock | 7 + pubspec.yaml | 1 + 6 files changed, 440 insertions(+) create mode 100644 lib/screens/patients/profile/new-medication/intervention_medication.dart create mode 100644 lib/screens/patients/profile/new-medication/new_medication_screen.dart diff --git a/lib/routes.dart b/lib/routes.dart index 8f636d74..e77bfaac 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -14,6 +14,8 @@ import 'package:doctor_app_flutter/screens/patients/profile/lab_result/labs_home import 'package:doctor_app_flutter/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart'; import 'package:doctor_app_flutter/screens/patients/profile/medical_report/MedicalReportDetailPage.dart'; import 'package:doctor_app_flutter/screens/patients/profile/medical_report/MedicalReportPage.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/new-medication/intervention_medication.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/new-medication/new_medication_screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/notes/note/progress_note_screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/notes/nursing_note/nursing_note_screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/operation_report/operation_report.dart'; @@ -81,6 +83,9 @@ const String DIAGNOSIS_FOR_IN_PATIENT = 'get_diagnosis_for_in_patient'; const String DIABETIC_CHART_VALUES = 'get_diabetic_chart_values'; const String DISCHARGE_SUMMARY = 'discharge_summary'; +const String NEW_MEDICATION = 'new_medication'; +const String INTERVENTION_MEDICATION = 'intervention_medication'; + //todo: change the routing way. var routes = { @@ -131,4 +136,6 @@ var routes = { DIAGNOSIS_FOR_IN_PATIENT: (_) => DiagnosisScreen(), ADMISSION_ORDERS: (_) => AdmissionOrdersScreen(), DIABETIC_CHART_VALUES: (_) => DiabeticChart(), + NEW_MEDICATION: (_) => NewMedicationScreen(), + INTERVENTION_MEDICATION: (_) => InterventionMedicationScreen(), }; diff --git a/lib/screens/patients/profile/new-medication/intervention_medication.dart b/lib/screens/patients/profile/new-medication/intervention_medication.dart new file mode 100644 index 00000000..826d0739 --- /dev/null +++ b/lib/screens/patients/profile/new-medication/intervention_medication.dart @@ -0,0 +1,299 @@ +import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/pednding_orders_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.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/card_with_bg_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; +import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class InterventionMedicationScreen extends StatefulWidget { + const InterventionMedicationScreen({Key key}) : super(key: key); + + @override + _InterventionMedicationScreenState createState() => _InterventionMedicationScreenState(); +} + +class _InterventionMedicationScreenState extends State { + bool isDischargedPatient = false; + + AuthenticationViewModel authenticationViewModel; + + ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + authenticationViewModel = Provider.of(context); + projectViewModel = Provider.of(context); + final routeArgs = ModalRoute.of(context).settings.arguments as Map; + PatiantInformtion patient = routeArgs['patient']; + String arrivalType = routeArgs['arrivalType']; + if (routeArgs.containsKey('isDischargedPatient')) + isDischargedPatient = routeArgs['isDischargedPatient']; + return BaseView( + onModelReady: (model) => model.getAdmissionOrders( + admissionNo: int.parse(patient.admissionNo), + patientId: patient.patientMRN), + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + backgroundColor: Theme.of(context).scaffoldBackgroundColor, + //appBarTitle: TranslationBase.of(context).progressNote, + appBar: PatientProfileAppBar( + patient, + isInpatient: true, + ), + body: model.admissionOrderList == null || + model.admissionOrderList.length == 0 + ? Center( + child: ErrorMessage( + error: TranslationBase.of(context).noDataAvailable, + ), + ) + : Container( + color: Colors.grey[200], + child: Column( + children: [ + Padding( + padding: EdgeInsets.all(12.0), + child: Column( + children: [ + Row( + children: [ + AppText( + TranslationBase.of(context).admission, + fontSize: 15.0, + fontWeight: FontWeight.w600, + fontFamily: 'Poppins', + ), + ], + ), + Row( + children: [ + AppText( + TranslationBase.of(context).orders, + fontSize: 30.0, + fontWeight: FontWeight.w700, + ), + ], + ), + ], + ), + ), + Expanded( + child: Container( + child: ListView.builder( + itemCount: model.admissionOrderList.length, + itemBuilder: (BuildContext ctxt, int index) { + return FractionallySizedBox( + widthFactor: 0.95, + child: CardWithBgWidget( + hasBorder: false, + bgColor: Colors.white, + widget: Column( + children: [ + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + width: MediaQuery.of(context) + .size + .width * + 0.60, + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Row( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + AppText( + TranslationBase.of( + context) + .createdBy + .toString(), + fontSize: 13, + ), + Expanded( + child: AppText( + model + .admissionOrderList[ + index] + .createdByName + .toString() ?? + '', + fontWeight: + FontWeight.w600, + fontSize: 12, + isCopyable: true, + ), + ), + ], + ), + Row( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + AppText( + TranslationBase.of( + context) + .procedureName + .toString() + + ": ", + fontSize: 13, + ), + Expanded( + child: AppText( + model + .admissionOrderList[ + index] + .procedureName + .toString() ?? + '', + fontWeight: + FontWeight.w600, + fontSize: 12, + isCopyable: true, + ), + ), + ], + ), + Row( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + AppText( + TranslationBase.of( + context) + .orderNo + .toString(), + fontSize: 13, + ), + Expanded( + child: AppText( + model + .admissionOrderList[ + index] + .orderNo + .toString() ?? + '', + fontWeight: + FontWeight.w600, + fontSize: 12, + isCopyable: true, + ), + ), + ], + ), + ], + ), + ), + Column( + children: [ + AppText( + model + .admissionOrderList[ + index] + .createdOn != + null + ? AppDateUtils.getDayMonthYearDateFormatted( + AppDateUtils + .getDateTimeFromServerFormat(model + .admissionOrderList[ + index] + .createdOn), + isArabic: + projectViewModel + .isArabic, + isMonthShort: true) + : AppDateUtils + .getDayMonthYearDateFormatted( + DateTime.now(), + isArabic: + projectViewModel + .isArabic), + fontWeight: FontWeight.w600, + fontSize: 14, + isCopyable: true, + ), + AppText( + model + .admissionOrderList[ + index] + .createdOn != + null + ? AppDateUtils.getHour( + AppDateUtils + .getDateTimeFromServerFormat(model + .admissionOrderList[ + index] + .createdOn)) + : AppDateUtils.getHour( + DateTime.now()), + fontWeight: FontWeight.w600, + fontSize: 14, + isCopyable: true, + ), + ], + crossAxisAlignment: + CrossAxisAlignment.end, + ) + ], + ), + SizedBox( + height: 8, + ), + // Row( + // mainAxisAlignment: + // MainAxisAlignment.start, + // children: [ + // Expanded( + // child: AppText( + // model + // .admissionOrderList[ + // index] + // .notes, + // fontSize: 10, + // isCopyable: true, + // ), + // ), + // ]) + ], + ), + SizedBox( + height: 20, + ), + ], + ), + ), + ); + }), + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/screens/patients/profile/new-medication/new_medication_screen.dart b/lib/screens/patients/profile/new-medication/new_medication_screen.dart new file mode 100644 index 00000000..fa3c3c69 --- /dev/null +++ b/lib/screens/patients/profile/new-medication/new_medication_screen.dart @@ -0,0 +1,119 @@ +import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/pednding_orders_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.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/card_with_bg_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; +import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_datetime_picker/flutter_datetime_picker.dart'; +import 'package:provider/provider.dart'; + +import '../../../../config/config.dart'; +import '../../../../routes.dart'; +import 'intervention_medication.dart'; + +class NewMedicationScreen extends StatefulWidget { + const NewMedicationScreen({Key key}) : super(key: key); + + @override + _NewMedicationScreenState createState() => _NewMedicationScreenState(); +} + +class _NewMedicationScreenState extends State { + bool isDischargedPatient = false; + + AuthenticationViewModel authenticationViewModel; + + ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + authenticationViewModel = Provider.of(context); + projectViewModel = Provider.of(context); + final routeArgs = ModalRoute.of(context).settings.arguments as Map; + PatiantInformtion patient = routeArgs['patient']; + String arrivalType = routeArgs['arrivalType']; + if (routeArgs.containsKey('isDischargedPatient')) + isDischargedPatient = routeArgs['isDischargedPatient']; + return BaseView( + onModelReady: (model) => model.getAdmissionOrders( + admissionNo: int.parse(patient.admissionNo), + patientId: patient.patientMRN), + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + backgroundColor: Colors.white, + //appBarTitle: TranslationBase.of(context).progressNote, + appBar: PatientProfileAppBar( + patient, + isInpatient: true, + ), + body: model.admissionOrderList == null || + model.admissionOrderList.length == 0 + ? Center( + child: ErrorMessage( + error: TranslationBase.of(context).noDataAvailable, + ), + ) + : Container( + color: Colors.white, + child: Padding( + padding: EdgeInsets.only(left: 130,top: 300), + child: Column( + children: [ + TextButton( + onPressed: () { + DatePicker.showDatePicker(context, + showTitleActions: true, + minTime: DateTime(1990, 3, 5), + maxTime: DateTime(2022, 6, 7), onChanged: (date) { + print('change $date'); + }, onConfirm: (date) { + print('confirm $date'); + }, currentTime: DateTime.now(), locale: LocaleType.en); + }, + child: Text( + 'Select Date From', + style: TextStyle(color: Colors.blue), + )), + TextButton( + onPressed: () { + DatePicker.showDatePicker(context, + showTitleActions: true, + minTime: DateTime(1990, 3, 5), + maxTime: DateTime(2022, 6, 7), onChanged: (date) { + print('change $date'); + }, onConfirm: (date) { + print('confirm $date'); + }, currentTime: DateTime.now(), locale: LocaleType.en); + }, + child: Text( + 'Select Date To', + style: TextStyle(color: Colors.blue), + )), + + RaisedButton( + onPressed: () => { + INTERVENTION_MEDICATION, + }, + child: + Text('Search'), + color: AppGlobal.appGreenColor, + textColor: Colors.white, + ), + ], + ), + ), + ), + + + ), + ); + } +} diff --git a/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart b/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart index 22d784e7..233a8dbf 100644 --- a/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart +++ b/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart @@ -167,6 +167,13 @@ class ProfileGridForInPatient extends StatelessWidget { 'assets/images/svgs/profile_screen/diabetic chart.svg', isInPatient: isInpatient, ), + PatientProfileCardModel( + 'New', + 'Medication', + NEW_MEDICATION, + '', + isInPatient: isInpatient, + ), ]; return Padding( diff --git a/pubspec.lock b/pubspec.lock index 85e7f11e..3ba5bc57 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -489,6 +489,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.5.0" + flutter_datetime_picker: + dependency: "direct main" + description: + name: flutter_datetime_picker + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.1" flutter_device_type: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 766f55cb..dfc76868 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -112,6 +112,7 @@ dependencies: # Hijri # hijri: ^2.0.3 hijri_picker: ^3.0.0 + flutter_datetime_picker: ^1.5.1 # flutter_math_fork: ^0.6.0 # flutter_math_fork: ^0.6.0 From af1217dd67a9649cc4492453c3db8b8bed00d7e9 Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Mon, 10 Jan 2022 12:10:55 +0200 Subject: [PATCH 07/41] finish assessment screen --- lib/config/localized_values.dart | 3 + ...rvive.dart => vte_assessment_service.dart} | 10 +-- .../profile/vte_assessment_view_model.dart | 12 +-- lib/locator.dart | 2 +- .../vte_assessment/vte_assessment_screen.dart | 90 ++++++++++++++----- lib/util/translations_delegate_base.dart | 3 + pubspec.lock | 9 +- 7 files changed, 89 insertions(+), 40 deletions(-) rename lib/core/service/patient/profile/{vte_assessment_servive.dart => vte_assessment_service.dart} (78%) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index d6570d74..5424f389 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1119,4 +1119,7 @@ const Map> localizedValues = { }, "planedProcedure": {"en": "Planed Procedure", "ar": "الإجراء المخطط"}, "moreDetails": {"en": "More Details", "ar": "المزيد من التفاصيل"}, + "VTE_Type": {"en": "VTE Type", "ar": "VTE Type"}, + "pharmacology": {"en": "Pharmacology", "ar": "علم العقاقير"}, + "reasonsThrombo": {"en": "Reasons Thrombo", "ar": "أسباب ثرومبو"}, }; diff --git a/lib/core/service/patient/profile/vte_assessment_servive.dart b/lib/core/service/patient/profile/vte_assessment_service.dart similarity index 78% rename from lib/core/service/patient/profile/vte_assessment_servive.dart rename to lib/core/service/patient/profile/vte_assessment_service.dart index 9bfbf288..81ad0650 100644 --- a/lib/core/service/patient/profile/vte_assessment_servive.dart +++ b/lib/core/service/patient/profile/vte_assessment_service.dart @@ -7,19 +7,19 @@ import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryR class VteAssessmentService extends BaseService { - List _allDischargeSummaryList = []; + List _allVteHistoryList = []; - List get allDischargeSummaryList => - _allDischargeSummaryList; + List get allVteHistoryList => + _allVteHistoryList; Future getVteAssessment( {VteAssessmentRequestModel vteAssessmentRequestModel}) async { hasError = false; await baseAppClient.post(VTE_ASSESSMENT, onSuccess: (dynamic response, int statusCode) { - _allDischargeSummaryList.clear(); + _allVteHistoryList.clear(); response['INP_VTEHistoryByTransactionNo_List'].forEach( (v) { - _allDischargeSummaryList.add(VteAssessmentResponseModel.fromJson(v)); + _allVteHistoryList.add(VteAssessmentResponseModel.fromJson(v)); }, ); }, onFailure: (String error, int statusCode) { diff --git a/lib/core/viewModel/profile/vte_assessment_view_model.dart b/lib/core/viewModel/profile/vte_assessment_view_model.dart index e044bc0c..0997805b 100644 --- a/lib/core/viewModel/profile/vte_assessment_view_model.dart +++ b/lib/core/viewModel/profile/vte_assessment_view_model.dart @@ -2,7 +2,7 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/model/vte_assessment/vte_assessment_req_model.dart'; import 'package:doctor_app_flutter/core/model/vte_assessment/vte_assessment_res_model.dart'; import 'package:doctor_app_flutter/core/service/patient/profile/discharge_summary_servive.dart'; -import 'package:doctor_app_flutter/core/service/patient/profile/vte_assessment_servive.dart'; +import 'package:doctor_app_flutter/core/service/patient/profile/vte_assessment_service.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; import 'package:doctor_app_flutter/locator.dart'; import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryReqModel.dart'; @@ -10,11 +10,11 @@ import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryR class VteAssessmentViewModel extends BaseViewModel { bool hasError = false; - VteAssessmentService _dischargeSummaryService = + VteAssessmentService _VteAssessmentService = locator(); List get allVteHistoryList => - _dischargeSummaryService.allDischargeSummaryList; + _VteAssessmentService.allVteHistoryList; Future getVteAssessment({ int patientId, @@ -25,10 +25,10 @@ class VteAssessmentViewModel extends BaseViewModel { transactionNo: admissionNo); hasError = false; setState(ViewState.Busy); - await _dischargeSummaryService.getVteAssessment( + await _VteAssessmentService.getVteAssessment( vteAssessmentRequestModel: vteAssessmentRequestModel); - if (_dischargeSummaryService.hasError) { - error = _dischargeSummaryService.error; + if (_VteAssessmentService.hasError) { + error = _VteAssessmentService.error; setState(ViewState.ErrorLocal); } else { setState(ViewState.Idle); diff --git a/lib/locator.dart b/lib/locator.dart index 1cd3fa87..52ddccef 100644 --- a/lib/locator.dart +++ b/lib/locator.dart @@ -33,7 +33,7 @@ import 'core/service/patient/patient-doctor-referral-service.dart'; import 'core/service/patient/patientInPatientService.dart'; import 'core/service/patient/patient_service.dart'; import 'core/service/patient/profile/operation_report_servive.dart'; -import 'core/service/patient/profile/vte_assessment_servive.dart'; +import 'core/service/patient/profile/vte_assessment_service.dart'; import 'core/service/patient/referral_patient_service.dart'; import 'core/service/patient_medical_file/admission_request/patient-admission-request-service.dart'; import 'core/service/patient_medical_file/insurance/InsuranceCardService.dart'; diff --git a/lib/screens/patients/profile/vte_assessment/vte_assessment_screen.dart b/lib/screens/patients/profile/vte_assessment/vte_assessment_screen.dart index 242dab07..230c9bfb 100644 --- a/lib/screens/patients/profile/vte_assessment/vte_assessment_screen.dart +++ b/lib/screens/patients/profile/vte_assessment/vte_assessment_screen.dart @@ -40,9 +40,10 @@ class _ProgressNoteState extends State { if (routeArgs.containsKey('isDischargedPatient')) isDischargedPatient = routeArgs['isDischargedPatient']; return BaseView( - onModelReady: (model) => model.getVteAssessment(patientId: patient.patientId, admissionNo: 2016023498 + onModelReady: (model) => model.getVteAssessment(patientId: patient.patientId, + admissionNo: 2016023498 - //int.parse(patient.admissionNo) + // admissionNo:int.parse(patient.admissionNo) ), builder: (_, model, w) => AppScaffold( baseViewModel: model, @@ -51,8 +52,8 @@ class _ProgressNoteState extends State { patient, isInpatient: true, ), - body: model.allDisChargeSummaryList == null || - model.allDisChargeSummaryList.length == 0 + body: model.allVteHistoryList == null || + model.allVteHistoryList.length == 0 ? Center( child: ErrorMessage( error: TranslationBase.of(context).noDataAvailable, @@ -65,7 +66,7 @@ class _ProgressNoteState extends State { Expanded( child: Container( child: ListView.builder( - itemCount: model.allDisChargeSummaryList.length, + itemCount: model.allVteHistoryList.length, itemBuilder: (BuildContext ctxt, int index) { return FractionallySizedBox( widthFactor: 0.95, @@ -102,10 +103,11 @@ class _ProgressNoteState extends State { .start, children: [ AppText( - TranslationBase.of( - context) - .createdBy, - fontSize: 12, + model + .allVteHistoryList[ + index].riskScore, + fontWeight: FontWeight.w600, + fontSize: 14, ), ], @@ -117,14 +119,14 @@ class _ProgressNoteState extends State { children: [ AppText( model - .allDisChargeSummaryList[ + .allVteHistoryList[ index] .createdOn != null ? AppDateUtils.getDayMonthYearDateFormatted( AppDateUtils - .getDateTimeFromServerFormat(model - .allDisChargeSummaryList[ + .getDateTimeFromString(model + .allVteHistoryList[ index] .createdOn), isArabic: @@ -143,14 +145,14 @@ class _ProgressNoteState extends State { ), AppText( model - .allDisChargeSummaryList[ + .allVteHistoryList[ index] .createdOn != null ? AppDateUtils.getHour( AppDateUtils - .getDateTimeFromServerFormat(model - .allDisChargeSummaryList[ + .getDateTimeFromString(model + .allVteHistoryList[ index] .createdOn)) : AppDateUtils.getHour( @@ -174,14 +176,62 @@ class _ProgressNoteState extends State { children: [ AppText( TranslationBase.of(context) - .icd + + .VTE_Type + " : ", fontSize: 12, ), Expanded( child: AppText( model - .allDisChargeSummaryList[ + .allVteHistoryList[ + index] + .vTEType, + fontSize: 12, + isCopyable: true, + ), + ), + ]), + SizedBox( + height: 8, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .pharmacology + + " : ", + fontSize: 12, + ), + Expanded( + child: AppText( + model + .allVteHistoryList[ + index] + .pharmacology, + fontSize: 12, + isCopyable: true, + ), + ), + ]), + SizedBox( + height: 8, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .reasonsThrombo + + " : ", + fontSize: 12, + ), + Expanded( + child: AppText( + model + .allVteHistoryList[ index] .reasonsThrombo, fontSize: 12, @@ -197,15 +247,15 @@ class _ProgressNoteState extends State { MainAxisAlignment.start, children: [ AppText( - "Ascii Desc : ", + "Ambulation Protocol : ", fontSize: 12, ), Expanded( child: AppText( model - .allDisChargeSummaryList[ + .allVteHistoryList[ index] - .riskScore, + .ambulationProtocol, fontSize: 12, isCopyable: true, ), diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index 86e17e1f..303a9acf 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -1737,6 +1737,9 @@ class TranslationBase { localizedValues['planedProcedure'][locale.languageCode]; String get moreDetails => localizedValues['moreDetails'][locale.languageCode]; + String get VTE_Type => localizedValues['VTE_Type'][locale.languageCode]; + String get pharmacology => localizedValues['pharmacology'][locale.languageCode]; + String get reasonsThrombo => localizedValues['reasonsThrombo'][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/pubspec.lock b/pubspec.lock index 85e7f11e..ea0635ca 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -763,13 +763,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.12.11" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.2" meta: dependency: transitive description: @@ -1173,7 +1166,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.8" + version: "0.4.3" timing: dependency: transitive description: From 0a0aa6ba77c87712b33568c7070eec840f98588b Mon Sep 17 00:00:00 2001 From: RoaaGhali98 Date: Mon, 10 Jan 2022 16:00:59 +0200 Subject: [PATCH 08/41] we add a new service called new_medication_screen --- .../profile/search_medication_view_model.dart | 422 ++++++++++++++++++ lib/locator.dart | 3 + .../new_medication_req_model.dart | 25 ++ .../new_medication_res_model.dart | 100 +++++ .../intervention_medication.dart | 16 +- .../new-medication/new_medication_screen.dart | 328 ++++++++++---- 6 files changed, 795 insertions(+), 99 deletions(-) create mode 100644 lib/core/viewModel/profile/search_medication_view_model.dart create mode 100644 lib/screens/patients/profile/new-medication-model/new_medication_req_model.dart create mode 100644 lib/screens/patients/profile/new-medication-model/new_medication_res_model.dart diff --git a/lib/core/viewModel/profile/search_medication_view_model.dart b/lib/core/viewModel/profile/search_medication_view_model.dart new file mode 100644 index 00000000..0e67496b --- /dev/null +++ b/lib/core/viewModel/profile/search_medication_view_model.dart @@ -0,0 +1,422 @@ +import 'package:doctor_app_flutter/core/enum/filter_type.dart'; +import 'package:doctor_app_flutter/core/enum/patient_type.dart'; +import 'package:doctor_app_flutter/core/enum/viewstate.dart'; +import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart'; +import 'package:doctor_app_flutter/core/service/patient/out_patient_service.dart'; +import 'package:doctor_app_flutter/core/service/patient/patientInPatientService.dart'; +import 'package:doctor_app_flutter/core/service/special_clinics/special_clinic_service.dart'; +import 'package:doctor_app_flutter/models/dashboard/get_special_clinical_care_mapping_List_Respose_Model.dart'; +import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; + +import '../../../locator.dart'; +import '../base_view_model.dart'; + + + +class SearchMedicationViewModel extends BaseViewModel { + OutPatientService _outPatientService = locator(); + SpecialClinicsService _specialClinicsService = + locator(); + + List get patientList => _outPatientService.patientList; + + List + get specialClinicalCareMappingList => + _specialClinicsService.specialClinicalCareMappingList; + + List filterData = []; + + DateTime selectedFromDate; + DateTime selectedToDate; + + int firstSubsetIndex = 0; + int inPatientPageSize = 20; + int lastSubsetIndex = 20; + + List InpatientClinicList = []; + + searchData(String str) { + var strExist = str.length > 0 ? true : false; + if (strExist) { + filterData = []; + for (var i = 0; i < _outPatientService.patientList.length; i++) { + String firstName = + _outPatientService.patientList[i].firstName.toUpperCase(); + String lastName = + _outPatientService.patientList[i].lastName.toUpperCase(); + String mobile = + _outPatientService.patientList[i].mobileNumber.toUpperCase(); + String patientID = + _outPatientService.patientList[i].patientId.toString(); + + if (firstName.contains(str.toUpperCase()) || + lastName.contains(str.toUpperCase()) || + mobile.contains(str) || + patientID.contains(str)) { + filterData.add(_outPatientService.patientList[i]); + } + } + notifyListeners(); + } else { + filterData = _outPatientService.patientList; + notifyListeners(); + } + } + + getOutPatient(PatientSearchRequestModel patientSearchRequestModel, + {bool isLocalBusy = false}) async { + if (isLocalBusy) { + setState(ViewState.BusyLocal); + } else { + setState(ViewState.Busy); + } + await getDoctorProfile(isGetProfile: true); + patientSearchRequestModel.doctorID = doctorProfile.doctorID; + await _outPatientService.getOutPatient(patientSearchRequestModel); + if (_outPatientService.hasError) { + error = _outPatientService.error; + if (isLocalBusy) { + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Error); + } + } else { + filterData = _outPatientService.patientList; + setState(ViewState.Idle); + } + } + + sortOutPatient({bool isDes = false}) { + if (isDes) + filterData = filterData.reversed.toList(); + else + filterData = filterData.reversed.toList(); + setState(ViewState.Idle); + } + + getPatientFileInformation(PatientSearchRequestModel patientSearchRequestModel, + {bool isLocalBusy = false}) async { + setState(ViewState.Busy); + await _outPatientService + .getPatientFileInformation(patientSearchRequestModel); + if (_outPatientService.hasError) { + error = _outPatientService.error; + setState(ViewState.Error); + } else { + filterData = _outPatientService.patientList; + setState(ViewState.Idle); + } + } + + getPatientBasedOnDate( + {item, + PatientSearchRequestModel patientSearchRequestModel, + PatientType selectedPatientType, + bool isSearchWithKeyInfo, + OutPatientFilterType outPatientFilterType}) async { + String dateTo; + String dateFrom; + if (OutPatientFilterType.Previous == outPatientFilterType) { + selectedFromDate = DateTime( + DateTime.now().year, DateTime.now().month - 1, DateTime.now().day); + selectedToDate = DateTime( + DateTime.now().year, DateTime.now().month, DateTime.now().day - 1); + dateTo = AppDateUtils.convertDateToFormat(selectedToDate, 'yyyy-MM-dd'); + dateFrom = + AppDateUtils.convertDateToFormat(selectedFromDate, 'yyyy-MM-dd'); + } else if (OutPatientFilterType.NextWeek == outPatientFilterType) { + dateTo = AppDateUtils.convertDateToFormat( + DateTime(DateTime.now().year, DateTime.now().month, + DateTime.now().day + 6), + 'yyyy-MM-dd'); + + dateFrom = AppDateUtils.convertDateToFormat( + DateTime(DateTime.now().year, DateTime.now().month, + DateTime.now().day + 1), + 'yyyy-MM-dd'); + } else { + dateFrom = AppDateUtils.convertDateToFormat( + DateTime( + DateTime.now().year, DateTime.now().month, DateTime.now().day), + 'yyyy-MM-dd'); + dateTo = AppDateUtils.convertDateToFormat( + DateTime( + DateTime.now().year, DateTime.now().month, DateTime.now().day), + 'yyyy-MM-dd'); + } + PatientSearchRequestModel currentModel = PatientSearchRequestModel(); + currentModel.patientID = patientSearchRequestModel.patientID; + currentModel.firstName = patientSearchRequestModel.firstName; + currentModel.lastName = patientSearchRequestModel.lastName; + currentModel.middleName = patientSearchRequestModel.middleName; + currentModel.doctorID = patientSearchRequestModel.doctorID; + currentModel.from = dateFrom; + currentModel.to = dateTo; + await getOutPatient(currentModel, isLocalBusy: true); + filterData = _outPatientService.patientList; + } + + PatientInPatientService _inPatientService = + locator(); + + List get inPatientList => _inPatientService.inPatientList; + + List get myIinPatientList => + _inPatientService.myInPatientList; + + List filteredInPatientItems = List(); + List filteredMyInPatientItems = List(); + + Future getInPatientList(PatientSearchRequestModel requestModel, + {bool isMyInpatient = false, bool isLocalBusy = false}) async { + await getDoctorProfile(); + if (isLocalBusy) { + setState(ViewState.BusyLocal); + } else { + setState(ViewState.Busy); + } + if (inPatientList.length == 0) + await _inPatientService.getInPatientList(requestModel, false); + if (_inPatientService.hasError) { + error = _inPatientService.error; + if (isLocalBusy) { + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Error); + } + } else { + setDefaultInPatientList(); + generateInpatientClinicList(); + setState(ViewState.Idle); + } + } + + sortInPatient({bool isDes = false, bool isAllClinic, bool isMyInPatient}) { + if (isMyInPatient + ? myIinPatientList.length > 0 + : isAllClinic + ? inPatientList.length > 0 + : filteredInPatientItems.length > 0) { + List localInPatient = isMyInPatient + ? [...filteredMyInPatientItems] + : isAllClinic + ? [...inPatientList] + : [...filteredInPatientItems]; + if (isDes) + localInPatient.sort((PatiantInformtion a, PatiantInformtion b) => b + .admissionDateWithDateTimeForm + .compareTo(a.admissionDateWithDateTimeForm)); + else + localInPatient.sort((PatiantInformtion a, PatiantInformtion b) => a + .admissionDateWithDateTimeForm + .compareTo(b.admissionDateWithDateTimeForm)); + if (isMyInPatient) { + filteredMyInPatientItems.clear(); + filteredMyInPatientItems.addAll(localInPatient); + } else if (isAllClinic) { + resetInPatientPagination(); + filteredInPatientItems + .addAll(localInPatient.sublist(firstSubsetIndex, lastSubsetIndex)); + } else { + filteredInPatientItems.clear(); + filteredInPatientItems.addAll(localInPatient); + } + } + setState(ViewState.Idle); + } + + resetInPatientPagination() { + filteredInPatientItems.clear(); + firstSubsetIndex = 0; + lastSubsetIndex = inPatientPageSize - 1; + } + + Future setDefaultInPatientList() async { + setState(ViewState.BusyLocal); + await getDoctorProfile(); + resetInPatientPagination(); + if (inPatientList.length > 0) { + lastSubsetIndex = (inPatientList.length < inPatientPageSize - 1 + ? inPatientList.length + : inPatientPageSize - 1); + + filteredInPatientItems + .addAll(inPatientList.sublist(firstSubsetIndex, lastSubsetIndex)); + } + + if (myIinPatientList.length > 0) { + filteredMyInPatientItems.addAll(myIinPatientList); + } + setState(ViewState.Idle); + } + + generateInpatientClinicList() { + InpatientClinicList.clear(); + inPatientList.forEach((element) { + if (!InpatientClinicList.contains(element.clinicDescription)) { + InpatientClinicList.add(element.clinicDescription); + } + }); + } + + addOnFilteredList() { + if (lastSubsetIndex < inPatientList.length) { + firstSubsetIndex = firstSubsetIndex + + (inPatientList.length - lastSubsetIndex < inPatientPageSize - 1 + ? inPatientList.length - lastSubsetIndex + : inPatientPageSize - 1); + lastSubsetIndex = lastSubsetIndex + + (inPatientList.length - lastSubsetIndex < inPatientPageSize - 1 + ? inPatientList.length - lastSubsetIndex + : inPatientPageSize - 1); + filteredInPatientItems + .addAll(inPatientList.sublist(firstSubsetIndex, lastSubsetIndex)); + setState(ViewState.Idle); + } + } + + removeOnFilteredList() { + if (lastSubsetIndex - inPatientPageSize - 1 > 0) { + filteredInPatientItems.removeAt(lastSubsetIndex - inPatientPageSize - 1); + setState(ViewState.Idle); + } + } + + filterByHospital({int hospitalId}) { + filteredInPatientItems = []; + for (var i = 0; i < inPatientList.length; i++) { + if (inPatientList[i].projectId == hospitalId) { + filteredInPatientItems.add(inPatientList[i]); + } + } + notifyListeners(); + } + + filterByClinic({String clinicName}) { + filteredInPatientItems = []; + for (var i = 0; i < inPatientList.length; i++) { + if (inPatientList[i].clinicDescription == clinicName) { + filteredInPatientItems.add(inPatientList[i]); + } + } + notifyListeners(); + } + + void clearPatientList() { + _inPatientService.inPatientList = []; + _inPatientService.myInPatientList = []; + } + + void filterSearchResults(String query, + {bool isAllClinic, bool isMyInPatient}) { + var strExist = query.length > 0 ? true : false; + + if (isMyInPatient) { + List localFilteredMyInPatientItems = [ + ...myIinPatientList + ]; + + if (strExist) { + filteredMyInPatientItems.clear(); + for (var i = 0; i < localFilteredMyInPatientItems.length; i++) { + String firstName = + localFilteredMyInPatientItems[i].firstName.toUpperCase(); + String lastName = + localFilteredMyInPatientItems[i].lastName.toUpperCase(); + String mobile = + localFilteredMyInPatientItems[i].mobileNumber.toUpperCase(); + String patientID = + localFilteredMyInPatientItems[i].patientId.toString(); + + if (firstName.contains(query.toUpperCase()) || + lastName.contains(query.toUpperCase()) || + mobile.contains(query) || + patientID.contains(query)) { + filteredMyInPatientItems.add(localFilteredMyInPatientItems[i]); + } + } + notifyListeners(); + } else { + if (myIinPatientList.length > 0) filteredMyInPatientItems.clear(); + filteredMyInPatientItems.addAll(myIinPatientList); + notifyListeners(); + } + } else { + if (isAllClinic) { + if (strExist) { + filteredInPatientItems = []; + for (var i = 0; i < inPatientList.length; i++) { + String firstName = inPatientList[i].firstName.toUpperCase(); + String lastName = inPatientList[i].lastName.toUpperCase(); + String mobile = inPatientList[i].mobileNumber.toUpperCase(); + String patientID = inPatientList[i].patientId.toString(); + + if (firstName.contains(query.toUpperCase()) || + lastName.contains(query.toUpperCase()) || + mobile.contains(query) || + patientID.contains(query)) { + filteredInPatientItems.add(inPatientList[i]); + } + } + notifyListeners(); + } else { + if (inPatientList.length > 0) filteredInPatientItems.clear(); + filteredInPatientItems.addAll(inPatientList); + notifyListeners(); + } + } else { + List localFilteredInPatientItems = [ + ...filteredInPatientItems + ]; + + if (strExist) { + filteredInPatientItems.clear(); + for (var i = 0; i < localFilteredInPatientItems.length; i++) { + String firstName = + localFilteredInPatientItems[i].firstName.toUpperCase(); + String lastName = + localFilteredInPatientItems[i].lastName.toUpperCase(); + String mobile = + localFilteredInPatientItems[i].mobileNumber.toUpperCase(); + String patientID = + localFilteredInPatientItems[i].patientId.toString(); + + if (firstName.contains(query.toUpperCase()) || + lastName.contains(query.toUpperCase()) || + mobile.contains(query) || + patientID.contains(query)) { + filteredInPatientItems.add(localFilteredInPatientItems[i]); + } + } + notifyListeners(); + } else { + if (localFilteredInPatientItems.length > 0) + filteredInPatientItems.clear(); + filteredInPatientItems.addAll(localFilteredInPatientItems); + notifyListeners(); + } + } + } + } + + getSpecialClinicalCareMappingList(clinicId, + {bool isLocalBusy = false}) async { + if (isLocalBusy) { + setState(ViewState.BusyLocal); + } else { + setState(ViewState.Busy); + } + await _specialClinicsService.getSpecialClinicalCareMappingList(clinicId); + if (_specialClinicsService.hasError) { + error = _specialClinicsService.error; + if (isLocalBusy) { + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Error); + } + } else { + setState(ViewState.Idle); + } + } +} diff --git a/lib/locator.dart b/lib/locator.dart index 28f4bfdf..d05643f0 100644 --- a/lib/locator.dart +++ b/lib/locator.dart @@ -13,6 +13,7 @@ import 'package:doctor_app_flutter/core/viewModel/profile/discharge_summary_view import 'package:doctor_app_flutter/core/viewModel/profile/operation_report_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/scan_qr_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/new-medication/new_medication_screen.dart'; import 'package:get_it/get_it.dart'; import 'core/service/AnalyticsService.dart'; @@ -65,6 +66,7 @@ import 'core/viewModel/patient-referral-viewmodel.dart'; import 'core/viewModel/patient-ucaf-viewmodel.dart'; import 'core/viewModel/patient-vital-sign-viewmodel.dart'; import 'core/viewModel/prescriptions_view_model.dart'; +import 'core/viewModel/profile/search_medication_view_model.dart'; import 'core/viewModel/radiology_view_model.dart'; import 'core/viewModel/referral_view_model.dart'; import 'core/viewModel/schedule_view_model.dart'; @@ -144,4 +146,5 @@ void setupLocator() { locator.registerFactory(() => PatientRegistrationViewModel()); locator.registerFactory(() => PendingOrdersViewModel()); locator.registerFactory(() => DischargeSummaryViewModel()); + locator.registerFactory(() => SearchMedicationViewModel()); } diff --git a/lib/screens/patients/profile/new-medication-model/new_medication_req_model.dart b/lib/screens/patients/profile/new-medication-model/new_medication_req_model.dart new file mode 100644 index 00000000..92cde706 --- /dev/null +++ b/lib/screens/patients/profile/new-medication-model/new_medication_req_model.dart @@ -0,0 +1,25 @@ +class InterventionMedicationReqModel { + int projectID; + int patientID; + String fromDate; + String toDate; + + InterventionMedicationReqModel( + {this.projectID, this.patientID, this.fromDate, this.toDate}); + + InterventionMedicationReqModel.fromJson(Map json) { + projectID = json['ProjectID']; + patientID = json['PatientID']; + fromDate = json['FromDate']; + toDate = json['ToDate']; + } + + Map toJson() { + final Map data = new Map(); + data['ProjectID'] = this.projectID; + data['PatientID'] = this.patientID; + data['FromDate'] = this.fromDate; + data['ToDate'] = this.toDate; + return data; + } +} \ No newline at end of file diff --git a/lib/screens/patients/profile/new-medication-model/new_medication_res_model.dart b/lib/screens/patients/profile/new-medication-model/new_medication_res_model.dart new file mode 100644 index 00000000..5d3dca39 --- /dev/null +++ b/lib/screens/patients/profile/new-medication-model/new_medication_res_model.dart @@ -0,0 +1,100 @@ +class InterventionMedicationResModel { + String cS; + String iHR; + String setupID; + int projectID; + int accessLevel; + int patientID; + String patientName; + String description; + int admissionNo; + int orderNo; + int prescriptionNo; + int lineItemNo; + int itemID; + String medication; + String doctorComments; + String startDatetime; + String stopDatetime; + int status; + int createdBy; + int authorizedby; + Null pharmacyRemarks; + String statusDescription; + + InterventionMedicationResModel( + {this.cS, + this.iHR, + this.setupID, + this.projectID, + this.accessLevel, + this.patientID, + this.patientName, + this.description, + this.admissionNo, + this.orderNo, + this.prescriptionNo, + this.lineItemNo, + this.itemID, + this.medication, + this.doctorComments, + this.startDatetime, + this.stopDatetime, + this.status, + this.createdBy, + this.authorizedby, + this.pharmacyRemarks, + this.statusDescription}); + + InterventionMedicationResModel.fromJson(Map json) { + cS = json['CS']; + iHR = json['IHR']; + setupID = json['SetupID']; + projectID = json['ProjectID']; + accessLevel = json['AccessLevel']; + patientID = json['PatientID']; + patientName = json['PatientName']; + description = json['Description']; + admissionNo = json['AdmissionNo']; + orderNo = json['OrderNo']; + prescriptionNo = json['PrescriptionNo']; + lineItemNo = json['LineItemNo']; + itemID = json['ItemID']; + medication = json['Medication']; + doctorComments = json['DoctorComments']; + startDatetime = json['StartDatetime']; + stopDatetime = json['StopDatetime']; + status = json['Status']; + createdBy = json['CreatedBy']; + authorizedby = json['Authorizedby']; + pharmacyRemarks = json['PharmacyRemarks']; + statusDescription = json['StatusDescription']; + } + + Map toJson() { + final Map data = new Map(); + data['CS'] = this.cS; + data['IHR'] = this.iHR; + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['AccessLevel'] = this.accessLevel; + data['PatientID'] = this.patientID; + data['PatientName'] = this.patientName; + data['Description'] = this.description; + data['AdmissionNo'] = this.admissionNo; + data['OrderNo'] = this.orderNo; + data['PrescriptionNo'] = this.prescriptionNo; + data['LineItemNo'] = this.lineItemNo; + data['ItemID'] = this.itemID; + data['Medication'] = this.medication; + data['DoctorComments'] = this.doctorComments; + data['StartDatetime'] = this.startDatetime; + data['StopDatetime'] = this.stopDatetime; + data['Status'] = this.status; + data['CreatedBy'] = this.createdBy; + data['Authorizedby'] = this.authorizedby; + data['PharmacyRemarks'] = this.pharmacyRemarks; + data['StatusDescription'] = this.statusDescription; + return data; + } +} \ No newline at end of file diff --git a/lib/screens/patients/profile/new-medication/intervention_medication.dart b/lib/screens/patients/profile/new-medication/intervention_medication.dart index 826d0739..aeca8f88 100644 --- a/lib/screens/patients/profile/new-medication/intervention_medication.dart +++ b/lib/screens/patients/profile/new-medication/intervention_medication.dart @@ -15,7 +15,10 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; class InterventionMedicationScreen extends StatefulWidget { - const InterventionMedicationScreen({Key key}) : super(key: key); + const InterventionMedicationScreen({Key key, this.patient}) : super(key: key); + final PatiantInformtion patient ; + + @override _InterventionMedicationScreenState createState() => _InterventionMedicationScreenState(); @@ -28,25 +31,18 @@ class _InterventionMedicationScreenState extends State( - onModelReady: (model) => model.getAdmissionOrders( - admissionNo: int.parse(patient.admissionNo), - patientId: patient.patientMRN), builder: (_, model, w) => AppScaffold( baseViewModel: model, backgroundColor: Theme.of(context).scaffoldBackgroundColor, //appBarTitle: TranslationBase.of(context).progressNote, appBar: PatientProfileAppBar( - patient, + widget.patient, isInpatient: true, ), body: model.admissionOrderList == null || diff --git a/lib/screens/patients/profile/new-medication/new_medication_screen.dart b/lib/screens/patients/profile/new-medication/new_medication_screen.dart index fa3c3c69..391cafec 100644 --- a/lib/screens/patients/profile/new-medication/new_medication_screen.dart +++ b/lib/screens/patients/profile/new-medication/new_medication_screen.dart @@ -1,118 +1,268 @@ -import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/pednding_orders_view_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; -import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/core/enum/filter_type.dart'; +import 'package:doctor_app_flutter/core/enum/viewstate.dart'; +import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart'; +import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.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/card_with_bg_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; -import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_datetime_picker/flutter_datetime_picker.dart'; -import 'package:provider/provider.dart'; +import 'package:hexcolor/hexcolor.dart'; -import '../../../../config/config.dart'; -import '../../../../routes.dart'; +import '../../../../core/viewModel/profile/operation_report_view_model.dart'; +import '../../../../core/viewModel/profile/search_medication_view_model.dart'; +import '../../../../models/patient/patiant_info_model.dart'; +import '../../../base/base_view.dart'; import 'intervention_medication.dart'; class NewMedicationScreen extends StatefulWidget { - const NewMedicationScreen({Key key}) : super(key: key); + final OutPatientFilterType outPatientFilterType; + + const NewMedicationScreen( + {Key key, this.outPatientFilterType, }) + : super(key: key); @override _NewMedicationScreenState createState() => _NewMedicationScreenState(); } class _NewMedicationScreenState extends State { - bool isDischargedPatient = false; - - AuthenticationViewModel authenticationViewModel; - - ProjectViewModel projectViewModel; + @override + void initState() { + // TODO: implement initState + super.initState(); + } @override Widget build(BuildContext context) { - authenticationViewModel = Provider.of(context); - projectViewModel = Provider.of(context); + var screenSize; final routeArgs = ModalRoute.of(context).settings.arguments as Map; PatiantInformtion patient = routeArgs['patient']; - String arrivalType = routeArgs['arrivalType']; - if (routeArgs.containsKey('isDischargedPatient')) - isDischargedPatient = routeArgs['isDischargedPatient']; - return BaseView( - onModelReady: (model) => model.getAdmissionOrders( - admissionNo: int.parse(patient.admissionNo), - patientId: patient.patientMRN), - builder: (_, model, w) => AppScaffold( - baseViewModel: model, - backgroundColor: Colors.white, - //appBarTitle: TranslationBase.of(context).progressNote, - appBar: PatientProfileAppBar( - patient, - isInpatient: true, - ), - body: model.admissionOrderList == null || - model.admissionOrderList.length == 0 - ? Center( - child: ErrorMessage( - error: TranslationBase.of(context).noDataAvailable, - ), - ) - : Container( - color: Colors.white, + return BaseView( + builder: (_, model, w) =>AppScaffold( + isShowAppBar: false, + backgroundColor: Theme.of(context).scaffoldBackgroundColor, + body: SingleChildScrollView( + child: Container( + height: MediaQuery.of(context).size.height * 1.0, child: Padding( - padding: EdgeInsets.only(left: 130,top: 300), + padding: EdgeInsets.all(0.0), child: Column( - children: [ - TextButton( - onPressed: () { - DatePicker.showDatePicker(context, - showTitleActions: true, - minTime: DateTime(1990, 3, 5), - maxTime: DateTime(2022, 6, 7), onChanged: (date) { - print('change $date'); - }, onConfirm: (date) { - print('confirm $date'); - }, currentTime: DateTime.now(), locale: LocaleType.en); - }, - child: Text( - 'Select Date From', - style: TextStyle(color: Colors.blue), - )), - TextButton( - onPressed: () { - DatePicker.showDatePicker(context, - showTitleActions: true, - minTime: DateTime(1990, 3, 5), - maxTime: DateTime(2022, 6, 7), onChanged: (date) { - print('change $date'); - }, onConfirm: (date) { - print('confirm $date'); - }, currentTime: DateTime.now(), locale: LocaleType.en); - }, - child: Text( - 'Select Date To', - style: TextStyle(color: Colors.blue), - )), - - RaisedButton( - onPressed: () => { - INTERVENTION_MEDICATION, - }, - child: - Text('Search'), - color: AppGlobal.appGreenColor, - textColor: Colors.white, - ), - ], + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + BottomSheetTitle( + title: (OutPatientFilterType.Previous == + widget.outPatientFilterType) + ? "" + : " New Medication", + ), + SizedBox( + height: 10.0, + ), + Center( + child: FractionallySizedBox( + widthFactor: 0.9, + child: Column( + children: [ + Container( + color: Colors.white, + child: InkWell( + onTap: () => selectDate(context,model, + firstDate: + getFirstDate(widget.outPatientFilterType), + lastDate: + getLastDate(widget.outPatientFilterType)), + child: TextField( + decoration: textFieldSelectorDecoration( + TranslationBase.of(context).fromDate, + model + .selectedFromDate != + null + ? "${AppDateUtils.convertStringToDateFormat(model.selectedFromDate.toString(), "yyyy-MM-dd")}" + : null, + true, + suffixIcon: Icon( + Icons.calendar_today, + color: Colors.black, + )), + enabled: false, + ), + ), + ), + SizedBox( + height: 10, + ), + Container( + color: Colors.white, + child: InkWell( + onTap: () => selectDate(context,model, + isFromDate: false, + firstDate: + getFirstDate(widget.outPatientFilterType), + lastDate: + getLastDate(widget.outPatientFilterType)), + child: TextField( + decoration: textFieldSelectorDecoration( + TranslationBase.of(context).toDate, + model + .selectedToDate != + null + ? "${AppDateUtils.convertStringToDateFormat(model.selectedToDate.toString(), "yyyy-MM-dd")}" + : null, + true, + suffixIcon: Icon( + Icons.calendar_today, + color: Colors.black, + )), + enabled: false, + ), + ), + ), + ], + ), + ), + ), + ], + ), + ), + ), ), + bottomSheet: Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(0.0), ), + border: Border.all(color: HexColor('#707070'), width: 0), ), + height: MediaQuery.of(context).size.height * 0.1, + width: double.infinity, + child: Column( + children: [ + SizedBox( + height: 10, + ), + Container( + child: FractionallySizedBox( + widthFactor: .80, + child: Center( + child: AppButton( + title: TranslationBase.of(context).search, + padding: 5, + color: Color(0xFF359846), + onPressed: () async { + + Navigator.push( + context, + MaterialPageRoute(builder: (context) => InterventionMedicationScreen(patient: patient,)), + ); + }, + ), + ), + ), + ), + SizedBox( + height: 5, + ), + ], + ), + )) + ); + } + + selectDate(BuildContext context,SearchMedicationViewModel model, + {bool isFromDate = true, DateTime firstDate, lastDate}) async { + Helpers.hideKeyboard(context); + DateTime selectedDate = isFromDate + ? model.selectedFromDate ?? firstDate + : model.selectedToDate ?? lastDate; + final DateTime picked = await showDatePicker( + context: context, + initialDate: selectedDate, + firstDate: firstDate, + lastDate: lastDate, + initialEntryMode: DatePickerEntryMode.calendar, + ); + if (picked != null) { + if (isFromDate) { + setState(() { + model.selectedFromDate = picked; + var date = picked.add(Duration(days: 30)); + if (date.isBefore(lastDate)) { + model.selectedToDate = date; + } else + model.selectedToDate = lastDate; + }); + } else { + setState(() { + model.selectedToDate = picked; + }); + } + } + } + + getFirstDate(OutPatientFilterType outPatientFilterType) { + if (outPatientFilterType == OutPatientFilterType.Previous) { + return DateTime( + DateTime.now().year - 20, DateTime.now().month, DateTime.now().day); + } else { + return DateTime( + DateTime.now().year, DateTime.now().month, DateTime.now().day + 1); + } + } + + getLastDate(OutPatientFilterType outPatientFilterType) { + if (outPatientFilterType == OutPatientFilterType.Previous) { + return DateTime( + DateTime.now().year, DateTime.now().month, DateTime.now().day - 1); + } else { + return DateTime( + DateTime.now().year, DateTime.now().month, DateTime.now().day + 7); + } + } + + InputDecoration textFieldSelectorDecoration( + String hintText, String selectedText, bool isDropDown, + {Icon suffixIcon}) { + return InputDecoration( + focusedBorder: OutlineInputBorder( + borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), + borderRadius: BorderRadius.circular(8), + ), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Color(0xFFEFEFEF), width: 2.0), + borderRadius: BorderRadius.circular(8), + ), + disabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Color(0xFFEFEFEF), width: 2.0), + borderRadius: BorderRadius.circular(8), + ), + hintText: selectedText != null ? selectedText : hintText, + suffixIcon: isDropDown + ? suffixIcon != null + ? suffixIcon + : Icon( + Icons.keyboard_arrow_down_sharp, + color: Color(0xff2E303A), + ) + : null, + hintStyle: TextStyle( + fontSize: 13, + color: Color(0xff2E303A), + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + ), + labelText: selectedText != null ? '$hintText\n$selectedText' : null, + labelStyle: TextStyle( + fontSize: 13, + color: Color(0xff2E303A), + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, ), ); } From 26fa1aec62a71c242be03faa2598bc7988a33ace Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Tue, 11 Jan 2022 09:58:12 +0200 Subject: [PATCH 09/41] DAPP-66: fix date with design improvement --- lib/screens/procedures/ProcedureCard.dart | 26 +++++++++++++++++------ 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/lib/screens/procedures/ProcedureCard.dart b/lib/screens/procedures/ProcedureCard.dart index d531cf35..f9d07b5b 100644 --- a/lib/screens/procedures/ProcedureCard.dart +++ b/lib/screens/procedures/ProcedureCard.dart @@ -1,10 +1,12 @@ //import 'package:doctor_app_flutter/client/base_app_client.dart'; +import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/model/procedure/get_ordered_procedure_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/cupertino.dart'; @@ -82,14 +84,15 @@ class ProcedureCard extends StatelessWidget { : 'Urgent', color: entityList.orderType == 0 ? Colors.black - : Colors.red[800], + : AppGlobal.appRedColor, fontWeight: FontWeight.w600, ), SizedBox( height: 5, ), AppText( - entityList.procedureName, + Helpers.convertToTitleCase( + entityList.procedureName), bold: true, fontSize: 14, ), @@ -104,13 +107,18 @@ class ProcedureCard extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.end, children: [ AppText( - '${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.convertISOStringToDateTime(entityList.orderDate), isArabic: projectViewModel.isArabic)}', + '${AppDateUtils.getDayMonthYearDateFormatted( + AppDateUtils.convertISOStringToDateTime( + entityList.createdOn), + isMonthShort: true, + isArabic: projectViewModel.isArabic, + )}', color: Colors.black, fontWeight: FontWeight.w600, fontSize: 14, ), AppText( - '${AppDateUtils.getHour(AppDateUtils.convertISOStringToDateTime(entityList.orderDate))}', + '${AppDateUtils.getHour(AppDateUtils.convertISOStringToDateTime(entityList.createdOn))}', fontWeight: FontWeight.w600, color: Colors.grey[700], fontSize: 14, @@ -174,7 +182,8 @@ class ProcedureCard extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( - entityList.doctorName, + Helpers.convertToTitleCase( + entityList.doctorName), fontFamily: 'Poppins', fontWeight: FontWeight.w800, fontSize: 1.7 * SizeConfig.textMultiplier, @@ -182,7 +191,8 @@ class ProcedureCard extends StatelessWidget { ), if (entityList.clinicDescription != null) AppText( - entityList.clinicDescription, + Helpers.convertToTitleCase( + entityList.clinicDescription), fontFamily: 'Poppins', fontWeight: FontWeight.w700, fontSize: 1.4 * SizeConfig.textMultiplier, @@ -201,7 +211,9 @@ class ProcedureCard extends StatelessWidget { children: [ Expanded( child: AppText( - entityList.remarks.toString() ?? '', + Helpers.convertToTitleCase( + entityList.remarks.toString()) ?? + '', fontSize: 12, ), ), From 1b12354581288676a83427eca84a47ff540ded64 Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Tue, 11 Jan 2022 10:28:28 +0200 Subject: [PATCH 10/41] DAPP-66: fix date with design improvement --- assets/images/dr_avatar.png | Bin 0 -> 38543 bytes lib/screens/procedures/ProcedureCard.dart | 6 ++++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 assets/images/dr_avatar.png diff --git a/assets/images/dr_avatar.png b/assets/images/dr_avatar.png new file mode 100644 index 0000000000000000000000000000000000000000..693ebd7a0c23eda1454c7997115dc94092832a75 GIT binary patch literal 38543 zcmZsCcRbba`~M-5tRj0RBiSRu$syURD6+GntPswzPMKwotgNC)lD)^FGL9L_<{0M~ z*~dJb@q6+9e1E^s=kxpiBOcx3y081Xuj_d|uj}>Zo}m`qMUIOg5Qt7k`>rtvL=OB) z4!Uq2_-7CL`xpdDGu64P_5eD$(L!x?#jNoVaz2)#p)Z)UJFD!I?q93yHQY-5ni?}+W1Z$ zP`vpq^4nkDyun?awoS>sVw2^Q2Y(a?aevCTBP4_7X>5TeZ}RyfyR|0Q)?@~pJIjc`Jj8eh7&Kz3Ng`(UyX{_9>*x)-So z-loAFOcyL3%)pv{J*@J2O6BU-dqfP;uqG|%2SF_3r0&(#Rm{xIVl$=l+~AX_3RhYD z^Pu)K$*Sl*B_=O^pBh>}2i^v!vR=|^4jmbXxUd~~K6CH55H~875R=2fo%Ly$UE(>U zY~ z5Jf`7;KlsX6yEdT?JLN@t*o-ixHq?nRGYd@H2yWoYHZ`yp44KVE}hu2A% z{b2e~n0}kC;42+{&tx!kuZnX^{#Wg<3h8QhISazC_djXioQTD3UYDs4q*qkAYtVSS zcYyKnh5VdhKjcEEn_ zjs0h>LNn#k0%6=mb~lu$maPxeNx;P|!+<4^Y4VuD6V8@&>?)}H_HZ?lH0sE9{`s)Q z`ymd-Ke4m#4Hti=n)1Ik{!YkpkU`H<<-&4xyZ*+xf4kXdwn|G-m)VEAAKxM)u!FbV zWII|D2PF0|`7L}ahl96{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mIaQ`jk60(D|?bW)9J`=Jk|7>Mx9{MwQ;7K6= zHiA6@o)c^?&;~s4!0Xy(_>yhE35-47B{2SCP;he5rl902hc)T?dPilbPAlc2L=dG; z$yIJVPX6^8#*o8Z)vwj)45L(;`Zwu{4)j0pz;lkrGwu21?F4%S_&8ZE7(DPigGcu< z$Ts|zmM;!rDh6|+o52Y!Qp2#B^sa$Q$Ntn@h@1@5%eW{NM49pD4$0L`dGxaz+kh$0 z2u`^Y!zE3#Rfh_P1;?FvfB07BKmTi6%roeJ;DP57o|o7nL2U$k1n|+;$zKj0c;J~H zCrnJO`i~IC&_&G{hH^1Sol?3ZIQ42)aBAuK;PjGf>eRCDosu%fSN=JUe*C z<%*e=|E@~czoOAqbkk%Q2B@?Zft+|}J-J2B?pEsz3ADBW_y1X3993(}PpQ&NF9kDY zSAv;xgF3DJIv2N8TKzp*|A32snBp=0nTBC+(ami*dFxd=L$O+`zsSWY%A!n;pU&|T zIqAo$QcKpW(yq=4N-YiM1W*5#uJmu4puP5Q^l!!S1rI#8=7~xGyqd Date: Tue, 11 Jan 2022 16:43:49 +0200 Subject: [PATCH 11/41] fix chart issues --- .../profile/vital_sign/LineChartCurved.dart | 77 +++++++++++++------ .../LineChartCurvedBloodPressure.dart | 68 +++++++++++----- .../vte_assessment/vte_assessment_screen.dart | 4 +- 3 files changed, 104 insertions(+), 45 deletions(-) diff --git a/lib/screens/patients/profile/vital_sign/LineChartCurved.dart b/lib/screens/patients/profile/vital_sign/LineChartCurved.dart index 8fa55b37..d1fcfef1 100644 --- a/lib/screens/patients/profile/vital_sign/LineChartCurved.dart +++ b/lib/screens/patients/profile/vital_sign/LineChartCurved.dart @@ -16,8 +16,8 @@ class LineChartCurved extends StatelessWidget { List yAxixs = List(); // DateFormat format = DateFormat("yyyy-MM-dd"); - DateFormat yearFormat = DateFormat("yyyy/MMM"); - DateFormat monthFormat = DateFormat("MMM"); + DateFormat yearFormat = DateFormat("yyyy/MMM/dd"); + DateFormat monthFormat = DateFormat("dd/MMM"); bool isDatesSameYear = true; @override @@ -96,6 +96,7 @@ class LineChartCurved extends StatelessWidget { } } + LineChartData sampleData1(context) { return LineChartData( lineTouchData: LineTouchData( @@ -162,31 +163,25 @@ class LineChartCurved extends StatelessWidget { return ''; }, ), - leftTitles: SideTitles( - showTitles: true, - getTextStyles: (context, value) { - return TextStyle( + leftTitles: SideTitles( + showTitles: true, + getTextStyles: (cxt, value) => const TextStyle( color: Colors.black, + fontWeight: FontWeight.bold, fontSize: 10, - ); - }, - getTitles: (value) { - // if (timeSeries.length < 10) { - // return '${value.toInt()}'; - // } else { - // if (value == getMinY()) - // return '${value.toInt()}'; - // if (value == getMaxY()) + ), + interval:getInterval(), + + // getTitles: (value) { + // if (value.toInt() == 0) // return '${value.toInt()}'; - // if (yAxixs.contains(value)) { + // else if (value.toInt() % horizontalInterval == 0) // return '${value.toInt()}'; - // } - // return ''; - // } - return '${value.toInt()}'; - }, - margin: 12, - ), + // else + // return ''; + // }, + margin: 12, + ), ), borderData: FlBorderData( show: true, @@ -208,12 +203,44 @@ class LineChartCurved extends StatelessWidget { ), minX: 0, maxX: (timeSeries.length - 1).toDouble(), - maxY: getMaxY() + 0.3, - minY: getMinY(), + maxY: getMaxY() + getInterval(), + minY: 0, lineBarsData: getData(context), ); } + // double getMaxY() { + // double max = 0; + // timeSeries.forEach((element) { + // double resultValueDouble = element.sales; + // if (resultValueDouble > max) max = resultValueDouble; + // }); + // + // return max.roundToDouble(); + // } + // + // double getMinY() { + // double min = timeSeries[0].sales; + // timeSeries.forEach((element) { + // double resultValueDouble = element.sales; + // if (resultValueDouble < min) min = resultValueDouble; + // }); + // int value = min.toInt(); + // + // return value.toDouble(); + // } + + + double getInterval(){ + + return getMaxY() - getMinY() <= 100 + ? 20 + : getMaxY() - getMinY() <= 1000 + ? 100 + : 200; + + } + double getMaxY() { double max = 0; timeSeries.forEach((element) { diff --git a/lib/screens/patients/profile/vital_sign/LineChartCurvedBloodPressure.dart b/lib/screens/patients/profile/vital_sign/LineChartCurvedBloodPressure.dart index 0af3c575..a84cd045 100644 --- a/lib/screens/patients/profile/vital_sign/LineChartCurvedBloodPressure.dart +++ b/lib/screens/patients/profile/vital_sign/LineChartCurvedBloodPressure.dart @@ -168,12 +168,12 @@ class LineChartCurvedBloodPressure extends StatelessWidget { ), leftTitles: SideTitles( showTitles: true, - getTextStyles: (context, value) { - return TextStyle( - color: Colors.black, - fontSize: 10, - ); - }, + getTextStyles: (cxt, value) => const TextStyle( + color: Colors.black, + fontWeight: FontWeight.bold, + fontSize: 10, + ), + interval:getInterval(), getTitles: (value) { return '${value.toInt()}'; }, @@ -199,23 +199,31 @@ class LineChartCurvedBloodPressure extends StatelessWidget { ), ), minX: 0, - maxX: (timeSeries1.length - 1).toDouble(), - maxY: getMaxY() + 0.3, - minY: getMinY(), + maxX: 0, + maxY: getMaxY() + getInterval(), + minY: 0, lineBarsData: getData(context), ); } + double getInterval(){ + + return getMaxY() - getMinY() <= 100 + ? 20 + : getMaxY() - getMinY() <= 1000 + ? 100 + : 200; + + } + + + double getMaxY() { double max = 0; timeSeries1.forEach((element) { double resultValueDouble = element.sales; if (resultValueDouble > max) max = resultValueDouble; }); - timeSeries2.forEach((element) { - double resultValueDouble = element.sales; - if (resultValueDouble > max) max = resultValueDouble; - }); return max.roundToDouble(); } @@ -226,15 +234,39 @@ class LineChartCurvedBloodPressure extends StatelessWidget { double resultValueDouble = element.sales; if (resultValueDouble < min) min = resultValueDouble; }); - timeSeries2.forEach((element) { - double resultValueDouble = element.sales; - if (resultValueDouble < min) min = resultValueDouble; - }); - int value = min.toInt(); return value.toDouble(); } + // double getMaxY() { + // double max = 0; + // timeSeries1.forEach((element) { + // double resultValueDouble = element.sales; + // if (resultValueDouble > max) max = resultValueDouble; + // }); + // timeSeries2.forEach((element) { + // double resultValueDouble = element.sales; + // if (resultValueDouble > max) max = resultValueDouble; + // }); + // + // return max.roundToDouble(); + // } + // + // double getMinY() { + // double min = timeSeries1[0].sales; + // timeSeries1.forEach((element) { + // double resultValueDouble = element.sales; + // if (resultValueDouble < min) min = resultValueDouble; + // }); + // timeSeries2.forEach((element) { + // double resultValueDouble = element.sales; + // if (resultValueDouble < min) min = resultValueDouble; + // }); + // + // int value = min.toInt(); + // + // return value.toDouble(); + // } List getData(context) { List spots = List(); diff --git a/lib/screens/patients/profile/vte_assessment/vte_assessment_screen.dart b/lib/screens/patients/profile/vte_assessment/vte_assessment_screen.dart index 230c9bfb..25eb51d8 100644 --- a/lib/screens/patients/profile/vte_assessment/vte_assessment_screen.dart +++ b/lib/screens/patients/profile/vte_assessment/vte_assessment_screen.dart @@ -41,9 +41,9 @@ class _ProgressNoteState extends State { isDischargedPatient = routeArgs['isDischargedPatient']; return BaseView( onModelReady: (model) => model.getVteAssessment(patientId: patient.patientId, - admissionNo: 2016023498 + // admissionNo: 2016023498 - // admissionNo:int.parse(patient.admissionNo) + admissionNo:int.parse(patient.admissionNo) ), builder: (_, model, w) => AppScaffold( baseViewModel: model, From 0d61d0febc1ec68f6d17a4892b7d6bd2b458f8a9 Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Tue, 11 Jan 2022 17:16:20 +0200 Subject: [PATCH 12/41] fix issues --- .../vital_sign_detail_pain_scale.dart | 27 ++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_detail_pain_scale.dart b/lib/screens/patients/profile/vital_sign/vital_sign_detail_pain_scale.dart index af67f3e3..8eaf8672 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_detail_pain_scale.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_detail_pain_scale.dart @@ -79,14 +79,18 @@ class VitalSignDetailPainScale extends StatelessWidget { margin: EdgeInsets.symmetric(horizontal: 16), padding: EdgeInsets.only(left: 8), child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ Expanded( flex: 2, child: Column( crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, children: [ Row( mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ Expanded( child: Container( @@ -268,13 +272,24 @@ class VitalSignDetailPainScale extends StatelessWidget { ), Expanded( child: Container( - padding: EdgeInsets.all(8), + padding: EdgeInsets.symmetric(horizontal: 8), child: Center( - child: AppText( - "${AppDateUtils.convertDateFromServerFormat(vitalList[index].createdOn, "E , dd MMM, yyyy hh:mm a")}", - fontWeight: FontWeight.w700, - color: Color(0XFF28353E), - fontSize: SizeConfig.textMultiplier * 1.6, + child: Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + AppText( + "${AppDateUtils.convertDateFromServerFormat(vitalList[index].createdOn, "E , dd MMM")}", + fontWeight: FontWeight.w700, + color: Color(0XFF28353E), + fontSize: SizeConfig.textMultiplier * 1.6, + ), + AppText( + "${AppDateUtils.convertDateFromServerFormat(vitalList[index].createdOn, "hh:mm a")}", + fontWeight: FontWeight.w700, + color: Color(0XFF28353E), + fontSize: SizeConfig.textMultiplier * 1.6, + ), + ], ), ), ), From ed447f6b17da01cf7cf7dae99f54ada48e912ceb Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Wed, 12 Jan 2022 09:30:13 +0200 Subject: [PATCH 13/41] fix issue DAPP-48 --- lib/screens/live_care/end_call_screen.dart | 2 +- .../medical-file/health_summary_page.dart | 2 +- .../medical-file/medical_file_details.dart | 2 +- .../patient_sick_leave_screen.dart | 2 +- lib/screens/patients/ECGPage.dart | 2 +- .../insurance_approval_screen_patient.dart | 2 +- .../patients/insurance_approvals_details.dart | 2 +- .../profile/UCAF/ucaf_pager_screen.dart | 2 +- .../admission_orders_screen.dart | 2 +- .../admission-request-first-screen.dart | 2 +- .../admission-request-third-screen.dart | 2 +- .../admission-request_second-screen.dart | 2 +- .../diabetic_chart/diabetic_chart.dart | 2 +- .../profile/diagnosis/diagnosis_screen.dart | 2 +- .../discharge_summary/discharge_summary.dart | 2 +- .../all_lab_special_result_page.dart | 2 +- .../lab_result/laboratory_result_page.dart | 2 +- .../profile/lab_result/labs_home_page.dart | 2 +- .../special_lab_result_details_page.dart | 2 +- .../MedicalReportDetailPage.dart | 2 +- .../medical_report/MedicalReportPage.dart | 2 +- .../notes/note/progress_note_screen.dart | 2 +- .../nursing_note/nursing_note_screen.dart | 2 +- .../operation_report/operation_report.dart | 2 +- .../pending_orders/pending_orders_screen.dart | 2 +- .../patient_profile_screen.dart | 2 +- .../radiology/radiology_details_page.dart | 4 +- .../radiology/radiology_home_page.dart | 2 +- .../refer-patient-screen-in-patient.dart | 2 +- .../referral/refer-patient-screen.dart | 2 +- .../soap_update/update_soap_index.dart | 2 +- .../vital_sign/vital_sign_details_screen.dart | 2 +- .../vital_sign_item_details_screen.dart | 2 +- .../vte_assessment/vte_assessment_screen.dart | 2 +- .../prescription_item_in_patient_page.dart | 2 +- .../prescription/prescription_items_page.dart | 2 +- .../prescription/prescriptions_page.dart | 2 +- lib/screens/procedures/procedure_screen.dart | 2 +- .../patients/profile/app_bar/header_row.dart | 38 +++++++++++++++ .../patient-profile-app-bar.dart | 47 ++++--------------- ...ent-profile-header-new-design-app-bar.dart | 3 +- 41 files changed, 89 insertions(+), 77 deletions(-) create mode 100644 lib/widgets/patients/profile/app_bar/header_row.dart rename lib/widgets/patients/profile/{ => app_bar}/patient-profile-app-bar.dart (94%) rename lib/widgets/patients/profile/{ => app_bar}/patient-profile-header-new-design-app-bar.dart (99%) diff --git a/lib/screens/live_care/end_call_screen.dart b/lib/screens/live_care/end_call_screen.dart index 87e36943..98592335 100644 --- a/lib/screens/live_care/end_call_screen.dart +++ b/lib/screens/live_care/end_call_screen.dart @@ -13,7 +13,7 @@ import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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/buttons/app_buttons_widget.dart'; diff --git a/lib/screens/medical-file/health_summary_page.dart b/lib/screens/medical-file/health_summary_page.dart index 9155ffc1..0843ffd0 100644 --- a/lib/screens/medical-file/health_summary_page.dart +++ b/lib/screens/medical-file/health_summary_page.dart @@ -6,7 +6,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/medical-file/medical_file_details.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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'; diff --git a/lib/screens/medical-file/medical_file_details.dart b/lib/screens/medical-file/medical_file_details.dart index eb76ead9..99591e70 100644 --- a/lib/screens/medical-file/medical_file_details.dart +++ b/lib/screens/medical-file/medical_file_details.dart @@ -4,7 +4,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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/expandable-widget-header-body.dart'; diff --git a/lib/screens/patient-sick-leave/patient_sick_leave_screen.dart b/lib/screens/patient-sick-leave/patient_sick_leave_screen.dart index a2bc5a23..ed74ce80 100644 --- a/lib/screens/patient-sick-leave/patient_sick_leave_screen.dart +++ b/lib/screens/patient-sick-leave/patient_sick_leave_screen.dart @@ -12,7 +12,7 @@ import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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/card_with_bg_widget.dart'; diff --git a/lib/screens/patients/ECGPage.dart b/lib/screens/patients/ECGPage.dart index d477f0cb..8e647b30 100644 --- a/lib/screens/patients/ECGPage.dart +++ b/lib/screens/patients/ECGPage.dart @@ -6,7 +6,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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:flutter/cupertino.dart'; diff --git a/lib/screens/patients/insurance_approval_screen_patient.dart b/lib/screens/patients/insurance_approval_screen_patient.dart index 53932c99..e547430a 100644 --- a/lib/screens/patients/insurance_approval_screen_patient.dart +++ b/lib/screens/patients/insurance_approval_screen_patient.dart @@ -7,7 +7,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/patients/insurance_approvals_details.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/doctor_card_insurance.dart'; import 'package:flutter/cupertino.dart'; diff --git a/lib/screens/patients/insurance_approvals_details.dart b/lib/screens/patients/insurance_approvals_details.dart index 4695b7d4..de530c3d 100644 --- a/lib/screens/patients/insurance_approvals_details.dart +++ b/lib/screens/patients/insurance_approvals_details.dart @@ -6,7 +6,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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/user-guid/CusomRow.dart'; diff --git a/lib/screens/patients/profile/UCAF/ucaf_pager_screen.dart b/lib/screens/patients/profile/UCAF/ucaf_pager_screen.dart index b2a28f9a..af2bbd0b 100644 --- a/lib/screens/patients/profile/UCAF/ucaf_pager_screen.dart +++ b/lib/screens/patients/profile/UCAF/ucaf_pager_screen.dart @@ -5,7 +5,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/UCAF/page-stepper-widget.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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/buttons/app_buttons_widget.dart'; diff --git a/lib/screens/patients/profile/admission-orders/admission_orders_screen.dart b/lib/screens/patients/profile/admission-orders/admission_orders_screen.dart index 9719b525..41a66b89 100644 --- a/lib/screens/patients/profile/admission-orders/admission_orders_screen.dart +++ b/lib/screens/patients/profile/admission-orders/admission_orders_screen.dart @@ -5,7 +5,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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/card_with_bg_widget.dart'; diff --git a/lib/screens/patients/profile/admission-request/admission-request-first-screen.dart b/lib/screens/patients/profile/admission-request/admission-request-first-screen.dart index b74c2ef3..46a18f88 100644 --- a/lib/screens/patients/profile/admission-request/admission-request-first-screen.dart +++ b/lib/screens/patients/profile/admission-request/admission-request-first-screen.dart @@ -9,7 +9,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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/buttons/app_buttons_widget.dart'; diff --git a/lib/screens/patients/profile/admission-request/admission-request-third-screen.dart b/lib/screens/patients/profile/admission-request/admission-request-third-screen.dart index fb805129..30f75c7a 100644 --- a/lib/screens/patients/profile/admission-request/admission-request-third-screen.dart +++ b/lib/screens/patients/profile/admission-request/admission-request-third-screen.dart @@ -10,7 +10,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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/buttons/app_buttons_widget.dart'; diff --git a/lib/screens/patients/profile/admission-request/admission-request_second-screen.dart b/lib/screens/patients/profile/admission-request/admission-request_second-screen.dart index 394112fa..dd18bcdb 100644 --- a/lib/screens/patients/profile/admission-request/admission-request_second-screen.dart +++ b/lib/screens/patients/profile/admission-request/admission-request_second-screen.dart @@ -12,7 +12,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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/buttons/app_buttons_widget.dart'; diff --git a/lib/screens/patients/profile/diabetic_chart/diabetic_chart.dart b/lib/screens/patients/profile/diabetic_chart/diabetic_chart.dart index de9f6476..32c79999 100644 --- a/lib/screens/patients/profile/diabetic_chart/diabetic_chart.dart +++ b/lib/screens/patients/profile/diabetic_chart/diabetic_chart.dart @@ -10,7 +10,7 @@ import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/charts/app_time_series_chart.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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/errors/error_message.dart'; diff --git a/lib/screens/patients/profile/diagnosis/diagnosis_screen.dart b/lib/screens/patients/profile/diagnosis/diagnosis_screen.dart index 5a04c60a..5c7264c5 100644 --- a/lib/screens/patients/profile/diagnosis/diagnosis_screen.dart +++ b/lib/screens/patients/profile/diagnosis/diagnosis_screen.dart @@ -8,7 +8,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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/card_with_bg_widget.dart'; diff --git a/lib/screens/patients/profile/discharge_summary/discharge_summary.dart b/lib/screens/patients/profile/discharge_summary/discharge_summary.dart index 0878994a..bc97085d 100644 --- a/lib/screens/patients/profile/discharge_summary/discharge_summary.dart +++ b/lib/screens/patients/profile/discharge_summary/discharge_summary.dart @@ -1,7 +1,7 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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/text_fields/text_fields_utils.dart'; diff --git a/lib/screens/patients/profile/lab_result/all_lab_special_result_page.dart b/lib/screens/patients/profile/lab_result/all_lab_special_result_page.dart index 0f550191..e6e20409 100644 --- a/lib/screens/patients/profile/lab_result/all_lab_special_result_page.dart +++ b/lib/screens/patients/profile/lab_result/all_lab_special_result_page.dart @@ -5,7 +5,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/lab_result/special_lab_result_details_page.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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'; 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 0ead8fea..162f6a2e 100644 --- a/lib/screens/patients/profile/lab_result/laboratory_result_page.dart +++ b/lib/screens/patients/profile/lab_result/laboratory_result_page.dart @@ -2,7 +2,7 @@ import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart'; import 'package:doctor_app_flutter/core/viewModel/labs_view_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; 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 8352db28..458e7ec4 100644 --- a/lib/screens/patients/profile/lab_result/labs_home_page.dart +++ b/lib/screens/patients/profile/lab_result/labs_home_page.dart @@ -8,7 +8,7 @@ import 'package:doctor_app_flutter/screens/procedures/base_add_procedure_tab_pag import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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/card_with_bg_widget.dart'; diff --git a/lib/screens/patients/profile/lab_result/special_lab_result_details_page.dart b/lib/screens/patients/profile/lab_result/special_lab_result_details_page.dart index da21ca3d..4b1e6b62 100644 --- a/lib/screens/patients/profile/lab_result/special_lab_result_details_page.dart +++ b/lib/screens/patients/profile/lab_result/special_lab_result_details_page.dart @@ -2,7 +2,7 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/PatientMedicalReportViewModel.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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/errors/error_message.dart'; diff --git a/lib/screens/patients/profile/medical_report/MedicalReportDetailPage.dart b/lib/screens/patients/profile/medical_report/MedicalReportDetailPage.dart index eb28c528..c189ac45 100644 --- a/lib/screens/patients/profile/medical_report/MedicalReportDetailPage.dart +++ b/lib/screens/patients/profile/medical_report/MedicalReportDetailPage.dart @@ -5,7 +5,7 @@ import 'package:doctor_app_flutter/models/patient/MedicalReport/MeidcalReportMod import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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/errors/error_message.dart'; diff --git a/lib/screens/patients/profile/medical_report/MedicalReportPage.dart b/lib/screens/patients/profile/medical_report/MedicalReportPage.dart index b124f2cc..ff4513fc 100644 --- a/lib/screens/patients/profile/medical_report/MedicalReportPage.dart +++ b/lib/screens/patients/profile/medical_report/MedicalReportPage.dart @@ -14,7 +14,7 @@ import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/large_avatar.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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/card_with_bg_widget.dart'; diff --git a/lib/screens/patients/profile/notes/note/progress_note_screen.dart b/lib/screens/patients/profile/notes/note/progress_note_screen.dart index b8220939..2ac65ac6 100644 --- a/lib/screens/patients/profile/notes/note/progress_note_screen.dart +++ b/lib/screens/patients/profile/notes/note/progress_note_screen.dart @@ -16,7 +16,7 @@ import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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/card_with_bg_widget.dart'; diff --git a/lib/screens/patients/profile/notes/nursing_note/nursing_note_screen.dart b/lib/screens/patients/profile/notes/nursing_note/nursing_note_screen.dart index 06dc687a..3834e084 100644 --- a/lib/screens/patients/profile/notes/nursing_note/nursing_note_screen.dart +++ b/lib/screens/patients/profile/notes/nursing_note/nursing_note_screen.dart @@ -9,7 +9,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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/card_with_bg_widget.dart'; diff --git a/lib/screens/patients/profile/operation_report/operation_report.dart b/lib/screens/patients/profile/operation_report/operation_report.dart index 409e118d..405e903b 100644 --- a/lib/screens/patients/profile/operation_report/operation_report.dart +++ b/lib/screens/patients/profile/operation_report/operation_report.dart @@ -10,7 +10,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/operation_report/update_operation_report.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart'; import 'package:flutter/material.dart'; diff --git a/lib/screens/patients/profile/pending_orders/pending_orders_screen.dart b/lib/screens/patients/profile/pending_orders/pending_orders_screen.dart index 589c4680..0be4e409 100644 --- a/lib/screens/patients/profile/pending_orders/pending_orders_screen.dart +++ b/lib/screens/patients/profile/pending_orders/pending_orders_screen.dart @@ -2,7 +2,7 @@ import 'package:doctor_app_flutter/core/viewModel/pednding_orders_view_model.dar import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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/card_with_bg_widget.dart'; diff --git a/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart b/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart index 0c12b913..906a1487 100644 --- a/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart +++ b/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart @@ -18,7 +18,7 @@ import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/profi import 'package:doctor_app_flutter/util/NotificationPermissionUtils.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-header-new-design-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; diff --git a/lib/screens/patients/profile/radiology/radiology_details_page.dart b/lib/screens/patients/profile/radiology/radiology_details_page.dart index df3bbb06..c1957260 100644 --- a/lib/screens/patients/profile/radiology/radiology_details_page.dart +++ b/lib/screens/patients/profile/radiology/radiology_details_page.dart @@ -4,7 +4,7 @@ import 'package:doctor_app_flutter/core/viewModel/radiology_view_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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/buttons/app_buttons_widget.dart'; @@ -50,7 +50,7 @@ class RadiologyDetailsPage extends StatelessWidget { ), isShowAppBar: true, baseViewModel: model, - body: SingleChildScrollView( + body: SingleChildScrollView( child: Column( mainAxisSize: MainAxisSize.max, crossAxisAlignment: CrossAxisAlignment.center, diff --git a/lib/screens/patients/profile/radiology/radiology_home_page.dart b/lib/screens/patients/profile/radiology/radiology_home_page.dart index cc7ada28..6bf24f42 100644 --- a/lib/screens/patients/profile/radiology/radiology_home_page.dart +++ b/lib/screens/patients/profile/radiology/radiology_home_page.dart @@ -7,7 +7,7 @@ import 'package:doctor_app_flutter/screens/procedures/ProcedureType.dart'; import 'package:doctor_app_flutter/screens/procedures/base_add_procedure_tab_page.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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'; diff --git a/lib/screens/patients/profile/referral/refer-patient-screen-in-patient.dart b/lib/screens/patients/profile/referral/refer-patient-screen-in-patient.dart index 5ecba4a1..500378f9 100644 --- a/lib/screens/patients/profile/referral/refer-patient-screen-in-patient.dart +++ b/lib/screens/patients/profile/referral/refer-patient-screen-in-patient.dart @@ -8,7 +8,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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/buttons/app_buttons_widget.dart'; diff --git a/lib/screens/patients/profile/referral/refer-patient-screen.dart b/lib/screens/patients/profile/referral/refer-patient-screen.dart index 622c7927..a973d1c5 100644 --- a/lib/screens/patients/profile/referral/refer-patient-screen.dart +++ b/lib/screens/patients/profile/referral/refer-patient-screen.dart @@ -9,7 +9,7 @@ import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/patient-referral-item-widget.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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/buttons/app_buttons_widget.dart'; diff --git a/lib/screens/patients/profile/soap_update/update_soap_index.dart b/lib/screens/patients/profile/soap_update/update_soap_index.dart index fd6a62d8..e8e65d57 100644 --- a/lib/screens/patients/profile/soap_update/update_soap_index.dart +++ b/lib/screens/patients/profile/soap_update/update_soap_index.dart @@ -7,7 +7,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/subjective/update_subjective_page.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:flutter/cupertino.dart'; diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart b/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart index 33c796b0..31f3cb09 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart @@ -8,7 +8,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_item.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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/errors/error_message.dart'; diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart b/lib/screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart index 26f418e8..8bf76370 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart @@ -7,7 +7,7 @@ import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sig import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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:flutter/material.dart'; diff --git a/lib/screens/patients/profile/vte_assessment/vte_assessment_screen.dart b/lib/screens/patients/profile/vte_assessment/vte_assessment_screen.dart index 25eb51d8..a0b18aab 100644 --- a/lib/screens/patients/profile/vte_assessment/vte_assessment_screen.dart +++ b/lib/screens/patients/profile/vte_assessment/vte_assessment_screen.dart @@ -9,7 +9,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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/card_with_bg_widget.dart'; diff --git a/lib/screens/prescription/prescription_item_in_patient_page.dart b/lib/screens/prescription/prescription_item_in_patient_page.dart index eb95257b..960bee9e 100644 --- a/lib/screens/prescription/prescription_item_in_patient_page.dart +++ b/lib/screens/prescription/prescription_item_in_patient_page.dart @@ -5,7 +5,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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:flutter/cupertino.dart'; diff --git a/lib/screens/prescription/prescription_items_page.dart b/lib/screens/prescription/prescription_items_page.dart index 751a3deb..1e83eebe 100644 --- a/lib/screens/prescription/prescription_items_page.dart +++ b/lib/screens/prescription/prescription_items_page.dart @@ -4,7 +4,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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/dialogs/ShowImageDialog.dart'; diff --git a/lib/screens/prescription/prescriptions_page.dart b/lib/screens/prescription/prescriptions_page.dart index ef66b82b..4776d470 100644 --- a/lib/screens/prescription/prescriptions_page.dart +++ b/lib/screens/prescription/prescriptions_page.dart @@ -9,7 +9,7 @@ import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/doctor_card.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; diff --git a/lib/screens/procedures/procedure_screen.dart b/lib/screens/procedures/procedure_screen.dart index 16937262..ebb112d9 100644 --- a/lib/screens/procedures/procedure_screen.dart +++ b/lib/screens/procedures/procedure_screen.dart @@ -8,7 +8,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/procedures/update-procedure.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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/transitions/slide_up_page.dart'; diff --git a/lib/widgets/patients/profile/app_bar/header_row.dart b/lib/widgets/patients/profile/app_bar/header_row.dart new file mode 100644 index 00000000..8d1b9f28 --- /dev/null +++ b/lib/widgets/patients/profile/app_bar/header_row.dart @@ -0,0 +1,38 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:flutter/material.dart'; + +class HeaderRow extends StatelessWidget { + final String label; + final String value; + + const HeaderRow({Key key, this.label, this.value}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + label, + isCopyable: true, + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3, + color: Color(0xFF575757), + fontWeight: FontWeight.w600, + ), + SizedBox( + width: 1, + ), + Expanded( + child: AppText( + value, + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5, + color: Color(0xFF2E303A), + fontWeight: FontWeight.w700, + isCopyable: true, + ), + ), + ], + ); + } +} diff --git a/lib/widgets/patients/profile/patient-profile-app-bar.dart b/lib/widgets/patients/profile/app_bar/patient-profile-app-bar.dart similarity index 94% rename from lib/widgets/patients/profile/patient-profile-app-bar.dart rename to lib/widgets/patients/profile/app_bar/patient-profile-app-bar.dart index 974d3590..a088cea3 100644 --- a/lib/widgets/patients/profile/patient-profile-app-bar.dart +++ b/lib/widgets/patients/profile/app_bar/patient-profile-app-bar.dart @@ -11,7 +11,8 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:url_launcher/url_launcher.dart'; -import 'large_avatar.dart'; +import '../large_avatar.dart'; +import 'header_row.dart'; class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { final PatiantInformtion patient; @@ -342,7 +343,7 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( - '${TranslationBase.of(context).dr}$doctorName', + Helpers.convertToTitleCase('${TranslationBase.of(context).dr}$doctorName'), color: Color(0xFF2E303A), fontWeight: FontWeight.w700, fontSize: SizeConfig @@ -366,9 +367,12 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { value: branch ?? '', ), if (clinic != null) - HeaderRow( - label: 'Clinic: ', - value: clinic ?? '', + Container( + width: MediaQuery.of(context).size.width * 0.51, + child: HeaderRow( + label: 'Clinic: ', + value: Helpers.convertToTitleCase(clinic) ?? '', + ), ), if (isMedicalFile && episode != null) HeaderRow( @@ -410,7 +414,7 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { ? isInpatient ? (isFromLabResult ? 210 : 200) : isAppointmentHeader - ? 290 + ? 340 : SizeConfig.isHeightVeryShort ? 137 : SizeConfig.isHeightShort @@ -420,34 +424,3 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { : height); } -class HeaderRow extends StatelessWidget { - final String label; - final String value; - - const HeaderRow({Key key, this.label, this.value}) : super(key: key); - - @override - Widget build(BuildContext context) { - return Row( - children: [ - AppText( - label, - isCopyable: true, - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3, - color: Color(0xFF575757), - fontWeight: FontWeight.w600, - ), - SizedBox( - width: 1, - ), - AppText( - value, - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5, - color: Color(0xFF2E303A), - fontWeight: FontWeight.w700, - isCopyable: true, - ), - ], - ); - } -} diff --git a/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart b/lib/widgets/patients/profile/app_bar/patient-profile-header-new-design-app-bar.dart similarity index 99% rename from lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart rename to lib/widgets/patients/profile/app_bar/patient-profile-header-new-design-app-bar.dart index 72e0bc59..5415717a 100644 --- a/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart +++ b/lib/widgets/patients/profile/app_bar/patient-profile-header-new-design-app-bar.dart @@ -7,13 +7,14 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; 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'; +import 'header_row.dart'; + class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with PreferredSizeWidget { final PatiantInformtion patient; From 05b656416d62f3278e6e7f8184d92ca57a396601 Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Wed, 12 Jan 2022 10:01:52 +0200 Subject: [PATCH 14/41] small fix --- .../patients/profile/app_bar/header_row.dart | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/lib/widgets/patients/profile/app_bar/header_row.dart b/lib/widgets/patients/profile/app_bar/header_row.dart index 8d1b9f28..453899f9 100644 --- a/lib/widgets/patients/profile/app_bar/header_row.dart +++ b/lib/widgets/patients/profile/app_bar/header_row.dart @@ -11,7 +11,7 @@ class HeaderRow extends StatelessWidget { @override Widget build(BuildContext context) { return Row( - crossAxisAlignment: CrossAxisAlignment.start, + // crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( label, @@ -23,14 +23,12 @@ class HeaderRow extends StatelessWidget { SizedBox( width: 1, ), - Expanded( - child: AppText( - value, - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5, - color: Color(0xFF2E303A), - fontWeight: FontWeight.w700, - isCopyable: true, - ), + AppText( + value, + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5, + color: Color(0xFF2E303A), + fontWeight: FontWeight.w700, + isCopyable: true, ), ], ); From d9b2a618f5fefe0981d00887e13c8657c8ae1f24 Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Wed, 12 Jan 2022 11:10:53 +0200 Subject: [PATCH 15/41] small fix --- .../assessment/update_assessment_page.dart | 557 +++++++++--------- .../patients/profile/app_bar/header_row.dart | 12 +- .../app_bar/patient-profile-app-bar.dart | 16 +- 3 files changed, 303 insertions(+), 282 deletions(-) diff --git a/lib/screens/patients/profile/soap_update/assessment/update_assessment_page.dart b/lib/screens/patients/profile/soap_update/assessment/update_assessment_page.dart index c7e82b5f..14b790d7 100644 --- a/lib/screens/patients/profile/soap_update/assessment/update_assessment_page.dart +++ b/lib/screens/patients/profile/soap_update/assessment/update_assessment_page.dart @@ -142,318 +142,327 @@ class _UpdateAssessmentPageState extends State return Container( margin: EdgeInsets.only( left: 5, right: 5, top: 15, bottom: 15), - child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - crossAxisAlignment: - CrossAxisAlignment.start, + child: Column( children: [ - Column( - crossAxisAlignment: - CrossAxisAlignment.start, + Row( + children: [ - RichText( - text: new TextSpan( - style: new TextStyle( - fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3.6, - color: Color(0xFF2E303A), - fontFamily: 'Poppins', - fontWeight: FontWeight.w600, - letterSpacing: -0.4), - children: [ - new TextSpan( - text: "ICD : ".toUpperCase(), - ), - new TextSpan( - text: assessment - .selectedICD.code - .trim() - .toUpperCase() ?? - ""), - ], - ), - ), - Container( - width: MediaQuery.of(context) - .size - .width * - 0.50, - child: RichText( - text: new TextSpan( - style: new TextStyle( - fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 5, - color: Color(0xFF2E303A), - fontFamily: 'Poppins', - fontWeight: FontWeight.w600, - letterSpacing: -0.64, - ), - children: [ - new TextSpan( - text: assessment - .selectedICD.description - .toString(), - ), - ], - ), - ), - ), - RichText( - text: new TextSpan( - style: new TextStyle( + RichText( + text: new TextSpan( + style: new TextStyle( fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3.5, + .getTextMultiplierBasedOnWidth() * + 3.6, color: Color(0xFF2E303A), fontFamily: 'Poppins', fontWeight: FontWeight.w600, + letterSpacing: -0.4), + children: [ + new TextSpan( + text: "ICD : ".toUpperCase(), ), - children: [ - new TextSpan( - text: TranslationBase.of( - context) - .appointmentNo, - style: new TextStyle( - fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3, - letterSpacing: -0.4, - color: Color(0xFF575757), - ), - ), - new TextSpan( - text: assessment.appointmentId - .toString() ?? - "", - style: new TextStyle( - fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3.6, - letterSpacing: -0.48, - color: Color(0xFF2B353E), - ), - ), - ], - ), + new TextSpan( + text: assessment + .selectedICD.code + .trim() + .toUpperCase() ?? + ""), + ], ), - RichText( - text: new TextSpan( - style: new TextStyle( - fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3, - color: Color(0xFF2E303A), - fontFamily: 'Poppins', - fontWeight: FontWeight.w600), - children: [ - new TextSpan( - text: TranslationBase.of( - context) - .condition + - " : ", - style: new TextStyle( - letterSpacing: -0.4, - color: Color(0xFF575757), + ), + Column( + crossAxisAlignment: + CrossAxisAlignment.end, + children: [ + AppText( + assessment.createdOn != null + ? AppDateUtils + .getDayMonthYearDateFormatted( + DateTime.parse( + assessment + .createdOn), isMonthShort: true) + : AppDateUtils + .getDayMonthYearDateFormatted( + DateTime.now()), + fontWeight: FontWeight.w600, + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3.6, + ), + AppText( + assessment.createdOn != null + ? AppDateUtils.getHour( + DateTime.parse( + assessment + .createdOn)) + : AppDateUtils.getHour( + DateTime.now()), + fontWeight: FontWeight.w600, + color: Color(0xFF575757), + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3.6, + ), + ], + ), + ], + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + + Container( + width: MediaQuery.of(context) + .size + .width * + 0.50, + child: RichText( + text: new TextSpan( + style: new TextStyle( + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 4.3, + color: Color(0xFF2E303A), + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + letterSpacing: -0.64, + ), + children: [ + new TextSpan( + text: assessment + .selectedICD.description + .toString(), + ), + ], ), ), - new TextSpan( - text: projectViewModel - .isArabic - ? assessment - .selectedDiagnosisCondition - .nameAr - : assessment - .selectedDiagnosisCondition - .nameEn, + ), + RichText( + text: new TextSpan( style: new TextStyle( fontSize: SizeConfig .getTextMultiplierBasedOnWidth() * - 3.6, - letterSpacing: -0.48, - color: Color(0xFF2B353E), + 3.5, + color: Color(0xFF2E303A), + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, ), - ), - ], - ), - ), - RichText( - text: new TextSpan( - style: new TextStyle( - fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3, - color: Color(0xFF2E303A), - fontFamily: 'Poppins', - fontWeight: FontWeight.w600), - children: [ - new TextSpan( - text: TranslationBase.of( + children: [ + new TextSpan( + text: TranslationBase.of( context) - .dType + - ' : ', - style: new TextStyle( - letterSpacing: -0.4, - color: Color(0xFF575757), - ), + .appointmentNo, + style: new TextStyle( + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3, + letterSpacing: -0.4, + color: Color(0xFF575757), + ), + ), + new TextSpan( + text: assessment.appointmentId + .toString() ?? + "", + style: new TextStyle( + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3.6, + letterSpacing: -0.48, + color: Color(0xFF2B353E), + ), + ), + ], ), - new TextSpan( - text: projectViewModel - .isArabic - ? assessment - .selectedDiagnosisType - .nameAr - : assessment - .selectedDiagnosisType - .nameEn, + ), + RichText( + text: new TextSpan( style: new TextStyle( - fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3.6, - letterSpacing: -0.48, - color: Color(0xFF2B353E), - ), - ), - ], - ), - ), - if (assessment.doctorName != null) - RichText( - text: new TextSpan( - style: new TextStyle( - fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3.6, - color: Color(0xFF2E303A), - fontFamily: 'Poppins', - fontWeight: - FontWeight.w600), - children: [ - new TextSpan( - text: TranslationBase.of( - context) - .doctor + - ' : ', - style: new TextStyle( fontSize: SizeConfig .getTextMultiplierBasedOnWidth() * 3, - letterSpacing: -0.4, - color: Color(0xFF575757), + color: Color(0xFF2E303A), + fontFamily: 'Poppins', + fontWeight: FontWeight.w600), + children: [ + new TextSpan( + text: TranslationBase.of( + context) + .condition + + " : ", + style: new TextStyle( + letterSpacing: -0.4, + color: Color(0xFF575757), + ), ), - ), - new TextSpan( - text: - assessment.doctorName ?? - '', - style: new TextStyle( + new TextSpan( + text: projectViewModel + .isArabic + ? assessment + .selectedDiagnosisCondition + .nameAr + : assessment + .selectedDiagnosisCondition + .nameEn, + style: new TextStyle( + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3.6, + letterSpacing: -0.48, + color: Color(0xFF2B353E), + ), + ), + ], + ), + ), + RichText( + text: new TextSpan( + style: new TextStyle( fontSize: SizeConfig .getTextMultiplierBasedOnWidth() * - 3.6, - letterSpacing: -0.48, - color: Color(0xFF2B353E), + 3, + color: Color(0xFF2E303A), + fontFamily: 'Poppins', + fontWeight: FontWeight.w600), + children: [ + new TextSpan( + text: TranslationBase.of( + context) + .dType + + ' : ', + style: new TextStyle( + letterSpacing: -0.4, + color: Color(0xFF575757), + ), ), - ), - ], + new TextSpan( + text: projectViewModel + .isArabic + ? assessment + .selectedDiagnosisType + .nameAr + : assessment + .selectedDiagnosisType + .nameEn, + style: new TextStyle( + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3.6, + letterSpacing: -0.48, + color: Color(0xFF2B353E), + ), + ), + ], + ), ), - ), - SizedBox( - height: 6, - ), - Row( - mainAxisAlignment: - MainAxisAlignment.start, - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ + if (assessment.doctorName != null) + RichText( + text: new TextSpan( + style: new TextStyle( + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3.6, + color: Color(0xFF2E303A), + fontFamily: 'Poppins', + fontWeight: + FontWeight.w600), + children: [ + new TextSpan( + text: TranslationBase.of( + context) + .doctor + + ' : ', + style: new TextStyle( + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3, + letterSpacing: -0.4, + color: Color(0xFF575757), + ), + ), + new TextSpan( + text: + assessment.doctorName ?? + '', + style: new TextStyle( + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3.6, + letterSpacing: -0.48, + color: Color(0xFF2B353E), + ), + ), + ], + ), + ), SizedBox( height: 6, ), - AppText( - (assessment.remark != null && - assessment.remark != - '') - ? TranslationBase.of( - context) - .remarks + - " : " - : '', - fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3, - color: Color(0xFF2E303A), - fontFamily: 'Poppins', - fontWeight: FontWeight.w600), - RemarkText( - remark: assessment.remark ?? "", - ), - ], - ), - ], - ), - Column( - crossAxisAlignment: - CrossAxisAlignment.end, - children: [ - Row( - children: [ - Column( + Row( + mainAxisAlignment: + MainAxisAlignment.start, crossAxisAlignment: - CrossAxisAlignment.end, + CrossAxisAlignment.start, children: [ - AppText( - assessment.createdOn != null - ? AppDateUtils - .getDayMonthYearDateFormatted( - DateTime.parse( - assessment - .createdOn)) - : AppDateUtils - .getDayMonthYearDateFormatted( - DateTime.now()), - fontWeight: FontWeight.w600, - fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3.6, + SizedBox( + height: 6, ), AppText( - assessment.createdOn != null - ? AppDateUtils.getHour( - DateTime.parse( - assessment - .createdOn)) - : AppDateUtils.getHour( - DateTime.now()), - fontWeight: FontWeight.w600, - color: Color(0xFF575757), - fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3.6, + (assessment.remark != null && + assessment.remark != + '') + ? TranslationBase.of( + context) + .remarks + + " : " + : '', + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3, + color: Color(0xFF2E303A), + fontFamily: 'Poppins', + fontWeight: FontWeight.w600), + RemarkText( + remark: assessment.remark ?? "", ), ], ), ], ), - SizedBox( - height: MediaQuery.of(context) - .size - .height * - 0.05, + Column( + crossAxisAlignment: + CrossAxisAlignment.end, + children: [ + + SizedBox( + height: MediaQuery.of(context) + .size + .height * + 0.05, + ), + InkWell( + onTap: () { + openAssessmentDialog(context, + isUpdate: true, + assessment: assessment, + model: model); + }, + child: Icon( + DoctorApp.edit, + size: 18, + ), + ) + ], ), - InkWell( - onTap: () { - openAssessmentDialog(context, - isUpdate: true, - assessment: assessment, - model: model); - }, - child: Icon( - DoctorApp.edit, - size: 18, - ), - ) ], ), ], diff --git a/lib/widgets/patients/profile/app_bar/header_row.dart b/lib/widgets/patients/profile/app_bar/header_row.dart index 453899f9..c5a0cd42 100644 --- a/lib/widgets/patients/profile/app_bar/header_row.dart +++ b/lib/widgets/patients/profile/app_bar/header_row.dart @@ -5,13 +5,14 @@ import 'package:flutter/material.dart'; class HeaderRow extends StatelessWidget { final String label; final String value; + final bool isExpanded; - const HeaderRow({Key key, this.label, this.value}) : super(key: key); + const HeaderRow({Key key, this.label, this.value, this.isExpanded = false}) : super(key: key); @override Widget build(BuildContext context) { return Row( - // crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( label, @@ -23,6 +24,13 @@ class HeaderRow extends StatelessWidget { SizedBox( width: 1, ), + isExpanded?Expanded(child: AppText( + value, + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5, + color: Color(0xFF2E303A), + fontWeight: FontWeight.w700, + isCopyable: true, + ), ): AppText( value, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5, diff --git a/lib/widgets/patients/profile/app_bar/patient-profile-app-bar.dart b/lib/widgets/patients/profile/app_bar/patient-profile-app-bar.dart index a088cea3..d9e10fa3 100644 --- a/lib/widgets/patients/profile/app_bar/patient-profile-app-bar.dart +++ b/lib/widgets/patients/profile/app_bar/patient-profile-app-bar.dart @@ -343,7 +343,8 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( - Helpers.convertToTitleCase('${TranslationBase.of(context).dr}$doctorName'), + Helpers.convertToTitleCase( + '${TranslationBase.of(context).dr}$doctorName'), color: Color(0xFF2E303A), fontWeight: FontWeight.w700, fontSize: SizeConfig @@ -368,11 +369,15 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { ), if (clinic != null) Container( - width: MediaQuery.of(context).size.width * 0.51, + width: + MediaQuery.of(context).size.width * + 0.51, child: HeaderRow( - label: 'Clinic: ', - value: Helpers.convertToTitleCase(clinic) ?? '', - ), + label: 'Clinic: ', + value: Helpers.convertToTitleCase( + clinic) ?? + '', + isExpanded: true), ), if (isMedicalFile && episode != null) HeaderRow( @@ -423,4 +428,3 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { (SizeConfig.isWidthLarge ? 25 : 20) : height); } - From 0d542a862e946147d3f6ab6efd8f57a217e6ecc7 Mon Sep 17 00:00:00 2001 From: RoaaGhali98 Date: Wed, 12 Jan 2022 16:39:15 +0200 Subject: [PATCH 16/41] add new service --- lib/config/config.dart | 3 + .../intervention_medication_service.dart | 34 ++ .../intervention_medication_view_model.dart | 39 ++ .../profile/search_medication_view_model.dart | 42 +++ lib/locator.dart | 6 + lib/routes.dart | 1 - .../intervention_medication.dart | 357 +++++++++--------- .../new-medication/new_medication_screen.dart | 2 +- pubspec.lock | 9 +- 9 files changed, 317 insertions(+), 176 deletions(-) create mode 100644 lib/core/service/patient/profile/intervention_medication_service.dart create mode 100644 lib/core/viewModel/profile/intervention_medication_view_model.dart diff --git a/lib/config/config.dart b/lib/config/config.dart index 17abf2bf..8a93f3e1 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -389,6 +389,9 @@ const GET_ALL_DISCHARGE_SUMMARY = const VTE_ASSESSMENT = "Services/Patients.svc/REST/INP_GetVTEHistoryByTransactionNo"; +const GET_INTERVENTION_MEDICATION = + "Services/DoctorApplication.svc/REST/DoctorApp_GetInterventionMedications"; + var selectedPatientType = 1; //*********change value to decode json from Dropdown ************ diff --git a/lib/core/service/patient/profile/intervention_medication_service.dart b/lib/core/service/patient/profile/intervention_medication_service.dart new file mode 100644 index 00000000..0dbd5a2f --- /dev/null +++ b/lib/core/service/patient/profile/intervention_medication_service.dart @@ -0,0 +1,34 @@ +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/core/model/vte_assessment/vte_assessment_req_model.dart'; +import 'package:doctor_app_flutter/core/model/vte_assessment/vte_assessment_res_model.dart'; +import 'package:doctor_app_flutter/core/service/base/base_service.dart'; +import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryReqModel.dart'; +import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryResModel.dart'; + +import '../../../../screens/patients/profile/new-medication-model/new_medication_req_model.dart'; +import '../../../../screens/patients/profile/new-medication-model/new_medication_res_model.dart'; + +class InterventionMedicationService extends BaseService { + + List _allInterventionList = []; + + List get allInterventionList => + _allInterventionList; + + Future getInterventionMedication( + {InterventionMedicationReqModel interventionMedicationResModel}) async { + hasError = false; + await baseAppClient.post(GET_INTERVENTION_MEDICATION, + onSuccess: (dynamic response, int statusCode) { + _allInterventionList.clear(); + response['List_InterventionMedications'].forEach( + (v) { + _allInterventionList.add(InterventionMedicationResModel.fromJson(v)); + }, + ); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: interventionMedicationResModel.toJson()); + } +} diff --git a/lib/core/viewModel/profile/intervention_medication_view_model.dart b/lib/core/viewModel/profile/intervention_medication_view_model.dart new file mode 100644 index 00000000..5f627a1b --- /dev/null +++ b/lib/core/viewModel/profile/intervention_medication_view_model.dart @@ -0,0 +1,39 @@ +import 'package:doctor_app_flutter/core/enum/viewstate.dart'; +import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; +import 'package:doctor_app_flutter/locator.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/new-medication-model/new_medication_res_model.dart'; + +import '../../../screens/patients/profile/new-medication-model/new_medication_req_model.dart'; +import '../../service/patient/profile/intervention_medication_service.dart'; + +class InterventionMedicationViewModel extends BaseViewModel { + bool hasError = false; + InterventionMedicationService _interventionMedicationService = + locator(); + + List get allInterventionList => + _interventionMedicationService.allInterventionList; + + Future getInterventionMedication({ + int patientId, + int admissionNo, + }) async { + InterventionMedicationReqModel interventionMedicationReqModel = + InterventionMedicationReqModel( + projectID: 15, + patientID: 79941, + fromDate: '\/Date(1488322922)\/', + toDate: '\/Date(1635886800000)\/', + ); + hasError = false; + setState(ViewState.Busy); + await _interventionMedicationService.getInterventionMedication( + interventionMedicationResModel: interventionMedicationReqModel); + if (_interventionMedicationService.hasError) { + error = _interventionMedicationService.error; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } +} diff --git a/lib/core/viewModel/profile/search_medication_view_model.dart b/lib/core/viewModel/profile/search_medication_view_model.dart index 0e67496b..2d529872 100644 --- a/lib/core/viewModel/profile/search_medication_view_model.dart +++ b/lib/core/viewModel/profile/search_medication_view_model.dart @@ -420,3 +420,45 @@ class SearchMedicationViewModel extends BaseViewModel { } } } + +// +// import 'package:doctor_app_flutter/core/enum/viewstate.dart'; +// import 'package:doctor_app_flutter/core/model/vte_assessment/vte_assessment_req_model.dart'; +// import 'package:doctor_app_flutter/core/model/vte_assessment/vte_assessment_res_model.dart'; +// import 'package:doctor_app_flutter/core/service/patient/profile/discharge_summary_servive.dart'; +// import 'package:doctor_app_flutter/core/service/patient/profile/vte_assessment_service.dart'; +// import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; +// import 'package:doctor_app_flutter/locator.dart'; +// import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryReqModel.dart'; +// import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryResModel.dart'; +// import 'package:doctor_app_flutter/screens/patients/profile/new-medication-model/new_medication_res_model.dart'; +// +// import '../../service/patient/profile/intervention_medication_service.dart'; +// +// class SearchMedicationViewModel extends BaseViewModel { +// bool hasError = false; +// InterventionMedicationService _interventionMedicationService = +// locator(); +// +// List get allVteHistoryList => +// _interventionMedicationService.allVteHistoryList; +// +// Future getVteAssessment({ +// int patientId, +// int admissionNo, +// }) async { +// VteAssessmentRequestModel vteAssessmentRequestModel = +// VteAssessmentRequestModel( +// transactionNo: admissionNo); +// hasError = false; +// setState(ViewState.Busy); +// await _interventionMedicationService.getVteAssessment( +// vteAssessmentRequestModel: vteAssessmentRequestModel); +// if (_interventionMedicationService.hasError) { +// error = _interventionMedicationService.error; +// setState(ViewState.ErrorLocal); +// } else { +// setState(ViewState.Idle); +// } +// } +// } diff --git a/lib/locator.dart b/lib/locator.dart index 93b1b2ce..5dd6a078 100644 --- a/lib/locator.dart +++ b/lib/locator.dart @@ -13,6 +13,7 @@ import 'package:doctor_app_flutter/core/viewModel/profile/discharge_summary_view import 'package:doctor_app_flutter/core/viewModel/profile/operation_report_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/scan_qr_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/new-medication/intervention_medication.dart'; import 'package:doctor_app_flutter/screens/patients/profile/new-medication/new_medication_screen.dart'; import 'package:get_it/get_it.dart'; @@ -33,6 +34,7 @@ import 'core/service/patient/out_patient_service.dart'; import 'core/service/patient/patient-doctor-referral-service.dart'; import 'core/service/patient/patientInPatientService.dart'; import 'core/service/patient/patient_service.dart'; +import 'core/service/patient/profile/intervention_medication_service.dart'; import 'core/service/patient/profile/operation_report_servive.dart'; import 'core/service/patient/profile/vte_assessment_service.dart'; import 'core/service/patient/referral_patient_service.dart'; @@ -67,6 +69,8 @@ import 'core/viewModel/patient-referral-viewmodel.dart'; import 'core/viewModel/patient-ucaf-viewmodel.dart'; import 'core/viewModel/patient-vital-sign-viewmodel.dart'; import 'core/viewModel/prescriptions_view_model.dart'; +import 'core/viewModel/profile/intervention_medication_view_model.dart'; +import 'core/viewModel/profile/search_medication_view_model.dart'; import 'core/viewModel/profile/vte_assessment_view_model.dart'; import 'core/viewModel/radiology_view_model.dart'; import 'core/viewModel/referral_view_model.dart'; @@ -116,6 +120,7 @@ void setupLocator() { locator.registerLazySingleton(() => PatientRegistrationService()); locator.registerLazySingleton(() => DischargeSummaryService()); locator.registerLazySingleton(() => VteAssessmentService()); + locator.registerLazySingleton(() => InterventionMedicationService()); /// View Model locator.registerFactory(() => DoctorReplayViewModel()); @@ -150,4 +155,5 @@ void setupLocator() { locator.registerFactory(() => DischargeSummaryViewModel()); locator.registerFactory(() => SearchMedicationViewModel()); locator.registerFactory(() => VteAssessmentViewModel()); + locator.registerFactory(() => InterventionMedicationViewModel()); } diff --git a/lib/routes.dart b/lib/routes.dart index ac234eb7..c4b89347 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -139,6 +139,5 @@ var routes = { ADMISSION_ORDERS: (_) => AdmissionOrdersScreen(), DIABETIC_CHART_VALUES: (_) => DiabeticChart(), NEW_MEDICATION: (_) => NewMedicationScreen(), - INTERVENTION_MEDICATION: (_) => InterventionMedicationScreen(), VTE_ASSESSMENT: (_) => VteAssessmentScreen(), }; diff --git a/lib/screens/patients/profile/new-medication/intervention_medication.dart b/lib/screens/patients/profile/new-medication/intervention_medication.dart index aeca8f88..0a7af86d 100644 --- a/lib/screens/patients/profile/new-medication/intervention_medication.dart +++ b/lib/screens/patients/profile/new-medication/intervention_medication.dart @@ -1,24 +1,29 @@ +import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; +import 'package:doctor_app_flutter/core/model/diagnosis/GetDiagnosisForInPatientRequestModel.dart'; import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/pednding_orders_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/profile/vte_assessment_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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/card_with_bg_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; -class InterventionMedicationScreen extends StatefulWidget { - const InterventionMedicationScreen({Key key, this.patient}) : super(key: key); - final PatiantInformtion patient ; +import '../../../../core/viewModel/profile/intervention_medication_view_model.dart'; +DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); +class InterventionMedicationScreen extends StatefulWidget { + final PatiantInformtion patient; + const InterventionMedicationScreen(this.patient, {Key key}) : super(key: key); @override _InterventionMedicationScreenState createState() => _InterventionMedicationScreenState(); @@ -26,27 +31,29 @@ class InterventionMedicationScreen extends StatefulWidget { class _InterventionMedicationScreenState extends State { bool isDischargedPatient = false; - AuthenticationViewModel authenticationViewModel; - ProjectViewModel projectViewModel; - @override Widget build(BuildContext context) { authenticationViewModel = Provider.of(context); projectViewModel = Provider.of(context); - return BaseView( + + return BaseView( + onModelReady: (model) => model.getInterventionMedication(patientId: widget.patient.patientId, + // admissionNo: 2016023498 + + admissionNo:int.parse(widget.patient.admissionNo) + ), builder: (_, model, w) => AppScaffold( baseViewModel: model, backgroundColor: Theme.of(context).scaffoldBackgroundColor, - //appBarTitle: TranslationBase.of(context).progressNote, appBar: PatientProfileAppBar( widget.patient, isInpatient: true, ), - body: model.admissionOrderList == null || - model.admissionOrderList.length == 0 + body: model.allInterventionList == null || + model.allInterventionList.length == 0 ? Center( child: ErrorMessage( error: TranslationBase.of(context).noDataAvailable, @@ -56,42 +63,16 @@ class _InterventionMedicationScreenState extends State[ - Padding( - padding: EdgeInsets.all(12.0), - child: Column( - children: [ - Row( - children: [ - AppText( - TranslationBase.of(context).admission, - fontSize: 15.0, - fontWeight: FontWeight.w600, - fontFamily: 'Poppins', - ), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context).orders, - fontSize: 30.0, - fontWeight: FontWeight.w700, - ), - ], - ), - ], - ), - ), Expanded( child: Container( child: ListView.builder( - itemCount: model.admissionOrderList.length, + itemCount: model.allInterventionList.length, itemBuilder: (BuildContext ctxt, int index) { return FractionallySizedBox( widthFactor: 0.95, child: CardWithBgWidget( hasBorder: false, - bgColor: Colors.white, + bgColor: Colors.transparent, widget: Column( children: [ Column( @@ -122,83 +103,13 @@ class _InterventionMedicationScreenState extends State { Navigator.push( context, - MaterialPageRoute(builder: (context) => InterventionMedicationScreen(patient: patient,)), + MaterialPageRoute(builder: (context) => InterventionMedicationScreen(patient)), ); diff --git a/pubspec.lock b/pubspec.lock index e4f5a19f..3ba5bc57 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -770,6 +770,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.12.11" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.2" meta: dependency: transitive description: @@ -1173,7 +1180,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.3" + version: "0.4.8" timing: dependency: transitive description: From af9e8dd095d65d6fe310cdd3deb9b1d948af2c22 Mon Sep 17 00:00:00 2001 From: RoaaGhali98 Date: Wed, 12 Jan 2022 16:47:26 +0200 Subject: [PATCH 17/41] we edit a date format --- .../profile/new-medication/intervention_medication.dart | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/screens/patients/profile/new-medication/intervention_medication.dart b/lib/screens/patients/profile/new-medication/intervention_medication.dart index 0a7af86d..2e3fb589 100644 --- a/lib/screens/patients/profile/new-medication/intervention_medication.dart +++ b/lib/screens/patients/profile/new-medication/intervention_medication.dart @@ -123,10 +123,15 @@ class _InterventionMedicationScreenState extends State Date: Thu, 13 Jan 2022 14:06:28 +0200 Subject: [PATCH 18/41] add new service called intervention_medication_history_screen --- lib/config/config.dart | 3 + .../intervention_medication_service.dart | 28 +- .../intervention_medication_view_model.dart | 34 +- ...rvention_medication_history_req_model.dart | 32 ++ ...rvention_medication_history_res_model.dart | 96 ++++ .../intervention_medication.dart | 448 +++++++++--------- ...ntervention_medication_history_screen.dart | 418 ++++++++++++++++ 7 files changed, 839 insertions(+), 220 deletions(-) create mode 100644 lib/screens/patients/profile/new-medication-model/intervention_medication_history_req_model.dart create mode 100644 lib/screens/patients/profile/new-medication-model/intervention_medication_history_res_model.dart create mode 100644 lib/screens/patients/profile/new-medication/intervention_medication_history_screen.dart diff --git a/lib/config/config.dart b/lib/config/config.dart index 8a93f3e1..d85b75cc 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -392,6 +392,9 @@ const VTE_ASSESSMENT = const GET_INTERVENTION_MEDICATION = "Services/DoctorApplication.svc/REST/DoctorApp_GetInterventionMedications"; +const GET_INTERVENTION_MEDICATION_HISTORY = + "Services/DoctorApplication.svc/REST/DoctorApp_GetInterventionHistory"; + var selectedPatientType = 1; //*********change value to decode json from Dropdown ************ diff --git a/lib/core/service/patient/profile/intervention_medication_service.dart b/lib/core/service/patient/profile/intervention_medication_service.dart index 0dbd5a2f..24d18eef 100644 --- a/lib/core/service/patient/profile/intervention_medication_service.dart +++ b/lib/core/service/patient/profile/intervention_medication_service.dart @@ -5,6 +5,8 @@ import 'package:doctor_app_flutter/core/service/base/base_service.dart'; import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryReqModel.dart'; import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryResModel.dart'; +import '../../../../screens/patients/profile/new-medication-model/intervention_medication_history_req_model.dart'; +import '../../../../screens/patients/profile/new-medication-model/intervention_medication_history_res_model.dart'; import '../../../../screens/patients/profile/new-medication-model/new_medication_req_model.dart'; import '../../../../screens/patients/profile/new-medication-model/new_medication_res_model.dart'; @@ -12,11 +14,16 @@ class InterventionMedicationService extends BaseService { List _allInterventionList = []; + List _allInterventionHistoryList = []; + List get allInterventionList => _allInterventionList; + List get allInterventionHistoryList => + _allInterventionHistoryList; + Future getInterventionMedication( - {InterventionMedicationReqModel interventionMedicationResModel}) async { + {InterventionMedicationReqModel interventionMedicationReqModel}) async { hasError = false; await baseAppClient.post(GET_INTERVENTION_MEDICATION, onSuccess: (dynamic response, int statusCode) { @@ -29,6 +36,23 @@ class InterventionMedicationService extends BaseService { }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; - }, body: interventionMedicationResModel.toJson()); + }, body: interventionMedicationReqModel.toJson()); + } + + Future getInterventionMedicationHistory( + {InterventionMedicationHistoryReqModel interventionMedicationHistoryReqModel}) async { + hasError = false; + await baseAppClient.post(GET_INTERVENTION_MEDICATION_HISTORY, + onSuccess: (dynamic response, int statusCode) { + _allInterventionHistoryList.clear(); + response['List_InterventionHistory'].forEach( + (v) { + _allInterventionHistoryList.add(InterventionMedicationHistoryResModel.fromJson(v)); + }, + ); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: interventionMedicationHistoryReqModel.toJson()); } } diff --git a/lib/core/viewModel/profile/intervention_medication_view_model.dart b/lib/core/viewModel/profile/intervention_medication_view_model.dart index 5f627a1b..8494b6d9 100644 --- a/lib/core/viewModel/profile/intervention_medication_view_model.dart +++ b/lib/core/viewModel/profile/intervention_medication_view_model.dart @@ -1,12 +1,16 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; import 'package:doctor_app_flutter/locator.dart'; +import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/patients/profile/new-medication-model/new_medication_res_model.dart'; +import '../../../screens/patients/profile/new-medication-model/intervention_medication_history_req_model.dart'; +import '../../../screens/patients/profile/new-medication-model/intervention_medication_history_res_model.dart'; import '../../../screens/patients/profile/new-medication-model/new_medication_req_model.dart'; import '../../service/patient/profile/intervention_medication_service.dart'; class InterventionMedicationViewModel extends BaseViewModel { + PatiantInformtion patient; bool hasError = false; InterventionMedicationService _interventionMedicationService = locator(); @@ -14,6 +18,10 @@ class InterventionMedicationViewModel extends BaseViewModel { List get allInterventionList => _interventionMedicationService.allInterventionList; + List get allInterventionHistoryList => + _interventionMedicationService.allInterventionHistoryList; + + Future getInterventionMedication({ int patientId, int admissionNo, @@ -28,7 +36,31 @@ class InterventionMedicationViewModel extends BaseViewModel { hasError = false; setState(ViewState.Busy); await _interventionMedicationService.getInterventionMedication( - interventionMedicationResModel: interventionMedicationReqModel); + interventionMedicationReqModel: interventionMedicationReqModel); + if (_interventionMedicationService.hasError) { + error = _interventionMedicationService.error; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + + + Future getInterventionMedicationHistory({ + int patientId, + }) async { + InterventionMedicationHistoryReqModel interventionMedicationHistoryReqModel = + InterventionMedicationHistoryReqModel( + projectID: 15, + patientID: 79941, + admissionNo: 2018013900, + prescriptionNo: 2045165, + orderNo: 1171570, + ); + hasError = false; + setState(ViewState.Busy); + await _interventionMedicationService.getInterventionMedicationHistory( + interventionMedicationHistoryReqModel: interventionMedicationHistoryReqModel); if (_interventionMedicationService.hasError) { error = _interventionMedicationService.error; setState(ViewState.ErrorLocal); diff --git a/lib/screens/patients/profile/new-medication-model/intervention_medication_history_req_model.dart b/lib/screens/patients/profile/new-medication-model/intervention_medication_history_req_model.dart new file mode 100644 index 00000000..122212b7 --- /dev/null +++ b/lib/screens/patients/profile/new-medication-model/intervention_medication_history_req_model.dart @@ -0,0 +1,32 @@ +class InterventionMedicationHistoryReqModel { + int projectID; + int patientID; + int admissionNo; + int orderNo; + int prescriptionNo; + + InterventionMedicationHistoryReqModel( + {this.projectID, + this.patientID, + this.admissionNo, + this.orderNo, + this.prescriptionNo}); + + InterventionMedicationHistoryReqModel.fromJson(Map json) { + projectID = json['ProjectID']; + patientID = json['PatientID']; + admissionNo = json['AdmissionNo']; + orderNo = json['OrderNo']; + prescriptionNo = json['PrescriptionNo']; + } + + Map toJson() { + final Map data = new Map(); + data['ProjectID'] = this.projectID; + data['PatientID'] = this.patientID; + data['AdmissionNo'] = this.admissionNo; + data['OrderNo'] = this.orderNo; + data['PrescriptionNo'] = this.prescriptionNo; + return data; + } +} \ No newline at end of file diff --git a/lib/screens/patients/profile/new-medication-model/intervention_medication_history_res_model.dart b/lib/screens/patients/profile/new-medication-model/intervention_medication_history_res_model.dart new file mode 100644 index 00000000..451cccb8 --- /dev/null +++ b/lib/screens/patients/profile/new-medication-model/intervention_medication_history_res_model.dart @@ -0,0 +1,96 @@ +class InterventionMedicationHistoryResModel { + String setupId; + String projectId; + int patientId; + int admissionNo; + int prescriptionId; + int orderNo; + int id; + int interventionId; + Null intervention; + String remark; + int commentedBy; + bool isDoctor; + bool isActive; + int createdBy; + String createdByName; + String createdByNameN; + String createdOn; + Null editedBy; + Null editedByName; + Null editedByNameN; + Null editedOn; + + InterventionMedicationHistoryResModel( + {this.setupId, + this.projectId, + this.patientId, + this.admissionNo, + this.prescriptionId, + this.orderNo, + this.id, + this.interventionId, + this.intervention, + this.remark, + this.commentedBy, + this.isDoctor, + this.isActive, + this.createdBy, + this.createdByName, + this.createdByNameN, + this.createdOn, + this.editedBy, + this.editedByName, + this.editedByNameN, + this.editedOn}); + + InterventionMedicationHistoryResModel.fromJson(Map json) { + setupId = json['SetupId']; + projectId = json['ProjectId']; + patientId = json['PatientId']; + admissionNo = json['AdmissionNo']; + prescriptionId = json['PrescriptionId']; + orderNo = json['OrderNo']; + id = json['Id']; + interventionId = json['InterventionId']; + intervention = json['Intervention']; + remark = json['Remark']; + commentedBy = json['CommentedBy']; + isDoctor = json['IsDoctor']; + isActive = json['IsActive']; + createdBy = json['CreatedBy']; + createdByName = json['CreatedByName']; + createdByNameN = json['CreatedByNameN']; + createdOn = json['CreatedOn']; + editedBy = json['EditedBy']; + editedByName = json['EditedByName']; + editedByNameN = json['EditedByNameN']; + editedOn = json['EditedOn']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupId'] = this.setupId; + data['ProjectId'] = this.projectId; + data['PatientId'] = this.patientId; + data['AdmissionNo'] = this.admissionNo; + data['PrescriptionId'] = this.prescriptionId; + data['OrderNo'] = this.orderNo; + data['Id'] = this.id; + data['InterventionId'] = this.interventionId; + data['Intervention'] = this.intervention; + data['Remark'] = this.remark; + data['CommentedBy'] = this.commentedBy; + data['IsDoctor'] = this.isDoctor; + data['IsActive'] = this.isActive; + data['CreatedBy'] = this.createdBy; + data['CreatedByName'] = this.createdByName; + data['CreatedByNameN'] = this.createdByNameN; + data['CreatedOn'] = this.createdOn; + data['EditedBy'] = this.editedBy; + data['EditedByName'] = this.editedByName; + data['EditedByNameN'] = this.editedByNameN; + data['EditedOn'] = this.editedOn; + return data; + } +} \ No newline at end of file diff --git a/lib/screens/patients/profile/new-medication/intervention_medication.dart b/lib/screens/patients/profile/new-medication/intervention_medication.dart index 2e3fb589..0ae3cee3 100644 --- a/lib/screens/patients/profile/new-medication/intervention_medication.dart +++ b/lib/screens/patients/profile/new-medication/intervention_medication.dart @@ -18,6 +18,8 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import '../../../../core/viewModel/profile/intervention_medication_view_model.dart'; +import '../../../../widgets/transitions/fade_page.dart'; +import 'intervention_medication_history_screen.dart'; DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); @@ -59,43 +61,64 @@ class _InterventionMedicationScreenState extends State[ - Expanded( - child: Container( - child: ListView.builder( - itemCount: model.allInterventionList.length, - itemBuilder: (BuildContext ctxt, int index) { - return FractionallySizedBox( - widthFactor: 0.95, - child: CardWithBgWidget( - hasBorder: false, - bgColor: Colors.transparent, - widget: Column( - children: [ - Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - SizedBox( - height: 10, - ), - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Container( - width: MediaQuery.of(context) - .size - .width * - 0.60, - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, + children: [ + Expanded( + child: Container( + child: ListView.builder( + itemCount: model.allInterventionList.length, + itemBuilder: (BuildContext ctxt, int index) { + return FractionallySizedBox( + widthFactor: 0.95, + child: CardWithBgWidget( + hasBorder: false, + bgColor: Colors.transparent, + widget: Column( + children: [ + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + width: MediaQuery.of(context) + .size + .width * + 0.60, + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Row( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + AppText( + model + .allInterventionList[ + index].cS, + fontWeight: FontWeight.w600, + fontSize: 14, + ), + + ], + ), + ], + ), + ), + Column( children: [ Row( crossAxisAlignment: @@ -103,9 +126,15 @@ class _InterventionMedicationScreenState extends State _InterventionMedicationHistoryScreenState(); +} + +class _InterventionMedicationHistoryScreenState extends State { + bool isDischargedPatient = false; + AuthenticationViewModel authenticationViewModel; + ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + authenticationViewModel = Provider.of(context); + projectViewModel = Provider.of(context); + + return BaseView( + onModelReady: (model) => model.getInterventionMedicationHistory(patientId: widget.patient.patientId, + ), + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + backgroundColor: Theme.of(context).scaffoldBackgroundColor, + appBar: PatientProfileAppBar( + widget.patient, + isInpatient: true, + ), + body: model.allInterventionHistoryList == null || + model.allInterventionHistoryList.length == 0 + ? Center( + child: ErrorMessage( + error: TranslationBase.of(context).noDataAvailable, + ), + ) + : Container( + color: Colors.grey[200], + child: Column( + children: [ + Expanded( + child: Container( + child: ListView.builder( + itemCount: model.allInterventionHistoryList.length, + itemBuilder: (BuildContext ctxt, int index) { + return FractionallySizedBox( + widthFactor: 0.95, + child: CardWithBgWidget( + hasBorder: false, + bgColor: Colors.transparent, + widget: Column( + children: [ + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + width: MediaQuery.of(context) + .size + .width * + 0.60, + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Row( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + AppText( + model + .allInterventionHistoryList[ + index].setupId, + fontWeight: FontWeight.w600, + fontSize: 14, + ), + + ], + ), + ], + ), + ), + Column( + children: [ + Row( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + AppText( + AppDateUtils.getDayMonthYearDateFormatted( + AppDateUtils.convertStringToDate( + model + .allInterventionHistoryList[ + index].createdOn) + ,isArabic: + projectViewModel + .isArabic, + isMonthShort: true), + fontWeight: FontWeight.w600, + fontSize: 14, + ), + + ], + ), + ], + ) + // Column( + // children: [ + // AppText( + // model + // .allInterventionList[ + // index] + // .startDatetime != + // null + // ? AppDateUtils.getDayMonthYearDateFormatted( + // AppDateUtils + // .getDateTimeFromString(model + // .allInterventionList[ + // index] + // .startDatetime), + // isArabic: + // projectViewModel + // .isArabic, + // isMonthShort: true) + // : AppDateUtils + // .getDayMonthYearDateFormatted( + // DateTime.now(), + // isArabic: + // projectViewModel + // .isArabic), + // fontWeight: FontWeight.w600, + // fontSize: 14, + // isCopyable: true, + // ), + // AppText( + // model + // .allInterventionList[ + // index] + // .startDatetime != + // null + // ? AppDateUtils.getHour( + // AppDateUtils + // .getDateTimeFromString(model + // .allInterventionList[ + // index] + // .startDatetime)) + // : AppDateUtils.getHour( + // DateTime.now()), + // fontWeight: FontWeight.w600, + // fontSize: 14, + // isCopyable: true, + // ), + // ], + // crossAxisAlignment: + // CrossAxisAlignment.end, + // ) + ], + ), + SizedBox( + height: 8, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + // AppText( + // TranslationBase.of(context) + // .VTE_Type + + // " : ", + // fontSize: 12, + // ), + Expanded( + child: AppText( + model + .allInterventionHistoryList[ + index] + .remark, + fontSize: 12, + isCopyable: true, + ), + ), + ]), + SizedBox( + height: 8, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + // AppText( + // TranslationBase.of(context) + // .pharmacology + + // " : ", + // fontSize: 12, + // ), + Expanded( + child: AppText( + model + .allInterventionHistoryList[ + index] + .createdByName, + fontSize: 12, + isCopyable: true, + ), + ), + ]), + SizedBox( + height: 8, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + // AppText( + // TranslationBase.of(context) + // .reasonsThrombo + + // " : ", + // fontSize: 12, + // ), + Expanded( + child: AppText( + model + .allInterventionHistoryList[ + index] + .setupId, + fontSize: 12, + isCopyable: true, + ), + ), + ]), + SizedBox( + height: 8, + ), + + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + // AppText( + // TranslationBase.of(context) + // .reasonsThrombo + + // " : ", + // fontSize: 12, + // ), + Expanded( + child: AppText( + model + .allInterventionHistoryList[ + index] + .setupId, + fontSize: 12, + isCopyable: true, + ), + ), + ]), + Row( + crossAxisAlignment: + CrossAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment.end, + children: [ + InkWell( + onTap: () async { + await locator() + .logEvent( + eventCategory: + "Operation Report Screen", + eventAction: + "Update Operation Report ", + ); + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (context) => + // UpdateOperationReport( + // reservation: model + // .reservationList[ + // index], + // patient: patient, + // isUpdate: true, + // )), + // ); + }, + child: Container( + decoration: BoxDecoration( + color: AppGlobal.appRedColor, + borderRadius: + BorderRadius.circular(10), + ), + // color:Colors.red[600], + + child: Row( + children: [ + + SizedBox( + width: 2, + ), + AppText( + TranslationBase.of(context) + .accept, + fontSize: 10, + color: Colors.white, + ), + ], + ), + padding: EdgeInsets.all(6), + ), + ), + SizedBox( + width: 10, + ), + InkWell( + onTap: () async { + await locator() + .logEvent( + eventCategory: + "Operation Report Screen", + eventAction: + "Update Operation Report ", + ); + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (context) => + // UpdateOperationReport( + // reservation: model + // .reservationList[ + // index], + // patient: patient, + // isUpdate: true, + // )), + // ); + }, + child: Container( + decoration: BoxDecoration( + color: AppGlobal.appGreenColor, + borderRadius: + BorderRadius.circular(10), + ), + // color:Colors.red[600], + + child: Row( + children: [ + + SizedBox( + width: 2, + ), + AppText( + TranslationBase.of(context) + .reject, + fontSize: 10, + color: Colors.white, + ), + ], + ), + padding: EdgeInsets.all(6), + ), + ), + ], + ), + + ], + ), + SizedBox( + height: 20, + ), + ], + ), + ), + ); + }), + ), + ), + ], + ), + ), + ), + ); + } +} From b79eff7f6b0729a60c0898f1e66c0e569047d5c4 Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Thu, 13 Jan 2022 14:30:32 +0200 Subject: [PATCH 19/41] fix issues --- lib/core/viewModel/PatientSearchViewModel.dart | 2 +- .../soap_update/shared_soap_widgets/steper/status_Label.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/core/viewModel/PatientSearchViewModel.dart b/lib/core/viewModel/PatientSearchViewModel.dart index 5acc6f07..3d8f7b63 100644 --- a/lib/core/viewModel/PatientSearchViewModel.dart +++ b/lib/core/viewModel/PatientSearchViewModel.dart @@ -126,7 +126,7 @@ class PatientSearchViewModel extends BaseViewModel { } else if (OutPatientFilterType.NextWeek == outPatientFilterType) { dateTo = AppDateUtils.convertDateToFormat( DateTime(DateTime.now().year, DateTime.now().month, - DateTime.now().day + 6), + DateTime.now().day + 7), 'yyyy-MM-dd'); dateFrom = AppDateUtils.convertDateToFormat( diff --git a/lib/screens/patients/profile/soap_update/shared_soap_widgets/steper/status_Label.dart b/lib/screens/patients/profile/soap_update/shared_soap_widgets/steper/status_Label.dart index ea75d348..d43168e3 100644 --- a/lib/screens/patients/profile/soap_update/shared_soap_widgets/steper/status_Label.dart +++ b/lib/screens/patients/profile/soap_update/shared_soap_widgets/steper/status_Label.dart @@ -39,7 +39,7 @@ class StatusLabel extends StatelessWidget { : TranslationBase.of(context).locked, fontWeight: FontWeight.bold, textAlign: TextAlign.center, - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 2.7, + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 2.5, color: stepId == selectedStepId ? Color(0xFFCC9B14) : stepId < selectedStepId From 65d04b2d0ff1a2844943d3d3f65cdb57839fcb49 Mon Sep 17 00:00:00 2001 From: RoaaGhali98 Date: Thu, 13 Jan 2022 15:09:22 +0200 Subject: [PATCH 20/41] fix some issues --- .../pharmacy_intervention_view_model.dart | 51 ++ .../profile/search_medication_view_model.dart | 464 ------------------ lib/locator.dart | 7 +- lib/routes.dart | 7 +- .../intervention_medication.dart | 0 ...ntervention_medication_history_screen.dart | 4 +- .../pharmacy_intervention_screen.dart} | 21 +- .../profile_gird_for_InPatient.dart | 6 +- 8 files changed, 68 insertions(+), 492 deletions(-) create mode 100644 lib/core/viewModel/profile/pharmacy_intervention_view_model.dart delete mode 100644 lib/core/viewModel/profile/search_medication_view_model.dart rename lib/screens/patients/profile/{new-medication => pharmacy-intervention}/intervention_medication.dart (100%) rename lib/screens/patients/profile/{new-medication => pharmacy-intervention}/intervention_medication_history_screen.dart (100%) rename lib/screens/patients/profile/{new-medication/new_medication_screen.dart => pharmacy-intervention/pharmacy_intervention_screen.dart} (92%) diff --git a/lib/core/viewModel/profile/pharmacy_intervention_view_model.dart b/lib/core/viewModel/profile/pharmacy_intervention_view_model.dart new file mode 100644 index 00000000..b34cced5 --- /dev/null +++ b/lib/core/viewModel/profile/pharmacy_intervention_view_model.dart @@ -0,0 +1,51 @@ +import 'package:doctor_app_flutter/core/enum/filter_type.dart'; +import 'package:doctor_app_flutter/core/enum/patient_type.dart'; +import 'package:doctor_app_flutter/core/enum/viewstate.dart'; +import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart'; +import 'package:doctor_app_flutter/core/service/patient/out_patient_service.dart'; +import 'package:doctor_app_flutter/core/service/patient/patientInPatientService.dart'; +import 'package:doctor_app_flutter/core/service/special_clinics/special_clinic_service.dart'; +import 'package:doctor_app_flutter/models/dashboard/get_special_clinical_care_mapping_List_Respose_Model.dart'; +import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; + +import '../../../locator.dart'; +import '../base_view_model.dart'; + + + +class PharmacyInterventionViewModel extends BaseViewModel { + OutPatientService _outPatientService = locator(); + SpecialClinicsService _specialClinicsService = + locator(); + + List get patientList => _outPatientService.patientList; + + List + get specialClinicalCareMappingList => + _specialClinicsService.specialClinicalCareMappingList; + + List filterData = []; + + DateTime selectedFromDate; + DateTime selectedToDate; + + int firstSubsetIndex = 0; + int inPatientPageSize = 20; + int lastSubsetIndex = 20; + + List InpatientClinicList = []; + + + PatientInPatientService _inPatientService = + locator(); + + List get inPatientList => _inPatientService.inPatientList; + + List get myIinPatientList => + _inPatientService.myInPatientList; + + List filteredInPatientItems = List(); + List filteredMyInPatientItems = List(); + +} diff --git a/lib/core/viewModel/profile/search_medication_view_model.dart b/lib/core/viewModel/profile/search_medication_view_model.dart deleted file mode 100644 index 2d529872..00000000 --- a/lib/core/viewModel/profile/search_medication_view_model.dart +++ /dev/null @@ -1,464 +0,0 @@ -import 'package:doctor_app_flutter/core/enum/filter_type.dart'; -import 'package:doctor_app_flutter/core/enum/patient_type.dart'; -import 'package:doctor_app_flutter/core/enum/viewstate.dart'; -import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart'; -import 'package:doctor_app_flutter/core/service/patient/out_patient_service.dart'; -import 'package:doctor_app_flutter/core/service/patient/patientInPatientService.dart'; -import 'package:doctor_app_flutter/core/service/special_clinics/special_clinic_service.dart'; -import 'package:doctor_app_flutter/models/dashboard/get_special_clinical_care_mapping_List_Respose_Model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; -import 'package:doctor_app_flutter/util/date-utils.dart'; - -import '../../../locator.dart'; -import '../base_view_model.dart'; - - - -class SearchMedicationViewModel extends BaseViewModel { - OutPatientService _outPatientService = locator(); - SpecialClinicsService _specialClinicsService = - locator(); - - List get patientList => _outPatientService.patientList; - - List - get specialClinicalCareMappingList => - _specialClinicsService.specialClinicalCareMappingList; - - List filterData = []; - - DateTime selectedFromDate; - DateTime selectedToDate; - - int firstSubsetIndex = 0; - int inPatientPageSize = 20; - int lastSubsetIndex = 20; - - List InpatientClinicList = []; - - searchData(String str) { - var strExist = str.length > 0 ? true : false; - if (strExist) { - filterData = []; - for (var i = 0; i < _outPatientService.patientList.length; i++) { - String firstName = - _outPatientService.patientList[i].firstName.toUpperCase(); - String lastName = - _outPatientService.patientList[i].lastName.toUpperCase(); - String mobile = - _outPatientService.patientList[i].mobileNumber.toUpperCase(); - String patientID = - _outPatientService.patientList[i].patientId.toString(); - - if (firstName.contains(str.toUpperCase()) || - lastName.contains(str.toUpperCase()) || - mobile.contains(str) || - patientID.contains(str)) { - filterData.add(_outPatientService.patientList[i]); - } - } - notifyListeners(); - } else { - filterData = _outPatientService.patientList; - notifyListeners(); - } - } - - getOutPatient(PatientSearchRequestModel patientSearchRequestModel, - {bool isLocalBusy = false}) async { - if (isLocalBusy) { - setState(ViewState.BusyLocal); - } else { - setState(ViewState.Busy); - } - await getDoctorProfile(isGetProfile: true); - patientSearchRequestModel.doctorID = doctorProfile.doctorID; - await _outPatientService.getOutPatient(patientSearchRequestModel); - if (_outPatientService.hasError) { - error = _outPatientService.error; - if (isLocalBusy) { - setState(ViewState.ErrorLocal); - } else { - setState(ViewState.Error); - } - } else { - filterData = _outPatientService.patientList; - setState(ViewState.Idle); - } - } - - sortOutPatient({bool isDes = false}) { - if (isDes) - filterData = filterData.reversed.toList(); - else - filterData = filterData.reversed.toList(); - setState(ViewState.Idle); - } - - getPatientFileInformation(PatientSearchRequestModel patientSearchRequestModel, - {bool isLocalBusy = false}) async { - setState(ViewState.Busy); - await _outPatientService - .getPatientFileInformation(patientSearchRequestModel); - if (_outPatientService.hasError) { - error = _outPatientService.error; - setState(ViewState.Error); - } else { - filterData = _outPatientService.patientList; - setState(ViewState.Idle); - } - } - - getPatientBasedOnDate( - {item, - PatientSearchRequestModel patientSearchRequestModel, - PatientType selectedPatientType, - bool isSearchWithKeyInfo, - OutPatientFilterType outPatientFilterType}) async { - String dateTo; - String dateFrom; - if (OutPatientFilterType.Previous == outPatientFilterType) { - selectedFromDate = DateTime( - DateTime.now().year, DateTime.now().month - 1, DateTime.now().day); - selectedToDate = DateTime( - DateTime.now().year, DateTime.now().month, DateTime.now().day - 1); - dateTo = AppDateUtils.convertDateToFormat(selectedToDate, 'yyyy-MM-dd'); - dateFrom = - AppDateUtils.convertDateToFormat(selectedFromDate, 'yyyy-MM-dd'); - } else if (OutPatientFilterType.NextWeek == outPatientFilterType) { - dateTo = AppDateUtils.convertDateToFormat( - DateTime(DateTime.now().year, DateTime.now().month, - DateTime.now().day + 6), - 'yyyy-MM-dd'); - - dateFrom = AppDateUtils.convertDateToFormat( - DateTime(DateTime.now().year, DateTime.now().month, - DateTime.now().day + 1), - 'yyyy-MM-dd'); - } else { - dateFrom = AppDateUtils.convertDateToFormat( - DateTime( - DateTime.now().year, DateTime.now().month, DateTime.now().day), - 'yyyy-MM-dd'); - dateTo = AppDateUtils.convertDateToFormat( - DateTime( - DateTime.now().year, DateTime.now().month, DateTime.now().day), - 'yyyy-MM-dd'); - } - PatientSearchRequestModel currentModel = PatientSearchRequestModel(); - currentModel.patientID = patientSearchRequestModel.patientID; - currentModel.firstName = patientSearchRequestModel.firstName; - currentModel.lastName = patientSearchRequestModel.lastName; - currentModel.middleName = patientSearchRequestModel.middleName; - currentModel.doctorID = patientSearchRequestModel.doctorID; - currentModel.from = dateFrom; - currentModel.to = dateTo; - await getOutPatient(currentModel, isLocalBusy: true); - filterData = _outPatientService.patientList; - } - - PatientInPatientService _inPatientService = - locator(); - - List get inPatientList => _inPatientService.inPatientList; - - List get myIinPatientList => - _inPatientService.myInPatientList; - - List filteredInPatientItems = List(); - List filteredMyInPatientItems = List(); - - Future getInPatientList(PatientSearchRequestModel requestModel, - {bool isMyInpatient = false, bool isLocalBusy = false}) async { - await getDoctorProfile(); - if (isLocalBusy) { - setState(ViewState.BusyLocal); - } else { - setState(ViewState.Busy); - } - if (inPatientList.length == 0) - await _inPatientService.getInPatientList(requestModel, false); - if (_inPatientService.hasError) { - error = _inPatientService.error; - if (isLocalBusy) { - setState(ViewState.ErrorLocal); - } else { - setState(ViewState.Error); - } - } else { - setDefaultInPatientList(); - generateInpatientClinicList(); - setState(ViewState.Idle); - } - } - - sortInPatient({bool isDes = false, bool isAllClinic, bool isMyInPatient}) { - if (isMyInPatient - ? myIinPatientList.length > 0 - : isAllClinic - ? inPatientList.length > 0 - : filteredInPatientItems.length > 0) { - List localInPatient = isMyInPatient - ? [...filteredMyInPatientItems] - : isAllClinic - ? [...inPatientList] - : [...filteredInPatientItems]; - if (isDes) - localInPatient.sort((PatiantInformtion a, PatiantInformtion b) => b - .admissionDateWithDateTimeForm - .compareTo(a.admissionDateWithDateTimeForm)); - else - localInPatient.sort((PatiantInformtion a, PatiantInformtion b) => a - .admissionDateWithDateTimeForm - .compareTo(b.admissionDateWithDateTimeForm)); - if (isMyInPatient) { - filteredMyInPatientItems.clear(); - filteredMyInPatientItems.addAll(localInPatient); - } else if (isAllClinic) { - resetInPatientPagination(); - filteredInPatientItems - .addAll(localInPatient.sublist(firstSubsetIndex, lastSubsetIndex)); - } else { - filteredInPatientItems.clear(); - filteredInPatientItems.addAll(localInPatient); - } - } - setState(ViewState.Idle); - } - - resetInPatientPagination() { - filteredInPatientItems.clear(); - firstSubsetIndex = 0; - lastSubsetIndex = inPatientPageSize - 1; - } - - Future setDefaultInPatientList() async { - setState(ViewState.BusyLocal); - await getDoctorProfile(); - resetInPatientPagination(); - if (inPatientList.length > 0) { - lastSubsetIndex = (inPatientList.length < inPatientPageSize - 1 - ? inPatientList.length - : inPatientPageSize - 1); - - filteredInPatientItems - .addAll(inPatientList.sublist(firstSubsetIndex, lastSubsetIndex)); - } - - if (myIinPatientList.length > 0) { - filteredMyInPatientItems.addAll(myIinPatientList); - } - setState(ViewState.Idle); - } - - generateInpatientClinicList() { - InpatientClinicList.clear(); - inPatientList.forEach((element) { - if (!InpatientClinicList.contains(element.clinicDescription)) { - InpatientClinicList.add(element.clinicDescription); - } - }); - } - - addOnFilteredList() { - if (lastSubsetIndex < inPatientList.length) { - firstSubsetIndex = firstSubsetIndex + - (inPatientList.length - lastSubsetIndex < inPatientPageSize - 1 - ? inPatientList.length - lastSubsetIndex - : inPatientPageSize - 1); - lastSubsetIndex = lastSubsetIndex + - (inPatientList.length - lastSubsetIndex < inPatientPageSize - 1 - ? inPatientList.length - lastSubsetIndex - : inPatientPageSize - 1); - filteredInPatientItems - .addAll(inPatientList.sublist(firstSubsetIndex, lastSubsetIndex)); - setState(ViewState.Idle); - } - } - - removeOnFilteredList() { - if (lastSubsetIndex - inPatientPageSize - 1 > 0) { - filteredInPatientItems.removeAt(lastSubsetIndex - inPatientPageSize - 1); - setState(ViewState.Idle); - } - } - - filterByHospital({int hospitalId}) { - filteredInPatientItems = []; - for (var i = 0; i < inPatientList.length; i++) { - if (inPatientList[i].projectId == hospitalId) { - filteredInPatientItems.add(inPatientList[i]); - } - } - notifyListeners(); - } - - filterByClinic({String clinicName}) { - filteredInPatientItems = []; - for (var i = 0; i < inPatientList.length; i++) { - if (inPatientList[i].clinicDescription == clinicName) { - filteredInPatientItems.add(inPatientList[i]); - } - } - notifyListeners(); - } - - void clearPatientList() { - _inPatientService.inPatientList = []; - _inPatientService.myInPatientList = []; - } - - void filterSearchResults(String query, - {bool isAllClinic, bool isMyInPatient}) { - var strExist = query.length > 0 ? true : false; - - if (isMyInPatient) { - List localFilteredMyInPatientItems = [ - ...myIinPatientList - ]; - - if (strExist) { - filteredMyInPatientItems.clear(); - for (var i = 0; i < localFilteredMyInPatientItems.length; i++) { - String firstName = - localFilteredMyInPatientItems[i].firstName.toUpperCase(); - String lastName = - localFilteredMyInPatientItems[i].lastName.toUpperCase(); - String mobile = - localFilteredMyInPatientItems[i].mobileNumber.toUpperCase(); - String patientID = - localFilteredMyInPatientItems[i].patientId.toString(); - - if (firstName.contains(query.toUpperCase()) || - lastName.contains(query.toUpperCase()) || - mobile.contains(query) || - patientID.contains(query)) { - filteredMyInPatientItems.add(localFilteredMyInPatientItems[i]); - } - } - notifyListeners(); - } else { - if (myIinPatientList.length > 0) filteredMyInPatientItems.clear(); - filteredMyInPatientItems.addAll(myIinPatientList); - notifyListeners(); - } - } else { - if (isAllClinic) { - if (strExist) { - filteredInPatientItems = []; - for (var i = 0; i < inPatientList.length; i++) { - String firstName = inPatientList[i].firstName.toUpperCase(); - String lastName = inPatientList[i].lastName.toUpperCase(); - String mobile = inPatientList[i].mobileNumber.toUpperCase(); - String patientID = inPatientList[i].patientId.toString(); - - if (firstName.contains(query.toUpperCase()) || - lastName.contains(query.toUpperCase()) || - mobile.contains(query) || - patientID.contains(query)) { - filteredInPatientItems.add(inPatientList[i]); - } - } - notifyListeners(); - } else { - if (inPatientList.length > 0) filteredInPatientItems.clear(); - filteredInPatientItems.addAll(inPatientList); - notifyListeners(); - } - } else { - List localFilteredInPatientItems = [ - ...filteredInPatientItems - ]; - - if (strExist) { - filteredInPatientItems.clear(); - for (var i = 0; i < localFilteredInPatientItems.length; i++) { - String firstName = - localFilteredInPatientItems[i].firstName.toUpperCase(); - String lastName = - localFilteredInPatientItems[i].lastName.toUpperCase(); - String mobile = - localFilteredInPatientItems[i].mobileNumber.toUpperCase(); - String patientID = - localFilteredInPatientItems[i].patientId.toString(); - - if (firstName.contains(query.toUpperCase()) || - lastName.contains(query.toUpperCase()) || - mobile.contains(query) || - patientID.contains(query)) { - filteredInPatientItems.add(localFilteredInPatientItems[i]); - } - } - notifyListeners(); - } else { - if (localFilteredInPatientItems.length > 0) - filteredInPatientItems.clear(); - filteredInPatientItems.addAll(localFilteredInPatientItems); - notifyListeners(); - } - } - } - } - - getSpecialClinicalCareMappingList(clinicId, - {bool isLocalBusy = false}) async { - if (isLocalBusy) { - setState(ViewState.BusyLocal); - } else { - setState(ViewState.Busy); - } - await _specialClinicsService.getSpecialClinicalCareMappingList(clinicId); - if (_specialClinicsService.hasError) { - error = _specialClinicsService.error; - if (isLocalBusy) { - setState(ViewState.ErrorLocal); - } else { - setState(ViewState.Error); - } - } else { - setState(ViewState.Idle); - } - } -} - -// -// import 'package:doctor_app_flutter/core/enum/viewstate.dart'; -// import 'package:doctor_app_flutter/core/model/vte_assessment/vte_assessment_req_model.dart'; -// import 'package:doctor_app_flutter/core/model/vte_assessment/vte_assessment_res_model.dart'; -// import 'package:doctor_app_flutter/core/service/patient/profile/discharge_summary_servive.dart'; -// import 'package:doctor_app_flutter/core/service/patient/profile/vte_assessment_service.dart'; -// import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; -// import 'package:doctor_app_flutter/locator.dart'; -// import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryReqModel.dart'; -// import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryResModel.dart'; -// import 'package:doctor_app_flutter/screens/patients/profile/new-medication-model/new_medication_res_model.dart'; -// -// import '../../service/patient/profile/intervention_medication_service.dart'; -// -// class SearchMedicationViewModel extends BaseViewModel { -// bool hasError = false; -// InterventionMedicationService _interventionMedicationService = -// locator(); -// -// List get allVteHistoryList => -// _interventionMedicationService.allVteHistoryList; -// -// Future getVteAssessment({ -// int patientId, -// int admissionNo, -// }) async { -// VteAssessmentRequestModel vteAssessmentRequestModel = -// VteAssessmentRequestModel( -// transactionNo: admissionNo); -// hasError = false; -// setState(ViewState.Busy); -// await _interventionMedicationService.getVteAssessment( -// vteAssessmentRequestModel: vteAssessmentRequestModel); -// if (_interventionMedicationService.hasError) { -// error = _interventionMedicationService.error; -// setState(ViewState.ErrorLocal); -// } else { -// setState(ViewState.Idle); -// } -// } -// } diff --git a/lib/locator.dart b/lib/locator.dart index 5dd6a078..76be7fa0 100644 --- a/lib/locator.dart +++ b/lib/locator.dart @@ -13,10 +13,7 @@ import 'package:doctor_app_flutter/core/viewModel/profile/discharge_summary_view import 'package:doctor_app_flutter/core/viewModel/profile/operation_report_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/scan_qr_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/new-medication/intervention_medication.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/new-medication/new_medication_screen.dart'; import 'package:get_it/get_it.dart'; - import 'core/service/AnalyticsService.dart'; import 'core/service/NavigationService.dart'; import 'core/service/PatientRegistrationService.dart'; @@ -70,7 +67,7 @@ import 'core/viewModel/patient-ucaf-viewmodel.dart'; import 'core/viewModel/patient-vital-sign-viewmodel.dart'; import 'core/viewModel/prescriptions_view_model.dart'; import 'core/viewModel/profile/intervention_medication_view_model.dart'; -import 'core/viewModel/profile/search_medication_view_model.dart'; +import 'core/viewModel/profile/pharmacy_intervention_view_model.dart'; import 'core/viewModel/profile/vte_assessment_view_model.dart'; import 'core/viewModel/radiology_view_model.dart'; import 'core/viewModel/referral_view_model.dart'; @@ -153,7 +150,7 @@ void setupLocator() { locator.registerFactory(() => PatientRegistrationViewModel()); locator.registerFactory(() => PendingOrdersViewModel()); locator.registerFactory(() => DischargeSummaryViewModel()); - locator.registerFactory(() => SearchMedicationViewModel()); + locator.registerFactory(() => PharmacyInterventionViewModel()); locator.registerFactory(() => VteAssessmentViewModel()); locator.registerFactory(() => InterventionMedicationViewModel()); } diff --git a/lib/routes.dart b/lib/routes.dart index c4b89347..23f1dcbc 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -14,12 +14,11 @@ import 'package:doctor_app_flutter/screens/patients/profile/lab_result/labs_home import 'package:doctor_app_flutter/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart'; import 'package:doctor_app_flutter/screens/patients/profile/medical_report/MedicalReportDetailPage.dart'; import 'package:doctor_app_flutter/screens/patients/profile/medical_report/MedicalReportPage.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/new-medication/intervention_medication.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/new-medication/new_medication_screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/notes/note/progress_note_screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/notes/nursing_note/nursing_note_screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/operation_report/operation_report.dart'; import 'package:doctor_app_flutter/screens/patients/profile/pending_orders/pending_orders_screen.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/pharmacy-intervention/pharmacy_intervention_screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/prescriptions/in_patient_prescription_details_screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/radiology/radiology_home_page.dart'; import 'package:doctor_app_flutter/screens/patients/profile/referral/refer-patient-screen-in-patient.dart'; @@ -85,7 +84,7 @@ const String DIAGNOSIS_FOR_IN_PATIENT = 'get_diagnosis_for_in_patient'; const String DIABETIC_CHART_VALUES = 'get_diabetic_chart_values'; const String VTE_ASSESSMENT = 'vte_assessment '; const String DISCHARGE_SUMMARY = 'discharge_summary'; -const String NEW_MEDICATION = 'new_medication'; +const String PHARMACY_INTERVENTION = 'new_medication'; const String INTERVENTION_MEDICATION = 'intervention_medication'; @@ -138,6 +137,6 @@ var routes = { DIAGNOSIS_FOR_IN_PATIENT: (_) => DiagnosisScreen(), ADMISSION_ORDERS: (_) => AdmissionOrdersScreen(), DIABETIC_CHART_VALUES: (_) => DiabeticChart(), - NEW_MEDICATION: (_) => NewMedicationScreen(), + PHARMACY_INTERVENTION: (_) => PharmacyInterventionScreen(), VTE_ASSESSMENT: (_) => VteAssessmentScreen(), }; diff --git a/lib/screens/patients/profile/new-medication/intervention_medication.dart b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication.dart similarity index 100% rename from lib/screens/patients/profile/new-medication/intervention_medication.dart rename to lib/screens/patients/profile/pharmacy-intervention/intervention_medication.dart diff --git a/lib/screens/patients/profile/new-medication/intervention_medication_history_screen.dart b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart similarity index 100% rename from lib/screens/patients/profile/new-medication/intervention_medication_history_screen.dart rename to lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart index cc824195..25d85c9b 100644 --- a/lib/screens/patients/profile/new-medication/intervention_medication_history_screen.dart +++ b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart @@ -321,7 +321,7 @@ class _InterventionMedicationHistoryScreenState extends State _NewMedicationScreenState(); + _PharmacyInterventionScreenState createState() => _PharmacyInterventionScreenState(); } -class _NewMedicationScreenState extends State { +class _PharmacyInterventionScreenState extends State { @override void initState() { // TODO: implement initState @@ -38,10 +32,9 @@ class _NewMedicationScreenState extends State { @override Widget build(BuildContext context) { - var screenSize; final routeArgs = ModalRoute.of(context).settings.arguments as Map; PatiantInformtion patient = routeArgs['patient']; - return BaseView( + return BaseView( builder: (_, model, w) =>AppScaffold( isShowAppBar: false, backgroundColor: Theme.of(context).scaffoldBackgroundColor, @@ -175,7 +168,7 @@ class _NewMedicationScreenState extends State { ); } - selectDate(BuildContext context,SearchMedicationViewModel model, + selectDate(BuildContext context,PharmacyInterventionViewModel model, {bool isFromDate = true, DateTime firstDate, lastDate}) async { Helpers.hideKeyboard(context); DateTime selectedDate = isFromDate diff --git a/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart b/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart index 63d40c52..bdc7af5d 100644 --- a/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart +++ b/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart @@ -176,9 +176,9 @@ class ProfileGridForInPatient extends StatelessWidget { isInPatient: isInpatient, ), PatientProfileCardModel( - 'New', - 'Medication', - NEW_MEDICATION, + 'Pharmacy', + 'intervention', + PHARMACY_INTERVENTION, '', isInPatient: isInpatient, ), From be40076defec3e5421b43909ac51d901c47c0cdd Mon Sep 17 00:00:00 2001 From: RoaaGhali98 Date: Sun, 16 Jan 2022 10:50:57 +0200 Subject: [PATCH 21/41] Add new function in intervention_medication_service called accepted or rejected --- lib/config/config.dart | 3 + .../intervention_medication_service.dart | 26 +- .../intervention_medication_view_model.dart | 35 +- .../pharmacy_intervention_view_model.dart | 6 - .../accept_or_reject_req_model.dart | 56 +++ .../accept_or_reject_res_model.dart | 4 + ...rvention_medication_history_req_model.dart | 0 ...rvention_medication_history_res_model.dart | 0 .../new_medication_req_model.dart | 0 .../new_medication_res_model.dart | 0 ...ntervention_medication_history_screen.dart | 50 +-- .../pharmacy_intervention_screen.dart | 320 ++++++++++-------- 12 files changed, 284 insertions(+), 216 deletions(-) create mode 100644 lib/screens/patients/profile/pharmacy-intervention-model/accept_or_reject_req_model.dart create mode 100644 lib/screens/patients/profile/pharmacy-intervention-model/accept_or_reject_res_model.dart rename lib/screens/patients/profile/{new-medication-model => pharmacy-intervention-model}/intervention_medication_history_req_model.dart (100%) rename lib/screens/patients/profile/{new-medication-model => pharmacy-intervention-model}/intervention_medication_history_res_model.dart (100%) rename lib/screens/patients/profile/{new-medication-model => pharmacy-intervention-model}/new_medication_req_model.dart (100%) rename lib/screens/patients/profile/{new-medication-model => pharmacy-intervention-model}/new_medication_res_model.dart (100%) diff --git a/lib/config/config.dart b/lib/config/config.dart index d85b75cc..0aaaa56d 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -395,6 +395,9 @@ const GET_INTERVENTION_MEDICATION = const GET_INTERVENTION_MEDICATION_HISTORY = "Services/DoctorApplication.svc/REST/DoctorApp_GetInterventionHistory"; +const SET_ACCEPTED_OR_REJECTED = + "Services/DoctorApplication.svc/REST/DoctorApp_AcceptOrRejectIntervention"; + var selectedPatientType = 1; //*********change value to decode json from Dropdown ************ diff --git a/lib/core/service/patient/profile/intervention_medication_service.dart b/lib/core/service/patient/profile/intervention_medication_service.dart index 24d18eef..eab0fcab 100644 --- a/lib/core/service/patient/profile/intervention_medication_service.dart +++ b/lib/core/service/patient/profile/intervention_medication_service.dart @@ -1,14 +1,11 @@ import 'package:doctor_app_flutter/config/config.dart'; -import 'package:doctor_app_flutter/core/model/vte_assessment/vte_assessment_req_model.dart'; -import 'package:doctor_app_flutter/core/model/vte_assessment/vte_assessment_res_model.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; -import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryReqModel.dart'; -import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryResModel.dart'; +import '../../../../screens/patients/profile/pharmacy-intervention-model/accept_or_reject_req_model.dart'; +import '../../../../screens/patients/profile/pharmacy-intervention-model/intervention_medication_history_req_model.dart'; +import '../../../../screens/patients/profile/pharmacy-intervention-model/intervention_medication_history_res_model.dart'; +import '../../../../screens/patients/profile/pharmacy-intervention-model/new_medication_req_model.dart'; +import '../../../../screens/patients/profile/pharmacy-intervention-model/new_medication_res_model.dart'; -import '../../../../screens/patients/profile/new-medication-model/intervention_medication_history_req_model.dart'; -import '../../../../screens/patients/profile/new-medication-model/intervention_medication_history_res_model.dart'; -import '../../../../screens/patients/profile/new-medication-model/new_medication_req_model.dart'; -import '../../../../screens/patients/profile/new-medication-model/new_medication_res_model.dart'; class InterventionMedicationService extends BaseService { @@ -55,4 +52,17 @@ class InterventionMedicationService extends BaseService { super.error = error; }, body: interventionMedicationHistoryReqModel.toJson()); } + + Future setAcceptedOrRejected( + {AcceptOrRejectReqModel acceptOrRejectReqModel}) async { + hasError = false; + await baseAppClient.post(SET_ACCEPTED_OR_REJECTED, + onSuccess: (dynamic response, int statusCode) { + _allInterventionHistoryList.clear(); + + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: acceptOrRejectReqModel.toJson()); + } } diff --git a/lib/core/viewModel/profile/intervention_medication_view_model.dart b/lib/core/viewModel/profile/intervention_medication_view_model.dart index 8494b6d9..343dda42 100644 --- a/lib/core/viewModel/profile/intervention_medication_view_model.dart +++ b/lib/core/viewModel/profile/intervention_medication_view_model.dart @@ -2,11 +2,11 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; import 'package:doctor_app_flutter/locator.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/new-medication-model/new_medication_res_model.dart'; - -import '../../../screens/patients/profile/new-medication-model/intervention_medication_history_req_model.dart'; -import '../../../screens/patients/profile/new-medication-model/intervention_medication_history_res_model.dart'; -import '../../../screens/patients/profile/new-medication-model/new_medication_req_model.dart'; +import '../../../screens/patients/profile/pharmacy-intervention-model/accept_or_reject_req_model.dart'; +import '../../../screens/patients/profile/pharmacy-intervention-model/intervention_medication_history_req_model.dart'; +import '../../../screens/patients/profile/pharmacy-intervention-model/intervention_medication_history_res_model.dart'; +import '../../../screens/patients/profile/pharmacy-intervention-model/new_medication_req_model.dart'; +import '../../../screens/patients/profile/pharmacy-intervention-model/new_medication_res_model.dart'; import '../../service/patient/profile/intervention_medication_service.dart'; class InterventionMedicationViewModel extends BaseViewModel { @@ -68,4 +68,29 @@ class InterventionMedicationViewModel extends BaseViewModel { setState(ViewState.Idle); } } + + + Future setAcceptedOrRejected({ + String remarks, + }) async { + AcceptOrRejectReqModel acceptOrRejectReqModel = + AcceptOrRejectReqModel( + projectID: 15, + patientID: 79941, + admissionNo: 2018013900, + prescriptionNo: 2045165, + orderNo: 1171570, + remarks: remarks + ); + hasError = false; + setState(ViewState.Busy); + await _interventionMedicationService.setAcceptedOrRejected( + acceptOrRejectReqModel: acceptOrRejectReqModel); + if (_interventionMedicationService.hasError) { + error = _interventionMedicationService.error; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } } diff --git a/lib/core/viewModel/profile/pharmacy_intervention_view_model.dart b/lib/core/viewModel/profile/pharmacy_intervention_view_model.dart index b34cced5..1bd1c4d2 100644 --- a/lib/core/viewModel/profile/pharmacy_intervention_view_model.dart +++ b/lib/core/viewModel/profile/pharmacy_intervention_view_model.dart @@ -1,14 +1,8 @@ -import 'package:doctor_app_flutter/core/enum/filter_type.dart'; -import 'package:doctor_app_flutter/core/enum/patient_type.dart'; -import 'package:doctor_app_flutter/core/enum/viewstate.dart'; -import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart'; import 'package:doctor_app_flutter/core/service/patient/out_patient_service.dart'; import 'package:doctor_app_flutter/core/service/patient/patientInPatientService.dart'; import 'package:doctor_app_flutter/core/service/special_clinics/special_clinic_service.dart'; import 'package:doctor_app_flutter/models/dashboard/get_special_clinical_care_mapping_List_Respose_Model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; -import 'package:doctor_app_flutter/util/date-utils.dart'; - import '../../../locator.dart'; import '../base_view_model.dart'; diff --git a/lib/screens/patients/profile/pharmacy-intervention-model/accept_or_reject_req_model.dart b/lib/screens/patients/profile/pharmacy-intervention-model/accept_or_reject_req_model.dart new file mode 100644 index 00000000..07ef3f99 --- /dev/null +++ b/lib/screens/patients/profile/pharmacy-intervention-model/accept_or_reject_req_model.dart @@ -0,0 +1,56 @@ +class AcceptOrRejectReqModel { + int patientID; + int projectID; + int admissionNo; + int prescriptionNo; + int orderNo; + String remarks; + int memberID; + int accessLevel; + int languageID; + int lineItemNo; + bool patientOutSA; + + AcceptOrRejectReqModel( + {this.patientID, + this.projectID, + this.admissionNo, + this.prescriptionNo, + this.orderNo, + this.remarks, + this.memberID, + this.accessLevel, + this.languageID, + this.lineItemNo, + this.patientOutSA}); + + AcceptOrRejectReqModel.fromJson(Map json) { + patientID = json['PatientID']; + projectID = json['ProjectID']; + admissionNo = json['AdmissionNo']; + prescriptionNo = json['PrescriptionNo']; + orderNo = json['OrderNo']; + remarks = json['Remarks']; + memberID = json['MemberID']; + accessLevel = json['AccessLevel']; + languageID = json['LanguageID']; + lineItemNo = json['LineItemNo']; + patientOutSA = json['PatientOutSA']; + } + + Map toJson() { + final Map data = new Map(); + data['PatientID'] = this.patientID; + data['ProjectID'] = this.projectID; + data['AdmissionNo'] = this.admissionNo; + data['PrescriptionNo'] = this.prescriptionNo; + data['OrderNo'] = this.orderNo; + data['Remarks'] = this.remarks; + data['MemberID'] = this.memberID; + data['AccessLevel'] = this.accessLevel; + data['LanguageID'] = this.languageID; + data['LineItemNo'] = this.lineItemNo; + data['PatientOutSA'] = this.patientOutSA; + return data; + } +} \ No newline at end of file diff --git a/lib/screens/patients/profile/pharmacy-intervention-model/accept_or_reject_res_model.dart b/lib/screens/patients/profile/pharmacy-intervention-model/accept_or_reject_res_model.dart new file mode 100644 index 00000000..7e2448f6 --- /dev/null +++ b/lib/screens/patients/profile/pharmacy-intervention-model/accept_or_reject_res_model.dart @@ -0,0 +1,4 @@ +class AcceptOrRejectResModel { + + +} \ No newline at end of file diff --git a/lib/screens/patients/profile/new-medication-model/intervention_medication_history_req_model.dart b/lib/screens/patients/profile/pharmacy-intervention-model/intervention_medication_history_req_model.dart similarity index 100% rename from lib/screens/patients/profile/new-medication-model/intervention_medication_history_req_model.dart rename to lib/screens/patients/profile/pharmacy-intervention-model/intervention_medication_history_req_model.dart diff --git a/lib/screens/patients/profile/new-medication-model/intervention_medication_history_res_model.dart b/lib/screens/patients/profile/pharmacy-intervention-model/intervention_medication_history_res_model.dart similarity index 100% rename from lib/screens/patients/profile/new-medication-model/intervention_medication_history_res_model.dart rename to lib/screens/patients/profile/pharmacy-intervention-model/intervention_medication_history_res_model.dart diff --git a/lib/screens/patients/profile/new-medication-model/new_medication_req_model.dart b/lib/screens/patients/profile/pharmacy-intervention-model/new_medication_req_model.dart similarity index 100% rename from lib/screens/patients/profile/new-medication-model/new_medication_req_model.dart rename to lib/screens/patients/profile/pharmacy-intervention-model/new_medication_req_model.dart diff --git a/lib/screens/patients/profile/new-medication-model/new_medication_res_model.dart b/lib/screens/patients/profile/pharmacy-intervention-model/new_medication_res_model.dart similarity index 100% rename from lib/screens/patients/profile/new-medication-model/new_medication_res_model.dart rename to lib/screens/patients/profile/pharmacy-intervention-model/new_medication_res_model.dart diff --git a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart index 25d85c9b..ee24edfa 100644 --- a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart +++ b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart @@ -1,8 +1,4 @@ -import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; -import 'package:doctor_app_flutter/core/model/diagnosis/GetDiagnosisForInPatientRequestModel.dart'; import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/profile/vte_assessment_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; @@ -16,13 +12,9 @@ import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; - import '../../../../config/config.dart'; -import '../../../../core/service/AnalyticsService.dart'; import '../../../../core/viewModel/profile/intervention_medication_view_model.dart'; -import '../../../../icons_app/doctor_app_icons.dart'; -import '../../../../locator.dart'; -import '../operation_report/update_operation_report.dart'; + DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); @@ -299,25 +291,7 @@ class _InterventionMedicationHistoryScreenState extends State() - .logEvent( - eventCategory: - "Operation Report Screen", - eventAction: - "Update Operation Report ", - ); - // Navigator.push( - // context, - // MaterialPageRoute( - // builder: (context) => - // UpdateOperationReport( - // reservation: model - // .reservationList[ - // index], - // patient: patient, - // isUpdate: true, - // )), - // ); + model.setAcceptedOrRejected(remarks: "Accepted"); }, child: Container( decoration: BoxDecoration( @@ -349,25 +323,7 @@ class _InterventionMedicationHistoryScreenState extends State() - .logEvent( - eventCategory: - "Operation Report Screen", - eventAction: - "Update Operation Report ", - ); - // Navigator.push( - // context, - // MaterialPageRoute( - // builder: (context) => - // UpdateOperationReport( - // reservation: model - // .reservationList[ - // index], - // patient: patient, - // isUpdate: true, - // )), - // ); + model.setAcceptedOrRejected(remarks: "Rejected"); }, child: Container( decoration: BoxDecoration( diff --git a/lib/screens/patients/profile/pharmacy-intervention/pharmacy_intervention_screen.dart b/lib/screens/patients/profile/pharmacy-intervention/pharmacy_intervention_screen.dart index 0713d3be..e7ac7b2c 100644 --- a/lib/screens/patients/profile/pharmacy-intervention/pharmacy_intervention_screen.dart +++ b/lib/screens/patients/profile/pharmacy-intervention/pharmacy_intervention_screen.dart @@ -7,6 +7,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; + import '../../../../core/viewModel/profile/pharmacy_intervention_view_model.dart'; import '../../../../models/patient/patiant_info_model.dart'; import '../../../base/base_view.dart'; @@ -15,15 +16,18 @@ import 'intervention_medication.dart'; class PharmacyInterventionScreen extends StatefulWidget { final OutPatientFilterType outPatientFilterType; - const PharmacyInterventionScreen( - {Key key, this.outPatientFilterType, }) - : super(key: key); + const PharmacyInterventionScreen({ + Key key, + this.outPatientFilterType, + }) : super(key: key); @override - _PharmacyInterventionScreenState createState() => _PharmacyInterventionScreenState(); + _PharmacyInterventionScreenState createState() => + _PharmacyInterventionScreenState(); } -class _PharmacyInterventionScreenState extends State { +class _PharmacyInterventionScreenState + extends State { @override void initState() { // TODO: implement initState @@ -35,145 +39,161 @@ class _PharmacyInterventionScreenState extends State final routeArgs = ModalRoute.of(context).settings.arguments as Map; PatiantInformtion patient = routeArgs['patient']; return BaseView( - builder: (_, model, w) =>AppScaffold( - isShowAppBar: false, - backgroundColor: Theme.of(context).scaffoldBackgroundColor, - body: SingleChildScrollView( - child: Container( - height: MediaQuery.of(context).size.height * 1.0, - child: Padding( - padding: EdgeInsets.all(0.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - BottomSheetTitle( - title: (OutPatientFilterType.Previous == - widget.outPatientFilterType) - ? "" - : " New Medication", - ), - SizedBox( - height: 10.0, - ), - Center( - child: FractionallySizedBox( - widthFactor: 0.9, - child: Column( - children: [ - Container( - color: Colors.white, - child: InkWell( - onTap: () => selectDate(context,model, - firstDate: - getFirstDate(widget.outPatientFilterType), - lastDate: - getLastDate(widget.outPatientFilterType)), - child: TextField( - decoration: textFieldSelectorDecoration( - TranslationBase.of(context).fromDate, - model - .selectedFromDate != - null - ? "${AppDateUtils.convertStringToDateFormat(model.selectedFromDate.toString(), "yyyy-MM-dd")}" - : null, - true, - suffixIcon: Icon( - Icons.calendar_today, - color: Colors.black, - )), - enabled: false, + builder: (_, model, w) => AppScaffold( + isShowAppBar: false, + backgroundColor: Theme.of(context).scaffoldBackgroundColor, + body: SingleChildScrollView( + child: Container( + height: MediaQuery.of(context).size.height * 1.0, + child: Padding( + padding: EdgeInsets.all(0.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + BottomSheetTitle( + title: (OutPatientFilterType.Previous == + widget.outPatientFilterType) + ? "" + : " Pharmacy Intervention", + ), + SizedBox( + height: 10.0, + ), + Center( + child: FractionallySizedBox( + widthFactor: 0.9, + child: Column( + children: [ + Container( + color: Colors.white, + child: InkWell( + onTap: () => selectDate( + context, + model, + firstDate: DateTime( + DateTime.now().year - 20, + DateTime.now().month, + DateTime.now().day), + lastDate: DateTime( + DateTime.now().year, + DateTime.now().month, + DateTime.now().day + 100), + selectedDate: DateTime( + DateTime.now().year, + DateTime.now().month, + DateTime.now().day), + ), + child: TextField( + decoration: textFieldSelectorDecoration( + TranslationBase.of(context).fromDate, + model.selectedFromDate != null + ? "${AppDateUtils.convertStringToDateFormat(model.selectedFromDate.toString(), "yyyy-MM-dd")}" + : null, + true, + suffixIcon: Icon( + Icons.calendar_today, + color: Colors.black, + )), + enabled: false, + ), ), ), - ), - SizedBox( - height: 10, - ), - Container( - color: Colors.white, - child: InkWell( - onTap: () => selectDate(context,model, + SizedBox( + height: 10, + ), + Container( + color: Colors.white, + child: InkWell( + onTap: () => selectDate( + context, + model, isFromDate: false, - firstDate: - getFirstDate(widget.outPatientFilterType), - lastDate: - getLastDate(widget.outPatientFilterType)), - child: TextField( - decoration: textFieldSelectorDecoration( - TranslationBase.of(context).toDate, - model - .selectedToDate != - null - ? "${AppDateUtils.convertStringToDateFormat(model.selectedToDate.toString(), "yyyy-MM-dd")}" - : null, - true, - suffixIcon: Icon( - Icons.calendar_today, - color: Colors.black, - )), - enabled: false, + firstDate: DateTime( + DateTime.now().year - 20, + DateTime.now().month, + DateTime.now().day), + lastDate: DateTime( + DateTime.now().year, + DateTime.now().month, + DateTime.now().day + 100), + selectedDate: DateTime( + DateTime.now().year, + DateTime.now().month, + DateTime.now().day), + ), + child: TextField( + decoration: textFieldSelectorDecoration( + TranslationBase.of(context).toDate, + model.selectedToDate != null + ? "${AppDateUtils.convertStringToDateFormat(model.selectedToDate.toString(), "yyyy-MM-dd")}" + : null, + true, + suffixIcon: Icon( + Icons.calendar_today, + color: Colors.black, + )), + enabled: false, + ), ), ), - ), - ], + ], + ), ), ), - ), - ], + ], + ), ), ), ), - ), - bottomSheet: Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.all( - Radius.circular(0.0), - ), - border: Border.all(color: HexColor('#707070'), width: 0), - ), - height: MediaQuery.of(context).size.height * 0.1, - width: double.infinity, - child: Column( - children: [ - SizedBox( - height: 10, + bottomSheet: Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(0.0), ), - Container( - child: FractionallySizedBox( - widthFactor: .80, - child: Center( - child: AppButton( - title: TranslationBase.of(context).search, - padding: 5, - color: Color(0xFF359846), - onPressed: () async { - - Navigator.push( - context, - MaterialPageRoute(builder: (context) => InterventionMedicationScreen(patient)), - ); - - - }, + border: Border.all(color: HexColor('#707070'), width: 0), + ), + height: MediaQuery.of(context).size.height * 0.1, + width: double.infinity, + child: Column( + children: [ + SizedBox( + height: 10, + ), + Container( + child: FractionallySizedBox( + widthFactor: .80, + child: Center( + child: AppButton( + title: TranslationBase.of(context).search, + padding: 5, + color: Color(0xFF359846), + onPressed: () async { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + InterventionMedicationScreen(patient)), + ); + }, + ), ), ), ), - ), - SizedBox( - height: 5, - ), - ], - ), - )) - ); + SizedBox( + height: 5, + ), + ], + ), + ))); } - selectDate(BuildContext context,PharmacyInterventionViewModel model, - {bool isFromDate = true, DateTime firstDate, lastDate}) async { + selectDate(BuildContext context, PharmacyInterventionViewModel model, + {bool isFromDate = true, + DateTime firstDate, + lastDate, + selectedDate}) async { Helpers.hideKeyboard(context); - DateTime selectedDate = isFromDate - ? model.selectedFromDate ?? firstDate - : model.selectedToDate ?? lastDate; final DateTime picked = await showDatePicker( context: context, initialDate: selectedDate, @@ -199,25 +219,25 @@ class _PharmacyInterventionScreenState extends State } } - getFirstDate(OutPatientFilterType outPatientFilterType) { - if (outPatientFilterType == OutPatientFilterType.Previous) { - return DateTime( - DateTime.now().year - 20, DateTime.now().month, DateTime.now().day); - } else { - return DateTime( - DateTime.now().year, DateTime.now().month, DateTime.now().day + 1); - } - } + // getFirstDate(OutPatientFilterType outPatientFilterType) { + // if (outPatientFilterType == OutPatientFilterType.Previous) { + // return DateTime(F + // DateTime.now().year - 20, DateTime.now().month, DateTime.now().day); + // } else { + // return DateTime( + // DateTime.now().year, DateTime.now().month, DateTime.now().day + 1); + // } + // } - getLastDate(OutPatientFilterType outPatientFilterType) { - if (outPatientFilterType == OutPatientFilterType.Previous) { - return DateTime( - DateTime.now().year, DateTime.now().month, DateTime.now().day - 1); - } else { - return DateTime( - DateTime.now().year, DateTime.now().month, DateTime.now().day + 7); - } - } + // getLastDate(OutPatientFilterType outPatientFilterType) { + // if (outPatientFilterType == OutPatientFilterType.Previous) { + // return DateTime( + // DateTime.now().year, DateTime.now().month, DateTime.now().day - 1); + // } else { + // return DateTime( + // DateTime.now().year , DateTime.now().month , DateTime.now().day + 100); + // } + // } InputDecoration textFieldSelectorDecoration( String hintText, String selectedText, bool isDropDown, @@ -238,11 +258,11 @@ class _PharmacyInterventionScreenState extends State hintText: selectedText != null ? selectedText : hintText, suffixIcon: isDropDown ? suffixIcon != null - ? suffixIcon - : Icon( - Icons.keyboard_arrow_down_sharp, - color: Color(0xff2E303A), - ) + ? suffixIcon + : Icon( + Icons.keyboard_arrow_down_sharp, + color: Color(0xff2E303A), + ) : null, hintStyle: TextStyle( fontSize: 13, From 23e1fed349494a28a93390556bae7b48b40fe37d Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Sun, 16 Jan 2022 10:55:40 +0200 Subject: [PATCH 22/41] fix issues --- lib/screens/procedures/ProcedureCard.dart | 4 ++-- lib/util/date-utils.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/screens/procedures/ProcedureCard.dart b/lib/screens/procedures/ProcedureCard.dart index d89150da..cb59885d 100644 --- a/lib/screens/procedures/ProcedureCard.dart +++ b/lib/screens/procedures/ProcedureCard.dart @@ -213,8 +213,8 @@ class ProcedureCard extends StatelessWidget { children: [ Expanded( child: AppText( - Helpers.convertToTitleCase( - entityList.remarks.toString()) ?? + entityList.remarks!= null?Helpers.convertToTitleCase( + entityList.remarks.toString()) : '', fontSize: 12, ), diff --git a/lib/util/date-utils.dart b/lib/util/date-utils.dart index 7c68d649..282b73b9 100644 --- a/lib/util/date-utils.dart +++ b/lib/util/date-utils.dart @@ -301,7 +301,7 @@ class AppDateUtils { /// get data formatted like 26 Apr 2020 /// [dateTime] convert DateTime to data formatted static String getDayMonthYearDateFormatted(DateTime dateTime, - {bool isArabic = false, bool isMonthShort = false}) { + {bool isArabic = false, bool isMonthShort = true}) { if (dateTime != null) return dateTime.day.toString() + " " + From 37928c1757ba846e0ab730ac1006ae76a4d3d602 Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Sun, 16 Jan 2022 11:33:49 +0200 Subject: [PATCH 23/41] fix issues --- .../intervention_medication_view_model.dart | 2 +- ...ntervention_medication_history_screen.dart | 26 ++++++++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/lib/core/viewModel/profile/intervention_medication_view_model.dart b/lib/core/viewModel/profile/intervention_medication_view_model.dart index 343dda42..5cc6a9b4 100644 --- a/lib/core/viewModel/profile/intervention_medication_view_model.dart +++ b/lib/core/viewModel/profile/intervention_medication_view_model.dart @@ -83,7 +83,7 @@ class InterventionMedicationViewModel extends BaseViewModel { remarks: remarks ); hasError = false; - setState(ViewState.Busy); + setState(ViewState.BusyLocal); await _interventionMedicationService.setAcceptedOrRejected( acceptOrRejectReqModel: acceptOrRejectReqModel); if (_interventionMedicationService.hasError) { diff --git a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart index ee24edfa..2ae9d78e 100644 --- a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart +++ b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart @@ -1,15 +1,19 @@ +import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; +import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; +import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.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/card_with_bg_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart'; +import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import '../../../../config/config.dart'; @@ -291,7 +295,17 @@ class _InterventionMedicationHistoryScreenState extends State Date: Sun, 16 Jan 2022 15:30:21 +0200 Subject: [PATCH 24/41] plan for refactor prescriptions --- .../prescription/add_prescription_form.dart | 9 +- lib/screens/prescription/drugtodrug.dart | 3 + .../prescription_checkout_screen.dart | 2 + .../prescription/prescription_text_filed.dart | 2 +- .../update_prescription_form.dart | 95 +++---------------- 5 files changed, 26 insertions(+), 85 deletions(-) diff --git a/lib/screens/prescription/add_prescription_form.dart b/lib/screens/prescription/add_prescription_form.dart index 8c07afcf..a8ee8cb8 100644 --- a/lib/screens/prescription/add_prescription_form.dart +++ b/lib/screens/prescription/add_prescription_form.dart @@ -229,6 +229,7 @@ class _PrescriptionFormWidgetState extends State { ProjectViewModel projectViewModel = Provider.of(context); return BaseView( onModelReady: (model) async { + /// TODO Elham* Move this to view model x = model.patientAssessmentList.map((element) { return element.icdCode10ID; }); @@ -331,7 +332,6 @@ class _PrescriptionFormWidgetState extends State { child: Wrap( alignment: WrapAlignment.center, children: [ - // TODO change it secondary button and add loading AppButton( title: TranslationBase.of( context) @@ -647,6 +647,7 @@ class _PrescriptionFormWidgetState extends State { child: InkWell( onTap: () => selectDate( context, widget.model), + /// TODO Elham* Use customTextFields for all TextFields here child: TextField( decoration: textFieldSelectorDecoration( @@ -667,6 +668,7 @@ class _PrescriptionFormWidgetState extends State { ), SizedBox( height: spaceBetweenTextFileds), + /// TODO Elham* Use customTextFields for all PrescriptionTextFiled( element: duration, elementError: durationError, @@ -787,6 +789,7 @@ class _PrescriptionFormWidgetState extends State { .addMedication, fontWeight: FontWeight.w600, onPressed: () async { + /// TODO Elham* Use it to separate function await locator< AnalyticsService>() .logEvent( @@ -1016,7 +1019,7 @@ class _PrescriptionFormWidgetState extends State { }); } } - + /// TODO Elham* Use it from the textfeild utils InputDecoration textFieldSelectorDecoration( String hintText, String selectedText, bool isDropDown, {Icon suffixIcon}) { @@ -1062,6 +1065,7 @@ class _PrescriptionFormWidgetState extends State { showModalBottomSheet( context: context, builder: (context) { + /// TODO Elham* Move this to widget return Container( height: SizeConfig.realScreenHeight * .8, width: SizeConfig.realScreenWidth, @@ -1122,6 +1126,7 @@ class _PrescriptionFormWidgetState extends State { }); } + /// TODO Elham* Move this to view model getPriscriptionforDrug( List prescriptionList, MedicineViewModel model) { var prescriptionDetails = []; diff --git a/lib/screens/prescription/drugtodrug.dart b/lib/screens/prescription/drugtodrug.dart index 78f5afae..5ecb07ce 100644 --- a/lib/screens/prescription/drugtodrug.dart +++ b/lib/screens/prescription/drugtodrug.dart @@ -114,6 +114,9 @@ class _DrugToDrug extends State { } getRequestedData() async { + + /// TODO Elham* rename model to meaning full not just modle with number + await model.getPatientVitalSign(widget.patient); await model2.getPatientAllergy(generalGetReqForSOAP); await model2.getMasterLookup(MasterKeysService.DiagnosisType); diff --git a/lib/screens/prescription/prescription_checkout_screen.dart b/lib/screens/prescription/prescription_checkout_screen.dart index 608dd643..f94c3b52 100644 --- a/lib/screens/prescription/prescription_checkout_screen.dart +++ b/lib/screens/prescription/prescription_checkout_screen.dart @@ -862,6 +862,8 @@ class _PrescriptionCheckOutScreenState } } + /// TODO Elham* Use it from the textfeild utils + InputDecoration textFieldSelectorDecoration( String hintText, String selectedText, bool isDropDown, {Icon suffixIcon}) { diff --git a/lib/screens/prescription/prescription_text_filed.dart b/lib/screens/prescription/prescription_text_filed.dart index 8f2676bc..95b70182 100644 --- a/lib/screens/prescription/prescription_text_filed.dart +++ b/lib/screens/prescription/prescription_text_filed.dart @@ -44,7 +44,7 @@ class _PrescriptionTextFiledState extends State { list: widget.elementList, attributeName: '${widget.keyName}', attributeValueId: widget.elementList.length == 1 - ? widget.elementList[0]['${widget.keyId}'] + ? widget.elementList[0]['${widget.keyId}'].toString() : '${widget.keyId}', okText: TranslationBase.of(context).ok, okFunction: (selectedValue) => diff --git a/lib/screens/prescription/update_prescription_form.dart b/lib/screens/prescription/update_prescription_form.dart index 1a39f7e6..92518fad 100644 --- a/lib/screens/prescription/update_prescription_form.dart +++ b/lib/screens/prescription/update_prescription_form.dart @@ -68,6 +68,7 @@ class _UpdatePrescriptionFormState extends State { int testNum = 0; int strengthChar; PatiantInformtion patient; + /// TODO Elham* add type dynamic route; dynamic doseTime; dynamic frequencyUpdate; @@ -86,6 +87,7 @@ class _UpdatePrescriptionFormState extends State { strengthController.text = widget.doseStreangth; remarksController.text = widget.remarks; indicationList = List(); + /// TODO Elham* create model and try to have them form service and add translation dynamic indication1 = {"id": 545, "name": "Gingival Hyperplasia"}; dynamic indication2 = {"id": 546, "name": "Mild Drowsiness"}; @@ -112,6 +114,7 @@ class _UpdatePrescriptionFormState extends State { indicationList.add(indication9); indicationList.add(indication10); } + /// TODO Elham* Add Translation @override Widget build(BuildContext context) { @@ -120,6 +123,8 @@ class _UpdatePrescriptionFormState extends State { (BuildContext context, StateSetter setState /*You can rename this!*/) { return BaseView( onModelReady: (model) async { + /// TODO Elham* Move this to view model and remove unused data + await model.getMedicationList(); await model.getMedicationStrength(); await model.getMedicationDuration(); @@ -172,78 +177,6 @@ class _UpdatePrescriptionFormState extends State { ), Column( children: [ - // Container( - // height: MediaQuery.of(context).size.height * - // 0.070, - // child: InkWell( - // onTap: model.allMedicationList != null - // ? () { - // setState(() { - // newSelectedMedication = null; - // }); - // } - // : null, - // child: newSelectedMedication == null - // ? AutoCompleteTextField< - // GetMedicationResponseModel>( - // decoration: - // textFieldSelectorDecoration( - // widget.drugNameGeneric, - // newSelectedMedication != null - // ? newSelectedMedication - // .genericName - // : null, - // true, - // ), - // itemSubmitted: (item) => setState( - // () => newSelectedMedication = - // item), - // key: key, - // suggestions: - // model.allMedicationList, - // itemBuilder: (context, - // suggestion) => - // new Padding( - // child: AppText(suggestion - // .description + - // '/' + - // suggestion.genericName), - // padding: - // EdgeInsets.all(8.0)), - // itemSorter: (a, b) => 1, - // itemFilter: (suggestion, input) => - // suggestion.genericName - // .toLowerCase() - // .startsWith( - // input.toLowerCase()) || - // suggestion.description - // .toLowerCase() - // .startsWith( - // input.toLowerCase()) || - // suggestion.keywords - // .toLowerCase() - // .startsWith( - // input.toLowerCase()), - // ) - // : TextField( - // decoration: - // textFieldSelectorDecoration( - // TranslationBase.of(context) - // .searchMedicineNameHere, - // newSelectedMedication != null - // ? newSelectedMedication - // .description + - // ('${newSelectedMedication.genericName}') - // : null, - // true, - // ), - // enabled: false, - // ), - // ), - // ), - // SizedBox( - // height: 12, - // ), Container( height: MediaQuery.of(context).size.height * @@ -284,15 +217,6 @@ class _UpdatePrescriptionFormState extends State { "Only 5 Digits allowed for strength"); } }, - // validator: (value) { - // if (value.isEmpty && - // strengthController.text.length > - // 4) - // return TranslationBase.of(context) - // .emptyMessage; - // else - // return null; - // }, ), ), SizedBox( @@ -805,6 +729,9 @@ class _UpdatePrescriptionFormState extends State { title: 'update prescription' .toUpperCase(), onPressed: () { + + /// TODO Elham* Move this to function + if (double.parse( strengthController.text) > 1000.0) { @@ -912,7 +839,7 @@ class _UpdatePrescriptionFormState extends State { }); } } - + // /// TODO Elham* Use it from the textfeild utils InputDecoration textFieldSelectorDecoration( String hintText, String selectedText, bool isDropDown, {Icon suffixIcon}) { @@ -945,6 +872,7 @@ class _UpdatePrescriptionFormState extends State { ); } + /// TODO Elham* Move this to view model and pass all data as model updatePrescription( {PrescriptionViewModel model, int drugId, @@ -1030,6 +958,9 @@ void updatePrescriptionForm( String uom, int box, String startDate}) { + + /// TODO Elham* remove unused code. + TextEditingController remarksController = TextEditingController(); TextEditingController doseController = TextEditingController(); TextEditingController frequencyController = TextEditingController(); From fde96fbce7a88ec10079c1158f4abc6a43e0959c Mon Sep 17 00:00:00 2001 From: RoaaGhali98 Date: Sun, 16 Jan 2022 16:07:53 +0200 Subject: [PATCH 25/41] Fix some issues --- lib/config/localized_values.dart | 2 + .../intervention_medication_view_model.dart | 70 ++- lib/locator.dart | 2 - .../intervention_medication.dart | 457 ++++++++---------- ...ntervention_medication_history_screen.dart | 137 ++---- .../pharmacy_intervention_screen.dart | 32 +- .../profile_gird_for_InPatient.dart | 6 +- lib/util/translations_delegate_base.dart | 4 + 8 files changed, 305 insertions(+), 405 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 5424f389..fa97bf62 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1054,6 +1054,8 @@ const Map> localizedValues = { "maritalStatus": {"en": "Marital Status", "ar": "الحالة الزوجية"}, "nursing": {"en": "Nursing", "ar": "تمريض"}, "diabetic": {"en": "Diabetic", "ar": "مرض السكري"}, + "pharmacy": {"en": "Pharmacy", "ar": "الصيدلاني"}, + "intervention": {"en": "Intervention", "ar": "التدخل"}, "chart": {"en": "Chart", "ar": "جدول"}, "operationTimeStart": { "en": "Operation Time Start :", diff --git a/lib/core/viewModel/profile/intervention_medication_view_model.dart b/lib/core/viewModel/profile/intervention_medication_view_model.dart index 5cc6a9b4..998c7958 100644 --- a/lib/core/viewModel/profile/intervention_medication_view_model.dart +++ b/lib/core/viewModel/profile/intervention_medication_view_model.dart @@ -2,14 +2,30 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; import 'package:doctor_app_flutter/locator.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import '../../../models/dashboard/get_special_clinical_care_mapping_List_Respose_Model.dart'; import '../../../screens/patients/profile/pharmacy-intervention-model/accept_or_reject_req_model.dart'; import '../../../screens/patients/profile/pharmacy-intervention-model/intervention_medication_history_req_model.dart'; import '../../../screens/patients/profile/pharmacy-intervention-model/intervention_medication_history_res_model.dart'; import '../../../screens/patients/profile/pharmacy-intervention-model/new_medication_req_model.dart'; import '../../../screens/patients/profile/pharmacy-intervention-model/new_medication_res_model.dart'; +import '../../../util/date-utils.dart'; import '../../service/patient/profile/intervention_medication_service.dart'; +import '../../service/special_clinics/special_clinic_service.dart'; class InterventionMedicationViewModel extends BaseViewModel { + + SpecialClinicsService _specialClinicsService = + locator(); + + List + get specialClinicalCareMappingList => + _specialClinicsService.specialClinicalCareMappingList; + + List filterData = []; + + DateTime selectedFromDate; + DateTime selectedToDate; + PatiantInformtion patient; bool hasError = false; InterventionMedicationService _interventionMedicationService = @@ -23,18 +39,25 @@ class InterventionMedicationViewModel extends BaseViewModel { Future getInterventionMedication({ + int projectId, int patientId, int admissionNo, + DateTime fromDate, + DateTime toDate, }) async { InterventionMedicationReqModel interventionMedicationReqModel = InterventionMedicationReqModel( - projectID: 15, - patientID: 79941, - fromDate: '\/Date(1488322922)\/', - toDate: '\/Date(1635886800000)\/', + projectID: projectId, + patientID: patientId, + fromDate: AppDateUtils.convertToServerFormat( + fromDate.toString(), + 'MM/dd/yyyy'), + toDate: AppDateUtils.convertToServerFormat( + toDate.toString(), + 'MM/dd/yyyy'), ); hasError = false; - setState(ViewState.Busy); + setState(ViewState.BusyLocal); await _interventionMedicationService.getInterventionMedication( interventionMedicationReqModel: interventionMedicationReqModel); if (_interventionMedicationService.hasError) { @@ -47,18 +70,22 @@ class InterventionMedicationViewModel extends BaseViewModel { Future getInterventionMedicationHistory({ + int projectId, int patientId, + int admissionNo, + int prescriptionNo, + int orderNo, }) async { InterventionMedicationHistoryReqModel interventionMedicationHistoryReqModel = InterventionMedicationHistoryReqModel( - projectID: 15, - patientID: 79941, - admissionNo: 2018013900, - prescriptionNo: 2045165, - orderNo: 1171570, + projectID: projectId, + patientID: patientId, + admissionNo: admissionNo, + prescriptionNo: prescriptionNo, + orderNo: orderNo, ); hasError = false; - setState(ViewState.Busy); + setState(ViewState.BusyLocal); await _interventionMedicationService.getInterventionMedicationHistory( interventionMedicationHistoryReqModel: interventionMedicationHistoryReqModel); if (_interventionMedicationService.hasError) { @@ -72,15 +99,24 @@ class InterventionMedicationViewModel extends BaseViewModel { Future setAcceptedOrRejected({ String remarks, + int memberId, + int projectId, + int patientID, + int admissionNo, + int prescriptionNo, + int orderNo, }) async { AcceptOrRejectReqModel acceptOrRejectReqModel = AcceptOrRejectReqModel( - projectID: 15, - patientID: 79941, - admissionNo: 2018013900, - prescriptionNo: 2045165, - orderNo: 1171570, - remarks: remarks + projectID: projectId, + patientID: patientID, + admissionNo: admissionNo, + prescriptionNo: prescriptionNo, + orderNo: orderNo, + accessLevel: 4, + lineItemNo: 1, + remarks: remarks, + memberID: memberId, ); hasError = false; setState(ViewState.BusyLocal); diff --git a/lib/locator.dart b/lib/locator.dart index 76be7fa0..fc42e632 100644 --- a/lib/locator.dart +++ b/lib/locator.dart @@ -67,7 +67,6 @@ import 'core/viewModel/patient-ucaf-viewmodel.dart'; import 'core/viewModel/patient-vital-sign-viewmodel.dart'; import 'core/viewModel/prescriptions_view_model.dart'; import 'core/viewModel/profile/intervention_medication_view_model.dart'; -import 'core/viewModel/profile/pharmacy_intervention_view_model.dart'; import 'core/viewModel/profile/vte_assessment_view_model.dart'; import 'core/viewModel/radiology_view_model.dart'; import 'core/viewModel/referral_view_model.dart'; @@ -150,7 +149,6 @@ void setupLocator() { locator.registerFactory(() => PatientRegistrationViewModel()); locator.registerFactory(() => PendingOrdersViewModel()); locator.registerFactory(() => DischargeSummaryViewModel()); - locator.registerFactory(() => PharmacyInterventionViewModel()); locator.registerFactory(() => VteAssessmentViewModel()); locator.registerFactory(() => InterventionMedicationViewModel()); } diff --git a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication.dart b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication.dart index 0ae3cee3..4587ce8d 100644 --- a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication.dart +++ b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication.dart @@ -1,8 +1,4 @@ -import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; -import 'package:doctor_app_flutter/core/model/diagnosis/GetDiagnosisForInPatientRequestModel.dart'; import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/profile/vte_assessment_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; @@ -16,7 +12,6 @@ import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; - import '../../../../core/viewModel/profile/intervention_medication_view_model.dart'; import '../../../../widgets/transitions/fade_page.dart'; import 'intervention_medication_history_screen.dart'; @@ -28,10 +23,12 @@ class InterventionMedicationScreen extends StatefulWidget { const InterventionMedicationScreen(this.patient, {Key key}) : super(key: key); @override - _InterventionMedicationScreenState createState() => _InterventionMedicationScreenState(); + _InterventionMedicationScreenState createState() => + _InterventionMedicationScreenState(); } -class _InterventionMedicationScreenState extends State { +class _InterventionMedicationScreenState + extends State { bool isDischargedPatient = false; AuthenticationViewModel authenticationViewModel; ProjectViewModel projectViewModel; @@ -42,11 +39,13 @@ class _InterventionMedicationScreenState extends State( - onModelReady: (model) => model.getInterventionMedication(patientId: widget.patient.patientId, - // admissionNo: 2016023498 - - admissionNo:int.parse(widget.patient.admissionNo) + onModelReady: (model) => model.getInterventionMedication( + patientId: widget.patient.patientId, + admissionNo: int.parse(widget.patient.admissionNo), + fromDate: model.selectedFromDate, + toDate: model.selectedToDate, ), + builder: (_, model, w) => AppScaffold( baseViewModel: model, backgroundColor: Theme.of(context).scaffoldBackgroundColor, @@ -55,270 +54,212 @@ class _InterventionMedicationScreenState extends State[ - Expanded( - child: Container( - child: ListView.builder( - itemCount: model.allInterventionList.length, - itemBuilder: (BuildContext ctxt, int index) { - return FractionallySizedBox( - widthFactor: 0.95, - child: CardWithBgWidget( - hasBorder: false, - bgColor: Colors.transparent, - widget: Column( - children: [ - Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - SizedBox( - height: 10, - ), - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - crossAxisAlignment: - CrossAxisAlignment.start, + child: ErrorMessage( + error: TranslationBase.of(context).noDataAvailable, + ), + ) + : Container( + color: Colors.grey[200], + child: Column( + children: [ + Expanded( + child: Container( + child: ListView.builder( + itemCount: model.allInterventionList.length, + itemBuilder: (BuildContext ctxt, int index) { + return InkWell( + child: FractionallySizedBox( + widthFactor: 0.95, + child: CardWithBgWidget( + hasBorder: false, + bgColor: Colors.transparent, + widget: Column( children: [ - Container( - width: MediaQuery.of(context) - .size - .width * - 0.60, - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Row( - crossAxisAlignment: - CrossAxisAlignment - .start, - children: [ - AppText( - model - .allInterventionList[ - index].cS, - fontWeight: FontWeight.w600, - fontSize: 14, - ), - - ], - ), - ], - ), - ), Column( + crossAxisAlignment: + CrossAxisAlignment.start, children: [ + SizedBox( + height: 10, + ), Row( + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, crossAxisAlignment: - CrossAxisAlignment - .start, + CrossAxisAlignment.start, children: [ - AppText( - AppDateUtils.getDayMonthYearDateFormatted( - AppDateUtils.convertStringToDate( - model - .allInterventionList[ - index].startDatetime) - ,isArabic: - projectViewModel - .isArabic, - isMonthShort: true), - fontWeight: FontWeight.w600, - fontSize: 14, + Container( + width: MediaQuery.of(context) + .size + .width * + 0.60, + child: Column( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + Row( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + AppText( + model + .allInterventionList[ + index] + .cS, + fontWeight: + FontWeight.w600, + fontSize: 14, + ), + ], + ), + ], + ), ), - + Column( + children: [ + Row( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + AppText( + AppDateUtils.getDayMonthYearDateFormatted( + AppDateUtils.convertStringToDate(model + .allInterventionList[ + index] + .startDatetime), + isArabic: + projectViewModel + .isArabic, + isMonthShort: + true), + fontWeight: + FontWeight.w600, + fontSize: 14, + ), + ], + ), + ], + ) ], ), - ], - ) - // Column( - // children: [ - // AppText( - // model - // .allInterventionList[ - // index] - // .startDatetime != - // null - // ? AppDateUtils.getDayMonthYearDateFormatted( - // AppDateUtils - // .getDateTimeFromString(model - // .allInterventionList[ - // index] - // .startDatetime), - // isArabic: - // projectViewModel - // .isArabic, - // isMonthShort: true) - // : AppDateUtils - // .getDayMonthYearDateFormatted( - // DateTime.now(), - // isArabic: - // projectViewModel - // .isArabic), - // fontWeight: FontWeight.w600, - // fontSize: 14, - // isCopyable: true, - // ), - // AppText( - // model - // .allInterventionList[ - // index] - // .startDatetime != - // null - // ? AppDateUtils.getHour( - // AppDateUtils - // .getDateTimeFromString(model - // .allInterventionList[ - // index] - // .startDatetime)) - // : AppDateUtils.getHour( - // DateTime.now()), - // fontWeight: FontWeight.w600, - // fontSize: 14, - // isCopyable: true, - // ), - // ], - // crossAxisAlignment: - // CrossAxisAlignment.end, - // ) - ], - ), - SizedBox( - height: 8, - ), - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - // AppText( - // TranslationBase.of(context) - // .VTE_Type + - // " : ", - // fontSize: 12, - // ), - Expanded( - child: AppText( - model - .allInterventionList[ - index] - .description, - fontSize: 12, - isCopyable: true, + SizedBox( + height: 8, ), - ), - ]), - SizedBox( - height: 8, - ), - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - // AppText( - // TranslationBase.of(context) - // .pharmacology + - // " : ", - // fontSize: 12, - // ), - Expanded( - child: AppText( - model - .allInterventionList[ - index] - .medication, - fontSize: 12, - isCopyable: true, + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + 'Description: ', + fontSize: 12, + ), + Expanded( + child: AppText( + model + .allInterventionList[ + index] + .description, + fontSize: 12, + isCopyable: true, + ), + ), + ]), + SizedBox( + height: 8, ), - ), - ]), - SizedBox( - height: 8, - ), - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - // AppText( - // TranslationBase.of(context) - // .reasonsThrombo + - // " : ", - // fontSize: 12, - // ), - Expanded( - child: AppText( - model - .allInterventionList[ - index] - .doctorComments, - fontSize: 12, - isCopyable: true, + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + 'Medication: ', + fontSize: 12, + ), + Expanded( + child: AppText( + model + .allInterventionList[ + index] + .medication, + fontSize: 12, + isCopyable: true, + ), + ), + ]), + SizedBox( + height: 8, ), - ), - ]), - SizedBox( - height: 8, - ), - - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - // AppText( - // TranslationBase.of(context) - // .reasonsThrombo + - // " : ", - // fontSize: 12, - // ), - Expanded( - child: AppText( - model - .allInterventionList[ - index] - .statusDescription, - fontSize: 12, - isCopyable: true, + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + 'Doctor Comments: ', + fontSize: 12, + ), + Expanded( + child: AppText( + model + .allInterventionList[ + index] + .doctorComments, + fontSize: 12, + isCopyable: true, + ), + ), + ]), + SizedBox( + height: 8, ), - ), - ]), - - ], - ), - SizedBox( - height: 20, + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + 'Status Description: ', + fontSize: 12, + ), + Expanded( + child: AppText( + model + .allInterventionList[ + index] + .statusDescription, + fontSize: 12, + isCopyable: true, + ), + ), + ]), + ], + ), + SizedBox( + height: 20, + ), + ], + ), + ), ), - ], - ), - ), - ); - }), + onTap: () { + Navigator.push( + context, + FadePage( + page: InterventionMedicationHistoryScreen(widget.patient, model.allInterventionList[index]), + ), + ); + }, + ); + }), + ), + ), + ], ), ), - ], - ), - ), - onTap: () { - // PatiantInformtion patient; - Navigator.push( - context, - FadePage( - page: InterventionMedicationHistoryScreen(widget.patient), - - ), - ); - }, - ), ), ); } diff --git a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart index 2ae9d78e..a2c751bb 100644 --- a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart +++ b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart @@ -3,6 +3,7 @@ import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/pharmacy-intervention-model/new_medication_res_model.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; @@ -24,7 +25,8 @@ DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); class InterventionMedicationHistoryScreen extends StatefulWidget { final PatiantInformtion patient; - const InterventionMedicationHistoryScreen(this.patient, {Key key}) : super(key: key); + final InterventionMedicationResModel interventionMedication; + const InterventionMedicationHistoryScreen(this.patient, this.interventionMedication, {Key key}) : super(key: key); @override _InterventionMedicationHistoryScreenState createState() => _InterventionMedicationHistoryScreenState(); @@ -41,7 +43,12 @@ class _InterventionMedicationHistoryScreenState extends State( - onModelReady: (model) => model.getInterventionMedicationHistory(patientId: widget.patient.patientId, + onModelReady: (model) => model.getInterventionMedicationHistory( + patientId: widget.patient.patientId, + projectId: widget.interventionMedication.projectID, + admissionNo: widget.interventionMedication.admissionNo, + prescriptionNo: widget.interventionMedication.prescriptionNo, + orderNo: widget.interventionMedication.orderNo, ), builder: (_, model, w) => AppScaffold( baseViewModel: model, @@ -133,61 +140,10 @@ class _InterventionMedicationHistoryScreenState extends State( + return BaseView( builder: (_, model, w) => AppScaffold( isShowAppBar: false, backgroundColor: Theme.of(context).scaffoldBackgroundColor, @@ -173,7 +173,7 @@ class _PharmacyInterventionScreenState context, MaterialPageRoute( builder: (context) => - InterventionMedicationScreen(patient)), + InterventionMedicationScreen(patient,)), ); }, ), @@ -188,7 +188,7 @@ class _PharmacyInterventionScreenState ))); } - selectDate(BuildContext context, PharmacyInterventionViewModel model, + selectDate(BuildContext context, InterventionMedicationViewModel model, {bool isFromDate = true, DateTime firstDate, lastDate, @@ -205,7 +205,7 @@ class _PharmacyInterventionScreenState if (isFromDate) { setState(() { model.selectedFromDate = picked; - var date = picked.add(Duration(days: 30)); + var date = picked.add(Duration(days: 1)); if (date.isBefore(lastDate)) { model.selectedToDate = date; } else @@ -219,26 +219,6 @@ class _PharmacyInterventionScreenState } } - // getFirstDate(OutPatientFilterType outPatientFilterType) { - // if (outPatientFilterType == OutPatientFilterType.Previous) { - // return DateTime(F - // DateTime.now().year - 20, DateTime.now().month, DateTime.now().day); - // } else { - // return DateTime( - // DateTime.now().year, DateTime.now().month, DateTime.now().day + 1); - // } - // } - - // getLastDate(OutPatientFilterType outPatientFilterType) { - // if (outPatientFilterType == OutPatientFilterType.Previous) { - // return DateTime( - // DateTime.now().year, DateTime.now().month, DateTime.now().day - 1); - // } else { - // return DateTime( - // DateTime.now().year , DateTime.now().month , DateTime.now().day + 100); - // } - // } - InputDecoration textFieldSelectorDecoration( String hintText, String selectedText, bool isDropDown, {Icon suffixIcon}) { diff --git a/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart b/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart index bdc7af5d..b43dbc44 100644 --- a/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart +++ b/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart @@ -176,10 +176,10 @@ class ProfileGridForInPatient extends StatelessWidget { isInPatient: isInpatient, ), PatientProfileCardModel( - 'Pharmacy', - 'intervention', + TranslationBase.of(context).pharmacy, + TranslationBase.of(context).intervention, PHARMACY_INTERVENTION, - '', + 'assets/images/svgs/profile_screen/medical report.svg', isInPatient: isInpatient, ), ]; diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index 303a9acf..96a4adf0 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -1725,6 +1725,10 @@ class TranslationBase { String get diabetic => localizedValues['diabetic'][locale.languageCode]; + String get pharmacy => localizedValues['pharmacy'][locale.languageCode]; + + String get intervention => localizedValues['intervention'][locale.languageCode]; + String get chart => localizedValues['chart'][locale.languageCode]; String get investigation => From 0895a80d16e1cf73729ac72ffa5b6a6401cecd3c Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Sun, 16 Jan 2022 16:56:46 +0200 Subject: [PATCH 26/41] fix issues with date --- .../intervention_medication.dart | 7 ++++--- .../pharmacy_intervention_screen.dart | 2 +- .../profile_gird_for_InPatient.dart | 17 ++++++++--------- pubspec.lock | 9 +-------- 4 files changed, 14 insertions(+), 21 deletions(-) diff --git a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication.dart b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication.dart index 4587ce8d..81360f5e 100644 --- a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication.dart +++ b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication.dart @@ -20,7 +20,8 @@ DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); class InterventionMedicationScreen extends StatefulWidget { final PatiantInformtion patient; - const InterventionMedicationScreen(this.patient, {Key key}) : super(key: key); + final InterventionMedicationViewModel previousModel; + const InterventionMedicationScreen(this.patient, {Key key, this.previousModel}) : super(key: key); @override _InterventionMedicationScreenState createState() => @@ -42,8 +43,8 @@ class _InterventionMedicationScreenState onModelReady: (model) => model.getInterventionMedication( patientId: widget.patient.patientId, admissionNo: int.parse(widget.patient.admissionNo), - fromDate: model.selectedFromDate, - toDate: model.selectedToDate, + fromDate: widget.previousModel.selectedFromDate, + toDate: widget.previousModel.selectedToDate, ), builder: (_, model, w) => AppScaffold( diff --git a/lib/screens/patients/profile/pharmacy-intervention/pharmacy_intervention_screen.dart b/lib/screens/patients/profile/pharmacy-intervention/pharmacy_intervention_screen.dart index 82a5c51e..c60805aa 100644 --- a/lib/screens/patients/profile/pharmacy-intervention/pharmacy_intervention_screen.dart +++ b/lib/screens/patients/profile/pharmacy-intervention/pharmacy_intervention_screen.dart @@ -173,7 +173,7 @@ class _PharmacyInterventionScreenState context, MaterialPageRoute( builder: (context) => - InterventionMedicationScreen(patient,)), + InterventionMedicationScreen(patient,previousModel: model,)), ); }, ), diff --git a/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart b/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart index b43dbc44..7aed8f6f 100644 --- a/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart +++ b/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart @@ -166,15 +166,14 @@ class ProfileGridForInPatient extends StatelessWidget { DIABETIC_CHART_VALUES, 'assets/images/svgs/profile_screen/diabetic chart.svg', isInPatient: isInpatient, - ) - , - PatientProfileCardModel( - "VTE", - "Assessment", - VTE_ASSESSMENT, - 'assets/images/svgs/profile_screen/diabetic chart.svg', - isInPatient: isInpatient, - ), + ), + PatientProfileCardModel( + "VTE", + "Assessment", + VTE_ASSESSMENT, + 'assets/images/svgs/profile_screen/diabetic chart.svg', + isInPatient: isInpatient, + ), PatientProfileCardModel( TranslationBase.of(context).pharmacy, TranslationBase.of(context).intervention, diff --git a/pubspec.lock b/pubspec.lock index 3ba5bc57..e4f5a19f 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -770,13 +770,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.12.11" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.2" meta: dependency: transitive description: @@ -1180,7 +1173,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.8" + version: "0.4.3" timing: dependency: transitive description: From d3f0f1a1414a430e2388aea7a2a2966fcb71fbd0 Mon Sep 17 00:00:00 2001 From: RoaaGhali98 Date: Sun, 16 Jan 2022 17:17:09 +0200 Subject: [PATCH 27/41] Fix the date format in intervention_medication_view_model --- .../profile/intervention_medication_view_model.dart | 8 ++------ lib/util/date-utils.dart | 4 ++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/core/viewModel/profile/intervention_medication_view_model.dart b/lib/core/viewModel/profile/intervention_medication_view_model.dart index 998c7958..68b8cc2b 100644 --- a/lib/core/viewModel/profile/intervention_medication_view_model.dart +++ b/lib/core/viewModel/profile/intervention_medication_view_model.dart @@ -49,12 +49,8 @@ class InterventionMedicationViewModel extends BaseViewModel { InterventionMedicationReqModel( projectID: projectId, patientID: patientId, - fromDate: AppDateUtils.convertToServerFormat( - fromDate.toString(), - 'MM/dd/yyyy'), - toDate: AppDateUtils.convertToServerFormat( - toDate.toString(), - 'MM/dd/yyyy'), + fromDate: AppDateUtils.convertDateToServerFormat(fromDate), + toDate: AppDateUtils.convertDateToServerFormat(toDate), ); hasError = false; setState(ViewState.BusyLocal); diff --git a/lib/util/date-utils.dart b/lib/util/date-utils.dart index 7c68d649..65e755f9 100644 --- a/lib/util/date-utils.dart +++ b/lib/util/date-utils.dart @@ -28,6 +28,10 @@ class AppDateUtils { return '/Date(${DateFormat(dateFormat).parse(date).millisecondsSinceEpoch})/'; } + static String convertDateToServerFormat(DateTime date) { + return '/Date(${date.millisecondsSinceEpoch})/'; + } + static convertDateFromServerFormat(String str, dateFormat) { var date = getDateTimeFromServerFormat(str); From fec899ebb74ac4bf6d868dd8818958b4c14c65a7 Mon Sep 17 00:00:00 2001 From: RoaaGhali98 Date: Sun, 16 Jan 2022 17:40:27 +0200 Subject: [PATCH 28/41] Add static data --- .../intervention_medication_view_model.dart | 52 +++++++++---------- .../intervention_medication.dart | 2 +- 2 files changed, 25 insertions(+), 29 deletions(-) diff --git a/lib/core/viewModel/profile/intervention_medication_view_model.dart b/lib/core/viewModel/profile/intervention_medication_view_model.dart index 68b8cc2b..4602611e 100644 --- a/lib/core/viewModel/profile/intervention_medication_view_model.dart +++ b/lib/core/viewModel/profile/intervention_medication_view_model.dart @@ -13,13 +13,12 @@ import '../../service/patient/profile/intervention_medication_service.dart'; import '../../service/special_clinics/special_clinic_service.dart'; class InterventionMedicationViewModel extends BaseViewModel { - SpecialClinicsService _specialClinicsService = - locator(); + locator(); List - get specialClinicalCareMappingList => - _specialClinicsService.specialClinicalCareMappingList; + get specialClinicalCareMappingList => + _specialClinicsService.specialClinicalCareMappingList; List filterData = []; @@ -37,20 +36,18 @@ class InterventionMedicationViewModel extends BaseViewModel { List get allInterventionHistoryList => _interventionMedicationService.allInterventionHistoryList; - Future getInterventionMedication({ int projectId, int patientId, - int admissionNo, DateTime fromDate, DateTime toDate, }) async { InterventionMedicationReqModel interventionMedicationReqModel = InterventionMedicationReqModel( - projectID: projectId, - patientID: patientId, - fromDate: AppDateUtils.convertDateToServerFormat(fromDate), - toDate: AppDateUtils.convertDateToServerFormat(toDate), + projectID: 15, //projectId, + patientID: 79941, //patientId, + fromDate: "\/Date(1488322922)\/",//AppDateUtils.convertDateToServerFormat(fromDate), + toDate: "\/Date(1635886800000)\/",//AppDateUtils.convertDateToServerFormat(toDate), ); hasError = false; setState(ViewState.BusyLocal); @@ -64,7 +61,6 @@ class InterventionMedicationViewModel extends BaseViewModel { } } - Future getInterventionMedicationHistory({ int projectId, int patientId, @@ -72,18 +68,20 @@ class InterventionMedicationViewModel extends BaseViewModel { int prescriptionNo, int orderNo, }) async { - InterventionMedicationHistoryReqModel interventionMedicationHistoryReqModel = - InterventionMedicationHistoryReqModel( - projectID: projectId, - patientID: patientId, - admissionNo: admissionNo, - prescriptionNo: prescriptionNo, - orderNo: orderNo, + InterventionMedicationHistoryReqModel + interventionMedicationHistoryReqModel = + InterventionMedicationHistoryReqModel( + projectID: 15, //projectId, + patientID: 79941, //patientId, + admissionNo: 2018013900,//admissionNo, + prescriptionNo: 2045165, //prescriptionNo, + orderNo: 1171570, //orderNo, ); hasError = false; setState(ViewState.BusyLocal); await _interventionMedicationService.getInterventionMedicationHistory( - interventionMedicationHistoryReqModel: interventionMedicationHistoryReqModel); + interventionMedicationHistoryReqModel: + interventionMedicationHistoryReqModel); if (_interventionMedicationService.hasError) { error = _interventionMedicationService.error; setState(ViewState.ErrorLocal); @@ -92,7 +90,6 @@ class InterventionMedicationViewModel extends BaseViewModel { } } - Future setAcceptedOrRejected({ String remarks, int memberId, @@ -102,17 +99,16 @@ class InterventionMedicationViewModel extends BaseViewModel { int prescriptionNo, int orderNo, }) async { - AcceptOrRejectReqModel acceptOrRejectReqModel = - AcceptOrRejectReqModel( - projectID: projectId, - patientID: patientID, - admissionNo: admissionNo, - prescriptionNo: prescriptionNo, - orderNo: orderNo, + AcceptOrRejectReqModel acceptOrRejectReqModel = AcceptOrRejectReqModel( + projectID: 15, //projectId, + patientID: 79941, //patientID, + admissionNo: 2018013900, //admissionNo, + prescriptionNo: 2045165, //prescriptionNo, + orderNo: 1171570, //orderNo, accessLevel: 4, lineItemNo: 1, remarks: remarks, - memberID: memberId, + memberID: 2804 //memberId, ); hasError = false; setState(ViewState.BusyLocal); diff --git a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication.dart b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication.dart index 81360f5e..bb38b28a 100644 --- a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication.dart +++ b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication.dart @@ -42,7 +42,7 @@ class _InterventionMedicationScreenState return BaseView( onModelReady: (model) => model.getInterventionMedication( patientId: widget.patient.patientId, - admissionNo: int.parse(widget.patient.admissionNo), + //admissionNo: int.parse(widget.patient.admissionNo), fromDate: widget.previousModel.selectedFromDate, toDate: widget.previousModel.selectedToDate, ), From 694be7315b7fa68cf9797c7e1747a0940bd50699 Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Mon, 17 Jan 2022 10:40:17 +0200 Subject: [PATCH 29/41] fix issue on loading --- .../profile/intervention_medication_view_model.dart | 8 ++++---- .../intervention_medication_history_screen.dart | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/core/viewModel/profile/intervention_medication_view_model.dart b/lib/core/viewModel/profile/intervention_medication_view_model.dart index 4602611e..45f78e95 100644 --- a/lib/core/viewModel/profile/intervention_medication_view_model.dart +++ b/lib/core/viewModel/profile/intervention_medication_view_model.dart @@ -50,12 +50,12 @@ class InterventionMedicationViewModel extends BaseViewModel { toDate: "\/Date(1635886800000)\/",//AppDateUtils.convertDateToServerFormat(toDate), ); hasError = false; - setState(ViewState.BusyLocal); + setState(ViewState.Busy); await _interventionMedicationService.getInterventionMedication( interventionMedicationReqModel: interventionMedicationReqModel); if (_interventionMedicationService.hasError) { error = _interventionMedicationService.error; - setState(ViewState.ErrorLocal); + setState(ViewState.Error); } else { setState(ViewState.Idle); } @@ -78,13 +78,13 @@ class InterventionMedicationViewModel extends BaseViewModel { orderNo: 1171570, //orderNo, ); hasError = false; - setState(ViewState.BusyLocal); + setState(ViewState.Busy); await _interventionMedicationService.getInterventionMedicationHistory( interventionMedicationHistoryReqModel: interventionMedicationHistoryReqModel); if (_interventionMedicationService.hasError) { error = _interventionMedicationService.error; - setState(ViewState.ErrorLocal); + setState(ViewState.Error); } else { setState(ViewState.Idle); } diff --git a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart index a2c751bb..971f5a67 100644 --- a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart +++ b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart @@ -225,7 +225,7 @@ class _InterventionMedicationHistoryScreenState extends State Date: Mon, 17 Jan 2022 10:59:29 +0200 Subject: [PATCH 30/41] Fix some issues --- .../intervention_medication_history_screen.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart index a2c751bb..dd0e949e 100644 --- a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart +++ b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart @@ -225,7 +225,7 @@ class _InterventionMedicationHistoryScreenState extends State Date: Tue, 18 Jan 2022 13:29:12 +0200 Subject: [PATCH 31/41] Editing the accept_or_reject_req_model --- .../profile/intervention_medication_view_model.dart | 4 +++- .../accept_or_reject_req_model.dart | 7 ++++++- .../intervention_medication_history_screen.dart | 6 ++++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/core/viewModel/profile/intervention_medication_view_model.dart b/lib/core/viewModel/profile/intervention_medication_view_model.dart index 45f78e95..4e8fb097 100644 --- a/lib/core/viewModel/profile/intervention_medication_view_model.dart +++ b/lib/core/viewModel/profile/intervention_medication_view_model.dart @@ -98,6 +98,7 @@ class InterventionMedicationViewModel extends BaseViewModel { int admissionNo, int prescriptionNo, int orderNo, + int interventionStatus, }) async { AcceptOrRejectReqModel acceptOrRejectReqModel = AcceptOrRejectReqModel( projectID: 15, //projectId, @@ -108,7 +109,8 @@ class InterventionMedicationViewModel extends BaseViewModel { accessLevel: 4, lineItemNo: 1, remarks: remarks, - memberID: 2804 //memberId, + memberID: 2804, //memberId, + interventionStatus: interventionStatus, ); hasError = false; setState(ViewState.BusyLocal); diff --git a/lib/screens/patients/profile/pharmacy-intervention-model/accept_or_reject_req_model.dart b/lib/screens/patients/profile/pharmacy-intervention-model/accept_or_reject_req_model.dart index 07ef3f99..b3660d59 100644 --- a/lib/screens/patients/profile/pharmacy-intervention-model/accept_or_reject_req_model.dart +++ b/lib/screens/patients/profile/pharmacy-intervention-model/accept_or_reject_req_model.dart @@ -10,6 +10,7 @@ class AcceptOrRejectReqModel { int languageID; int lineItemNo; bool patientOutSA; + int interventionStatus; AcceptOrRejectReqModel( {this.patientID, @@ -22,7 +23,9 @@ class AcceptOrRejectReqModel { this.accessLevel, this.languageID, this.lineItemNo, - this.patientOutSA}); + this.patientOutSA, + this.interventionStatus, + }); AcceptOrRejectReqModel.fromJson(Map json) { patientID = json['PatientID']; @@ -36,6 +39,7 @@ class AcceptOrRejectReqModel { languageID = json['LanguageID']; lineItemNo = json['LineItemNo']; patientOutSA = json['PatientOutSA']; + interventionStatus = json['InterventionStatus']; } Map toJson() { @@ -51,6 +55,7 @@ class AcceptOrRejectReqModel { data['LanguageID'] = this.languageID; data['LineItemNo'] = this.lineItemNo; data['PatientOutSA'] = this.patientOutSA; + data['InterventionStatus'] = this.interventionStatus; return data; } } \ No newline at end of file diff --git a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart index 971f5a67..89b555b4 100644 --- a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart +++ b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart @@ -226,12 +226,13 @@ class _InterventionMedicationHistoryScreenState extends State Date: Tue, 18 Jan 2022 15:16:30 +0200 Subject: [PATCH 32/41] call service after accept or reject --- .../intervention_medication_view_model.dart | 66 ++++++++++++------- ...ntervention_medication_history_screen.dart | 19 +++++- 2 files changed, 60 insertions(+), 25 deletions(-) diff --git a/lib/core/viewModel/profile/intervention_medication_view_model.dart b/lib/core/viewModel/profile/intervention_medication_view_model.dart index 4e8fb097..c6e2dbff 100644 --- a/lib/core/viewModel/profile/intervention_medication_view_model.dart +++ b/lib/core/viewModel/profile/intervention_medication_view_model.dart @@ -44,10 +44,14 @@ class InterventionMedicationViewModel extends BaseViewModel { }) async { InterventionMedicationReqModel interventionMedicationReqModel = InterventionMedicationReqModel( - projectID: 15, //projectId, - patientID: 79941, //patientId, - fromDate: "\/Date(1488322922)\/",//AppDateUtils.convertDateToServerFormat(fromDate), - toDate: "\/Date(1635886800000)\/",//AppDateUtils.convertDateToServerFormat(toDate), + projectID: 15, + //projectId, + patientID: 79941, + //patientId, + fromDate: "\/Date(1488322922)\/", + //AppDateUtils.convertDateToServerFormat(fromDate), + toDate: + "\/Date(1635886800000)\/", //AppDateUtils.convertDateToServerFormat(toDate), ); hasError = false; setState(ViewState.Busy); @@ -61,30 +65,40 @@ class InterventionMedicationViewModel extends BaseViewModel { } } - Future getInterventionMedicationHistory({ - int projectId, - int patientId, - int admissionNo, - int prescriptionNo, - int orderNo, - }) async { + Future getInterventionMedicationHistory( + {int projectId, + int patientId, + int admissionNo, + int prescriptionNo, + int orderNo, + bool isBusyLocal = false}) async { InterventionMedicationHistoryReqModel interventionMedicationHistoryReqModel = InterventionMedicationHistoryReqModel( - projectID: 15, //projectId, - patientID: 79941, //patientId, - admissionNo: 2018013900,//admissionNo, - prescriptionNo: 2045165, //prescriptionNo, + projectID: 15, + //projectId, + patientID: 79941, + //patientId, + admissionNo: 2018013900, + //admissionNo, + prescriptionNo: 2045165, + //prescriptionNo, orderNo: 1171570, //orderNo, ); hasError = false; - setState(ViewState.Busy); + if (isBusyLocal) + setState(ViewState.Busy); + else + setState(ViewState.Busy); await _interventionMedicationService.getInterventionMedicationHistory( interventionMedicationHistoryReqModel: interventionMedicationHistoryReqModel); if (_interventionMedicationService.hasError) { error = _interventionMedicationService.error; - setState(ViewState.Error); + if (isBusyLocal) + setState(ViewState.ErrorLocal); + else + setState(ViewState.Error); } else { setState(ViewState.Idle); } @@ -101,15 +115,21 @@ class InterventionMedicationViewModel extends BaseViewModel { int interventionStatus, }) async { AcceptOrRejectReqModel acceptOrRejectReqModel = AcceptOrRejectReqModel( - projectID: 15, //projectId, - patientID: 79941, //patientID, - admissionNo: 2018013900, //admissionNo, - prescriptionNo: 2045165, //prescriptionNo, - orderNo: 1171570, //orderNo, + projectID: 15, + //projectId, + patientID: 79941, + //patientID, + admissionNo: 2018013900, + //admissionNo, + prescriptionNo: 2045165, + //prescriptionNo, + orderNo: 1171570, + //orderNo, accessLevel: 4, lineItemNo: 1, remarks: remarks, - memberID: 2804, //memberId, + memberID: 2804, + //memberId, interventionStatus: interventionStatus, ); hasError = false; diff --git a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart index 89b555b4..c7aaceeb 100644 --- a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart +++ b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart @@ -234,10 +234,17 @@ class _InterventionMedicationHistoryScreenState extends State Date: Tue, 18 Jan 2022 23:28:21 +0200 Subject: [PATCH 33/41] Wrapping the Row cards with CustomRow in intervention_medication.dart and intervention_medication_history_screen.dart and fix the accept or reject issue, fix the lable in intervention_medication_history_screen.dart and edit the initial date in pharmacy_intervention_screen.dart --- .../intervention_medication_view_model.dart | 2 + .../accept_or_reject_req_model.dart | 5 + .../intervention_medication.dart | 123 +++++------------- ...ntervention_medication_history_screen.dart | 95 ++++---------- .../pharmacy_intervention_screen.dart | 25 ++-- 5 files changed, 74 insertions(+), 176 deletions(-) diff --git a/lib/core/viewModel/profile/intervention_medication_view_model.dart b/lib/core/viewModel/profile/intervention_medication_view_model.dart index c6e2dbff..ea93a7d9 100644 --- a/lib/core/viewModel/profile/intervention_medication_view_model.dart +++ b/lib/core/viewModel/profile/intervention_medication_view_model.dart @@ -113,6 +113,7 @@ class InterventionMedicationViewModel extends BaseViewModel { int prescriptionNo, int orderNo, int interventionStatus, + int status, }) async { AcceptOrRejectReqModel acceptOrRejectReqModel = AcceptOrRejectReqModel( projectID: 15, @@ -131,6 +132,7 @@ class InterventionMedicationViewModel extends BaseViewModel { memberID: 2804, //memberId, interventionStatus: interventionStatus, + status: status ); hasError = false; setState(ViewState.BusyLocal); diff --git a/lib/screens/patients/profile/pharmacy-intervention-model/accept_or_reject_req_model.dart b/lib/screens/patients/profile/pharmacy-intervention-model/accept_or_reject_req_model.dart index b3660d59..67b234de 100644 --- a/lib/screens/patients/profile/pharmacy-intervention-model/accept_or_reject_req_model.dart +++ b/lib/screens/patients/profile/pharmacy-intervention-model/accept_or_reject_req_model.dart @@ -11,6 +11,7 @@ class AcceptOrRejectReqModel { int lineItemNo; bool patientOutSA; int interventionStatus; + int status; AcceptOrRejectReqModel( {this.patientID, @@ -25,6 +26,7 @@ class AcceptOrRejectReqModel { this.lineItemNo, this.patientOutSA, this.interventionStatus, + this.status }); AcceptOrRejectReqModel.fromJson(Map json) { @@ -40,6 +42,8 @@ class AcceptOrRejectReqModel { lineItemNo = json['LineItemNo']; patientOutSA = json['PatientOutSA']; interventionStatus = json['InterventionStatus']; + status = json['Status']; + } Map toJson() { @@ -56,6 +60,7 @@ class AcceptOrRejectReqModel { data['LineItemNo'] = this.lineItemNo; data['PatientOutSA'] = this.patientOutSA; data['InterventionStatus'] = this.interventionStatus; + data['Status'] = this.status; return data; } } \ No newline at end of file diff --git a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication.dart b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication.dart index bb38b28a..3944d2b8 100644 --- a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication.dart +++ b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication.dart @@ -10,6 +10,7 @@ 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/card_with_bg_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart'; +import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import '../../../../core/viewModel/profile/intervention_medication_view_model.dart'; @@ -102,22 +103,11 @@ class _InterventionMedicationScreenState CrossAxisAlignment .start, children: [ - Row( - crossAxisAlignment: - CrossAxisAlignment - .start, - children: [ - AppText( - model - .allInterventionList[ - index] - .cS, - fontWeight: - FontWeight.w600, - fontSize: 14, - ), - ], - ), + CustomRow( + valueSize: 14, + label: '', + value: model.allInterventionList[index].cS, + ) ], ), ), @@ -142,6 +132,7 @@ class _InterventionMedicationScreenState fontWeight: FontWeight.w600, fontSize: 14, + color: Color(0xFF2B353E), ), ], ), @@ -152,91 +143,39 @@ class _InterventionMedicationScreenState SizedBox( height: 8, ), - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - AppText( - 'Description: ', - fontSize: 12, - ), - Expanded( - child: AppText( - model - .allInterventionList[ - index] - .description, - fontSize: 12, - isCopyable: true, - ), - ), - ]), + CustomRow( + labelSize: 12, + valueSize: 12, + label: 'Description: ', + value: model.allInterventionList[index].description, + ), SizedBox( height: 8, ), - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - AppText( - 'Medication: ', - fontSize: 12, - ), - Expanded( - child: AppText( - model - .allInterventionList[ - index] - .medication, - fontSize: 12, - isCopyable: true, - ), - ), - ]), + CustomRow( + labelSize: 12, + valueSize: 12, + label: 'Medication: ', + value: model.allInterventionList[index].medication, + ), SizedBox( height: 8, ), - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - AppText( - 'Doctor Comments: ', - fontSize: 12, - ), - Expanded( - child: AppText( - model - .allInterventionList[ - index] - .doctorComments, - fontSize: 12, - isCopyable: true, - ), - ), - ]), + CustomRow( + labelSize: 12, + valueSize: 12, + label: 'Doctor Comments: ', + value: model.allInterventionList[index].doctorComments, + ), SizedBox( height: 8, ), - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - AppText( - 'Status Description: ', - fontSize: 12, - ), - Expanded( - child: AppText( - model - .allInterventionList[ - index] - .statusDescription, - fontSize: 12, - isCopyable: true, - ), - ), - ]), + CustomRow( + labelSize: 12, + valueSize: 12, + label: 'Status Description: ', + value: model.allInterventionList[index].statusDescription, + ), ], ), SizedBox( diff --git a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart index c7aaceeb..e1c0de4b 100644 --- a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart +++ b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart @@ -19,6 +19,7 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import '../../../../config/config.dart'; import '../../../../core/viewModel/profile/intervention_medication_view_model.dart'; +import '../../../../widgets/shared/user-guid/CusomRow.dart'; DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); @@ -102,20 +103,11 @@ class _InterventionMedicationHistoryScreenState extends State - InterventionMedicationScreen(patient,previousModel: model,)), + InterventionMedicationScreen( + patient, + previousModel: model, + )), ); }, ), From fdc39f28e3a59a403dd1964d157c5439f11c3cfa Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Wed, 19 Jan 2022 12:08:06 +0200 Subject: [PATCH 34/41] small change --- .../intervention_medication_history_screen.dart | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart index e1c0de4b..2ceab871 100644 --- a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart +++ b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart @@ -104,10 +104,10 @@ class _InterventionMedicationHistoryScreenState extends State Date: Wed, 19 Jan 2022 12:11:05 +0200 Subject: [PATCH 35/41] Replace static data --- .../intervention_medication_view_model.dart | 44 +++++++------------ 1 file changed, 15 insertions(+), 29 deletions(-) diff --git a/lib/core/viewModel/profile/intervention_medication_view_model.dart b/lib/core/viewModel/profile/intervention_medication_view_model.dart index ea93a7d9..5f220bdd 100644 --- a/lib/core/viewModel/profile/intervention_medication_view_model.dart +++ b/lib/core/viewModel/profile/intervention_medication_view_model.dart @@ -44,14 +44,10 @@ class InterventionMedicationViewModel extends BaseViewModel { }) async { InterventionMedicationReqModel interventionMedicationReqModel = InterventionMedicationReqModel( - projectID: 15, - //projectId, - patientID: 79941, - //patientId, - fromDate: "\/Date(1488322922)\/", - //AppDateUtils.convertDateToServerFormat(fromDate), - toDate: - "\/Date(1635886800000)\/", //AppDateUtils.convertDateToServerFormat(toDate), + projectID: projectId, + patientID: patientId, + fromDate: AppDateUtils.convertDateToServerFormat(fromDate), + toDate: AppDateUtils.convertDateToServerFormat(toDate), ); hasError = false; setState(ViewState.Busy); @@ -75,15 +71,11 @@ class InterventionMedicationViewModel extends BaseViewModel { InterventionMedicationHistoryReqModel interventionMedicationHistoryReqModel = InterventionMedicationHistoryReqModel( - projectID: 15, - //projectId, - patientID: 79941, - //patientId, - admissionNo: 2018013900, - //admissionNo, - prescriptionNo: 2045165, - //prescriptionNo, - orderNo: 1171570, //orderNo, + projectID: projectId, + patientID: patientId, + admissionNo: admissionNo, + prescriptionNo: prescriptionNo, + orderNo: orderNo, ); hasError = false; if (isBusyLocal) @@ -116,21 +108,15 @@ class InterventionMedicationViewModel extends BaseViewModel { int status, }) async { AcceptOrRejectReqModel acceptOrRejectReqModel = AcceptOrRejectReqModel( - projectID: 15, - //projectId, - patientID: 79941, - //patientID, - admissionNo: 2018013900, - //admissionNo, - prescriptionNo: 2045165, - //prescriptionNo, - orderNo: 1171570, - //orderNo, + projectID: projectId, + patientID: patientID, + admissionNo: admissionNo, + prescriptionNo: prescriptionNo, + orderNo: orderNo, accessLevel: 4, lineItemNo: 1, remarks: remarks, - memberID: 2804, - //memberId, + memberID: memberId, interventionStatus: interventionStatus, status: status ); From 8464c70f35fb82bee48de5a3fe402cd9d44856be Mon Sep 17 00:00:00 2001 From: RoaaGhali98 Date: Wed, 19 Jan 2022 12:14:04 +0200 Subject: [PATCH 36/41] Replace static data --- .../intervention_medication_view_model.dart | 62 +++++++++++-------- 1 file changed, 37 insertions(+), 25 deletions(-) diff --git a/lib/core/viewModel/profile/intervention_medication_view_model.dart b/lib/core/viewModel/profile/intervention_medication_view_model.dart index 5f220bdd..1caa36a9 100644 --- a/lib/core/viewModel/profile/intervention_medication_view_model.dart +++ b/lib/core/viewModel/profile/intervention_medication_view_model.dart @@ -37,17 +37,21 @@ class InterventionMedicationViewModel extends BaseViewModel { _interventionMedicationService.allInterventionHistoryList; Future getInterventionMedication({ + int projectId, int patientId, DateTime fromDate, DateTime toDate, + }) async { InterventionMedicationReqModel interventionMedicationReqModel = InterventionMedicationReqModel( - projectID: projectId, - patientID: patientId, - fromDate: AppDateUtils.convertDateToServerFormat(fromDate), - toDate: AppDateUtils.convertDateToServerFormat(toDate), + + projectID: projectId, + patientID: patientId, + fromDate: AppDateUtils.convertDateToServerFormat(fromDate), + toDate: AppDateUtils.convertDateToServerFormat(toDate), + ); hasError = false; setState(ViewState.Busy); @@ -62,20 +66,24 @@ class InterventionMedicationViewModel extends BaseViewModel { } Future getInterventionMedicationHistory( - {int projectId, - int patientId, - int admissionNo, - int prescriptionNo, - int orderNo, + { + int projectId, + int patientId, + int admissionNo, + int prescriptionNo, + int orderNo, + bool isBusyLocal = false}) async { InterventionMedicationHistoryReqModel interventionMedicationHistoryReqModel = InterventionMedicationHistoryReqModel( - projectID: projectId, - patientID: patientId, - admissionNo: admissionNo, - prescriptionNo: prescriptionNo, - orderNo: orderNo, + + projectID: projectId, + patientID: patientId, + admissionNo: admissionNo, + prescriptionNo: prescriptionNo, + orderNo: orderNo, + ); hasError = false; if (isBusyLocal) @@ -97,6 +105,7 @@ class InterventionMedicationViewModel extends BaseViewModel { } Future setAcceptedOrRejected({ + String remarks, int memberId, int projectId, @@ -106,19 +115,22 @@ class InterventionMedicationViewModel extends BaseViewModel { int orderNo, int interventionStatus, int status, + }) async { AcceptOrRejectReqModel acceptOrRejectReqModel = AcceptOrRejectReqModel( - projectID: projectId, - patientID: patientID, - admissionNo: admissionNo, - prescriptionNo: prescriptionNo, - orderNo: orderNo, - accessLevel: 4, - lineItemNo: 1, - remarks: remarks, - memberID: memberId, - interventionStatus: interventionStatus, - status: status + + projectID: projectId, + patientID: patientID, + admissionNo: admissionNo, + prescriptionNo: prescriptionNo, + orderNo: orderNo, + accessLevel: 4, + lineItemNo: 1, + remarks: remarks, + memberID: memberId, + interventionStatus: interventionStatus, + status: status + ); hasError = false; setState(ViewState.BusyLocal); From 90c74c2f0651fd04bf80d8701549e3ccd12bbefe Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Wed, 19 Jan 2022 12:41:23 +0200 Subject: [PATCH 37/41] small fix issues --- .../profile/intervention_medication_view_model.dart | 4 ++-- .../pharmacy_intervention_screen.dart | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/core/viewModel/profile/intervention_medication_view_model.dart b/lib/core/viewModel/profile/intervention_medication_view_model.dart index 1caa36a9..9c456a2a 100644 --- a/lib/core/viewModel/profile/intervention_medication_view_model.dart +++ b/lib/core/viewModel/profile/intervention_medication_view_model.dart @@ -22,8 +22,8 @@ class InterventionMedicationViewModel extends BaseViewModel { List filterData = []; - DateTime selectedFromDate; - DateTime selectedToDate; + DateTime selectedFromDate = DateTime.now(); + DateTime selectedToDate = DateTime.now().add(Duration(days: 1)); PatiantInformtion patient; bool hasError = false; diff --git a/lib/screens/patients/profile/pharmacy-intervention/pharmacy_intervention_screen.dart b/lib/screens/patients/profile/pharmacy-intervention/pharmacy_intervention_screen.dart index 2ce150d8..f7e2d7ba 100644 --- a/lib/screens/patients/profile/pharmacy-intervention/pharmacy_intervention_screen.dart +++ b/lib/screens/patients/profile/pharmacy-intervention/pharmacy_intervention_screen.dart @@ -85,9 +85,8 @@ class _PharmacyInterventionScreenState child: TextField( decoration: textFieldSelectorDecoration( TranslationBase.of(context).fromDate, - model.selectedFromDate != null - ? "${AppDateUtils.convertStringToDateFormat(model.selectedFromDate.toString(), "yyyy-MM-dd")}" - : "${AppDateUtils.convertStringToDateFormat(DateTime.now().toString(), "yyyy-MM-dd")}", + "${AppDateUtils.convertStringToDateFormat(model.selectedFromDate.toString(), "yyyy-MM-dd")}" + , true, suffixIcon: Icon( Icons.calendar_today, @@ -122,9 +121,8 @@ class _PharmacyInterventionScreenState child: TextField( decoration: textFieldSelectorDecoration( TranslationBase.of(context).toDate, - model.selectedToDate != null - ? "${AppDateUtils.convertStringToDateFormat(model.selectedToDate.toString(), "yyyy-MM-dd")}" - : "${AppDateUtils.convertStringToDateFormat(DateTime.now().add(Duration(days: 1)).toString(), "yyyy-MM-dd")}", + "${AppDateUtils.convertStringToDateFormat(model.selectedToDate.toString(), "yyyy-MM-dd")}" + , true, suffixIcon: Icon( Icons.calendar_today, From 2ffa745e73c487834d01ce5ea09f421ae2ce0f39 Mon Sep 17 00:00:00 2001 From: RoaaGhali98 Date: Wed, 19 Jan 2022 13:08:24 +0200 Subject: [PATCH 38/41] add translations to pharmacy_intervention_screen, intervention_medication and intervention_medication_history_screen --- lib/config/localized_values.dart | 5 +++++ .../intervention_medication.dart | 8 ++++---- .../intervention_medication_history_screen.dart | 4 ++-- .../pharmacy_intervention_screen.dart | 2 +- lib/util/translations_delegate_base.dart | 11 +++++++++++ 5 files changed, 23 insertions(+), 7 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index fa97bf62..5dc41d3e 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -20,6 +20,7 @@ const Map> localizedValues = { "ar": "ليس لديك أي جدول" }, "verify": {"en": "VERIFY", "ar": "تحقق"}, + "pharmacy-intervention": {"en": "Pharmacy Intervention", "ar": "التدخل الصيدلاني"}, "referralDoctor": {"en": "Referral Doctor", "ar": "الطبيب المُحول إليه"}, "referringClinic": {"en": "Referring Clinic", "ar": "العيادة المُحول إليها"}, "frequency": {"en": "Frequency", "ar": "تكرر"}, @@ -537,6 +538,10 @@ const Map> localizedValues = { "selectSeverity": {"en": "Select Severity", "ar": "حدد الخطورة"}, "leaveCreated": {"en": "Leave has been created", "ar": "تم إنشاء الإجازة"}, "medications": {"en": "Medications", "ar": "الأدوية"}, + "medication": {"en": "Medication", "ar": "الدواء"}, + "createdByName": {"en": "Created By Name", "ar": "الدواء"}, + "statusDescription": {"en": "Status Description", "ar": "وصف الحالة"}, + "doctorComments": {"en": "Doctor Comments", "ar": "تعليقات الطبيب"}, "procedures": {"en": "Procedures", "ar": "الإجراءات"}, "vitalSignEmptyMsg": { "en": "There is no vital signs for this patient", diff --git a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication.dart b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication.dart index 3944d2b8..af54efab 100644 --- a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication.dart +++ b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication.dart @@ -146,7 +146,7 @@ class _InterventionMedicationScreenState CustomRow( labelSize: 12, valueSize: 12, - label: 'Description: ', + label: TranslationBase.of(context).description, value: model.allInterventionList[index].description, ), SizedBox( @@ -155,7 +155,7 @@ class _InterventionMedicationScreenState CustomRow( labelSize: 12, valueSize: 12, - label: 'Medication: ', + label: TranslationBase.of(context).medication, value: model.allInterventionList[index].medication, ), SizedBox( @@ -164,7 +164,7 @@ class _InterventionMedicationScreenState CustomRow( labelSize: 12, valueSize: 12, - label: 'Doctor Comments: ', + label: TranslationBase.of(context).doctorComments, value: model.allInterventionList[index].doctorComments, ), SizedBox( @@ -173,7 +173,7 @@ class _InterventionMedicationScreenState CustomRow( labelSize: 12, valueSize: 12, - label: 'Status Description: ', + label: TranslationBase.of(context).statusDescription, value: model.allInterventionList[index].statusDescription, ), ], diff --git a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart index 2ceab871..ce1e69f0 100644 --- a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart +++ b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart @@ -106,7 +106,7 @@ class _InterventionMedicationHistoryScreenState extends State localizedValues['add-sickleave'][locale.languageCode]; + String get pharmacyIntervention => + localizedValues['pharmacy-intervention'][locale.languageCode]; + String get add => localizedValues['add'][locale.languageCode]; String get addSickLeaverequest => @@ -906,6 +909,14 @@ class TranslationBase { String get medications => localizedValues['medications'][locale.languageCode]; + String get medication => localizedValues['medication'][locale.languageCode]; + + String get doctorComments => localizedValues['doctorComments'][locale.languageCode]; + + String get statusDescription => localizedValues['statusDescription'][locale.languageCode]; + + String get createdByName => localizedValues['createdByName'][locale.languageCode]; + String get procedures => localizedValues['procedures'][locale.languageCode]; String get chiefComplaints => From bbdc243f0ff0140ca448c628a64f065dca8d1501 Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Sun, 23 Jan 2022 09:16:06 +0200 Subject: [PATCH 39/41] fix main issues --- .../profile/UCAF/UCAF-input-screen.dart | 4 +++- lib/screens/prescription/drugtodrug.dart | 20 ++++++++++--------- lib/widgets/shared/user-guid/CusomRow.dart | 1 + 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart b/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart index ddad858f..88e14e7a 100644 --- a/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart +++ b/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart @@ -38,6 +38,8 @@ class _UCAFInputScreenState extends State { final _whereController = TextEditingController(); final _managementsLineController = TextEditingController(); final _signsController = TextEditingController(); + + ///TODO Elham* fix this List conditionsData = [ {"name": "CHRONIC", "isChecked": false}, {"name": "RTA", "isChecked": false}, @@ -383,7 +385,7 @@ class _UCAFInputScreenState extends State { error: model.patientVitalSignsHistory == null || model.patientVitalSignsHistory.length == 0 ? TranslationBase.of(context).vitalSignEmptyMsg - : TranslationBase.of(context))) + : TranslationBase.of(context).chiefComplaintEmptyMsg)) : Container(), ), ); diff --git a/lib/screens/prescription/drugtodrug.dart b/lib/screens/prescription/drugtodrug.dart index 5ecb07ce..d744dcda 100644 --- a/lib/screens/prescription/drugtodrug.dart +++ b/lib/screens/prescription/drugtodrug.dart @@ -28,6 +28,7 @@ class DrugToDrug extends StatefulWidget { class _DrugToDrug extends State { int typeID = 1; bool isLoaded = false; + /// TODO Elham* fix this List> expandableList = [ {'name': 'CRITICAL', 'level': 'LEVEL_4'}, {'name': 'HIGH', 'level': 'LEVEL_3'}, @@ -35,15 +36,7 @@ class _DrugToDrug extends State { {'name': 'LOW', 'level': 'LEVEL_1'}, {'name': 'INFO', 'level': 'INFO'}, ]; - GeneralGetReqForSOAP generalGetReqForSOAP = GeneralGetReqForSOAP( - patientMRN: 2954208, - //widget.patient.patientMRN, - episodeId: 210011002, - //widget.patient.episodeNo, - appointmentNo: 2016055308, - //widget.patient.appointmentNo, - doctorID: '', - editedBy: ''); + VitalSignsViewModel model = new VitalSignsViewModel(); SOAPViewModel model2 = new SOAPViewModel(); @@ -115,6 +108,15 @@ class _DrugToDrug extends State { getRequestedData() async { + + GeneralGetReqForSOAP generalGetReqForSOAP = GeneralGetReqForSOAP( + /// TODO Elham* fix this today + patientMRN: widget.patient.patientMRN, + episodeId: widget.patient.episodeNo, + appointmentNo: + widget.patient.appointmentNo, + doctorID: '', + editedBy: ''); /// TODO Elham* rename model to meaning full not just modle with number await model.getPatientVitalSign(widget.patient); diff --git a/lib/widgets/shared/user-guid/CusomRow.dart b/lib/widgets/shared/user-guid/CusomRow.dart index 21875e4d..f7181f14 100644 --- a/lib/widgets/shared/user-guid/CusomRow.dart +++ b/lib/widgets/shared/user-guid/CusomRow.dart @@ -38,6 +38,7 @@ class CustomRow extends StatelessWidget { width: 1, ), Expanded( + flex: 0, child: AppText( value, fontSize: From 45f30a8d612114e712e87162c3884f5a6ab0e0ff Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Sun, 23 Jan 2022 09:49:40 +0200 Subject: [PATCH 40/41] small fixes --- .../viewModel/patient-referral-viewmodel.dart | 4 ++-- .../doctor_replay/doctor_reply_widget.dart | 5 +++-- .../profile/referral/refer-patient-screen.dart | 18 ++++++++++++++---- lib/widgets/shared/user-guid/CusomRow.dart | 4 +++- 4 files changed, 22 insertions(+), 9 deletions(-) diff --git a/lib/core/viewModel/patient-referral-viewmodel.dart b/lib/core/viewModel/patient-referral-viewmodel.dart index 861c110b..42888002 100644 --- a/lib/core/viewModel/patient-referral-viewmodel.dart +++ b/lib/core/viewModel/patient-referral-viewmodel.dart @@ -230,12 +230,12 @@ class PatientReferralViewModel extends BaseViewModel { Future makeReferral(PatiantInformtion patient, String isoStringDate, int projectID, int clinicID, int doctorID, String remarks) async { - setState(ViewState.Busy); + setState(ViewState.BusyLocal); await _referralPatientService.makeReferral( patient, isoStringDate, projectID, clinicID, doctorID, remarks); if (_referralPatientService.hasError) { error = _referralPatientService.error; - setState(ViewState.Error); + setState(ViewState.ErrorLocal); } else { setState(ViewState.Idle); } diff --git a/lib/screens/doctor/doctor_replay/doctor_reply_widget.dart b/lib/screens/doctor/doctor_replay/doctor_reply_widget.dart index dce1d38c..e8d70786 100644 --- a/lib/screens/doctor/doctor_replay/doctor_reply_widget.dart +++ b/lib/screens/doctor/doctor_replay/doctor_reply_widget.dart @@ -207,10 +207,11 @@ class _DoctorReplyWidgetState extends State { label: TranslationBase.of(context).fileNumber, value: widget.reply.patientID.toString(), isCopyable: false, + isExpanded: false, ), CustomRow( - label: TranslationBase.of(context).age + " : ", - isCopyable: false, + label: TranslationBase.of(context).age + " : ", isCopyable: false, + isExpanded: false, value: "${AppDateUtils.getAgeByBirthday(widget.reply.dateofBirth, context)}", ), diff --git a/lib/screens/patients/profile/referral/refer-patient-screen.dart b/lib/screens/patients/profile/referral/refer-patient-screen.dart index a973d1c5..b8da5a14 100644 --- a/lib/screens/patients/profile/referral/refer-patient-screen.dart +++ b/lib/screens/patients/profile/referral/refer-patient-screen.dart @@ -7,6 +7,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; +import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/patient-referral-item-widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; @@ -209,19 +210,28 @@ class _PatientMakeReferralScreenState extends State { _selectedClinic == null || _selectedDoctor == null || _remarksController.text == null) return; - model + GifLoaderDialogUtils.showMyDialog(context); + await model .makeReferral( patient, appointmentDate.toIso8601String(), _selectedBranch['facilityId'], _selectedClinic['ClinicID'], _selectedDoctor['DoctorID'], - _remarksController.text) - .then((_) { + _remarksController.text); + if(model.state == ViewState.ErrorLocal) { + GifLoaderDialogUtils.hideDialog(context); + + Helpers.showErrorToast(model.error); + + } else { + GifLoaderDialogUtils.hideDialog(context); + DrAppToastMsg.showSuccesToast( TranslationBase.of(context).referralSuccessMsg); Navigator.pop(context); - }); + } + }, ), ) diff --git a/lib/widgets/shared/user-guid/CusomRow.dart b/lib/widgets/shared/user-guid/CusomRow.dart index f7181f14..006e0fa4 100644 --- a/lib/widgets/shared/user-guid/CusomRow.dart +++ b/lib/widgets/shared/user-guid/CusomRow.dart @@ -12,6 +12,7 @@ class CustomRow extends StatelessWidget { this.valueSize, this.width, this.isCopyable = true, + this.isExpanded = true, }) : super(key: key); final String label; @@ -20,6 +21,7 @@ class CustomRow extends StatelessWidget { final double valueSize; final double width; final bool isCopyable; + final bool isExpanded; @override Widget build(BuildContext context) { @@ -38,7 +40,7 @@ class CustomRow extends StatelessWidget { width: 1, ), Expanded( - flex: 0, + flex: isExpanded ? 1 : 0, child: AppText( value, fontSize: From 5ed3084130ec4b6efe62bd6b82c29fdbd50502f7 Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Sun, 23 Jan 2022 09:55:46 +0200 Subject: [PATCH 41/41] fix clinic name --- lib/models/patient/patiant_info_model.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/models/patient/patiant_info_model.dart b/lib/models/patient/patiant_info_model.dart index 9e4ebeb2..99127cc9 100644 --- a/lib/models/patient/patiant_info_model.dart +++ b/lib/models/patient/patiant_info_model.dart @@ -1,6 +1,7 @@ // TODO = it have to be changed. import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/util/helpers.dart'; class PatiantInformtion { PatiantInformtion patientDetails; @@ -199,8 +200,8 @@ class PatiantInformtion { bedId = json["BedID"] ?? json["bedID"]; nursingStationId = json["NursingStationID"] ?? json["nursingStationID"]; description = json["Description"] ?? json["description"]; - clinicDescription = - json["ClinicDescription"] ?? json["clinicDescription"]; + clinicDescription = Helpers.convertToTitleCase( + json["ClinicDescription"] ?? json["clinicDescription"]??''); clinicDescriptionN = json["ClinicDescriptionN"] ?? json["clinicDescriptionN"]; nationalityName = json["NationalityName"] ??