From 76d411b79a13cf64bf3e5746678f322c2746bedf Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Sun, 18 Apr 2021 13:11:33 +0300 Subject: [PATCH 1/4] move soap folder to the correct place --- lib/core/service/SOAP_service.dart | 1 - lib/core/viewModel/SOAP_view_model.dart | 1 - lib/routes.dart | 5 +---- .../profile/soap_update/SOAP_open_items.dart | 0 .../profile/soap_update/SOAP_step_header.dart | 2 +- .../assessment/add_assessment_details.dart | 2 +- .../assessment/update_assessment_page.dart | 0 .../profile/soap_update/custom_validation_error.dart | 0 .../profile/soap_update/expandable_SOAP_widget.dart | 0 .../soap_update/objective/examination-item-card.dart | 0 .../objective/objective-add-examination-page.dart | 0 .../soap_update/objective/update_objective_page.dart | 0 .../patients/profile/soap_update/steps_widget.dart | 0 .../subjective/allergies/add_allergies.dart | 0 .../allergies/update_allergies_widget.dart | 0 .../soap_update/subjective/bottom_sheet_title.dart | 0 .../soap_update/subjective/history/PriorityBar.dart | 0 .../subjective/history/add_history_dialog.dart | 0 .../subjective/history/update_history_widget.dart | 0 .../subjective/medication/add_medication.dart | 0 .../medication/update_medication_widget.dart | 0 .../subjective/update_Chief_complaints.dart | 2 +- .../subjective/update_subjective_page.dart | 8 +++----- .../profile/soap_update/update_plan_page.dart | 0 .../profile/soap_update/update_soap_index.dart | 12 +++++------- lib/widgets/patients/dynamic_elements.dart | 2 +- .../master_key_checkbox_search_allergies_widget.dart | 2 +- 27 files changed, 14 insertions(+), 23 deletions(-) rename lib/{widgets => screens}/patients/profile/soap_update/SOAP_open_items.dart (100%) rename lib/{widgets => screens}/patients/profile/soap_update/SOAP_step_header.dart (95%) rename lib/{widgets => screens}/patients/profile/soap_update/assessment/add_assessment_details.dart (99%) rename lib/{widgets => screens}/patients/profile/soap_update/assessment/update_assessment_page.dart (100%) rename lib/{widgets => screens}/patients/profile/soap_update/custom_validation_error.dart (100%) rename lib/{widgets => screens}/patients/profile/soap_update/expandable_SOAP_widget.dart (100%) rename lib/{widgets => screens}/patients/profile/soap_update/objective/examination-item-card.dart (100%) rename lib/{widgets => screens}/patients/profile/soap_update/objective/objective-add-examination-page.dart (100%) rename lib/{widgets => screens}/patients/profile/soap_update/objective/update_objective_page.dart (100%) rename lib/{widgets => screens}/patients/profile/soap_update/steps_widget.dart (100%) rename lib/{widgets => screens}/patients/profile/soap_update/subjective/allergies/add_allergies.dart (100%) rename lib/{widgets => screens}/patients/profile/soap_update/subjective/allergies/update_allergies_widget.dart (100%) rename lib/{widgets => screens}/patients/profile/soap_update/subjective/bottom_sheet_title.dart (100%) rename lib/{widgets => screens}/patients/profile/soap_update/subjective/history/PriorityBar.dart (100%) rename lib/{widgets => screens}/patients/profile/soap_update/subjective/history/add_history_dialog.dart (100%) rename lib/{widgets => screens}/patients/profile/soap_update/subjective/history/update_history_widget.dart (100%) rename lib/{widgets => screens}/patients/profile/soap_update/subjective/medication/add_medication.dart (100%) rename lib/{widgets => screens}/patients/profile/soap_update/subjective/medication/update_medication_widget.dart (100%) rename lib/{widgets => screens}/patients/profile/soap_update/subjective/update_Chief_complaints.dart (95%) rename lib/{widgets => screens}/patients/profile/soap_update/subjective/update_subjective_page.dart (97%) rename lib/{widgets => screens}/patients/profile/soap_update/update_plan_page.dart (100%) rename lib/{widgets => screens}/patients/profile/soap_update/update_soap_index.dart (91%) diff --git a/lib/core/service/SOAP_service.dart b/lib/core/service/SOAP_service.dart index d35736f5..901445bf 100644 --- a/lib/core/service/SOAP_service.dart +++ b/lib/core/service/SOAP_service.dart @@ -21,7 +21,6 @@ import 'package:doctor_app_flutter/models/SOAP/post_chief_complaint_request_mode import 'package:doctor_app_flutter/models/SOAP/post_histories_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/post_physical_exam_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/post_progress_note_request_model.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/assessment/update_assessment_page.dart'; import 'base/lookup-service.dart'; diff --git a/lib/core/viewModel/SOAP_view_model.dart b/lib/core/viewModel/SOAP_view_model.dart index c576e566..274c983f 100644 --- a/lib/core/viewModel/SOAP_view_model.dart +++ b/lib/core/viewModel/SOAP_view_model.dart @@ -25,7 +25,6 @@ import 'package:doctor_app_flutter/models/SOAP/post_chief_complaint_request_mode import 'package:doctor_app_flutter/models/SOAP/post_histories_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/post_physical_exam_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/post_progress_note_request_model.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/assessment/update_assessment_page.dart'; import 'package:flutter/material.dart'; import '../../locator.dart'; diff --git a/lib/routes.dart b/lib/routes.dart index dbe4f0cb..502b3be6 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -1,4 +1,3 @@ -import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/root_page.dart'; import 'package:doctor_app_flutter/screens/medical-file/medical_file_page.dart'; import 'package:doctor_app_flutter/screens/patients/ECGPage.dart'; @@ -13,14 +12,13 @@ import 'package:doctor_app_flutter/screens/patients/profile/radiology/radiology_ import 'package:doctor_app_flutter/screens/patients/profile/refer_patient_screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/prescriptions/in_patient_prescription_details_screen.dart'; -import 'package:doctor_app_flutter/screens/live_care/video_call.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/soap_update/update_soap_index.dart'; import 'package:doctor_app_flutter/screens/prescription/prescription_screen_history.dart'; import 'package:doctor_app_flutter/screens/prescription/prescriptions_page.dart'; import 'package:doctor_app_flutter/screens/sick-leave/add-sickleave.dart'; import 'package:doctor_app_flutter/screens/sick-leave/show-sickleave.dart'; import 'package:doctor_app_flutter/screens/sick-leave/sick_leave.dart'; import 'package:doctor_app_flutter/screens/procedures/procedure_screen.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_soap_index.dart'; import './screens/QR_reader_screen.dart'; import './screens/auth/change_password_screen.dart'; @@ -28,7 +26,6 @@ import './screens/auth/login_screen.dart'; import './screens/auth/verification_methods_screen.dart'; import './screens/auth/verify_account_screen.dart'; import './screens/blood_bank_screen.dart'; -import 'screens/home/home_screen.dart'; import './screens/doctor/message_screen.dart'; import './screens/doctor/my_schedule_screen.dart'; import './screens/doctor/services_screen.dart'; diff --git a/lib/widgets/patients/profile/soap_update/SOAP_open_items.dart b/lib/screens/patients/profile/soap_update/SOAP_open_items.dart similarity index 100% rename from lib/widgets/patients/profile/soap_update/SOAP_open_items.dart rename to lib/screens/patients/profile/soap_update/SOAP_open_items.dart diff --git a/lib/widgets/patients/profile/soap_update/SOAP_step_header.dart b/lib/screens/patients/profile/soap_update/SOAP_step_header.dart similarity index 95% rename from lib/widgets/patients/profile/soap_update/SOAP_step_header.dart rename to lib/screens/patients/profile/soap_update/SOAP_step_header.dart index e4d8d67e..0efcc4fa 100644 --- a/lib/widgets/patients/profile/soap_update/SOAP_step_header.dart +++ b/lib/screens/patients/profile/soap_update/SOAP_step_header.dart @@ -1,6 +1,6 @@ import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/soap_update/steps_widget.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/steps_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; diff --git a/lib/widgets/patients/profile/soap_update/assessment/add_assessment_details.dart b/lib/screens/patients/profile/soap_update/assessment/add_assessment_details.dart similarity index 99% rename from lib/widgets/patients/profile/soap_update/assessment/add_assessment_details.dart rename to lib/screens/patients/profile/soap_update/assessment/add_assessment_details.dart index bb331ba1..008172a6 100644 --- a/lib/widgets/patients/profile/soap_update/assessment/add_assessment_details.dart +++ b/lib/screens/patients/profile/soap_update/assessment/add_assessment_details.dart @@ -12,8 +12,8 @@ import 'package:doctor_app_flutter/models/SOAP/post_assessment_request_model.dar import 'package:doctor_app_flutter/models/doctor/doctor_profile_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/soap_update/subjective/bottom_sheet_title.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/bottom_sheet_title.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart'; diff --git a/lib/widgets/patients/profile/soap_update/assessment/update_assessment_page.dart b/lib/screens/patients/profile/soap_update/assessment/update_assessment_page.dart similarity index 100% rename from lib/widgets/patients/profile/soap_update/assessment/update_assessment_page.dart rename to lib/screens/patients/profile/soap_update/assessment/update_assessment_page.dart diff --git a/lib/widgets/patients/profile/soap_update/custom_validation_error.dart b/lib/screens/patients/profile/soap_update/custom_validation_error.dart similarity index 100% rename from lib/widgets/patients/profile/soap_update/custom_validation_error.dart rename to lib/screens/patients/profile/soap_update/custom_validation_error.dart diff --git a/lib/widgets/patients/profile/soap_update/expandable_SOAP_widget.dart b/lib/screens/patients/profile/soap_update/expandable_SOAP_widget.dart similarity index 100% rename from lib/widgets/patients/profile/soap_update/expandable_SOAP_widget.dart rename to lib/screens/patients/profile/soap_update/expandable_SOAP_widget.dart diff --git a/lib/widgets/patients/profile/soap_update/objective/examination-item-card.dart b/lib/screens/patients/profile/soap_update/objective/examination-item-card.dart similarity index 100% rename from lib/widgets/patients/profile/soap_update/objective/examination-item-card.dart rename to lib/screens/patients/profile/soap_update/objective/examination-item-card.dart diff --git a/lib/widgets/patients/profile/soap_update/objective/objective-add-examination-page.dart b/lib/screens/patients/profile/soap_update/objective/objective-add-examination-page.dart similarity index 100% rename from lib/widgets/patients/profile/soap_update/objective/objective-add-examination-page.dart rename to lib/screens/patients/profile/soap_update/objective/objective-add-examination-page.dart diff --git a/lib/widgets/patients/profile/soap_update/objective/update_objective_page.dart b/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart similarity index 100% rename from lib/widgets/patients/profile/soap_update/objective/update_objective_page.dart rename to lib/screens/patients/profile/soap_update/objective/update_objective_page.dart diff --git a/lib/widgets/patients/profile/soap_update/steps_widget.dart b/lib/screens/patients/profile/soap_update/steps_widget.dart similarity index 100% rename from lib/widgets/patients/profile/soap_update/steps_widget.dart rename to lib/screens/patients/profile/soap_update/steps_widget.dart diff --git a/lib/widgets/patients/profile/soap_update/subjective/allergies/add_allergies.dart b/lib/screens/patients/profile/soap_update/subjective/allergies/add_allergies.dart similarity index 100% rename from lib/widgets/patients/profile/soap_update/subjective/allergies/add_allergies.dart rename to lib/screens/patients/profile/soap_update/subjective/allergies/add_allergies.dart diff --git a/lib/widgets/patients/profile/soap_update/subjective/allergies/update_allergies_widget.dart b/lib/screens/patients/profile/soap_update/subjective/allergies/update_allergies_widget.dart similarity index 100% rename from lib/widgets/patients/profile/soap_update/subjective/allergies/update_allergies_widget.dart rename to lib/screens/patients/profile/soap_update/subjective/allergies/update_allergies_widget.dart diff --git a/lib/widgets/patients/profile/soap_update/subjective/bottom_sheet_title.dart b/lib/screens/patients/profile/soap_update/subjective/bottom_sheet_title.dart similarity index 100% rename from lib/widgets/patients/profile/soap_update/subjective/bottom_sheet_title.dart rename to lib/screens/patients/profile/soap_update/subjective/bottom_sheet_title.dart diff --git a/lib/widgets/patients/profile/soap_update/subjective/history/PriorityBar.dart b/lib/screens/patients/profile/soap_update/subjective/history/PriorityBar.dart similarity index 100% rename from lib/widgets/patients/profile/soap_update/subjective/history/PriorityBar.dart rename to lib/screens/patients/profile/soap_update/subjective/history/PriorityBar.dart diff --git a/lib/widgets/patients/profile/soap_update/subjective/history/add_history_dialog.dart b/lib/screens/patients/profile/soap_update/subjective/history/add_history_dialog.dart similarity index 100% rename from lib/widgets/patients/profile/soap_update/subjective/history/add_history_dialog.dart rename to lib/screens/patients/profile/soap_update/subjective/history/add_history_dialog.dart diff --git a/lib/widgets/patients/profile/soap_update/subjective/history/update_history_widget.dart b/lib/screens/patients/profile/soap_update/subjective/history/update_history_widget.dart similarity index 100% rename from lib/widgets/patients/profile/soap_update/subjective/history/update_history_widget.dart rename to lib/screens/patients/profile/soap_update/subjective/history/update_history_widget.dart diff --git a/lib/widgets/patients/profile/soap_update/subjective/medication/add_medication.dart b/lib/screens/patients/profile/soap_update/subjective/medication/add_medication.dart similarity index 100% rename from lib/widgets/patients/profile/soap_update/subjective/medication/add_medication.dart rename to lib/screens/patients/profile/soap_update/subjective/medication/add_medication.dart diff --git a/lib/widgets/patients/profile/soap_update/subjective/medication/update_medication_widget.dart b/lib/screens/patients/profile/soap_update/subjective/medication/update_medication_widget.dart similarity index 100% rename from lib/widgets/patients/profile/soap_update/subjective/medication/update_medication_widget.dart rename to lib/screens/patients/profile/soap_update/subjective/medication/update_medication_widget.dart diff --git a/lib/widgets/patients/profile/soap_update/subjective/update_Chief_complaints.dart b/lib/screens/patients/profile/soap_update/subjective/update_Chief_complaints.dart similarity index 95% rename from lib/widgets/patients/profile/soap_update/subjective/update_Chief_complaints.dart rename to lib/screens/patients/profile/soap_update/subjective/update_Chief_complaints.dart index bb66fd90..6169c3db 100644 --- a/lib/widgets/patients/profile/soap_update/subjective/update_Chief_complaints.dart +++ b/lib/screens/patients/profile/soap_update/subjective/update_Chief_complaints.dart @@ -1,10 +1,10 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/medication/update_medication_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/new_text_Field.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import '../custom_validation_error.dart'; +import 'medication/update_medication_widget.dart'; class UpdateChiefComplaints extends StatelessWidget { const UpdateChiefComplaints({ diff --git a/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart b/lib/screens/patients/profile/soap_update/subjective/update_subjective_page.dart similarity index 97% rename from lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart rename to lib/screens/patients/profile/soap_update/subjective/update_subjective_page.dart index 37291faa..819acfb2 100644 --- a/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart +++ b/lib/screens/patients/profile/soap_update/subjective/update_subjective_page.dart @@ -17,18 +17,16 @@ import 'package:doctor_app_flutter/models/doctor/doctor_profile_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/soap_update/subjective/update_Chief_complaints.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/allergies/update_allergies_widget.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/history/update_history_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.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'; import 'package:hexcolor/hexcolor.dart'; import '../SOAP_step_header.dart'; import '../expandable_SOAP_widget.dart'; -import '../steps_widget.dart'; +import 'allergies/update_allergies_widget.dart'; +import 'history/update_history_widget.dart'; +import 'update_Chief_complaints.dart'; class UpdateSubjectivePage extends StatefulWidget { final Function changePageViewIndex; diff --git a/lib/widgets/patients/profile/soap_update/update_plan_page.dart b/lib/screens/patients/profile/soap_update/update_plan_page.dart similarity index 100% rename from lib/widgets/patients/profile/soap_update/update_plan_page.dart rename to lib/screens/patients/profile/soap_update/update_plan_page.dart diff --git a/lib/widgets/patients/profile/soap_update/update_soap_index.dart b/lib/screens/patients/profile/soap_update/update_soap_index.dart similarity index 91% rename from lib/widgets/patients/profile/soap_update/update_soap_index.dart rename to lib/screens/patients/profile/soap_update/update_soap_index.dart index 5166f998..de62f754 100644 --- a/lib/widgets/patients/profile/soap_update/update_soap_index.dart +++ b/lib/screens/patients/profile/soap_update/update_soap_index.dart @@ -7,18 +7,17 @@ import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_history.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/soap_update/steps_widget.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/assessment/update_assessment_page.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_plan_page.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/soap_update/subjective/update_subjective_page.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.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'; import 'package:flutter/material.dart'; -import '../patient-profile-header-new-design.dart'; +import 'assessment/update_assessment_page.dart'; import 'objective/update_objective_page.dart'; +import 'update_plan_page.dart'; class UpdateSoapIndex extends StatefulWidget { final bool isUpdate; @@ -88,7 +87,6 @@ class _UpdateSoapIndexState extends State mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ - // PatientPageHeaderWidget(patient), PatientProfileHeaderNewDesign(patient, '7', '7',), Container( width: double.infinity, diff --git a/lib/widgets/patients/dynamic_elements.dart b/lib/widgets/patients/dynamic_elements.dart index a6a492ca..4a13630b 100644 --- a/lib/widgets/patients/dynamic_elements.dart +++ b/lib/widgets/patients/dynamic_elements.dart @@ -1,7 +1,7 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/models/patient/patient_model.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/soap_update/custom_validation_error.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/custom_validation_error.dart'; import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; diff --git a/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart b/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart index 07d5d7e4..56db325b 100644 --- a/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart +++ b/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart @@ -3,8 +3,8 @@ import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/soap_update/custom_validation_error.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/custom_validation_error.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/new_text_Field.dart'; From 4da72c81af433c7f130d284e501829086a865fc2 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Sun, 18 Apr 2021 13:28:50 +0300 Subject: [PATCH 2/4] first step form code refactor --- .../profile/soap_update/SOAP_open_items.dart | 1 - .../profile/soap_update/SOAP_step_header.dart | 1 - .../assessment/add_assessment_details.dart | 53 ------------------- .../assessment/update_assessment_page.dart | 3 +- .../soap_update/expandable_SOAP_widget.dart | 1 - ...ination-page.dart => add-examination.dart} | 2 - .../objective/examination-item-card.dart | 4 +- .../objective/update_objective_page.dart | 8 +-- .../subjective/allergies/add_allergies.dart | 2 - .../allergies/update_allergies_widget.dart | 12 +---- .../subjective/bottom_sheet_title.dart | 1 - .../history/add_history_dialog.dart | 2 +- .../{PriorityBar.dart => priority_bar.dart} | 0 .../history/update_history_widget.dart | 12 ----- .../subjective/medication/add_medication.dart | 1 + .../medication/update_medication_widget.dart | 23 -------- .../subjective/update_subjective_page.dart | 1 - .../soap_update/update_soap_index.dart | 3 -- 18 files changed, 10 insertions(+), 120 deletions(-) rename lib/screens/patients/profile/soap_update/objective/{objective-add-examination-page.dart => add-examination.dart} (99%) rename lib/screens/patients/profile/soap_update/subjective/history/{PriorityBar.dart => priority_bar.dart} (100%) diff --git a/lib/screens/patients/profile/soap_update/SOAP_open_items.dart b/lib/screens/patients/profile/soap_update/SOAP_open_items.dart index e3b0c483..31a501ce 100644 --- a/lib/screens/patients/profile/soap_update/SOAP_open_items.dart +++ b/lib/screens/patients/profile/soap_update/SOAP_open_items.dart @@ -1,4 +1,3 @@ -import 'package:doctor_app_flutter/config/size_config.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/material.dart'; diff --git a/lib/screens/patients/profile/soap_update/SOAP_step_header.dart b/lib/screens/patients/profile/soap_update/SOAP_step_header.dart index 0efcc4fa..14385a9e 100644 --- a/lib/screens/patients/profile/soap_update/SOAP_step_header.dart +++ b/lib/screens/patients/profile/soap_update/SOAP_step_header.dart @@ -1,4 +1,3 @@ -import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/steps_widget.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; diff --git a/lib/screens/patients/profile/soap_update/assessment/add_assessment_details.dart b/lib/screens/patients/profile/soap_update/assessment/add_assessment_details.dart index 008172a6..a23fc9be 100644 --- a/lib/screens/patients/profile/soap_update/assessment/add_assessment_details.dart +++ b/lib/screens/patients/profile/soap_update/assessment/add_assessment_details.dart @@ -74,7 +74,6 @@ class _AddAssessmentDetailsState extends State { if (widget.mySelectedAssessment.selectedICD != null) icdNameController.text = widget.mySelectedAssessment.selectedICD.code; } - final screenSize = MediaQuery.of(context).size; InputDecoration textFieldSelectorDecoration( String hintText, String selectedText, bool isDropDown, {IconData icon}) { @@ -143,24 +142,9 @@ class _AddAssessmentDetailsState extends State { height: 55.0, hintText: TranslationBase.of(context).appointmentNumber, - //fontSize: 13.5, - // hintColor: Colors.black, - //hasLabelText: appointmentIdController.text != '' - // ? true - // : false, - //showLabelText: true, - //fontWeight: FontWeight.w600, - //readOnly: true, isDropDown: false, enabled: false, controller: appointmentIdController, - // validator: (value) { - // if (value == null) - // return TranslationBase.of(context) - // .emptyMessage; - // else - // return null; - // }, ), ), SizedBox( @@ -284,25 +268,10 @@ class _AddAssessmentDetailsState extends State { ); } : null, - //hasLabelText: - // conditionController.text != '' ? true : false, - //showLabelText: true, hintText: TranslationBase.of(context).condition, - //fontSize: 13.5, - //readOnly: true, - //suffixIcon: EvaIcons.arrowDown, - // hintColor: Colors.black, - //fontWeight: FontWeight.w600, maxLines: 2, minLines: 1, controller: conditionController, - // validator: (value) { - // if (value == null) - // return TranslationBase.of(context).emptyMessage; - // else - // return null; - // }, - isDropDown: true, enabled: false, ), @@ -324,8 +293,6 @@ class _AddAssessmentDetailsState extends State { okFunction: (MasterKeyModel selectedValue) { setState(() { - // _selectedDiagnosisType = - // selectedValue; widget.mySelectedAssessment .selectedDiagnosisType = selectedValue; @@ -345,28 +312,12 @@ class _AddAssessmentDetailsState extends State { ); } : null, - //hasLabelText: - // typeController.text != '' ? true : false, - //prefixIcon: Icon(Icons.add), - //showLabelText: true, hintText: TranslationBase.of(context).dType, - //fontSize: 13.5, - //readOnly: true, - // hintColor: Colors.black, - //suffixIcon: EvaIcons.arrowDown, - //fontWeight: FontWeight.w600, maxLines: 2, minLines: 1, enabled: false, isDropDown: true, - controller: typeController, - // validator: (value) { - // if (value == null) - // return TranslationBase.of(context).emptyMessage; - // else - // return null; - // }, ), if (isFormSubmitted && widget.mySelectedAssessment @@ -381,7 +332,6 @@ class _AddAssessmentDetailsState extends State { child: TextFields( hintText: TranslationBase.of(context).remarks, fontSize: 13.5, - // hintColor: Colors.black, fontWeight: FontWeight.w600, maxLines: 18, minLines: 5, @@ -518,12 +468,9 @@ class _AddAssessmentDetailsState extends State { mySelectedAssessment.doctorName = doctorProfile.doctorName; if (!isUpdate) { - // widget.mySelectedAssessmentList.add(mySelectedAssessment); widget.addSelectedAssessment(mySelectedAssessment, isUpdate); } Navigator.of(context).pop(); } - - // widget.changePageViewIndex(3); } } \ No newline at end of file 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 bc0fad71..7508bf0a 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 @@ -20,8 +20,8 @@ import 'package:provider/provider.dart'; import '../SOAP_open_items.dart'; import '../SOAP_step_header.dart'; -import 'add_assessment_details.dart'; import '../expandable_SOAP_widget.dart'; +import 'add_assessment_details.dart'; class UpdateAssessmentPage extends StatefulWidget { final Function changePageViewIndex; @@ -107,7 +107,6 @@ class _UpdateAssessmentPageState extends State { backgroundColor: Theme .of(context) .scaffoldBackgroundColor, - // baseViewModel: model, body: SingleChildScrollView( physics: ScrollPhysics(), child: Container( diff --git a/lib/screens/patients/profile/soap_update/expandable_SOAP_widget.dart b/lib/screens/patients/profile/soap_update/expandable_SOAP_widget.dart index a55662ce..f83cceda 100644 --- a/lib/screens/patients/profile/soap_update/expandable_SOAP_widget.dart +++ b/lib/screens/patients/profile/soap_update/expandable_SOAP_widget.dart @@ -1,4 +1,3 @@ -import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart'; diff --git a/lib/screens/patients/profile/soap_update/objective/objective-add-examination-page.dart b/lib/screens/patients/profile/soap_update/objective/add-examination.dart similarity index 99% rename from lib/screens/patients/profile/soap_update/objective/objective-add-examination-page.dart rename to lib/screens/patients/profile/soap_update/objective/add-examination.dart index 225b6f61..3a9dcd24 100644 --- a/lib/screens/patients/profile/soap_update/objective/objective-add-examination-page.dart +++ b/lib/screens/patients/profile/soap_update/objective/add-examination.dart @@ -16,8 +16,6 @@ import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; -// Author Mosa Abuzaid - class AddExaminationPage extends StatefulWidget { final List mySelectedExamination; final Function addSelectedExamination; diff --git a/lib/screens/patients/profile/soap_update/objective/examination-item-card.dart b/lib/screens/patients/profile/soap_update/objective/examination-item-card.dart index 8d53bbd0..d40faea5 100644 --- a/lib/screens/patients/profile/soap_update/objective/examination-item-card.dart +++ b/lib/screens/patients/profile/soap_update/objective/examination-item-card.dart @@ -6,11 +6,11 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; -class ExaminationIitemCard extends StatelessWidget { +class ExaminationItemCard extends StatelessWidget { final MySelectedExamination examination; final Function removeExamination; - ExaminationIitemCard(this.examination, this.removeExamination); + ExaminationItemCard(this.examination, this.removeExamination); @override Widget build(BuildContext context) { diff --git a/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart b/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart index 457bfe5f..66882edb 100644 --- a/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart +++ b/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart @@ -1,5 +1,4 @@ import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; -import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; @@ -24,8 +23,8 @@ import 'package:provider/provider.dart'; import '../SOAP_open_items.dart'; import '../SOAP_step_header.dart'; import '../expandable_SOAP_widget.dart'; +import 'add-examination.dart'; import 'examination-item-card.dart'; -import 'objective-add-examination-page.dart'; class UpdateObjectivePage extends StatefulWidget { final Function changePageViewIndex; @@ -130,8 +129,9 @@ class _UpdateObjectivePageState extends State { Column( children: widget.mySelectedExamination.map((examination) { - return ExaminationIitemCard(examination, () { - removeExamination(examination.selectedExamination); + return ExaminationItemCard(examination, () { + removeExamination( + examination.selectedExamination); }); }).toList(), ) diff --git a/lib/screens/patients/profile/soap_update/subjective/allergies/add_allergies.dart b/lib/screens/patients/profile/soap_update/subjective/allergies/add_allergies.dart index 59569e22..c2847e07 100644 --- a/lib/screens/patients/profile/soap_update/subjective/allergies/add_allergies.dart +++ b/lib/screens/patients/profile/soap_update/subjective/allergies/add_allergies.dart @@ -30,8 +30,6 @@ class AddAllergies extends StatefulWidget { class _AddAllergiesState extends State { List allergiesList; List allergySeverityList; - MasterKeyModel _selectedAllergySeverity; - MasterKeyModel _selectedAllergy; TextEditingController remarkController = TextEditingController(); TextEditingController severityController = TextEditingController(); TextEditingController allergyController = TextEditingController(); diff --git a/lib/screens/patients/profile/soap_update/subjective/allergies/update_allergies_widget.dart b/lib/screens/patients/profile/soap_update/subjective/allergies/update_allergies_widget.dart index 442268e7..6b20cf47 100644 --- a/lib/screens/patients/profile/soap_update/subjective/allergies/update_allergies_widget.dart +++ b/lib/screens/patients/profile/soap_update/subjective/allergies/update_allergies_widget.dart @@ -1,20 +1,9 @@ -import 'package:autocomplete_textfield/autocomplete_textfield.dart'; -import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; -import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.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/shared/Text.dart'; -import 'package:doctor_app_flutter/widgets/shared/TextFields.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/divider_with_spaces_around.dart'; -import 'package:doctor_app_flutter/widgets/shared/master_key_checkbox_search_allergies_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; -import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:hexcolor/hexcolor.dart'; @@ -23,6 +12,7 @@ import 'package:provider/provider.dart'; import '../../SOAP_open_items.dart'; import 'add_allergies.dart'; +// ignore: must_be_immutable class UpdateAllergiesWidget extends StatefulWidget { List myAllergiesList; diff --git a/lib/screens/patients/profile/soap_update/subjective/bottom_sheet_title.dart b/lib/screens/patients/profile/soap_update/subjective/bottom_sheet_title.dart index ba893520..8f5ecf93 100644 --- a/lib/screens/patients/profile/soap_update/subjective/bottom_sheet_title.dart +++ b/lib/screens/patients/profile/soap_update/subjective/bottom_sheet_title.dart @@ -1,6 +1,5 @@ import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:flutter/material.dart'; -import 'package:font_awesome_flutter/font_awesome_flutter.dart'; class BottomSheetTitle extends StatelessWidget { const BottomSheetTitle({ diff --git a/lib/screens/patients/profile/soap_update/subjective/history/add_history_dialog.dart b/lib/screens/patients/profile/soap_update/subjective/history/add_history_dialog.dart index e39bd72a..d63e74c2 100644 --- a/lib/screens/patients/profile/soap_update/subjective/history/add_history_dialog.dart +++ b/lib/screens/patients/profile/soap_update/subjective/history/add_history_dialog.dart @@ -12,7 +12,7 @@ import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; import '../bottom_sheet_title.dart'; -import 'PriorityBar.dart'; +import 'priority_bar.dart'; class AddHistoryDialog extends StatefulWidget { final Function changePageViewIndex; diff --git a/lib/screens/patients/profile/soap_update/subjective/history/PriorityBar.dart b/lib/screens/patients/profile/soap_update/subjective/history/priority_bar.dart similarity index 100% rename from lib/screens/patients/profile/soap_update/subjective/history/PriorityBar.dart rename to lib/screens/patients/profile/soap_update/subjective/history/priority_bar.dart diff --git a/lib/screens/patients/profile/soap_update/subjective/history/update_history_widget.dart b/lib/screens/patients/profile/soap_update/subjective/history/update_history_widget.dart index f2adc388..12c02fa1 100644 --- a/lib/screens/patients/profile/soap_update/subjective/history/update_history_widget.dart +++ b/lib/screens/patients/profile/soap_update/subjective/history/update_history_widget.dart @@ -1,26 +1,14 @@ -import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; -import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_history.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/shared/Text.dart'; -import 'package:doctor_app_flutter/widgets/shared/TextFields.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/master_key_checkbox_search_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; -import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; import '../../SOAP_open_items.dart'; -import 'PriorityBar.dart'; -import '../bottom_sheet_title.dart'; import 'add_history_dialog.dart'; class UpdateHistoryWidget extends StatefulWidget { diff --git a/lib/screens/patients/profile/soap_update/subjective/medication/add_medication.dart b/lib/screens/patients/profile/soap_update/subjective/medication/add_medication.dart index 2c93040f..ba19ae57 100644 --- a/lib/screens/patients/profile/soap_update/subjective/medication/add_medication.dart +++ b/lib/screens/patients/profile/soap_update/subjective/medication/add_medication.dart @@ -20,6 +20,7 @@ import 'package:provider/provider.dart'; import '../../custom_validation_error.dart'; import '../bottom_sheet_title.dart'; +// ignore: must_be_immutable class AddMedication extends StatefulWidget { final Function addMedicationFun; TextEditingController medicationController; diff --git a/lib/screens/patients/profile/soap_update/subjective/medication/update_medication_widget.dart b/lib/screens/patients/profile/soap_update/subjective/medication/update_medication_widget.dart index 8bc01b35..66dc345b 100644 --- a/lib/screens/patients/profile/soap_update/subjective/medication/update_medication_widget.dart +++ b/lib/screens/patients/profile/soap_update/subjective/medication/update_medication_widget.dart @@ -1,29 +1,8 @@ -import 'package:autocomplete_textfield/autocomplete_textfield.dart'; -import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; -import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.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/shared/Text.dart'; -import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; -import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.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/master_key_dailog.dart'; -import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/material.dart'; -import 'package:font_awesome_flutter/font_awesome_flutter.dart'; -import 'package:hexcolor/hexcolor.dart'; -import 'package:provider/provider.dart'; import '../../SOAP_open_items.dart'; -import '../../custom_validation_error.dart'; -import '../bottom_sheet_title.dart'; import 'add_medication.dart'; class UpdateMedicationWidget extends StatefulWidget { @@ -41,8 +20,6 @@ class UpdateMedicationWidget extends StatefulWidget { class _UpdateMedicationWidgetState extends State { @override Widget build(BuildContext context) { - ProjectViewModel projectViewModel = Provider.of(context); - return Column( children: [ diff --git a/lib/screens/patients/profile/soap_update/subjective/update_subjective_page.dart b/lib/screens/patients/profile/soap_update/subjective/update_subjective_page.dart index 819acfb2..70211931 100644 --- a/lib/screens/patients/profile/soap_update/subjective/update_subjective_page.dart +++ b/lib/screens/patients/profile/soap_update/subjective/update_subjective_page.dart @@ -1,6 +1,5 @@ import 'package:doctor_app_flutter/client/base_app_client.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; -import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.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 de62f754..acb855fe 100644 --- a/lib/screens/patients/profile/soap_update/update_soap_index.dart +++ b/lib/screens/patients/profile/soap_update/update_soap_index.dart @@ -1,4 +1,3 @@ -import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/doctor_replay_view_model.dart'; import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteResModel.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart'; @@ -9,9 +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/screens/patients/profile/soap_update/subjective/update_subjective_page.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.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'; import 'package:flutter/material.dart'; From 042d4b4bfd8da2884d55f0b2b4e8f796d1f56479 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Sun, 18 Apr 2021 17:06:32 +0300 Subject: [PATCH 3/4] remove commented code --- .../assessment/add_assessment_details.dart | 5 ++--- .../assessment/update_assessment_page.dart | 6 +++--- .../soap_update/objective/update_objective_page.dart | 12 +++--------- .../soap_update/{ => plan}/update_plan_page.dart | 5 ++--- .../{ => shared_soap_widgets}/SOAP_open_items.dart | 0 .../{ => shared_soap_widgets}/SOAP_step_header.dart | 4 ++-- .../bottom_sheet_title.dart | 0 .../expandable_SOAP_widget.dart | 1 - .../{ => shared_soap_widgets}/steps_widget.dart | 3 --- .../subjective/allergies/add_allergies.dart | 8 +------- .../allergies/update_allergies_widget.dart | 5 +---- .../update_Chief_complaints.dart | 4 ++-- .../subjective/history/add_history_dialog.dart | 3 +-- .../soap_update/subjective/history/priority_bar.dart | 2 +- .../subjective/history/update_history_widget.dart | 5 +---- .../subjective/medication/add_medication.dart | 10 ++-------- .../medication/update_medication_widget.dart | 2 +- .../subjective/update_subjective_page.dart | 10 +++------- .../profile/soap_update/update_soap_index.dart | 4 +--- lib/widgets/patients/dynamic_elements.dart | 2 +- .../master_key_checkbox_search_allergies_widget.dart | 2 +- .../shared/user-guid}/custom_validation_error.dart | 0 22 files changed, 28 insertions(+), 65 deletions(-) rename lib/screens/patients/profile/soap_update/{ => plan}/update_plan_page.dart (99%) rename lib/screens/patients/profile/soap_update/{ => shared_soap_widgets}/SOAP_open_items.dart (100%) rename lib/screens/patients/profile/soap_update/{ => shared_soap_widgets}/SOAP_step_header.dart (92%) rename lib/screens/patients/profile/soap_update/{subjective => shared_soap_widgets}/bottom_sheet_title.dart (100%) rename lib/screens/patients/profile/soap_update/{ => shared_soap_widgets}/expandable_SOAP_widget.dart (97%) rename lib/screens/patients/profile/soap_update/{ => shared_soap_widgets}/steps_widget.dart (99%) rename lib/screens/patients/profile/soap_update/subjective/{ => cheif_complaints}/update_Chief_complaints.dart (95%) rename lib/{screens/patients/profile/soap_update => widgets/shared/user-guid}/custom_validation_error.dart (100%) diff --git a/lib/screens/patients/profile/soap_update/assessment/add_assessment_details.dart b/lib/screens/patients/profile/soap_update/assessment/add_assessment_details.dart index a23fc9be..a2083bd9 100644 --- a/lib/screens/patients/profile/soap_update/assessment/add_assessment_details.dart +++ b/lib/screens/patients/profile/soap_update/assessment/add_assessment_details.dart @@ -12,7 +12,7 @@ import 'package:doctor_app_flutter/models/SOAP/post_assessment_request_model.dar import 'package:doctor_app_flutter/models/doctor/doctor_profile_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/soap_update/subjective/bottom_sheet_title.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; @@ -24,7 +24,7 @@ import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; -import '../custom_validation_error.dart'; +import '../../../../../widgets/shared/user-guid/custom_validation_error.dart'; class AddAssessmentDetails extends StatefulWidget { final MySelectedAssessment mySelectedAssessment; @@ -151,7 +151,6 @@ class _AddAssessmentDetailsState extends State { height: 10, ), Container( - // height: 60.0, child: InkWell( onTap: model.listOfICD10 != null ? () { 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 7508bf0a..ecb57067 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 @@ -18,9 +18,9 @@ import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; -import '../SOAP_open_items.dart'; -import '../SOAP_step_header.dart'; -import '../expandable_SOAP_widget.dart'; +import '../shared_soap_widgets/SOAP_open_items.dart'; +import '../shared_soap_widgets/SOAP_step_header.dart'; +import '../shared_soap_widgets/expandable_SOAP_widget.dart'; import 'add_assessment_details.dart'; class UpdateAssessmentPage extends StatefulWidget { diff --git a/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart b/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart index 66882edb..8c69084a 100644 --- a/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart +++ b/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart @@ -20,9 +20,9 @@ import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; -import '../SOAP_open_items.dart'; -import '../SOAP_step_header.dart'; -import '../expandable_SOAP_widget.dart'; +import '../shared_soap_widgets/SOAP_open_items.dart'; +import '../shared_soap_widgets/SOAP_step_header.dart'; +import '../shared_soap_widgets/expandable_SOAP_widget.dart'; import 'add-examination.dart'; import 'examination-item-card.dart'; @@ -102,7 +102,6 @@ class _UpdateObjectivePageState extends State { builder: (_, model, w) => AppScaffold( isShowAppBar: false, backgroundColor: Theme.of(context).scaffoldBackgroundColor, - // baseViewModel: model, body: SingleChildScrollView( child: Center( child: FractionallySizedBox( @@ -234,7 +233,6 @@ class _UpdateObjectivePageState extends State { examType: exam.selectedExamination.typeId, isAbnormal: exam.isAbnormal, isNormal: exam.isNormal, - // masterDescription: exam.selectedExamination, notExamined: exam.notExamined, examinationType: exam.isNormal ? 1 @@ -263,10 +261,6 @@ class _UpdateObjectivePageState extends State { widget.changePageViewIndex(2); } } else { - // widget.changeLoadingState(true); - // - // widget.changePageViewIndex(2); - helpers.showErrorToast(TranslationBase.of(context).examinationErrorMsg); } } diff --git a/lib/screens/patients/profile/soap_update/update_plan_page.dart b/lib/screens/patients/profile/soap_update/plan/update_plan_page.dart similarity index 99% rename from lib/screens/patients/profile/soap_update/update_plan_page.dart rename to lib/screens/patients/profile/soap_update/plan/update_plan_page.dart index 663bf91f..6f57ceb8 100644 --- a/lib/screens/patients/profile/soap_update/update_plan_page.dart +++ b/lib/screens/patients/profile/soap_update/plan/update_plan_page.dart @@ -19,8 +19,8 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; -import 'SOAP_step_header.dart'; -import 'expandable_SOAP_widget.dart'; +import '../shared_soap_widgets/SOAP_step_header.dart'; +import '../shared_soap_widgets/expandable_SOAP_widget.dart'; class UpdatePlanPage extends StatefulWidget { final Function changePageViewIndex; @@ -99,7 +99,6 @@ class _UpdatePlanPageState extends State { widget.changeLoadingState(false); }, builder: (_, model, w) => AppScaffold( - // baseViewModel: model, backgroundColor: Theme .of(context) .scaffoldBackgroundColor, diff --git a/lib/screens/patients/profile/soap_update/SOAP_open_items.dart b/lib/screens/patients/profile/soap_update/shared_soap_widgets/SOAP_open_items.dart similarity index 100% rename from lib/screens/patients/profile/soap_update/SOAP_open_items.dart rename to lib/screens/patients/profile/soap_update/shared_soap_widgets/SOAP_open_items.dart diff --git a/lib/screens/patients/profile/soap_update/SOAP_step_header.dart b/lib/screens/patients/profile/soap_update/shared_soap_widgets/SOAP_step_header.dart similarity index 92% rename from lib/screens/patients/profile/soap_update/SOAP_step_header.dart rename to lib/screens/patients/profile/soap_update/shared_soap_widgets/SOAP_step_header.dart index 14385a9e..da1abd28 100644 --- a/lib/screens/patients/profile/soap_update/SOAP_step_header.dart +++ b/lib/screens/patients/profile/soap_update/shared_soap_widgets/SOAP_step_header.dart @@ -1,4 +1,4 @@ -import 'package:doctor_app_flutter/screens/patients/profile/soap_update/steps_widget.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/steps_widget.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/material.dart'; @@ -33,7 +33,7 @@ class SOAPStepHeader extends StatelessWidget { child: StepsWidget( index: currentIndex, changeCurrentTab: changePageViewIndex, - height: 100,//MediaQuery.of(context).size.height * 0.17, + height: 100, ), ), SizedBox( diff --git a/lib/screens/patients/profile/soap_update/subjective/bottom_sheet_title.dart b/lib/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart similarity index 100% rename from lib/screens/patients/profile/soap_update/subjective/bottom_sheet_title.dart rename to lib/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart diff --git a/lib/screens/patients/profile/soap_update/expandable_SOAP_widget.dart b/lib/screens/patients/profile/soap_update/shared_soap_widgets/expandable_SOAP_widget.dart similarity index 97% rename from lib/screens/patients/profile/soap_update/expandable_SOAP_widget.dart rename to lib/screens/patients/profile/soap_update/shared_soap_widgets/expandable_SOAP_widget.dart index f83cceda..962f8adb 100644 --- a/lib/screens/patients/profile/soap_update/expandable_SOAP_widget.dart +++ b/lib/screens/patients/profile/soap_update/shared_soap_widgets/expandable_SOAP_widget.dart @@ -41,7 +41,6 @@ class ExpandableSOAPWidget extends StatelessWidget { children: [ Texts(headerTitle, variant: isExpanded ? "bodyText" : '', - // bold: isExpanded ? true : false, fontSize: 15, color: Colors.black), if(isRequired) diff --git a/lib/screens/patients/profile/soap_update/steps_widget.dart b/lib/screens/patients/profile/soap_update/shared_soap_widgets/steps_widget.dart similarity index 99% rename from lib/screens/patients/profile/soap_update/steps_widget.dart rename to lib/screens/patients/profile/soap_update/shared_soap_widgets/steps_widget.dart index 973c4138..059674a8 100644 --- a/lib/screens/patients/profile/soap_update/steps_widget.dart +++ b/lib/screens/patients/profile/soap_update/shared_soap_widgets/steps_widget.dart @@ -13,7 +13,6 @@ class StepsWidget extends StatelessWidget { StepsWidget({Key key, this.index, this.changeCurrentTab, this.height = 0.0}); - // TODO : Add translation to name @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); @@ -24,7 +23,6 @@ class StepsWidget extends StatelessWidget { height: height == 0 ? 150 : height, width: MediaQuery.of(context).size.width * 0.9, color: Colors.transparent, - // child:, ), Positioned( top: 30 @@ -245,7 +243,6 @@ class StepsWidget extends StatelessWidget { AppText( "Plan", fontWeight: FontWeight.bold, - // textAlign: TextAlign.center, fontSize: 12, ), StatusLabel( diff --git a/lib/screens/patients/profile/soap_update/subjective/allergies/add_allergies.dart b/lib/screens/patients/profile/soap_update/subjective/allergies/add_allergies.dart index c2847e07..437cc928 100644 --- a/lib/screens/patients/profile/soap_update/subjective/allergies/add_allergies.dart +++ b/lib/screens/patients/profile/soap_update/subjective/allergies/add_allergies.dart @@ -14,7 +14,7 @@ import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; -import '../bottom_sheet_title.dart'; +import '../../shared_soap_widgets/bottom_sheet_title.dart'; class AddAllergies extends StatefulWidget { final Function addAllergiesFun; @@ -223,18 +223,12 @@ class _AddAllergiesState extends State { if (allergy.isEmpty) { myAllergiesListLocal.add(mySelectedAllergy); - // Navigator.of(context).pop(); } else { allergy.first.selectedAllergy = mySelectedAllergy.selectedAllergy; allergy.first.selectedAllergySeverity = mySelectedAllergy.selectedAllergySeverity; allergy.first.remark = mySelectedAllergy.remark; allergy.first.isChecked = mySelectedAllergy.isChecked; - // Navigator.of(context).pop(); - - // helpers.showErrorToast(TranslationBase - // .of(context) - // .itemExist); } }); } diff --git a/lib/screens/patients/profile/soap_update/subjective/allergies/update_allergies_widget.dart b/lib/screens/patients/profile/soap_update/subjective/allergies/update_allergies_widget.dart index 6b20cf47..ff88718e 100644 --- a/lib/screens/patients/profile/soap_update/subjective/allergies/update_allergies_widget.dart +++ b/lib/screens/patients/profile/soap_update/subjective/allergies/update_allergies_widget.dart @@ -9,7 +9,7 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; -import '../../SOAP_open_items.dart'; +import '../../shared_soap_widgets/SOAP_open_items.dart'; import 'add_allergies.dart'; // ignore: must_be_immutable @@ -67,7 +67,6 @@ class _UpdateAllergiesWidgetState extends State { ? selectedAllergy.selectedAllergy.nameAr : selectedAllergy.selectedAllergy.nameEn .toUpperCase(), - // variant: "bodyText", textDecoration: selectedAllergy.isChecked ? null : TextDecoration.lineThrough, @@ -80,11 +79,9 @@ class _UpdateAllergiesWidgetState extends State { : selectedAllergy.selectedAllergySeverity .nameEn .toUpperCase(), - // variant: "bodyText", textDecoration: selectedAllergy.isChecked ? null : TextDecoration.lineThrough, - // bold: true, color: Color(0xFFCC9B14)), ], ), diff --git a/lib/screens/patients/profile/soap_update/subjective/update_Chief_complaints.dart b/lib/screens/patients/profile/soap_update/subjective/cheif_complaints/update_Chief_complaints.dart similarity index 95% rename from lib/screens/patients/profile/soap_update/subjective/update_Chief_complaints.dart rename to lib/screens/patients/profile/soap_update/subjective/cheif_complaints/update_Chief_complaints.dart index 6169c3db..cdc6cad5 100644 --- a/lib/screens/patients/profile/soap_update/subjective/update_Chief_complaints.dart +++ b/lib/screens/patients/profile/soap_update/subjective/cheif_complaints/update_Chief_complaints.dart @@ -3,8 +3,8 @@ import 'package:doctor_app_flutter/widgets/shared/new_text_Field.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import '../custom_validation_error.dart'; -import 'medication/update_medication_widget.dart'; +import '../../../../../../widgets/shared/user-guid/custom_validation_error.dart'; +import '../medication/update_medication_widget.dart'; class UpdateChiefComplaints extends StatelessWidget { const UpdateChiefComplaints({ diff --git a/lib/screens/patients/profile/soap_update/subjective/history/add_history_dialog.dart b/lib/screens/patients/profile/soap_update/subjective/history/add_history_dialog.dart index d63e74c2..6f610a8e 100644 --- a/lib/screens/patients/profile/soap_update/subjective/history/add_history_dialog.dart +++ b/lib/screens/patients/profile/soap_update/subjective/history/add_history_dialog.dart @@ -11,7 +11,7 @@ import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; -import '../bottom_sheet_title.dart'; +import '../../shared_soap_widgets/bottom_sheet_title.dart'; import 'priority_bar.dart'; class AddHistoryDialog extends StatefulWidget { @@ -74,7 +74,6 @@ class _AddHistoryDialogState extends State { controller: widget.controller, onPageChanged: (index) { setState(() { - // currentIndex = index; }); }, scrollDirection: Axis.horizontal, diff --git a/lib/screens/patients/profile/soap_update/subjective/history/priority_bar.dart b/lib/screens/patients/profile/soap_update/subjective/history/priority_bar.dart index 693ab59e..ac6ec2c5 100644 --- a/lib/screens/patients/profile/soap_update/subjective/history/priority_bar.dart +++ b/lib/screens/patients/profile/soap_update/subjective/history/priority_bar.dart @@ -69,7 +69,7 @@ class _PriorityBarState extends State { style: TextStyle( fontSize: 14, - color: Colors.black, //Colors.black, + color: Colors.black, fontWeight: FontWeight.bold, ), ), diff --git a/lib/screens/patients/profile/soap_update/subjective/history/update_history_widget.dart b/lib/screens/patients/profile/soap_update/subjective/history/update_history_widget.dart index 12c02fa1..ad8f779e 100644 --- a/lib/screens/patients/profile/soap_update/subjective/history/update_history_widget.dart +++ b/lib/screens/patients/profile/soap_update/subjective/history/update_history_widget.dart @@ -8,7 +8,7 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; -import '../../SOAP_open_items.dart'; +import '../../shared_soap_widgets/SOAP_open_items.dart'; import 'add_history_dialog.dart'; class UpdateHistoryWidget extends StatefulWidget { @@ -68,7 +68,6 @@ class _UpdateHistoryWidgetState extends State textDecoration: myHistory.isChecked ? null : TextDecoration.lineThrough, - // bold: true, color: Colors.black), width: MediaQuery .of(context) @@ -89,9 +88,7 @@ class _UpdateHistoryWidgetState extends State textDecoration: myHistory.isChecked ? null : TextDecoration.lineThrough, - // bold: true, color: HexColor("#B8382C"),), - // width: MediaQuery.of(context).size.width * 0.3, ), Icon( FontAwesomeIcons.times, diff --git a/lib/screens/patients/profile/soap_update/subjective/medication/add_medication.dart b/lib/screens/patients/profile/soap_update/subjective/medication/add_medication.dart index ba19ae57..3b96cd65 100644 --- a/lib/screens/patients/profile/soap_update/subjective/medication/add_medication.dart +++ b/lib/screens/patients/profile/soap_update/subjective/medication/add_medication.dart @@ -17,8 +17,8 @@ import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; -import '../../custom_validation_error.dart'; -import '../bottom_sheet_title.dart'; +import '../../../../../../widgets/shared/user-guid/custom_validation_error.dart'; +import '../../shared_soap_widgets/bottom_sheet_title.dart'; // ignore: must_be_immutable class AddMedication extends StatefulWidget { @@ -38,7 +38,6 @@ class _AddMedicationState extends State { MasterKeyModel _selectedMedicationRoute; MasterKeyModel _selectedMedicationFrequency; - MasterKeyModel _selectedAllergy; TextEditingController doseController = TextEditingController(); TextEditingController strengthController = TextEditingController(); TextEditingController routeController = TextEditingController(); @@ -244,7 +243,6 @@ class _AddMedicationState extends State { : null, hintText: TranslationBase.of(context).doseTime, - //TODO add translation maxLines: 2, minLines: 2, isDropDown: true, @@ -295,8 +293,6 @@ class _AddMedicationState extends State { : null, hintText: TranslationBase.of(context).strength, - // hintColor: Colors.black, - // fontWeight: FontWeight.w600, maxLines: 2, minLines: 2, controller: strengthController, @@ -392,9 +388,7 @@ class _AddMedicationState extends State { : null, hintText: TranslationBase.of(context).frequency, - //TODO add translation enabled: false, - // hintColor: Colors.black, maxLines: 2, minLines: 2, isDropDown: true, diff --git a/lib/screens/patients/profile/soap_update/subjective/medication/update_medication_widget.dart b/lib/screens/patients/profile/soap_update/subjective/medication/update_medication_widget.dart index 66dc345b..7372e7ee 100644 --- a/lib/screens/patients/profile/soap_update/subjective/medication/update_medication_widget.dart +++ b/lib/screens/patients/profile/soap_update/subjective/medication/update_medication_widget.dart @@ -2,7 +2,7 @@ import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:flutter/material.dart'; -import '../../SOAP_open_items.dart'; +import '../../shared_soap_widgets/SOAP_open_items.dart'; import 'add_medication.dart'; class UpdateMedicationWidget extends StatefulWidget { diff --git a/lib/screens/patients/profile/soap_update/subjective/update_subjective_page.dart b/lib/screens/patients/profile/soap_update/subjective/update_subjective_page.dart index 70211931..d78c8c45 100644 --- a/lib/screens/patients/profile/soap_update/subjective/update_subjective_page.dart +++ b/lib/screens/patients/profile/soap_update/subjective/update_subjective_page.dart @@ -21,11 +21,11 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; -import '../SOAP_step_header.dart'; -import '../expandable_SOAP_widget.dart'; +import '../shared_soap_widgets/SOAP_step_header.dart'; +import '../shared_soap_widgets/expandable_SOAP_widget.dart'; import 'allergies/update_allergies_widget.dart'; import 'history/update_history_widget.dart'; -import 'update_Chief_complaints.dart'; +import 'cheif_complaints/update_Chief_complaints.dart'; class UpdateSubjectivePage extends StatefulWidget { final Function changePageViewIndex; @@ -225,7 +225,6 @@ class _UpdateSubjectivePageState extends State { backgroundColor: Theme .of(context) .scaffoldBackgroundColor, - // baseViewModel: model, body: SingleChildScrollView( physics: ScrollPhysics(), child: Center( @@ -482,7 +481,6 @@ class _UpdateSubjectivePageState extends State { widget.myHistoryList.forEach((history) { if (postHistoriesRequestModel.listMedicalHistoryVM == null) postHistoriesRequestModel.listMedicalHistoryVM = []; - //TODO: make static value dynamic postHistoriesRequestModel.listMedicalHistoryVM.add(ListMedicalHistoryVM( patientMRN: widget.patientInfo.patientMRN, episodeId: widget.patientInfo.episodeNo, @@ -511,7 +509,6 @@ class _UpdateSubjectivePageState extends State { formKey.currentState.save(); if(formKey.currentState.validate()){ PostChiefComplaintRequestModel postChiefComplaintRequestModel = - //TODO: make static value dynamic new PostChiefComplaintRequestModel( patientMRN: widget.patientInfo.patientMRN, episodeID: widget.patientInfo.episodeNo, @@ -525,7 +522,6 @@ class _UpdateSubjectivePageState extends State { numberOfWeeks: 0); if (model.patientChiefComplaintList.isEmpty) { - // TODO: make it postChiefComplaint after it start to work postChiefComplaintRequestModel.editedBy = ''; await model.postChiefComplaint(postChiefComplaintRequestModel); } else { 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 acb855fe..d9af7457 100644 --- a/lib/screens/patients/profile/soap_update/update_soap_index.dart +++ b/lib/screens/patients/profile/soap_update/update_soap_index.dart @@ -14,7 +14,7 @@ import 'package:flutter/material.dart'; import 'assessment/update_assessment_page.dart'; import 'objective/update_objective_page.dart'; -import 'update_plan_page.dart'; +import 'plan/update_plan_page.dart'; class UpdateSoapIndex extends StatefulWidget { final bool isUpdate; @@ -50,7 +50,6 @@ class _UpdateSoapIndexState extends State @override void initState() { - // TODO: implement initState _controller = new PageController(); super.initState(); @@ -68,7 +67,6 @@ class _UpdateSoapIndexState extends State PatiantInformtion patient = routeArgs['patient']; return BaseView( builder: (_, model, w) => AppScaffold( - // baseViewModel: model, isLoading: _isLoading, isShowAppBar: false, body: SingleChildScrollView( diff --git a/lib/widgets/patients/dynamic_elements.dart b/lib/widgets/patients/dynamic_elements.dart index 4a13630b..1760c796 100644 --- a/lib/widgets/patients/dynamic_elements.dart +++ b/lib/widgets/patients/dynamic_elements.dart @@ -1,6 +1,6 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/models/patient/patient_model.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/soap_update/custom_validation_error.dart'; +import 'package:doctor_app_flutter/widgets/shared/user-guid/custom_validation_error.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart'; import 'package:flutter/material.dart'; diff --git a/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart b/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart index 56db325b..3e4d1186 100644 --- a/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart +++ b/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart @@ -3,7 +3,7 @@ import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/soap_update/custom_validation_error.dart'; +import 'package:doctor_app_flutter/widgets/shared/user-guid/custom_validation_error.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; diff --git a/lib/screens/patients/profile/soap_update/custom_validation_error.dart b/lib/widgets/shared/user-guid/custom_validation_error.dart similarity index 100% rename from lib/screens/patients/profile/soap_update/custom_validation_error.dart rename to lib/widgets/shared/user-guid/custom_validation_error.dart From 2fd30ae1be0413e3bb01588d26049af6364f7773 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Sun, 18 Apr 2021 17:23:47 +0300 Subject: [PATCH 4/4] improve exam step --- .../post_physical_exam_request_model.dart | 1 - .../assessment/update_assessment_page.dart | 1 + .../objective/add_examination_page.dart | 148 ++++++++++ ...ation.dart => add_examination_widget.dart} | 253 +----------------- ...m-card.dart => examination_item_card.dart} | 0 .../examinations_list_search_widget.dart | 115 ++++++++ .../objective/update_objective_page.dart | 10 +- .../subjective/allergies/add_allergies.dart | 23 +- .../history/update_history_widget.dart | 1 - 9 files changed, 282 insertions(+), 270 deletions(-) create mode 100644 lib/screens/patients/profile/soap_update/objective/add_examination_page.dart rename lib/screens/patients/profile/soap_update/objective/{add-examination.dart => add_examination_widget.dart} (54%) rename lib/screens/patients/profile/soap_update/objective/{examination-item-card.dart => examination_item_card.dart} (100%) create mode 100644 lib/screens/patients/profile/soap_update/objective/examinations_list_search_widget.dart diff --git a/lib/models/SOAP/post_physical_exam_request_model.dart b/lib/models/SOAP/post_physical_exam_request_model.dart index d1b64837..52836232 100644 --- a/lib/models/SOAP/post_physical_exam_request_model.dart +++ b/lib/models/SOAP/post_physical_exam_request_model.dart @@ -1,4 +1,3 @@ - import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; class PostPhysicalExamRequestModel { List listHisProgNotePhysicalExaminationVM; 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 ecb57067..7a42fe79 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 @@ -23,6 +23,7 @@ import '../shared_soap_widgets/SOAP_step_header.dart'; import '../shared_soap_widgets/expandable_SOAP_widget.dart'; import 'add_assessment_details.dart'; +// ignore: must_be_immutable class UpdateAssessmentPage extends StatefulWidget { final Function changePageViewIndex; List mySelectedAssessmentList; diff --git a/lib/screens/patients/profile/soap_update/objective/add_examination_page.dart b/lib/screens/patients/profile/soap_update/objective/add_examination_page.dart new file mode 100644 index 00000000..b9f1bd63 --- /dev/null +++ b/lib/screens/patients/profile/soap_update/objective/add_examination_page.dart @@ -0,0 +1,148 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; +import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; +import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; +import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.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/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/borderedButton.dart'; +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; + +import 'examinations_list_search_widget.dart'; + +class AddExaminationPage extends StatefulWidget { + final List mySelectedExamination; + final Function addSelectedExamination; + final Function(MasterKeyModel) removeExamination; + + AddExaminationPage( + {this.mySelectedExamination, + this.addSelectedExamination, + this.removeExamination}); + + @override + _AddExaminationPageState createState() => _AddExaminationPageState(); +} + +class _AddExaminationPageState extends State { + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) async { + if (model.physicalExaminationList.length == 0) { + await model.getMasterLookup(MasterKeysService.PhysicalExamination); + } + }, + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + isShowAppBar: false, + backgroundColor: Color.fromRGBO(248, 248, 248, 1), + body: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Container( + padding: + EdgeInsets.only(left: 16, top: 70, right: 16, bottom: 16), + color: Colors.white, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: AppText( + "${TranslationBase.of(context).addExamination}", + fontSize: SizeConfig.textMultiplier * 3.3, + color: Colors.black, + fontWeight: FontWeight.w700, + ), + ), + InkWell( + onTap: () { + Navigator.of(context).pop(); + }, + child: Icon( + Icons.clear, + size: 40, + ), + ) + ], + ), + ), + Expanded( + child: SingleChildScrollView( + child: Column( + children: [ + Container( + margin: EdgeInsets.all(16.0), + padding: EdgeInsets.all(0.0), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + color: Colors.white, + borderRadius: BorderRadius.circular(12), + border: Border.fromBorderSide(BorderSide( + color: Colors.grey.shade400, + width: 0.4, + )), + ), + child: Column( + children: [ + ExaminationsListSearchWidget( + masterList: model.physicalExaminationList, + isServiceSelected: (master) => + isServiceSelected(master), + removeHistory: (history) { + setState(() { + widget.removeExamination(history); + }); + }, + addHistory: (selectedExamination) { + setState(() { + widget.mySelectedExamination + .add(selectedExamination); + }); + }, + ), + ], + ), + ), + ], + ), + ), + ), + Container( + padding: EdgeInsets.all(16), + color: Colors.white, + child: BorderedButton( + "${TranslationBase.of(context).addExamination}", + backgroundColor: HexColor("#359846"), + textColor: Colors.white, + vPadding: 12, + radius: 12, + fontWeight: FontWeight.w600, + fontSize: SizeConfig.textMultiplier * 2.5, + fontFamily: 'Poppins', + handler: () { + widget.addSelectedExamination(); + }, + ), + ) + ], + ), + ), + ); + } + + isServiceSelected(MasterKeyModel masterKey) { + Iterable exam = widget.mySelectedExamination.where( + (element) => + masterKey.id == element.selectedExamination.id && + masterKey.typeId == element.selectedExamination.typeId); + if (exam.length > 0) { + return true; + } + return false; + } +} diff --git a/lib/screens/patients/profile/soap_update/objective/add-examination.dart b/lib/screens/patients/profile/soap_update/objective/add_examination_widget.dart similarity index 54% rename from lib/screens/patients/profile/soap_update/objective/add-examination.dart rename to lib/screens/patients/profile/soap_update/objective/add_examination_widget.dart index 3a9dcd24..82cef2e9 100644 --- a/lib/screens/patients/profile/soap_update/objective/add-examination.dart +++ b/lib/screens/patients/profile/soap_update/objective/add_examination_widget.dart @@ -1,252 +1,17 @@ +// ignore: must_be_immutable import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; -import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.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/shared/app-textfield-custom.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/borderedButton.dart'; -import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart'; import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; -class AddExaminationPage extends StatefulWidget { - final List mySelectedExamination; - final Function addSelectedExamination; - final Function(MasterKeyModel) removeExamination; - - AddExaminationPage( - {this.mySelectedExamination, - this.addSelectedExamination, - this.removeExamination}); - - @override - _AddExaminationPageState createState() => _AddExaminationPageState(); -} - -class _AddExaminationPageState extends State { - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) async { - if (model.physicalExaminationList.length == 0) { - await model.getMasterLookup(MasterKeysService.PhysicalExamination); - } - }, - builder: (_, model, w) => AppScaffold( - baseViewModel: model, - isShowAppBar: false, - backgroundColor: Color.fromRGBO(248, 248, 248, 1), - body: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Container( - padding: - EdgeInsets.only(left: 16, top: 70, right: 16, bottom: 16), - color: Colors.white, - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - child: AppText( - "${TranslationBase.of(context).addExamination}", - fontSize: SizeConfig.textMultiplier * 3.3, - color: Colors.black, - fontWeight: FontWeight.w700, - ), - ), - InkWell( - onTap: () { - Navigator.of(context).pop(); - }, - child: Icon( - Icons.clear, - size: 40, - ), - ) - ], - ), - ), - Expanded( - child: SingleChildScrollView( - child: Column( - children: [ - Container( - margin: EdgeInsets.all(16.0), - padding: EdgeInsets.all(0.0), - decoration: BoxDecoration( - shape: BoxShape.rectangle, - color: Colors.white, - borderRadius: BorderRadius.circular(12), - border: Border.fromBorderSide(BorderSide( - color: Colors.grey.shade400, - width: 0.4, - )), - ), - child: Column( - children: [ - ExaminationsListSearchWidget( - masterList: model.physicalExaminationList, - isServiceSelected: (master) => - isServiceSelected(master), - removeHistory: (history) { - setState(() { - widget.removeExamination(history); - }); - }, - addHistory: (selectedExamination) { - setState(() { - widget.mySelectedExamination - .add(selectedExamination); - }); - }, - ), - ], - ), - ), - ], - ), - ), - ), - Container( - padding: EdgeInsets.all(16), - color: Colors.white, - child: BorderedButton( - "${TranslationBase.of(context).addExamination}", - backgroundColor: HexColor("#359846"), - textColor: Colors.white, - vPadding: 12, - radius: 12, - fontWeight: FontWeight.w600, - fontSize: SizeConfig.textMultiplier * 2.5, - fontFamily: 'Poppins', - handler: () { - widget.addSelectedExamination(); - }, - ), - ) - ], - ), - ), - ); - } - - isServiceSelected(MasterKeyModel masterKey) { - Iterable exam = widget.mySelectedExamination.where( - (element) => - masterKey.id == element.selectedExamination.id && - masterKey.typeId == element.selectedExamination.typeId); - if (exam.length > 0) { - return true; - } - return false; - } -} - -class ExaminationsListSearchWidget extends StatefulWidget { - final Function(MasterKeyModel) removeHistory; - final Function(MySelectedExamination) addHistory; - final bool Function(MasterKeyModel) isServiceSelected; - final List masterList; - - ExaminationsListSearchWidget( - {this.removeHistory, - this.addHistory, - this.isServiceSelected, - this.masterList}); - - @override - _ExaminationsListSearchWidgetState createState() => - _ExaminationsListSearchWidgetState(); -} - -class _ExaminationsListSearchWidgetState - extends State { - int expandedIndex = -1; - List items = List(); - TextEditingController filteredSearchController = TextEditingController(); - - @override - void initState() { - items.addAll(widget.masterList); - super.initState(); - } - - @override - Widget build(BuildContext context) { - return Column( - children: [ - AppTextFieldCustom( - height: MediaQuery.of(context).size.height * 0.080, - hintText: TranslationBase.of(context).searchExamination, - isDropDown: true, - hasBorder: false, - controller: filteredSearchController, - onChanged: (value) { - filterSearchResults(value); - }, - suffixIcon: Icon( - Icons.search, - color: Colors.black, - ), - ), - DividerWithSpacesAround( - height: 2, - ), - ...items.mapIndexed((index, item) { - return AddExaminationWidget( - item: item, - addHistory: widget.addHistory, - removeHistory: widget.removeHistory, - isServiceSelected: widget.isServiceSelected, - isExpand: index == expandedIndex, - expandClick: () { - setState(() { - if (expandedIndex == index) { - expandedIndex = -1; - } else { - expandedIndex = index; - } - }); - }, - ); - }).toList(), - ], - ); - } - - void filterSearchResults(String query) { - List dummySearchList = List(); - dummySearchList.addAll(widget.masterList); - if (query.isNotEmpty) { - List dummyListData = List(); - dummySearchList.forEach((item) { - if (item.nameAr.toLowerCase().contains(query.toLowerCase()) || - item.nameEn.toLowerCase().contains(query.toLowerCase())) { - dummyListData.add(item); - } - }); - setState(() { - items.clear(); - items.addAll(dummyListData); - }); - return; - } else { - setState(() { - items.clear(); - items.addAll(widget.masterList); - }); - } - } -} - +// ignore: must_be_immutable class AddExaminationWidget extends StatefulWidget { MasterKeyModel item; final Function(MasterKeyModel) removeHistory; @@ -275,10 +40,10 @@ class _AddExaminationWidgetState extends State { @override void initState() { - examination.selectedExamination = widget.item; super.initState(); } + @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); @@ -479,7 +244,7 @@ class _AddExaminationWidgetState extends State { minLines: 2, maxLines: 4, inputType: TextInputType.multiline, - onChanged: (value){ + onChanged: (value) { examination.remark = value; }, ), @@ -492,13 +257,3 @@ class _AddExaminationWidgetState extends State { ); } } - -extension FicListExtension on List { - /// Maps each element of the list. - /// The [map] function gets both the original [item] and its [index]. - Iterable mapIndexed(E Function(int index, T item) map) sync* { - for (var index = 0; index < length; index++) { - yield map(index, this[index]); - } - } -} diff --git a/lib/screens/patients/profile/soap_update/objective/examination-item-card.dart b/lib/screens/patients/profile/soap_update/objective/examination_item_card.dart similarity index 100% rename from lib/screens/patients/profile/soap_update/objective/examination-item-card.dart rename to lib/screens/patients/profile/soap_update/objective/examination_item_card.dart diff --git a/lib/screens/patients/profile/soap_update/objective/examinations_list_search_widget.dart b/lib/screens/patients/profile/soap_update/objective/examinations_list_search_widget.dart new file mode 100644 index 00000000..941b60ca --- /dev/null +++ b/lib/screens/patients/profile/soap_update/objective/examinations_list_search_widget.dart @@ -0,0 +1,115 @@ +import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; +import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart'; +import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart'; +import 'package:flutter/material.dart'; + +import 'add_examination_widget.dart'; + +class ExaminationsListSearchWidget extends StatefulWidget { + final Function(MasterKeyModel) removeHistory; + final Function(MySelectedExamination) addHistory; + final bool Function(MasterKeyModel) isServiceSelected; + final List masterList; + + ExaminationsListSearchWidget( + {this.removeHistory, + this.addHistory, + this.isServiceSelected, + this.masterList}); + + @override + _ExaminationsListSearchWidgetState createState() => + _ExaminationsListSearchWidgetState(); +} + +class _ExaminationsListSearchWidgetState + extends State { + int expandedIndex = -1; + List items = List(); + TextEditingController filteredSearchController = TextEditingController(); + + @override + void initState() { + items.addAll(widget.masterList); + super.initState(); + } + + @override + Widget build(BuildContext context) { + return Column( + children: [ + AppTextFieldCustom( + height: MediaQuery.of(context).size.height * 0.080, + hintText: TranslationBase.of(context).searchExamination, + isDropDown: true, + hasBorder: false, + controller: filteredSearchController, + onChanged: (value) { + filterSearchResults(value); + }, + suffixIcon: Icon( + Icons.search, + color: Colors.black, + ), + ), + DividerWithSpacesAround( + height: 2, + ), + ...items.mapIndexed((index, item) { + return AddExaminationWidget( + item: item, + addHistory: widget.addHistory, + removeHistory: widget.removeHistory, + isServiceSelected: widget.isServiceSelected, + isExpand: index == expandedIndex, + expandClick: () { + setState(() { + if (expandedIndex == index) { + expandedIndex = -1; + } else { + expandedIndex = index; + } + }); + }, + ); + }).toList(), + ], + ); + } + + void filterSearchResults(String query) { + List dummySearchList = List(); + dummySearchList.addAll(widget.masterList); + if (query.isNotEmpty) { + List dummyListData = List(); + dummySearchList.forEach((item) { + if (item.nameAr.toLowerCase().contains(query.toLowerCase()) || + item.nameEn.toLowerCase().contains(query.toLowerCase())) { + dummyListData.add(item); + } + }); + setState(() { + items.clear(); + items.addAll(dummyListData); + }); + return; + } else { + setState(() { + items.clear(); + items.addAll(widget.masterList); + }); + } + } +} + +extension FicListExtension on List { + /// Maps each element of the list. + /// The [map] function gets both the original [item] and its [index]. + Iterable mapIndexed(E Function(int index, T item) map) sync* { + for (var index = 0; index < length; index++) { + yield map(index, this[index]); + } + } +} diff --git a/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart b/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart index 8c69084a..abb62808 100644 --- a/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart +++ b/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart @@ -18,18 +18,17 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; -import 'package:provider/provider.dart'; import '../shared_soap_widgets/SOAP_open_items.dart'; import '../shared_soap_widgets/SOAP_step_header.dart'; import '../shared_soap_widgets/expandable_SOAP_widget.dart'; -import 'add-examination.dart'; -import 'examination-item-card.dart'; +import 'add_examination_page.dart'; +import 'examination_item_card.dart'; class UpdateObjectivePage extends StatefulWidget { final Function changePageViewIndex; final Function changeLoadingState; - final int currentIndex; + final int currentIndex; final List mySelectedExamination; final PatiantInformtion patientInfo; @@ -62,9 +61,6 @@ class _UpdateObjectivePageState extends State { @override Widget build(BuildContext context) { - final screenSize = MediaQuery.of(context).size; - ProjectViewModel projectViewModel = Provider.of(context); - return BaseView( onModelReady: (model) async { widget.mySelectedExamination.clear(); diff --git a/lib/screens/patients/profile/soap_update/subjective/allergies/add_allergies.dart b/lib/screens/patients/profile/soap_update/subjective/allergies/add_allergies.dart index 437cc928..c1cbcd28 100644 --- a/lib/screens/patients/profile/soap_update/subjective/allergies/add_allergies.dart +++ b/lib/screens/patients/profile/soap_update/subjective/allergies/add_allergies.dart @@ -12,7 +12,6 @@ import 'package:doctor_app_flutter/widgets/shared/master_key_checkbox_search_all import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; -import 'package:provider/provider.dart'; import '../../shared_soap_widgets/bottom_sheet_title.dart'; @@ -72,8 +71,6 @@ class _AddAllergiesState extends State { @override Widget build(BuildContext context) { - ProjectViewModel projectViewModel = Provider.of(context); - final screenSize = MediaQuery.of(context).size; return FractionallySizedBox( heightFactor: 1, child: BaseView( @@ -119,8 +116,8 @@ class _AddAllergiesState extends State { }, addAllergy: (MySelectedAllergy mySelectedAllergy) { - AddAllergyLocally(mySelectedAllergy); - }, + addAllergyLocally(mySelectedAllergy); + }, addSelectedAllergy: () => widget .addAllergiesFun(myAllergiesListLocal), isServiceSelected: (master) => @@ -208,17 +205,19 @@ class _AddAllergiesState extends State { return null; } - AddAllergyLocally(MySelectedAllergy mySelectedAllergy) { + addAllergyLocally(MySelectedAllergy mySelectedAllergy) { if (mySelectedAllergy.selectedAllergy == null) { - helpers.showErrorToast(TranslationBase.of(context).requiredMsg); + helpers.showErrorToast(TranslationBase + .of(context) + .requiredMsg); } else { setState(() { List allergy = - // ignore: missing_return - myAllergiesListLocal - .where((element) => - mySelectedAllergy.selectedAllergy.id == - element.selectedAllergy.id) + // ignore: missing_return + myAllergiesListLocal + .where((element) => + mySelectedAllergy.selectedAllergy.id == + element.selectedAllergy.id) .toList(); if (allergy.isEmpty) { diff --git a/lib/screens/patients/profile/soap_update/subjective/history/update_history_widget.dart b/lib/screens/patients/profile/soap_update/subjective/history/update_history_widget.dart index ad8f779e..41df16ed 100644 --- a/lib/screens/patients/profile/soap_update/subjective/history/update_history_widget.dart +++ b/lib/screens/patients/profile/soap_update/subjective/history/update_history_widget.dart @@ -23,7 +23,6 @@ class UpdateHistoryWidget extends StatefulWidget { class _UpdateHistoryWidgetState extends State with TickerProviderStateMixin { PageController _controller; - int _currentIndex = 0; changePageViewIndex(pageIndex) { _controller.jumpToPage(pageIndex);