From 7e12b587a957da250be100cabfd8d8feb60e3466 Mon Sep 17 00:00:00 2001 From: RoaaGhali98 Date: Mon, 28 Feb 2022 11:12:46 +0200 Subject: [PATCH] Solving the conflict --- android/app/build.gradle | 2 +- android/build.gradle | 2 +- assets/images/dr_avatar.png | Bin 0 -> 38543 bytes ios/Runner.xcodeproj/project.pbxproj | 4 +- lib/client/base_app_client.dart | 5 +- lib/config/config.dart | 40 +- lib/config/localized_values.dart | 28 +- .../prescription_entity_model.dart | 145 ++ .../Prescriptions/prescription_model.dart | 154 +-- .../Prescriptions/prescription_req_model.dart | 10 +- .../model}/SOAP/Allergy_model.dart | 0 .../GetChiefComplaintReqModel.dart | 0 .../GetChiefComplaintResModel.dart | 0 .../model}/SOAP/GeneralGetReqForSOAP.dart | 0 .../model}/SOAP/GetAllergiesResModel.dart | 0 .../model}/SOAP/GetAssessmentReqModel.dart | 0 .../model}/SOAP/GetAssessmentResModel.dart | 0 .../SOAP/GetGetProgressNoteReqModel.dart | 0 .../SOAP/GetGetProgressNoteResModel.dart | 0 .../model}/SOAP/GetHistoryReqModel.dart | 0 .../model}/SOAP/GetHistoryResModel.dart | 0 .../SOAP/GetPhysicalExamListResModel.dart | 0 .../model}/SOAP/GetPhysicalExamReqModel.dart | 0 .../model}/SOAP/PatchAssessmentReqModel.dart | 0 .../model}/SOAP/PostEpisodeReqModel.dart | 0 .../SOAP/get_Allergies_request_model.dart | 0 .../GetEpisodeForInpatientReqModel.dart | 0 .../PostEpisodeForInpatientRequestModel.dart | 0 .../model}/SOAP/master_key_model.dart | 0 .../model}/SOAP/order-procedure.dart | 0 .../SOAP/post_allergy_request_model.dart | 0 .../SOAP/post_assessment_request_model.dart | 0 .../post_chief_complaint_request_model.dart | 0 .../SOAP/post_histories_request_model.dart | 0 .../post_physical_exam_request_model.dart | 0 .../post_progress_note_request_model.dart | 0 .../selected_items/my_selected_allergy.dart | 2 +- .../selected_items/my_selected_assement.dart | 2 +- .../my_selected_examination.dart | 2 +- .../selected_items/my_selected_history.dart | 2 +- .../admission_orders_model.dart | 0 .../admission_orders_request_model.dart | 0 ...on_code_for_doctor_app_response_model.dart | 2 +- .../model}/chart_axis_model.dart | 0 .../model}/countriesModel.dart | 0 .../model}/dashboard/dashboard_model.dart | 0 ...cial_clinical_care_List_Respose_Model.dart | 0 ...nical_care_mapping_List_Respose_Model.dart | 0 .../GetDischargeSummaryReqModel.dart | 0 .../GetDischargeSummaryResModel.dart | 0 .../model}/doctor/clinic_model.dart | 0 .../model}/doctor/doctor_profile_model.dart | 0 ...list_doctor_working_hours_table_model.dart | 0 .../list_gt_my_patients_question_model.dart | 0 .../model}/doctor/profile_req_Model.dart | 0 .../request_create_doctor_response.dart | 0 .../doctor/replay/request_doctor_reply.dart | 0 .../request_add_referred_doctor_remarks.dart | 0 .../model}/doctor/request_schedule.dart | 0 .../statstics_for_certain_doctor_request.dart | 0 .../model}/doctor/user_model.dart | 0 .../verify_referral_doctor_remarks.dart | 0 lib/core/model/labs/patient_lab_orders.dart | 2 + .../model}/livecare/end_call_req.dart | 0 .../model}/livecare/get_panding_req_list.dart | 0 .../model}/livecare/get_pending_res_list.dart | 0 .../model}/livecare/session_status_model.dart | 0 .../model}/livecare/start_call_req.dart | 0 .../model}/livecare/start_call_res.dart | 0 .../model}/livecare/transfer_to_admin.dart | 0 lib/core/model/note/CreateNoteModel.dart | 6 +- lib/core/model/note/note_model.dart | 11 +- .../model/note/stp_master_list_req_model.dart | 32 + .../model/note/stp_master_list_res_model.dart | 22 + lib/core/model/note/update_note_model.dart | 6 +- ...update_operation_report_request_model.dart | 0 .../get_operation_details_request_modle.dart | 0 .../get_operation_details_response_modle.dart | 0 .../get_reservations_request_model.dart | 0 .../get_reservations_response_model.dart | 0 .../MedicalReport/MedicalReportTemplate.dart | 0 .../MedicalReport/MeidcalReportModel.dart | 0 .../model}/patient/PatientArrivalEntity.dart | 0 .../get_clinic_by_project_id_request.dart | 0 .../get_doctor_by_clinic_id_request.dart | 0 ...t_list_stp_referral_frequency_request.dart | 0 .../patient/get_pending_patient_er_model.dart | 0 .../patient/insurance_aprovals_request.dart | 0 .../lab_orders/lab_orders_req_model.dart | 0 .../lab_orders/lab_orders_res_model.dart | 0 .../model}/patient/lab_result/lab_result.dart | 0 .../lab_result/lab_result_req_model.dart | 0 .../patient/my_referral/PendingReferral.dart | 0 .../patient/my_referral/clinic-doctor.dart | 0 .../my_referral_patient_model.dart | 0 .../my_referred_patient_model.dart | 0 .../model}/patient/orders_request.dart | 0 .../model}/patient/patiant_info_model.dart | 5 +- ...et_patient_arrival_list_request_model.dart | 0 .../model}/patient/patient_model.dart | 0 .../prescription/prescription_report.dart | 0 .../prescription_report_for_in_patient.dart | 0 .../prescription/prescription_req_model.dart | 0 .../prescription/prescription_res_model.dart | 4 - .../request_prescription_report.dart | 0 .../model}/patient/progress_note_request.dart | 0 .../radiology/radiology_req_model.dart | 0 .../radiology/radiology_res_model.dart | 0 ...st_prescription_report_for_in_patient.dart | 0 .../patient/refer_to_doctor_request.dart | 0 .../request_my_referral_patient_model.dart | 0 .../patient/topten_users_res_model.dart | 2 +- .../vital_sign/patient-vital-sign-data.dart | 0 .../patient-vital-sign-history.dart | 0 .../vital_sign/vital_sign_req_model.dart | 0 .../vital_sign/vital_sign_res_model.dart | 0 .../pending_order_request_model.dart | 0 .../pending_orders/pending_orders_model.dart | 0 .../pharmacies_List_request_model.dart | 0 .../pharmacies_items_request_model.dart | 0 .../accept_or_reject_req_model.dart | 66 + .../accept_or_reject_res_model.dart | 4 + ...rvention_medication_history_req_model.dart | 32 + ...rvention_medication_history_res_model.dart | 96 ++ .../new_medication_req_model.dart | 25 + .../new_medication_res_model.dart | 100 ++ .../sickleave/add_sickleave_request.dart | 0 .../sickleave/extend_sick_leave_request.dart | 0 .../sickleave/get_all_sickleave_response.dart | 0 .../sick_leave_statisitics_model.dart | 0 .../vte_assessment_req_model.dart | 22 + .../vte_assessment_res_model.dart | 48 + lib/core/service/VideoCallService.dart | 10 +- lib/core/service/authentication_service.dart | 6 +- lib/core/service/base/base_service.dart | 4 +- lib/core/service/base/lookup-service.dart | 4 +- lib/core/service/home/dasboard_service.dart | 2 +- .../service/home/doctor_reply_service.dart | 8 +- lib/core/service/home/scan_qr_service.dart | 2 +- lib/core/service/home/schedule_service.dart | 4 +- .../patient/DischargedPatientService.dart | 2 +- .../patient/LiveCarePatientServices.dart | 8 +- .../patient/MyReferralPatientService.dart | 2 +- .../service/patient/out_patient_service.dart | 2 +- .../patient-doctor-referral-service.dart | 16 +- .../patient/patientInPatientService.dart | 2 +- lib/core/service/patient/patient_service.dart | 52 +- .../profile/discharge_summary_servive.dart | 4 +- .../intervention_medication_service.dart | 66 + .../profile/operation_report_servive.dart | 10 +- .../profile/vte_assessment_service.dart | 30 + .../patient/referral_patient_service.dart | 6 +- .../insurance/InsuranceCardService.dart | 4 +- .../lab_order/labs_service.dart | 2 +- .../PatientMedicalReportService.dart | 6 +- .../medical_report/medical_file_service.dart | 5 +- .../prescription/medicine_service.dart | 6 +- .../prescription/prescription_service.dart | 270 +++- .../prescription/prescriptions_service.dart | 238 ---- .../procedure/procedure_service.dart | 17 +- .../radiology/radiology_service.dart | 2 +- .../sick_leave/sickleave_service.dart | 12 +- .../soap/SOAP_service.dart | 50 +- .../ucaf/patient-ucaf-service.dart | 12 +- .../patient-vital-signs-service.dart | 6 +- lib/core/service/pending_order_service.dart | 8 +- .../special_clinic_service.dart | 4 +- .../viewModel/DischargedPatientViewModel.dart | 2 +- lib/core/viewModel/InsuranceViewModel.dart | 2 +- .../viewModel/LiveCarePatientViewModel.dart | 8 +- .../PatientMedicalReportViewModel.dart | 6 +- .../viewModel/PatientSearchViewModel.dart | 6 +- lib/core/viewModel/SOAP_view_model.dart | 56 +- .../viewModel/authentication_view_model.dart | 8 +- lib/core/viewModel/base_view_model.dart | 2 +- lib/core/viewModel/dashboard_view_model.dart | 6 +- .../viewModel/doctor_replay_view_model.dart | 6 +- lib/core/viewModel/labs_view_model.dart | 2 +- lib/core/viewModel/livecare_view_model.dart | 12 +- lib/core/viewModel/medicine_view_model.dart | 260 +++- .../viewModel/patient-referral-viewmodel.dart | 14 +- .../viewModel/patient-ucaf-viewmodel.dart | 12 +- .../patient-vital-sign-viewmodel.dart | 6 +- lib/core/viewModel/patient_view_model.dart | 57 +- .../viewModel/pednding_orders_view_model.dart | 4 +- .../prescription_view_model.dart | 206 +-- .../viewModel/prescriptions_view_model.dart | 163 --- lib/core/viewModel/procedure_View_model.dart | 20 +- .../profile/discharge_summary_view_model.dart | 4 +- .../intervention_medication_view_model.dart | 147 ++ .../profile/operation_report_view_model.dart | 8 +- .../pharmacy_intervention_view_model.dart | 45 + .../profile/vte_assessment_view_model.dart | 37 + lib/core/viewModel/project_view_model.dart | 4 +- lib/core/viewModel/radiology_view_model.dart | 2 +- lib/core/viewModel/referral_view_model.dart | 2 +- lib/core/viewModel/scan_qr_view_model.dart | 2 +- lib/core/viewModel/schedule_view_model.dart | 2 +- lib/core/viewModel/sick_leave_view_model.dart | 8 +- lib/landing_page.dart | 17 +- lib/locator.dart | 15 +- lib/routes.dart | 15 +- .../doctor_replay/doctor_repaly_chat.dart | 2 +- .../doctor_replay/doctor_reply_screen.dart | 12 +- .../doctor_replay/doctor_reply_widget.dart | 11 +- lib/screens/doctor/my_schedule_screen.dart | 2 +- .../doctor/patient_arrival_screen.dart | 2 +- .../home/dashboard_referral_patient.dart | 2 +- .../home/dashboard_slider-item-widget.dart | 2 +- lib/screens/home/dashboard_swipe_widget.dart | 2 +- lib/screens/home/home_screen.dart | 38 +- lib/screens/live_care/end_call_screen.dart | 8 +- .../live-care_transfer_to_admin.dart | 12 +- .../live_care/live_care_patient_screen.dart | 2 +- lib/screens/live_care/panding_list.dart | 2 +- lib/screens/live_care/video_call.dart | 6 +- .../medical-file/health_summary_page.dart | 4 +- .../medical-file/medical_file_details.dart | 4 +- .../medicine/medicine_search_screen.dart | 271 ++-- .../medicine/pharmacies_list_screen.dart | 367 ++--- .../add_patient_sick_leave_screen.dart | 8 +- .../patient_sick_leave_screen.dart | 4 +- lib/screens/patients/ECGPage.dart | 4 +- .../patients/In_patient/InPatientHeader.dart | 2 +- .../In_patient/in_patient_screen.dart | 13 +- .../ReferralDischargedPatientDetails.dart | 4 +- .../insurance_approval_screen_patient.dart | 4 +- .../patients/insurance_approvals_details.dart | 10 +- .../out_patient/filter_date_page.dart | 4 +- .../out_patient/out_patient_screen.dart | 13 +- ...t_patient_prescription_details_screen.dart | 4 +- .../patient_search_result_screen.dart | 2 +- .../patient_search/patient_search_screen.dart | 2 +- .../profile/UCAF/UCAF-detail-screen.dart | 11 +- .../profile/UCAF/UCAF-input-screen.dart | 6 +- .../profile/UCAF/page-stepper-widget.dart | 16 +- .../profile/UCAF/ucaf_pager_screen.dart | 4 +- .../admission_orders_screen.dart | 4 +- .../admission-request-first-screen.dart | 4 +- .../admission-request-third-screen.dart | 4 +- .../admission-request_second-screen.dart | 4 +- .../diabetic_chart/diabetic_chart.dart | 4 +- ...iabetic_details_blood_pressurewideget.dart | 2 +- .../profile/diagnosis/diagnosis_screen.dart | 4 +- .../all_discharge_summary.dart | 2 +- .../discharge_Summary_widget.dart | 2 +- .../discharge_summary/discharge_summary.dart | 4 +- .../pending_discharge_summary.dart | 2 +- .../profile/lab_result/FlowChartPage.dart | 2 +- .../lab_result/LabResultHistoryPage.dart | 4 +- .../profile/lab_result/LabResultWidget.dart | 2 +- .../Lab_Result_details_wideget.dart | 6 - .../all_lab_special_result_page.dart | 4 +- .../lab_result/lab_result_secreen.dart | 5 +- .../lab_result/laboratory_result_page.dart | 4 +- .../lab_result/laboratory_result_widget.dart | 2 +- .../profile/lab_result/labs_home_page.dart | 6 +- .../special_lab_result_details_page.dart | 4 +- .../AddVerifyMedicalReport.dart | 8 +- .../MedicalReportDetailPage.dart | 6 +- .../medical_report/MedicalReportPage.dart | 4 +- .../notes/note/progress_note_screen.dart | 28 +- .../profile/notes/note/update_note.dart | 421 +++--- .../nursing_note/nursing_note_screen.dart | 4 +- .../operation_report/operation_report.dart | 4 +- .../update_operation_report.dart | 14 +- .../pending_orders/pending_orders_screen.dart | 4 +- .../intervention_medication.dart | 206 +++ ...ntervention_medication_history_screen.dart | 299 +++++ .../pharmacy_intervention_screen.dart | 262 ++++ ...n_patient_prescription_details_screen.dart | 2 +- ...out_patient_prescription_details_item.dart | 2 +- ...l.dart => patient_profile_card_model.dart} | 0 .../patient_profile_screen.dart | 8 +- .../profile_gird_for_InPatient.dart | 25 +- .../profile_gird_for_other.dart | 10 +- .../profile_gird_for_search.dart | 10 +- .../radiology/radiology_details_page.dart | 6 +- .../radiology/radiology_home_page.dart | 4 +- .../referral/AddReplayOnReferralPatient.dart | 10 +- .../referral/my-referral-detail-screen.dart | 2 +- .../referral/patient_referral_screen.dart | 17 +- .../refer-patient-screen-in-patient.dart | 14 +- .../referral/refer-patient-screen.dart | 13 +- .../referral_patient_detail_in-paint.dart | 4 +- .../referral/referred-patient-screen.dart | 50 +- .../referred_patient_detail_in-paint.dart | 7 +- .../assessment/add_assessment_details.dart | 12 +- .../assessment/update_assessment_page.dart | 563 ++++---- .../objective/add_examination_page.dart | 4 +- .../objective/add_examination_widget.dart | 4 +- .../objective/examination_item_card.dart | 2 +- .../examinations_list_search_widget.dart | 4 +- .../objective/update_objective_page.dart | 10 +- .../soap_update/plan/update_plan_page.dart | 10 +- .../shared_soap_widgets/SOAP_step_header.dart | 2 +- .../bottom_sheet_dialog_button.dart | 4 +- .../steper/status_Label.dart | 6 +- .../steper/steps_widget.dart | 15 +- .../profile/soap_update/soap_utils.dart | 8 +- .../subjective/allergies/add_allergies.dart | 4 +- .../subjective/allergies/allergies_item.dart | 4 +- ..._key_checkbox_search_allergies_widget.dart | 4 +- .../allergies/update_allergies_widget.dart | 2 +- .../history/add_history_dialog.dart | 4 +- .../history/update_history_widget.dart | 4 +- .../subjective/medication/add_medication.dart | 2 +- .../medication/update_medication_widget.dart | 2 +- .../subjective/update_subjective_page.dart | 8 +- .../soap_update/update_soap_index.dart | 8 +- .../profile/vital_sign/LineChartCurved.dart | 77 +- .../LineChartCurvedBloodPressure.dart | 68 +- .../vital_sign_detail_pain_scale.dart | 29 +- ...al_sign_details_blood_pressurewideget.dart | 2 +- .../vital_sign/vital_sign_details_screen.dart | 4 +- .../vital_sign_details_wideget.dart | 2 +- .../vital_sign_item_details_screen.dart | 6 +- .../vital_sing_chart_and_detials.dart | 2 +- .../vital_sing_chart_blood_pressure.dart | 2 +- .../vte_assessment/vte_assessment_screen.dart | 282 ++++ .../RegisterConfirmationPatientPage.dart | 2 +- .../register_patient/RegisterPatientPage.dart | 4 +- .../add_drug/add_drug_widget.dart | 146 ++ .../add_drug/drug_to_drug.dart} | 69 +- .../add_prescription/add_prescription.dart | 171 +++ .../prescription_form_widget.dart | 547 ++++++++ .../search_preescription_widget.dart | 137 ++ .../prescription/add_prescription_form.dart | 1177 ----------------- .../prescription/new_prescriptions_page.dart | 180 +++ .../prescription/old_prescriptions_page.dart | 234 ++++ .../prescription_authorazation_form.dart | 1 - .../prescription_checkout_screen.dart | 81 +- .../prescription_details_page.dart | 168 --- .../prescription_item_in_patient_page.dart | 235 ---- .../prescription/prescription_items_page.dart | 373 ------ .../prescription/prescription_text_filed.dart | 2 +- .../prescription/prescription_warnings.dart | 168 --- .../preacription_items_widget.dart | 157 +++ .../prescription_items_in_patient.dart | 187 +++ .../prescription_items_out_patient.dart | 74 ++ .../prescription/prescriptions_page.dart | 218 --- .../update_prescription_form.dart | 1060 --------------- .../procedures/ExpansionProcedure.dart | 19 +- lib/screens/procedures/ProcedureCard.dart | 4 +- .../procedures/add-favourite-procedure.dart | 196 ++- .../procedures/add-procedure-page.dart | 5 +- .../base_add_procedure_tab_page.dart | 251 ++-- .../entity_list_checkbox_search_widget.dart | 4 +- .../procedures/entity_list_fav_procedure.dart | 120 +- .../procedures/procedure_checkout_screen.dart | 6 +- lib/screens/procedures/procedure_screen.dart | 6 +- lib/screens/procedures/update-procedure.dart | 8 +- lib/util/VideoChannel.dart | 2 +- lib/util/date-utils.dart | 6 +- lib/util/helpers.dart | 102 +- lib/util/tab_helper.dart | 113 ++ lib/util/translations_delegate_base.dart | 234 ++-- lib/widgets/dashboard/out_patient_stack.dart | 2 +- lib/widgets/doctor/lab_result_widget.dart | 2 +- .../doctor/my_referral_patient_widget.dart | 2 +- lib/widgets/doctor/my_schedule_widget.dart | 69 +- .../medicine/medicine_item_widget.dart | 98 +- lib/widgets/patients/dynamic_elements.dart | 166 --- .../patient-referral-item-widget.dart | 129 +- .../patients/patient_card/PatientCard.dart | 2 +- .../patients/patient_card/ShowTimer.dart | 2 +- .../profile/PatientProfileButton.dart | 2 +- .../profile/Profile_general_info_Widget.dart | 2 +- .../patients/profile/app_bar/header_row.dart | 44 + .../patient-profile-app-bar.dart | 55 +- ...ent-profile-header-new-design-app-bar.dart | 5 +- .../prescription_in_patinets_widget.dart | 2 +- .../prescription_out_patinets_widget.dart | 2 +- .../profile/profile_medical_info_widget.dart | 4 +- ...rofile_medical_info_widget_in_patient.dart | 11 +- .../profile_medical_info_widget_search.dart | 4 +- .../patients/vital_sign_details_wideget.dart | 2 +- lib/widgets/shared/app_scaffold_widget.dart | 3 +- .../shared/charts/app_time_series_chart.dart | 2 +- .../shared/dialogs/dailog-list-select.dart | 7 +- .../shared/dialogs/master_key_dailog.dart | 2 +- lib/widgets/shared/doctor_card.dart | 8 + lib/widgets/shared/doctor_card_insurance.dart | 6 +- .../master_key_checkbox_search_widget.dart | 2 +- .../app_text_field_custom_serach.dart | 5 +- .../shared/text_fields/html_rich_editor.dart | 2 +- .../shared/text_fields/new_text_Field.dart | 237 ---- lib/widgets/shared/user-guid/CusomRow.dart | 3 + pubspec.lock | 107 +- pubspec.yaml | 1 + 390 files changed, 6982 insertions(+), 6945 deletions(-) create mode 100644 assets/images/dr_avatar.png create mode 100644 lib/core/model/Prescriptions/prescription_entity_model.dart rename lib/{models => core/model}/SOAP/Allergy_model.dart (100%) rename lib/{models => core/model}/SOAP/ChiefComplaint/GetChiefComplaintReqModel.dart (100%) rename lib/{models => core/model}/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart (100%) rename lib/{models => core/model}/SOAP/GeneralGetReqForSOAP.dart (100%) rename lib/{models => core/model}/SOAP/GetAllergiesResModel.dart (100%) rename lib/{models => core/model}/SOAP/GetAssessmentReqModel.dart (100%) rename lib/{models => core/model}/SOAP/GetAssessmentResModel.dart (100%) rename lib/{models => core/model}/SOAP/GetGetProgressNoteReqModel.dart (100%) rename lib/{models => core/model}/SOAP/GetGetProgressNoteResModel.dart (100%) rename lib/{models => core/model}/SOAP/GetHistoryReqModel.dart (100%) rename lib/{models => core/model}/SOAP/GetHistoryResModel.dart (100%) rename lib/{models => core/model}/SOAP/GetPhysicalExamListResModel.dart (100%) rename lib/{models => core/model}/SOAP/GetPhysicalExamReqModel.dart (100%) rename lib/{models => core/model}/SOAP/PatchAssessmentReqModel.dart (100%) rename lib/{models => core/model}/SOAP/PostEpisodeReqModel.dart (100%) rename lib/{models => core/model}/SOAP/get_Allergies_request_model.dart (100%) rename lib/{models => core/model}/SOAP/in_patient/GetEpisodeForInpatientReqModel.dart (100%) rename lib/{models => core/model}/SOAP/in_patient/PostEpisodeForInpatientRequestModel.dart (100%) rename lib/{models => core/model}/SOAP/master_key_model.dart (100%) rename lib/{models => core/model}/SOAP/order-procedure.dart (100%) rename lib/{models => core/model}/SOAP/post_allergy_request_model.dart (100%) rename lib/{models => core/model}/SOAP/post_assessment_request_model.dart (100%) rename lib/{models => core/model}/SOAP/post_chief_complaint_request_model.dart (100%) rename lib/{models => core/model}/SOAP/post_histories_request_model.dart (100%) rename lib/{models => core/model}/SOAP/post_physical_exam_request_model.dart (100%) rename lib/{models => core/model}/SOAP/post_progress_note_request_model.dart (100%) rename lib/{models => core/model}/SOAP/selected_items/my_selected_allergy.dart (86%) rename lib/{models => core/model}/SOAP/selected_items/my_selected_assement.dart (88%) rename lib/{models => core/model}/SOAP/selected_items/my_selected_examination.dart (87%) rename lib/{models => core/model}/SOAP/selected_items/my_selected_history.dart (74%) rename lib/{models => core/model}/admisson_orders/admission_orders_model.dart (100%) rename lib/{models => core/model}/admisson_orders/admission_orders_request_model.dart (100%) rename lib/{models => core/model}/chart_axis_model.dart (100%) rename lib/{models => core/model}/countriesModel.dart (100%) rename lib/{models => core/model}/dashboard/dashboard_model.dart (100%) rename lib/{models => core/model}/dashboard/get_special_clinical_care_List_Respose_Model.dart (100%) rename lib/{models => core/model}/dashboard/get_special_clinical_care_mapping_List_Respose_Model.dart (100%) rename lib/{models => core/model}/discharge_summary/GetDischargeSummaryReqModel.dart (100%) rename lib/{models => core/model}/discharge_summary/GetDischargeSummaryResModel.dart (100%) rename lib/{models => core/model}/doctor/clinic_model.dart (100%) rename lib/{models => core/model}/doctor/doctor_profile_model.dart (100%) rename lib/{models => core/model}/doctor/list_doctor_working_hours_table_model.dart (100%) rename lib/{models => core/model}/doctor/list_gt_my_patients_question_model.dart (100%) rename lib/{models => core/model}/doctor/profile_req_Model.dart (100%) rename lib/{models => core/model}/doctor/replay/request_create_doctor_response.dart (100%) rename lib/{models => core/model}/doctor/replay/request_doctor_reply.dart (100%) rename lib/{models => core/model}/doctor/request_add_referred_doctor_remarks.dart (100%) rename lib/{models => core/model}/doctor/request_schedule.dart (100%) rename lib/{models => core/model}/doctor/statstics_for_certain_doctor_request.dart (100%) rename lib/{models => core/model}/doctor/user_model.dart (100%) rename lib/{models => core/model}/doctor/verify_referral_doctor_remarks.dart (100%) rename lib/{models => core/model}/livecare/end_call_req.dart (100%) rename lib/{models => core/model}/livecare/get_panding_req_list.dart (100%) rename lib/{models => core/model}/livecare/get_pending_res_list.dart (100%) rename lib/{models => core/model}/livecare/session_status_model.dart (100%) rename lib/{models => core/model}/livecare/start_call_req.dart (100%) rename lib/{models => core/model}/livecare/start_call_res.dart (100%) rename lib/{models => core/model}/livecare/transfer_to_admin.dart (100%) create mode 100644 lib/core/model/note/stp_master_list_req_model.dart create mode 100644 lib/core/model/note/stp_master_list_res_model.dart rename lib/{models => core/model}/operation_report/create_update_operation_report_request_model.dart (100%) rename lib/{models => core/model}/operation_report/get_operation_details_request_modle.dart (100%) rename lib/{models => core/model}/operation_report/get_operation_details_response_modle.dart (100%) rename lib/{models => core/model}/operation_report/get_reservations_request_model.dart (100%) rename lib/{models => core/model}/operation_report/get_reservations_response_model.dart (100%) rename lib/{models => core/model}/patient/MedicalReport/MedicalReportTemplate.dart (100%) rename lib/{models => core/model}/patient/MedicalReport/MeidcalReportModel.dart (100%) rename lib/{models => core/model}/patient/PatientArrivalEntity.dart (100%) rename lib/{models => core/model}/patient/get_clinic_by_project_id_request.dart (100%) rename lib/{models => core/model}/patient/get_doctor_by_clinic_id_request.dart (100%) rename lib/{models => core/model}/patient/get_list_stp_referral_frequency_request.dart (100%) rename lib/{models => core/model}/patient/get_pending_patient_er_model.dart (100%) rename lib/{models => core/model}/patient/insurance_aprovals_request.dart (100%) rename lib/{models => core/model}/patient/lab_orders/lab_orders_req_model.dart (100%) rename lib/{models => core/model}/patient/lab_orders/lab_orders_res_model.dart (100%) rename lib/{models => core/model}/patient/lab_result/lab_result.dart (100%) rename lib/{models => core/model}/patient/lab_result/lab_result_req_model.dart (100%) rename lib/{models => core/model}/patient/my_referral/PendingReferral.dart (100%) rename lib/{models => core/model}/patient/my_referral/clinic-doctor.dart (100%) rename lib/{models => core/model}/patient/my_referral/my_referral_patient_model.dart (100%) rename lib/{models => core/model}/patient/my_referral/my_referred_patient_model.dart (100%) rename lib/{models => core/model}/patient/orders_request.dart (100%) rename lib/{models => core/model}/patient/patiant_info_model.dart (99%) rename lib/{models => core/model}/patient/patient_arrival/get_patient_arrival_list_request_model.dart (100%) rename lib/{models => core/model}/patient/patient_model.dart (100%) rename lib/{models => core/model}/patient/prescription/prescription_report.dart (100%) rename lib/{models => core/model}/patient/prescription/prescription_report_for_in_patient.dart (100%) rename lib/{models => core/model}/patient/prescription/prescription_req_model.dart (100%) rename lib/{models => core/model}/patient/prescription/prescription_res_model.dart (97%) rename lib/{models => core/model}/patient/prescription/request_prescription_report.dart (100%) rename lib/{models => core/model}/patient/progress_note_request.dart (100%) rename lib/{models => core/model}/patient/radiology/radiology_req_model.dart (100%) rename lib/{models => core/model}/patient/radiology/radiology_res_model.dart (100%) rename lib/{models => core/model}/patient/reauest_prescription_report_for_in_patient.dart (100%) rename lib/{models => core/model}/patient/refer_to_doctor_request.dart (100%) rename lib/{models => core/model}/patient/request_my_referral_patient_model.dart (100%) rename lib/{models => core/model}/patient/topten_users_res_model.dart (87%) rename lib/{models => core/model}/patient/vital_sign/patient-vital-sign-data.dart (100%) rename lib/{models => core/model}/patient/vital_sign/patient-vital-sign-history.dart (100%) rename lib/{models => core/model}/patient/vital_sign/vital_sign_req_model.dart (100%) rename lib/{models => core/model}/patient/vital_sign/vital_sign_res_model.dart (100%) rename lib/{models => core/model}/pending_orders/pending_order_request_model.dart (100%) rename lib/{models => core/model}/pending_orders/pending_orders_model.dart (100%) rename lib/{models => core/model}/pharmacies/pharmacies_List_request_model.dart (100%) rename lib/{models => core/model}/pharmacies/pharmacies_items_request_model.dart (100%) create mode 100644 lib/core/model/pharmacy-intervention-model/accept_or_reject_req_model.dart create mode 100644 lib/core/model/pharmacy-intervention-model/accept_or_reject_res_model.dart create mode 100644 lib/core/model/pharmacy-intervention-model/intervention_medication_history_req_model.dart create mode 100644 lib/core/model/pharmacy-intervention-model/intervention_medication_history_res_model.dart create mode 100644 lib/core/model/pharmacy-intervention-model/new_medication_req_model.dart create mode 100644 lib/core/model/pharmacy-intervention-model/new_medication_res_model.dart rename lib/{models => core/model}/sickleave/add_sickleave_request.dart (100%) rename lib/{models => core/model}/sickleave/extend_sick_leave_request.dart (100%) rename lib/{models => core/model}/sickleave/get_all_sickleave_response.dart (100%) rename lib/{models => core/model}/sickleave/sick_leave_statisitics_model.dart (100%) create mode 100644 lib/core/model/vte_assessment/vte_assessment_req_model.dart create mode 100644 lib/core/model/vte_assessment/vte_assessment_res_model.dart create mode 100644 lib/core/service/patient/profile/intervention_medication_service.dart create mode 100644 lib/core/service/patient/profile/vte_assessment_service.dart delete mode 100644 lib/core/service/patient_medical_file/prescription/prescriptions_service.dart rename lib/core/viewModel/{ => prescription}/prescription_view_model.dart (53%) delete mode 100644 lib/core/viewModel/prescriptions_view_model.dart create mode 100644 lib/core/viewModel/profile/intervention_medication_view_model.dart create mode 100644 lib/core/viewModel/profile/pharmacy_intervention_view_model.dart create mode 100644 lib/core/viewModel/profile/vte_assessment_view_model.dart create mode 100644 lib/screens/patients/profile/pharmacy-intervention/intervention_medication.dart create mode 100644 lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart create mode 100644 lib/screens/patients/profile/pharmacy-intervention/pharmacy_intervention_screen.dart rename lib/screens/patients/profile/profile_screen/{PatientProfileCardModel.dart => patient_profile_card_model.dart} (100%) create mode 100644 lib/screens/patients/profile/vte_assessment/vte_assessment_screen.dart create mode 100644 lib/screens/prescription/add_prescription/add_drug/add_drug_widget.dart rename lib/screens/prescription/{drugtodrug.dart => add_prescription/add_drug/drug_to_drug.dart} (66%) create mode 100644 lib/screens/prescription/add_prescription/add_prescription.dart create mode 100644 lib/screens/prescription/add_prescription/prescription_form_widget.dart create mode 100644 lib/screens/prescription/add_prescription/search_preescription_widget.dart delete mode 100644 lib/screens/prescription/add_prescription_form.dart create mode 100644 lib/screens/prescription/new_prescriptions_page.dart create mode 100644 lib/screens/prescription/old_prescriptions_page.dart delete mode 100644 lib/screens/prescription/prescription_authorazation_form.dart delete mode 100644 lib/screens/prescription/prescription_details_page.dart delete mode 100644 lib/screens/prescription/prescription_item_in_patient_page.dart delete mode 100644 lib/screens/prescription/prescription_items_page.dart delete mode 100644 lib/screens/prescription/prescription_warnings.dart create mode 100644 lib/screens/prescription/prescriptions_items/preacription_items_widget.dart create mode 100644 lib/screens/prescription/prescriptions_items/prescription_items_in_patient.dart create mode 100644 lib/screens/prescription/prescriptions_items/prescription_items_out_patient.dart delete mode 100644 lib/screens/prescription/prescriptions_page.dart delete mode 100644 lib/screens/prescription/update_prescription_form.dart create mode 100644 lib/util/tab_helper.dart delete mode 100644 lib/widgets/patients/dynamic_elements.dart create mode 100644 lib/widgets/patients/profile/app_bar/header_row.dart rename lib/widgets/patients/profile/{ => app_bar}/patient-profile-app-bar.dart (94%) rename lib/widgets/patients/profile/{ => app_bar}/patient-profile-header-new-design-app-bar.dart (98%) delete mode 100644 lib/widgets/shared/text_fields/new_text_Field.dart diff --git a/android/app/build.gradle b/android/app/build.gradle index ab88f580..44cefae1 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 30 + compileSdkVersion 31 // signingConfigs { // release { diff --git a/android/build.gradle b/android/build.gradle index ae74fcf6..cd7010e5 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlin_version = '1.3.50' + ext.kotlin_version = '1.5.20' repositories { google() jcenter() diff --git a/assets/images/dr_avatar.png b/assets/images/dr_avatar.png new file mode 100644 index 0000000000000000000000000000000000000000..693ebd7a0c23eda1454c7997115dc94092832a75 GIT binary patch literal 38543 zcmZsCcRbba`~M-5tRj0RBiSRu$syURD6+GntPswzPMKwotgNC)lD)^FGL9L_<{0M~ z*~dJb@q6+9e1E^s=kxpiBOcx3y081Xuj_d|uj}>Zo}m`qMUIOg5Qt7k`>rtvL=OB) z4!Uq2_-7CL`xpdDGu64P_5eD$(L!x?#jNoVaz2)#p)Z)UJFD!I?q93yHQY-5ni?}+W1Z$ zP`vpq^4nkDyun?awoS>sVw2^Q2Y(a?aevCTBP4_7X>5TeZ}RyfyR|0Q)?@~pJIjc`Jj8eh7&Kz3Ng`(UyX{_9>*x)-So z-loAFOcyL3%)pv{J*@J2O6BU-dqfP;uqG|%2SF_3r0&(#Rm{xIVl$=l+~AX_3RhYD z^Pu)K$*Sl*B_=O^pBh>}2i^v!vR=|^4jmbXxUd~~K6CH55H~875R=2fo%Ly$UE(>U zY~ z5Jf`7;KlsX6yEdT?JLN@t*o-ixHq?nRGYd@H2yWoYHZ`yp44KVE}hu2A% z{b2e~n0}kC;42+{&tx!kuZnX^{#Wg<3h8QhISazC_djXioQTD3UYDs4q*qkAYtVSS zcYyKnh5VdhKjcEEn_ zjs0h>LNn#k0%6=mb~lu$maPxeNx;P|!+<4^Y4VuD6V8@&>?)}H_HZ?lH0sE9{`s)Q z`ymd-Ke4m#4Hti=n)1Ik{!YkpkU`H<<-&4xyZ*+xf4kXdwn|G-m)VEAAKxM)u!FbV zWII|D2PF0|`7L}ahl96{Vt^}S=#mx`0%j--26txF$ z#nQG{B^;tN*bG0{9H-vUMEU zWJPV}(6XJkyyEP7-Fsp#ieh?3=34!ABjMuLy^;qAYto|U6lyqns(n>*+akVe1^#PgPf0@L!Y3c4aQ_R> zTVEAP@jzZ}o2!xk>KqLZJ1~&BBqtB8T#S1&xWmgC72#%5!kPpd8+R@EvzPS0C0I`tY0_*>>%IY@1dhs9MV* zYh`V1o|VXwv*!OTBKhqWj_u&-0S_;X>vc6<7*u+`1& z>_7Qxg*s&Jl+-U7I5@%ni$i4T19MB^h@_?)C9j&>Tn%z{ix4^rn!_tSC`<}jHe#-U zdeAlzbTs~MPgoz6En@aMj4HPpd}s2PO!>1?JMo!PdMx>%IPAslHBH2mzW8;I7d6zt zeioTs!k|{uV2^;5^v7|0Xa<{-U6(gzhR3}RXf3HHUJ48ISi3VqxAA|IvKV~ZpdcI3 z9lS>WJd*%uHW30XMRGD`EtU+gB8FFJVTp9m=((p8*_R6K%Ogcxqjo^eEa*3uEyCI$ zKKQmpgaZGK4e^^Mt+U^BgMhK#3(}DR66}xE^$Z-qph0)2;pX-5&hvv;XWt`fNWtr^ zOzrJD5k*%yx53dxP6-i?sTE&R+4$Jpvv05Ps?ef>ADFk1+KDTz2IU{7| zl~G4|mvlxLl}+!?ZzcIWkMM|{i(svvo?lL`HEJjFa&R_l)*aVG9zIke*wHQlo;Vt; znWyaM>}LclHE|X0d7t{_V~8Cbctv}na$&)iKgu)NfS52C3~i@Qm(g+`@#}z6=F;JI zPY92UK>CsgH?0XL1r@im05@slxfjbDCJCKu;5I51H=?(rEwjg;8;l*C%Je&Ncdgk& ztahjrmcSwHv)^6Z7#1TOS8SKgXRDuXU}V~S%QBGuF@E=YZi2|aUSudm8$;ZNdGljy z9B}3zDoVR-r^_P~iiTH7?F9cirNzlSDI!d6a18CE^6&32klyIWTb%2QNM?>m0{hvd zJS|u6&%W!)B06Ry>czaSo&W#k-3~hqbiZTml}=XW9l5#C~c2j;&C|z0~oXW+k(I@#=UnT7r{riU2${OC<9c@ zWG#3hPTbPwbL~RHi^@yq^|sq~!8Z54e+p9{TMwaLEVhRQk~!wtjoVmi9#X~zPzqmRmpU6_yc5bqqu1rpdrYw?3oPWPKAVVhh4VsJ z77S@U=76YP0)4f^>Oj6!c48Demy->DX>z!=GZeO}<$(1N-r&72tz9)-4FI31*6 zW2YTSbc!9UT-frU!W4p;Xj~T@?c&QIRQ|uOvEw;^-ErkCJgKu_mo<}pLBaE zasYLrJ85*quCsGzV(B|iOqX%*f(C>^v$eUGk1jC2JaAbzO@uhG=_+iupUHzvWqtc# zPdmp{{=#B#$^Y_rEYnz7{BhR#foWXx4kC*^7um9@{2 z0U8oXEgEI_aLI@s*w%{KKB8zF`!Zu20-WGHuCk;0$7egL7aDT#_GCZw zbj;Nf>>!6Gocio&%MIWkFkj=Hy!ixEwBn5rxmpKs&FFS(^bqPF(O^oFw;Jk0evhu_ zZfmXW{<;;xh-nRTNT?;UV#b0=isWu9`q10#Nr2S_BvqTJkTZB zv%;Y025ZXsYu&cB&0fm`H4oRuUHx@T7?g3 zgyMgV^Oxa$Bg<|o5l9P;Kn&Y%ONrFd`&8n)&ev_rhzpF-1yP((15rZb>&{q(!_8PC z>%Sx##sWSD9;^KP#s#du?teWAH%l`jGt=|RFhC`94QUF*wqlX(Bz3H(^W;Wd>7QXz zA?r!THzI)|kfxxbpZREr{mDEU@Rh*hWw&{ZZ;(3bmiVt&;;u%t@DnjK1dhwloQ5f` zS?3QdIUn#DA8eqq%mnhZ9J~-jL9H6tjlh{bVuNXx-gIk2QlFlDObP5kYa=R8y?qb2 zOTWzYvUb#i5SS%H0fe0hd={MY=Vi&%w3+A>rc+&(`NFFEl(sIg$2@WMYw z@=>1sP^j}VYK(4<31nNMqR@iWE7!b)Rq&bOH6xyxjYpru_#>hhDEd4*3DGhh3b83v z1SKLeso_>#lac=jHrNld2!0S%K4J5j?Yj4VE+5%Te81TK4>$O!O2D{n@%k`-t+vSwmoLohqNVPcPXQ5;hBgCZaSWKJasf}CKN`WMiRnNd~oSH0-`gm^-SKLc`xcVNIgxHS|SAPxg#1r z1TP#~C9w)Kof&f_^hPA1NhpkP0UL$Svc<_VmzA&))U);fnT#%evF?90cK%^ED*g{# z*E5^X8b=zDI)3&)1D3pW+I$~A!5{*kH#~0LL#*(th4i#wC3lyVG_D#7ot<}ZuDIqn z#w7V0F(s-8W%+=dZ`^3y_D!6+Lj1j_`|P(e&ysa;OqU>;K5AZ_ln{l?Lv3{hkUtKn zC|muDvh|8n*Teq>-sV42zxbT{ z@p(fb+|HemXyor;b4R~D9vS!#%}SR)-j&dfI}$8O5w50*uq^)WuNlFPJwz_XcOlFh zr;0YmP;6>gY}0JLE}AFasg}|qWkO=MN26mz|apTyU1)`&h8$?R|5Ryq7zDc zu%XMc>y(v><(%g74z!s~-in!(;;%k4Ni0BL0&B)WpB2ifwqp-(;`l6z9d~*<9D80}y9Jou zvKROV?hVzKToY|;uKx@&iCi2}iShv3LY0FeK&$KzQsNvS&$UO5dlBX`?}_1Jk80lP zkNdNAu>!0}L|6ILXW1+Ft|S618Q2NuHd31i#o_8FM{x zQepF-tAy_Ln`=7ScylgW;7!~zDs}1-eb4_5@mVnlK)RMsu?mLA1zDlJcoA|q zKeT^x|A%t7G0^~K+1a9%CizacaKldfbxo}*9N+?QsWd>`40q%VDLL|PkB>&>V0cd> zcU;=-$bl`DX3Dj(vxC-*TD5rUV>^>P7$ZHjj)3a&d%rt>(>m1f>926Ku!kF zp&mhxYp!P4e9acS>?tV+GZ|{Ty|clG-tAtj@^^^d$pDOq9@x^v+SdHOhDN=uv$Il= z@$6t^Wb|hwPy!yKkCQbphypE1gvGpwnm_0b8Uc)*cF zavrD*no^MY_C@_x{6+LuC+`z)O@qLPjjgmfsM}E4x(+XyprHa_S_f?)@(B9ac!7P7 z6^KXdMx}pjKTu-$;0gq(zk8J~FH8^Tf;s(T@5ZlRz-5U;reBF!RE3W6YMp8bmP#{A zfoqzN8v2-asP62W!Vg&$bWAxm=|-LRBzz<~+Ak>XL4aj18-0@9GY!RSlo5Rn8JIGx z@Of%)H2jCmXTs`Uw99qd3M7m&W;9B25>7qicazm|B@15F&OplTe;}pL7=x_+-D>~m z#`k%YN&>fCBEa1!;-|2Y1D7EZfLbKLrLUyxY+vf5x5RIdU0N4j-}<)3*VUDm^J?I) zP}A`zmXx@~#ydp%au-G^CtLYrULZS)DoXl*#}Pul3WInLg3_v=d;q1#h zi(M_?gTH}ssza71%@fY%&H?GhC`F&`VV=j5-hU@_ucq9CE?t3#P$`w1Yzu9Usu3j? z`e(Qz{@Jy7c>gjm=|8>3J(?c)UVO6+AZv%Ek|m{i)9X4X{E0xg$QfstxqXLComJsW zdGEgwDDS6`@Usj_=*sG;T39*!v+vRdQdat1^_(rdaHdU~gdtmQfI3?gV)i5ai%QwN z4qq%Kg)NW0uWDrVY)_Wzp6qDu|B@^4b6WarHw6qkOT7*(7!ue+2xut5cinYu`fMyg zl2l4R+5W8)AzW}DP+Llz&65LD66`=B1el<^$L zuaq9Rv!v-3_0{rq-LnJezihtrPu|7X*KEf5$8`WeP*wG-VLG8M1gqNJ7y-C%<-}jr zqAPH~U0llr2rN~i;kKrh0OHGV8bov1TXOd8IW4|5mZkoQN~Y6Sfvz?K6~Ng}b5N}R z%dr}xEnC;>W49L)hl}Et;B%E8j7^%Ye}@sCt76P&h8kCNQ;PfhlR!119~NN9e*n9C z<+zHx;UKV}C11}JC?)o>=QZtZ6)01FNtP&p0Q6QLbn!5kiyk-C&dHRwSZ25PXT@r> zE33(g3XKx@=8>sCTokl`MR+dcy6riidJ9RZ4=YNg4(D(&=%+6tBY@FJOVS2_W-r0) z&UK@F{F2abW~_;a{T2xJQx4a$o0HeyqoN53z-C0+TS$&vyETFIasU(3jNB3CgR6bi z|7#f1J!u%S!1(g5NL~Ye%TgXLb1Vxy*JQK3Tj;q|(y|aM>R*W3;xBuoMG*v;pWECa z%A!gv)PDCX4*Xk_6GKvMigO&~J(YGbTxDetP_ylPHwCTZ{h11@gJWT zMB?AJjC{eb4vP8@`r}Xvo{LY;jwqWjWOmBoyQ<+%{xi+}X4Ck7h}{%8rKIQNtbRfY z=~Y{uPJ2M=jyZ%GA&%p;{XtOh^)^Z;2J59od^ocv*fa5_&k^WBWdJlyS~Tr%x%XT; zO+Wu&8Aek{5lzP=_MF~eSd6Lo;RW0l8&L+CIg|ciomN(5dAUPUmst2Y##W;izMJ2x zvh_u={p=EbfaHtF_NDZwAO2#OpqwG6w*}@}L}&69 z@6gq(Mju7Thp}{)Yn=4IOANAl#EPyQ)T5C;laU;1@xzdHY+{F10HjhYM4$%N%P*l& zyh=)>CG>J=l4z8|POvMLvUVHrhF&=7s7`wzJLIE_$%SI&>Ua2TSDS_Sp1ku;PX_Sc z1@ru?jvY?*XaWLoJn7mk%- z4BPk340WE58jn(2u3(qLW(~C8ZGS-L`S)fFoF2XClFhw^Pf%8tiT~lW>N4<|(PKmG z(|KKGr1UWSA*H{xDO&V(hOP&XRWCB206 z^Ur)+P0f$3YxzpbXX*Ph5gbGZH2&bl`NQS@H>=I>S^5>@?C7u?ToPxxl zpuxMz;lI8m*P_DFch1gw;gm~xR^o95{rQNSfB~5IsTEr6Tt8icpD1pNbL zy+WMc-xc@0w6`@SP&q>h&eazu261oHPs=`TR|F(+q-X%X<`AWn!h)bo_C6L?#FKL< zA+u{jDS4It)$hJqBSqsgT&5p&4;^IjR4|>svbS~j?-hDujK&DE$D1p(-iyph2G>v? zAM(N6IzvnMViwFo@wm_9(&_7LJJISJ3V{w3X96a&zH1M8uZ`m@BeEadQVPREMVBa= zOo=~i__|o&20W|w)5fFU7G|aqvFq%FcQYHTnoOWG&2j-?jQ4&nK2PlAgi|RD3^O@& zO3JX4tiMa73PZV%KN(9wqssl;KK!v_+-|hqP*8p%dA4Pm8PP+p`;?jx34s;(l2&Ld z7sah*MxdW0KH(F@*zSgOPcKzqmlsFdQys^;%`|Fk`!edfU$q2wf2a?03?9DBs2f9m zb~pCWXE|5fJDMo4|3YF*=_S6*gMhNrS@UHRf7ajf7JbH19G{_oL;f=|i9JtQ4Bq&) zOaNHljhb~bznWkjwUp^Bx0w`8dBY%_rMEqYu z(0?f%h-}wioX27PxOH6xxK-liCbl(W@%{+`ans{XY*+;*XS2AP@sNrFTZKScmn&OV zYC=zY&+J;UxnCj~f90jqP==NAMD@7uA}K;tK&NXWa}`uJ zr|qfzsrUXJ11e&BPir#IhWGb@XN1W?wX}bM8j9mBe#(+qk^AEsi3n|*<2}iD1{vU* zpzuG7st(r1D*p({nhkB(^y#ldq^kZmOazp0%bGWQfNwGX%JiUX?Lh7I?8X&#^g4D( z-uZ+z$|xMaF*l^hXdrBsYpyc0(d%FI<eOcNHBco7NF2!D&yz9 zcJWMid`6`X%D3)SjM@I?QUPe%jj#AsNqT_#5ItSOXXN77p1cs-%hDZg8mbnvELi_+ zGtRpF`+**u2mB4(?zh={XDZH$-*3Ae#^dPUt{qktO_!x#!Sc$%<`Gmtp_PZqh}cX$ z>21s^JCcu&gCxA0)F(Eswp@h^!^ZsjU2`9Jxx0(A>!F%x&Q8^B@^t@Di05;_fMDSM zts5aeh@jK5;4Ns+y!A}$?|gi5?6cZ|XF@kD#(1#)@&1DL#=8`J0gZng-OPe+oS9i_ zkyBIyf#s}}=(YX!$H-=E^>sLhzh9rAvR3mjUvY~AiVw299*)mJGkg4&OD4t7OPZ%b zZnN~77@j#5Z|e_tp8ei#!s6N6>KKECGs@}=hkMX5lj0@W&*SvkMB{Qtuak`{ zd`o$VLrp6kJ{38GVI~3zn_t(`utlhnOzb`&_kw}WEv;`F`c-@+;UvW4*Y}MprvE^K z{QwggJjs0{P~kA^GVUVcUL`q<{B?By$jAq6F^|dgv^P{_@kX2 zN5d-|k3%&ay&buzbsEDL$#PSgC^-I-YZiwrnqrF}W~+O)^K&98tX|hgp0Q6x>8xqn zyO;C zwJM=FVUtmhs~@P0=Akd06+Erhcji3=;m2DXIae8|j55KEBKL6df-Fogsk}tv1mT|R z))eMVpWwJI}QW9odzSSu&n0?vu+-plkuH&WNgHM z?hCV?E+3fQrcT*ld=`5wu?&D?XQncmXwC?yjiGLvnW4$m77Y}3+#sLL`S?5rTQ(`5 zpl_%9D^Cz@FpW%XxTfMRM z@?$7)=7CG^M>)~}9c7&cBATYrOasv0x&gQG9R_TAt{HD#=K@zOchvAup5Q{nN0t=! z5h0Ge#ky*I7Iw)8+16M5!Exb0ZjFh?E9iD|(UTq)#s62Jl(6jF!$qefLnB^G8TREo?4*ZjqV zMn+-)+2;(*IW<^<4p{5n!mo99!TGDgTKQ2PlR9^d%NC9TZb=HLlOl8eH?m)$m#tpk zQJg;4dB>jdMO-o{Ann|Xbu`_Y3QwvNr5VZ?Q=gjtI`6?m(j% z7yH*`uG;e+!eX8Sx^aGF*Ttps?=`Xs>xl2)yJer{%%2C2urn&ad+og8T{_IuI{j;h z!}+H?0*cpSM4QO!S1MdJ90Oc%A}Kc0#7P9;_Zosxb1J=8WV}2j;>)yl_Qu?9pO-?S z{-ZMeXxiu&&=1qzzH2orQ25quCQFsx(^6|dL-MNI9RakY^wyJg??rw1aWh=co+THj z_cKd6Fp?i2%@q6{J+T{+8&;uVjhAxUX!;+cSfr!MTKLFZTsKA$bt3Agbpcl<%HI}0 z&U1mckH!=IxUlJo{-TF`!a;kGVwg#Ksp&^NrvVq&QGCUCV#i$&L4zGE-qhLo_cjD* zp!v5b#e(4l>fmxp!E`{?2kaSYYP7k$9)=fOcv^-1MG{ytn61oXLh~|SuD{jdZ6DFvVflM-M8gQ;wM-#~1BDOEhoKK9qrcsP&fUZ~Ib&3bj5|xtR%)b_ zM1b;$7CTySN=QOH-v?Q1x_lLWNzA`>R^*Gw5B~Rx_@tHX=h4dfvqi-Fu1Dep=a`*~ z@<}@8Xf4axd!qngl#Dh1;P6_h;sQbAsU?Lg9jDlX_5C{es6i|8IdM&*9Sk-L^j|~) zY=Gh{Ci_7*N@q4L)@KFIh%FSiLJt8Ld;~DSQzDDiX~Woj7w87Dl*Jqq)+^vd8W?JwQI9&h(w(fzP%g>@cob++b z9iZy{v31@U$LUO3qfHqapL_G>VJ2lFf*Y)En2h@lS%K5<6n>qg#Z8^Q*EhucOE%8~ zaN)KM$9g~$0njeR#3?LO13QxHH^4WP7E3WXP$*i}i1x z*`{~rsaUcBtz4IY_NG9X^ix}o7gRyliCvl_p;{vBW!rCr>%x#n~1llkB@YHLF85!zi@TUd)5chtNRU9d?cZyoSZNszqF_3oLM3wC!1YXsDLE$ zs;eBs|9`1j2++I61W4%&b(N7!%JV)1c$@dV0>T$Wi60QR`bXAp_vma70<)#d;KBhX zYy==#J?(7y+Wr4(O2xV50CQF)3-t3S_Qv!ooyYlj2`_^(Q|^bJ?%uO*&U2L%!AnrX zA|ziFu@H>dEh$RGkD7Cy)}d-m^+;JZ>kf^_@MMqx3mUi`pERwp243U<)&&O{h!Yf* zxj1Aiu*{q^L6|je#+&WKUfoT=XQAP!x?R=}B$1aud(!HYP4r1d{#CMaA^1BHFp%V* zyGcXT_;eHhy7RozMILeAKxyTfYZxQmS8|i9fc?qXtSq(gcukR}JBuB6e+?v)f@Qnt zRY_-L0c2FlX@lZ_3QTaPMfO(-fXgZaS_eUKbh&Svb(C&5yh~ZQk0oWs)d+uVcH>Y4C-&An&|4(g!UYivjiMt*r9H3&(lnKp8A3dUdA- z=m_}t!qTFc8r_e=(}q0C1R*lkDr3Om@hajxnLV(8Ehu^p_w)lxb~az8!xkl}thuJ+ zgHayi@qj_uJinv%<*BnOP#pfJ1xU{EBEXBWGZ!GjfW9>+y}J5C=TAj9jEN}Brr?^a zWIm!kLm?2as?h`YMX~Cr{p@=}C<{6P151u9N1R>_YsL$l-}Jn{tovwm#Q11b2r2n!#7Y4q5iLSM zmi{z&a)KIER7OUUm1zSk=0)x>V$r49*V}L7f%dHXl<;PK9}tJrMXndLK*w0xLTP{f z(PWWEZ!Q!I;0{EO1T~T}d3JhN>CrF0hF1*EWWhqxG9OvDEE-nmE zOqgtrx!Hl@2FkhP=xp?`g=@M!0_hCIJ{~uJ*eMz!z5U)R6}0)B{Jq`y z!?Qz-$&tBeQvitzO8Bd5wNT?H45>i=9e5nk2kk)ZZOICO07Z3XwLbS+>m@Bhl3v?w zC4Viq`xrC@#%AczS_YAe9$IXCZBGuGeN)k}0*{_&PgBkXty(gYGx*Qtr& z*^jt&pE1cdb`3w=yxp*?b&CKKb~n->nOrpLO!Ky`j50WH_Tlg9)CwjI*pm0?$(btoyo_dMJKKdyemq5+4ZmHV}sg4Be&fX1q%pb?JA2Kj&C-(jhhG=qNxabhxRGfr1G``gk z>~gI*!O}gb&?o{BHO*i?OV7}_)>D9qad7Ua_LApPHMK-K2|EkFIyqsR^o3C3Wb&=? zaj$-5{UKa=4~CeD?RpfwAninQ+WL#IeJVqH?o831GCpq{wSu(`H4g-CN~0#P!cQE< zZ#o3i=7*4Y7G08Mt1OUUECJ5ab!Xs<=rt<85cSGy%Iw$RdS><)7`y^;wsgEkGV(2Y z!wM}LY!bCU2Re4#$!6>3E8@^K=n;rEKM5@oj3iWxSE4>usytIydWfaGE z*|tR_AawB~W({}(KOM%QuTIOJZqsCs_s&1GK&C+WD1jKW26J7glS_d&id1JmE(=fa zQpV+>z#r#5uk@gf*!fXc?T|`bwye8P`m%Ldg0Rbxq9kTpVuT(!G3tb9d4;C7REM#A(Blw*hs_Os1L1?YRfHIr)t zgv@W}D^JKB!74wHZ147xR`Q4F(-%{FZJ2#`T#-GJ#3tPNyLtFmCpg>g;a17S{i-|K z2eokmo+km7Cy!+^f$W)-qAb~hPk*(`Pl6a8seGqsTWAHnq8dPy6`GOgsDal7^yn8B zE4A{X3lg^$to;}{y~2;*Qfwwt{_eyc;{M;x^(I+0Y-xbJcQNG>4>!dq-|qR_a3 z@cOmeN%7t-`18cBdXpy*imYHlQB<9_v@(Jqck$U{g?{=V`CAy>aA~qRa=<)Fpa6p= z@T95J1Gnp?gk|y;eex^@Y0LZJs(BXiNgW>dsL@CKeo^`dgm$-bePB_?BB$&gr2}L6 zaSSBO0OXPrVw3`j+seFNxe!Bo3SB~A*37hj|4Q%Pf4%x-Fu_u~s$0MC0>LOA%wa`- zDchgTc62JDRf`|WH!n5Ve!|+*_ zO27W+MSuiD-3;CP8TZnWh+9F`Ud*Ag*ky;m!|Vc&Z7A5QmTw)$q%=Q$HaC zq(0rsV;KyaZjoMrdoS)# zgIZGZzLk-fuL2Z}^AW{k{q-G)%L^cWeOxYX7>i4Y6()S=2d-K7=)|x$FQK{HUq|Cb zA{vXhqEbDCT8YK4p75I=)+c5USasd7l9Xna{D}anp~MKOn_a#PukA?hpj6z$?)aQp{m+Cs#8*;5#uO zFb-ax{ivVz^)@U_!0Maea>-_*<>6+ErT=CM`_P*>v=JtqkyX2TK1VQJbg+qSBJZ~% zAL-p^5%kJZ0uYm?ORc*#C8Xy8pW^uUzV|ZGzw>%YgH~nFU+q5JGa1o3M#3PurxVtz zqzjwKNA~Dof>%dpj|-sJm1}hOKjJGy$m*NDt2eX&(Xg1Obh2)q=e|1C0ic}e2S9=# zqZh}JR}GI?%TQN+4|(LYV>JmaTiuOE>rb#nbqL8Pw8G1a0gZQw;4P~MlE$pJ4XW`a z1wu*L1~XPda1N(Q8v*gF)k%1qw(|X7p9$gAufCyKCZK~LbAfi;jX|Cnk@q*^|oEX%&wF9bTr+L;)GNqsU^Nt_M#E+|a1YVu0q5-sIdHe~N! zrycw@qNb4WrMB{gfx>=OB*ol#vR5LU$>#gdK?A01q&+l!8#ak$N@lZ7Ef(&*EbUgf zLGf~^3b63-X7ff-$FZkrR$sp;*!;0fQQ@ULz9I9P$-)FT!q)KoW`i$(+w~tMBDaCt zj1-T!M$-IJApD4Hdi=9${?uN)9>xe!)`QCq@({O3dt#Dq!s=ikgOIsCXh4DxnL^s_^xaH^`^?tN#2^=p^28Eixp(6=aGbS$ z0#}igz-JW$KtEUB_wTPU;xEI1k0ak#+)h7q7t+f&;^=-ey!Npt((S9pU94RU!08W8 zmRGAq%6%&gMjHcRpK~IUEx${i)eeeGmL{Sjrd08qfcyiPb`^D5v5Y*J82p zfsGE(-Yr^3nm~N0xSddU{L?qt#8m6sLuDaOyKD*hMB=VkZyqs7?Px($=A%Cu{Zu^- zpGJo&hhmavl8J0nvI9+Hbq0QLJs2^x{7KqvNT`ImZQDs%+q}cKD1j;`Luc9b>+Sm* zzb|eK79F_BiKz`Hl!GBBW6St}j=jP)s=odDgbWor4#<8nB+4xgG$ov(# z+G&^`Ry3|IG@|P0(_2X3A`5$^RA(VR&L31OCL`J*v*a*lTPz7rSqW%Xt+s8}A0G4f z#^r=(X|+n7m}^N)xI84%F$s-rU9H>F6^766da&Tie}*67W(sI!{HrDcT#8<;4Rvud$ENX?@fVfN zR9MmyN@lBMj*LfMmB+*&v9&$1C@Esh7uA{lF53EHTDDd?iW3b=jz|Q&h3sY zx1Kyth#qBVb`pH#mic{8u_>|TU56iJg%g_h{QV`v@$Nr?l&~KSmk6NFOnmTq=Ybm7 zH-Memu;rbgHi%=8?A|IZD~C)(weiRw(nv7ySqpZ4$alV|Ud{TV;&?QFF!QQ{bJca+ zNJfKQgNAgPE5vI;Ho*OP)Op-U_r@_8NgX)jL2F~-6bzLWRuwVyCBj8NPO71016A|XP*s!|*kRdcUTT8%IJWwYC^{nl& z)2@|Zi0MyEV)BL_hfvLJ-5FY(<$@P-XkUCJZlUOn$>e~xjC2ENu{ar;-CH~eAff=| zO(m)}yo_oNG3lL%LTmZe)85e7PCwgObl=6rc<;JRmFLA=@34l{)+d`%DdzM0G_m@s=k?vw97f?0Yv#Df_CsJ#ULZfIvWQyMf||qfe6zT739_c~MEnL-u7am!zBRUJ=TE*k3&u7O z{BpXFSG6*KHpwkC*Y9Tu3kH=)p${{V!R0|7;{a1j{c&w08N%xYTeiR-8Pi*<)XS7T zs9o-=Q@RbyW}?Am&3Am{>4bi9%IU{u6Ah^> zdAoJtTm!7>?CD=7uEA9{v$@?&f&M8&!UIN}tgN#9^f8bIIqX4m(O(19lN-rux{e%Up|86VL+U8y7^-gGBzc?!8s+l`>!O7m0B%rFKlyaFr9A^`ei zgf`M6cQz#kUc-%8lK*|X5O2ivQbw*eYuC@Jexf`LaT9H%SaKjukIaiCt^kF@BGd>o z8BTfD%aACle0fGoauP_12sZo^mf0z!i284)7$bNeTG=!IMWrPHXGs5&(9dIk*KTud%a zdw1!{8#DXQ0%UgcfDGqn7{`+FxVX^qSfiYGIc1!C(NJ6#zZT&OkbGEjqLfC*fc}T& zDZj@#>VSi=^RX&H+OlOj`8paG1`X6*lDOf+$Ok9$4CyhC9n@VKqG(&^YK`{jX9PX8 zSiRJZ0-Dzhr}nJGTvsIVg_ks;ayFD1k}O(9yrc|DH?%5FRiFF zejD)kpF&_us}|ADd1c{F^yG>omm97Av$ML#18WG%l65boNFuRiCeS*TfF}C`S_b9GA{%nV7dml zz>TdpYxZtEhcLc& z*R(s3_gxO=rZ(`|jdl^~KwqpHbilxEn{vd4neBoO9-n?VIVDDR@9D&C7cSsKgPh5| zy3M8>eA(D&$}1X&>}1xs4>WabWs&Yk(i`n_-86S+COqxWTSoQnmlI-`>cZYrVI zwO536iF+p{&SSU4Ny1qa9gV4Y*zC^mnxp-@z&uY;V?)?S{OVy;m5j7XSY4Aj`TJ4! zRKjDA(hL zRqfE4EgFA~4w!((fZgeWKtWf8{Xrz4Cg&W9CN-f?O^3L&{*M9K__eCTl;TDiK&=Cd zR(Zd`WRGbr!d8K*oeHh5%yqssf7mvom zD{sufyyYunIw;;t?Whl7i%2|KxkBbA8^3t`m2tbx-`D)R(PD?<9C8mWb^m(PLw`%W zO3GZ8QVHu41i1z5DuPb4hLOhR2H05lO@%a4O;()_33flZJBAn-bSw{S8P~Hu`ve1@ zf2@Gz79P)kx}_@t_w!+JxS!8tz@x@iMl4wU1BVY`Nt<}SN;l6&$Bm-da+Ek`a985F zPTSAEi*>hA@{U#lkiggY1V!&P-o+|onE4XpO9z+i(ZwOg5~rJo(|%G#NiWv(9kKZp zA*2xHO%OQAb+%R_4h?raQAPvkn$Dm4A|hCe1LyMrHQq9RID&0`aP*zx{q^D|ZtQaY zJqZjg&=2g)=%7E`b!m_|n6imr>KOVp!4H|ITk~M5M2$EBz|+6iY~=zU+>=`6UdA9c ze>{O}nI8+sl@X2hSta2Tf6KlKkkRA|xEl64!peygaETYnFjF%6vWyJ_#?*jxBMz;h#l#IOsyqI{m zE&FVm=YpS#I&kEaA9A?U;JCjYETr736BQ{TP0mvkcdyL zKOy-Z&#qtb%Y`498-oy5F^`g(4YaK6JYP*JbsimhpoT(LwD(~kNl7Bcp$7Nx!@9<< zEP+Yb+fiX1e!toxRt8gdX2CrU?>3kdiZh*-!r36k9H1cnOM0-3_=_&Wn~E;` zur9ivW^_jlclSVsj$sBiGk(0Qb{sh+Gdb;o9vJbwu7ujpNpxE*GX?g~!0=}EFSM-i z{Dm546M9xqCsg{92W<4=>hoz1dD9O+Ogz*ec;-PsE(JnR4!Iu+ae2oVa!PaO`yzEc z)4p6o>L^uMWosg@x^0I{qG%Z_o|>bzByp$xKK}5gtwQW1biD?cPK_$R?u-G40kQ zTpKypMjxt$PNqeXhK!y(>l^9WUM7J&;ybD7dYI+6U#5xF3Dek_LPI%0W?o%s!$vxs zcXRXD>^^$nx-`6tYXfmEU_NcUD|^Wynr{+|$xJX)i~GRSp@Q|qe(jH8kLjI}$ZkP^ zikv32dG60?CyR3-eYovA*vC55cnG$CckY7IV-6U@<&Fq*zLGiWT`tg2ZLa*aB)A)M zQxtO&Bu%YT-Oc#8?~VGaYe<}p>o_AlAkY7e5LhdsY3da-Z}}zkhFo%8~5cK;o>2yzeJ`F*SS3 z1y1bixJQaa_Z(9oCq6=ihpNEX8V!j(HMF9AWrZeEQZd;g%n7?(!)jVbH{O}R4c+~U zMoN|LqlXvwd5*Ag9k>p;kg5(J9ulm)~Wkr;z})iPj7 z;boe~U7Dq>9wi6l{?JRL;)DjuW9VX40S+80EXA=y=*z6 zhnY`>iMO%IyFF*<5F~2`~Dt>&0Jdpz&0Bp_WCh4sJtzBX?glQN~*P?x;NJ} z_TJ|Z>dIXd%NLP0qu9hWn?~<)ZOM~XDk#hj95r6} zd7LDlHu8$jE*+ylYiA=(Tir)8GYJ7A|7Q28boWNov(h0=Bfe$h@)%so`Sg;0h zNAo&t(-GoEoj+Or%q;$uVgdUH$z=F4F#*_nUmuQ`b}tf$3lTqSOM9itgVUe(d$ZhZ zMrT+2ne$=rm*t;lOew=P*c*OcLJM@#xV;aZoEWbARHgsH0)XwRD&> zNrHbo?MOFuNP%r3!K+jv6>H5-F~eQUd=%WsKs{V=(q*{6nclQg7F=vDn=2djn7g_S zRaFBhxF3p9)ZU`nyy`?rl9_eb(Iwyx?Cmd++oBT(m|U^-2cDzv1zgH0&>87oCzZy? z&0;^K#X39cA+C(a?P1Lh{NO-{8@T1HK9#)-7P1en=+H^|2(TK{zqD~wkpXM>&aU1~ z18DKZCVla^HQ$*!no z<&#%3Gzo;>x|snq*FNx=1tlfi5-l^I2@W38H;X~)NPsRAsWa|gxb%;^~ zUXuQueMmY%m)%@Wmyw!SUu_aPC$uIT41{y>r$8RjYkz?o!j6RxG`W-{ z*Lk>}q&`~E$*JGZ8qb86i+27cBn3~jaj;onW#|24vu0rV_5PKc zqy-Xn9r{YS?BKep=SX$&z-ssWNKTocwq595E>o)&N=9B1K|A{Jo09x($b z;5Ts-<~~VfUw}?aR24J33Ka6K)VM1ujT`S%APM&+E`O@04_XP*pMR z#u(@}$QR)~TgQm2L871|w5&U15zLw~Cd?f981(tcD?EIp3FDc0k7aU;+_BmkLhKGX zBuNu1e0cX=d+Ks|1<|!si1~bWcD|Pywhb=KpMeYZaC}Z0VtGw7uEky2RJu z$xNgUozA|nxw3(?CKvTU@$F)bB{!iwKrj;WX0ZREM;F042D|eN*_Trk?h<^*<90NN zuImMQ$l8q-T1|6q*b(+DuA*VKWeP@gwN49Q$STXi#*x0|u-Wbe9{3^Qc1ES#C*QVnb54p2bqp85MATMGWNvmu53?r>` zrE&*5{IT!Va`;Xz<(I&fL_JX8su5oMK4^2FnaNfc`)KG;7G?C#%u+GbET7dASMrZ+ySnI(ZEIkaQQtItN|t6$84`%<618bN1_&!I#uK%%w?-dn7UNE2RH zww7(qC>GRx(noXDh#@mHV}~j9IH>+L^;bmkPoG>6S}t~jE3I2czE?^HpWv-#Wn#gY zf2)gt*P!co@vigG=Cv}9Sy6ZQ^;^1#suy)cE_^sMAwC^uwqHJ*Npne5;Czq1$sr$` z;$k{zhGhrcX2)@$c{*BD;{kx%eC=*|Z@^v)t(x()wq!4*|1i>Q#*ot+Z6eCE$=MbF zLiI)o1SzkOy;OJrPX(1%P8fDE>!f9X_zijN2B+}E_kFmAN!48$k9U+ccfh3_=9b*5 zKjVbLOkYJwp-8;AE6``|$fp@G)U<$Q2&q4OYrnh{@;x|43$`~&pk&*>hS#4wCIn-1X>k>Jj#K`=r z?f&i}Y%gkZ34v~Ew&{(cuxWd{OSiSqG*2DE?Sta6FF7$CAf9=NrxcAL1@<4HNi()s z{b>qPJYomZHPzrU{iji=Z;y0In;PB=n+d}nOvoKR-yn@#B1xRp{A$jQ)8+S096PFu znl^G&*{oR9KYAfr<~QJyR7kJfdF)kreAqwydVMF!n7;pGkq8}ih^)`n<$aUX_o$`E zcb(2&8*Pk3mSiiVJYzJGu)RZd)bb7`1?eqgq+@w@dfW3UCZ?N^f@2?U#BD@UcgDe` zyZ71J0(=$#YWe+IoE??RW9PkehxOlhwS<5!yWm%Im?C2 zHn`U!qGJ0ZHiBnBv2gJ4IvSEqfX@<--H;O&50embxL*rOpEU~|)tW->)2}q}wliCc z5q>=0hYA8)HfUq8SQ3|Y7?up?cE`zDeRA?RDjgF0e$Hf`sv;*jG{!Kahk3f7F|++L zKPu0y?!$+^)ZK~#MxjL9+biJ$Ce*W3=%sAw$66N8NJFett4Dh^!>||(qD0L-c=_0i zJECU3!d;aCGusA8^DM1|2t^Et?}OORkCC2T8m1!DdGv0{=Ip)d9U6G^#W!ZHBt7s6^v$7r^!6#x$%newzzn*^K&5_j@s)3iCLU~e zzSEJxz6j`aWu2tv3fJCcWf=FH8ruEI47}c9m!ZVw=trEEN0N2}_Y2D!GBA(3I;O82 z3^aZ@JeYt;{T0|?Uyej&e@4G?TgiR20NWzW@6zIyctx00viQcm91kvTL4S%T+b#TZ zR9}GDp-E7Vy#&^QHw9kU*s!F5+IHi&>e1UC`o&<-BOm02(EU}-WbEykVqttXxhUa^cruhgecOthf2j zd@5KnKVDp_)B+yX$68%bb?>R&^8Dv6sMm|{@3r(9wP5i4MG*A<4D5@7PVVC>lg2Y| zBtYa;wzph@@LpsXI@Z*uU8>7lO@VMztIao>aYs+<$TYfhx>~qNyla0n}24i=J zhp!AiAylj8XdCO{a2A0Qz8M7|nj`+_AQ-@)Z@Wn}!oL>tS`M``tO!y_a+G?Xa=H%( z=PkhI291S`9fV-D1+x>c?}6B?Tm7*n&A4H~yyBAQ_uOB^Gw}xVeey5?ZUQ#?byx99 zkNQhOj+=7Z*Fl~b%V`Ed{@<6HL%YxjFF;;53Gr9X>P$L_bt%?x(9Nm_NCv z2g`^1B~Off`D^0ZkI{vNjFlqi8^A;kKz$q~4w*XpCe&+DL*BEe-xeUt&@(E@-v&MN zIw_|=7T@59G4K$b`Hib@4Vzo&?)o>?*=*IH<>Z`Y$Mjv0ldz_9L|-Im!BWI-ToYb* z%>_wWZAC``HhZ0uNmC@*wZYFv%@19ekKQdT02iQ1Jp0@&7Jc$87NLC1(uSJ89t`k4 zLgO&)kLx5agr(J8<%e1G&ZL~!QWG!?Lnl0qu!*w!Nf%itzPuptT$TxmIiI=m8KaXW zV+YdeP-kj^O&v=;Y3c5#d^gL-#TQy8uzCs8_qF~~+mBWhQ;0yz7J!#_*n9K>-h-?c znPBz)@fpJ1%7oehO9@~}AJyuZC}Z3F2rhRo5x(xB0*$|bV`}(&#S4NT<7)_=%u-XVL+uk(6*dRImL9KhT;qe71(grI11KgsyB+}k zfjUiOIUk{yFD!^)UoJr(IsSx+o1YACUj;Qscz#H{Rq?H>f|(ySuRk?; z%;`I6q5jxcT)ui#MQ&JY4QFbC6<@XWblx{&_ebcdAE+4B%IaS}S?~_7{8<=m*#6;N zFC#F`sx_ycSCzQ?<`h|mA|F_cL0tf5_7R?w;R=n4eRsCxmrcqdoV5#A2x07o^wu5a1_a2p%VmKG z=aWl0XHNNYFbfq#c)DB#+Y0@v=gfKgJ)=kcom@#lQz4&S@89d}tb@5+_bB}tRd-I{P z2TWw|mbqY=CKmIoBS~1c;&7FrHo$tYjVYmm%x|JK=%qS#3XC^4t=pk8+w}s2selq} ztr29sHNp#O!=JhQmHH%ywL9u@Ebv&;hw^?Rr|(hT8m>~r4#$ympV&cD)_04e2Rduv zgVWWDj<)g8zWKh-@Sy1`b=xZ1jU@OE`T)Ts(3wrk-$2Hyg58-&4P5Gt0P$jl#o`g* zwb}KUm+`@l4h&gFK;EQ7K<3dGrRb94Sq{G`IjVx6N?4(p{1+&4?IY*AR&0cTwVUFf z1cZzmGUcIz0o52kgPxbS)qO|>dQS?hIGB&f8zq469o&^i5zi$`O~jRqoAJAhENHyn zh!W=ImQV}=i*@hBGmJ4{K__gJ>TtO^sE~Sf`G7||yPVg~WTW>odf-h3k$pFTDLiN2 zAX6XBctB_*(g&i92j^#~KB5d>J=C0U|8`51cY_bq-wA`vP;#CVyR)RX7{%fVMn*lA zSZiV1$$v2DB1Dt#&;hy)7I~B zFSHwCX?qf0&B~kH#in??U*h)$u7j+qCkW!gEX+N+3SKM;SZ;mBpbu^AKbLxkrz>7iHHlivnc0mil0<~JjlOwnqoHvbDSSEpNKU%OzEXtn^F4Akh+d{eTf^Hs zc;Bb>Tjj148;o%4_KHM@H>nxit0!6AXNd@S?54nfKM8-kl`v+lLq+ftbroC%Bk!)? z58enDIPTgIL$r67DA?W~1fY=d-2Z|%$eh?IpOu2Jha z^RYm`PTYjLyGQ%EqF}k6eg8?&x#|LX_SMcKTW52z8%xX`Qk$$JunC*I1s&_%9%=VQ zOs*{o;c9w@^y*%UZ=HH#v}s7 z0<5XM7B>^%E{(gB!+u9Uv=HV5n?4a!Wx`_-NmC_t%4L~_4C>;M&lBJratt4cA08Sk zLW(-FwJ+EoPf1x;kZCvg$18~4vK~k97kmuIbk_%OG(S<7yr7}^;?}CIw+GqikFB*u zPY$Q5o@C?=)xb?&G}Cma#(lBMD${H6{R&VSE*KxYp1CC9sP<-td#3XF$0n@E7n6ROBPA?y1RS(?z$i7OwP3XYCn-^sE%)HxQcgt{JnEzfA-NwInJRLOs zR@i;1w$Ztp1l#Rq;~7<;18eszhGZ*HhQ+zrBl{xV2qrO0Lp&!B)v% zO|<#O?)u|VrfJjh;ksCG@H(88wL|tsu=&S=wN*0-8?QEflbajXn!8~0(Uyds=4N#C zr~!xgljp5BiK|?GCX$_f4){0bAHjVxlVC~?Grh94-Dm@ulMKT$~iNn|pH+(5q_S1W7WK z7kVYe&H!WyGRn5CTqQGoI8w@YO`$9~uX7OYAV_F0E+!(qRmOsZvIytZgOOjBf=+XB zq;0u6=Dev%wykS@c!x!qJhP#h7u`FRCIA-wFl*A8WqkmD#;*m*g4!yF&z3=IAKsgV$A3f7oe0n0F9?D??o9_$ z3~aES`p`8WkgiwXK#zDmcHO@HbvM!<*HffGmw9v~mWP~%S#Z|eGvO_qH?@RC492W1 z7=S4MuPx1__Gu%k7suG<)Z4&d-D>uEpY!tFt)WK=j;{s)g(Jah5iL;=m^-e|8E=Qr z?u_@RZYTO$tdy*u%&|r$z-W1#Gh@JGU+ZIkumN!=%PV96pln-Xq2wGcgx&;!=cVHYo|l+dQ!dz0 za}iRfWn14z^hU!K1*&F1(;Mc^LjXwq6_CPlQe1^ZsH!kf5#E+RhQ6UVZyF@>O2)6a z1x5LSohSvfd0A9+<*AsV5Qf-*y(qKzWsCI5q(;J=Krl zYoES2^(&)-)21ajf`9q$EAcA*b2)2grr5%ko_JRmH`g9M0bA}Ubk~I!=AqlH9&J&P zwYrm}WcYRI2)>j8u+D4|1c)aa(U(rTfx_6OJ>3W->{&9lCf<@Qx4{ysM>Jx-&*fRa14{)!y}jYklHfc|Gg{t~i+{dvw@}wz%^Wi2< z1Rq2HZ8dkf#wtm{eURaKeWv(5lVGQqqx%bxadx>;tcMLfY*E5aZ*FnN1@L|f0 zMo<1JpWyD;T(VBB>P@oITfmVn`jVg7@l>&J_Vei-Ju^dr(_ zf*R&&`L3ZR)im~&Z9i&smBjO3#37BoBa2}$`w;^`zYJ++FaLTd2k10kS3QFFytP|h z$swsceE3E8>fAk<`NNha8^1s(t@*YzdROxtw3MVS8uhx-2nklRC-xDY-{ErUq~>Me zZatYVJ=xrZ`eyhsYQlm|eo+M4I9$91sz=Wwr{gyF`PB%bW ze$SYS@oY4ydQ;-Xu~i41{u|%a1r_KVY=x^#vGc>ooBxa5w8WXT~># zI;l(7-aG(~?d?AOx^(s|=E3e+!NgtvdM%CPdM;UTy23C27zy}U65%Ejl`tE|_BI>o$KiSYK?IF_>xiQC2oxxdfw$d(#TA#PX4Qur)Z zUJHqTr9%)S`44jjH?HynEdzB(Q}u3h0(@b_Z-*NxOjz>nh=#tNb{Z7pxlItRP)wQ19;^RnCW@qqKDUSSI)_HD5!a6@4VgAV9{AK#5_ z4Vgks^WtSr{9?0TY7!L)e7fjrh#pYO6k}9y^go7}Ly~SzTmckLLt{lS=!5Vkz~I@O z&n0{do5r!CAqXsTVRl}`W^Cvebv9)44k2>r8Ks#d-B0Mz3pr`ogin#LA0JGogPfj9 zL=KqKiL9JJj{c29jW3t`OBQ~Y^-r*7WE#hHP!ayD1kfwx{?D)4qIkNgOa6q zJI-Z|3!AVTDmc11DY@e*jdr-JuY`?>uhy;nG*S+FRIezgL6&@5>la>95jX z!1{`bS0rvsI6mdp1dHk2p6Cq`R@iLA6-hi56r!r8OxcfAW4My#x zrDZ?~((A<}rLchE+ZIYq-dnicCvwEXifgNXSqq4K$$Y(hwvyj?1t{|nXjXlPayl{W z9Ur~W>F6eeMl;`Xxr=F%e)~Be;}B!=#bnQ#)MP|$6OrTIOEU^8Z2)wbt`#osVxRoP z;zV^bE?EyNm$R*r-<|uH9b!Lu9YhNbLw9teu1Q^Z_lto0L%MH0CM<~zcAhTx2w2q7 zV^`Y`>28&TVHkJQ7E*2l%H7AWYXpG(3#IwQC4nFTbfc-#K?1H)l~Vci_Ohha@_89< z>~Cezw2y;1Ot2vBPu<~h?0URv_gqI=3WS9xpq?`ln2W+04&~Q%wqu?rb!E3@Ddih1 z;I^ma-A6i^C<7o{Kc`AM{L`Br%hJV9*Ktdi-s3UBK7#9+NM1ofzmq`>E&?K7LxA`%} z#RW9v<+&e|1(>zftpuT<#zZr$_y=JNr;3Zs-I!|~NEm=N&Bncxe$h0KrxpJ?j9nXC zdAw?=ev+#pg^@x|zo=RwCo`@~NVmMl4f+`r!1E#%!gBBc&MBcJE5$5MQm?%E1dUuF zzAXmaTuYjoTPc`x!clBje|n)H%&EgRAbSxYbsY|%vK7Ais`Z^*p70e=3n#8{tn&ER zj#A|FU%0ryss3KsP7{C;eCLcsK+R5-E|Pc%bXEzMjoWd&@iqQrfRs4i;7101GAFRl z(Tq!`DKI6fgwgcDxIl#T!$ETY@k8IHGo8&#aL>S$NC ziXX1W<~~M-a;mQF^VDO~Tdw{qv> zD;jJ#F?maaXCURd(>b5H-sf&B515loeQDpZvT3}^7%2*ddevEbjBiT28T)b-8m=Cf(v$rg2`out53G9XMn^l?LR5^F`p9eF&HcB{$F6R`_ z`8p>AO@Qy!FO)h+O3l5j@{0s5bA`i=>pN_T5?;U*WeSB|ru2Xnld`{ZN3^zKIR%ri z744%c$=_Kn%hsI>;H!P_pmO3Fq@jFf8m=bZ!T?{FW2c21;*ctSAVyMTw3D%l{Y!}I z4*!L|*t5Y*zB7ATIv^fpT$2jMjk=&|OeG>U;V3gzLgT`H@Z|fMO8|Rs^~(YEMl=HN zlE0+5%dP4x@oNAqpr5A%?+WGR#W)$H*v*CN3#CISCTFQZ(lX9JcK`*^;*r|-djP7M z+#Jk8R9(#ShRWF37x0|wA{}sf*e@Mx&-azddEk&31SOj%U+)%{ZUjn1-gIEq<=N8- zJI=yR3s$T8cN*5tSlYEjV=k&n6JxN;7IO~Oy0p~)Jazt6jH~IY7 zN4jm7%Q%l;j2gX8)u9oQu~GEj2U2@^5UGQs&w~@T7?o1l=imR*bo!Q&V8XhF^j%u* zj!K4{$P_ulfJIbCY#THbIXFBFFqj=mNK!Fj4yYMo(3FBYr4Z=lUUT*LYEc&Az5fc6 ztw$V~{!G+Ae!MPR=qD{3EEvwRMjEox+6bsz0RPO^CCPEk*3YR~0zl&90iTYnN9`Q4 z7ruzHE0Jl?y*Jq^rZYUlSX}WJaIY@lnF+7ImcsjVv+oL^JgwloLm$Wc526c)7|1>I z8!57X3lW*Dz_6!UUZ8~~F_PGxOHc8_Qz-~p+CzL=QN1WKbg0(HcK+JQ{#^>Hsf=Aw2L#x(8=bcIBZw$D<^wQdh7v)uoJ$#$Wg=*vgd zRPe+lprY3BLA@4nvDm^(+IJZiK4W$vfqm7JB}wrmZjFeK3e28Zh9P6)h9#hoH)fm+ zPv@2OHQ26iniEj;?;^zOoAE}dl6|~xj>R17?D_W1vfs?jNKdT(@|`9X5`@dhzR3Mk zsz7})4=Qaoxa?Rmd=(a${fT&4>-I}gN*P$!bj7_Y#D8P~$3_dN?m%TedLCt*%AnE9 zZG3lNW;@5QVCm`U%XIScMo`CIE~AMaHW2x36V&k_>fmZFdt1oMh$<_t5MU037g0@N zX=yfqM9Dv*fe#toGS1KsS>vbS@wRqhxL?dQ``4@JGHcD1+J;+4KRG1`E9##{ zgDYi)!E{kopj2MWl1~Lra;h_zQFWbrbRM9ktLe}r@^e}FEbC)$l>z3j@cx(wc$@aU z>GGmAT`Z70eM=>vo@Vh2CUcVA7q7Hg}6yxDkIIN-$N;eACe5}+)SEG+Cj#SUB^aF|5GMxOGo zl}-kLnqG(X4O^TA2|~gDCkLnr`M`Pg`Yz_~aJmm(KCXxl6nBSGW&r^?{8V%eX!rYq z0O9bJky3LJ;o+++-Yz%L@Zs{3Nf=Ae7qp7>PA3A%ssWt1FDW=Y6{3|}pdzITos zD69ZV`kJO@W`118hmFv9?{a9)n?sk9gkk@EpBi95uJ;XWnv?4Uq6$E83VWP(w=Ts8 z%WaN*JhFNsT=yJ};n?|gWF#jhR{yI_6n#g3-gBr+c)P~$&Bc=k3F@8)e_0<@MajYtZHtu2x3TXGagoN3Z>&1U9O#tfPp6d@+Ohd0 zJ{`i+YFkNGX&~h5QKb#|IS!aD$GC7>LXo^%yJ-l}75bkd%9-$|>giBQI_5*+o_5Q7 zN0y$6tdJYj7sXAyDSp39SWb=xMO%+MjF^+U(7AlX?l;*ZL$EKzM7};XS&X1sQV5_x zNhyy?vGA{AD54-$7DWFjX+`@jUV3G`L-eOxTV;TOk5xkfHd!1SdbGcew>C!l@&I*; zokvHPS37PcfTaE|u)6scF-(`U`uo(;|B`Qv4qANESB4Nd3_X_>=(|#GdmDRqi^vnE zzNex{?~#`fmwnMY62lW-#EQ;_3m%mc2R$Q1OT~RYgSg^`CE>n`l;y>Ff0zs&HxWF6 z`j^H7VI-Z;RiC>pnUk6?B4)^#eNnSaluTzpmH$;xg|QqP+EWPU_T%YEtn#N!)x$;) zsV0sqr{C#lLZ^2li@G&ji*$+A^`mJO$U$w&Y{q+Gk>m#Blf^k`WM$+Q^7~A2pR`0Q@34 zBXYxu<1q|d@B$S;O{pip^yYsBzyhGMt}HfUrxSdx#PK0*`!spU;jWbO7L}2QTs&rb zUg!O`qs$6}$e0xxzQ4ojE+XI6{?5&A)ThJi* zP+^Lj`au2^P%ks#KcVgp1HJ_h*wo%P%>?+>sh9BwIHVhz@nn-zRGMP< zF5m9i5uTpNGOg?}rw`fur_!vRWYw((iuI6P5%SJ-9>Fm{uCq_eH zFgdvI%~1{i&Hf2&yQ411vA_(DnCEKh>9#&t*s!Ppah&GD_2Um8H$n?NzEA*grLEgU z)VotI8pU!+`uW7id?#>lF5M0vOTmrCTZChrw>v??*XlPS<19Ex3D*GNXd9R~Aoy1L zoAVC13oMFmcDGNr!Z9kTrtd7kYwK*R>mKqgMDs5JKlCoiGSky@(-6+Ly9VOPxMk>4 z;!)i}cPDN(?3lCM?pz@X@;wMv)XNAU{;BWser0m7pD|WnsQ;!C1-XR>Pcz~x4S^QW z>9l3l*LOI!TM}>iPirIpij578BR}~9>ehFOY)eKaSaDF=BDQJyKpO+>Ud2__a_1qo z>g}CEJmqHDN8-^;IA3@XUL=O2)k401{Q|N{*l=w`ODL11kQFQ`mngj`gHGg<)umF3ZsZvn=o)|@o7%#JmAn&zo5lHWv zPBkUY@FvC3Qsm%HO^q6sc-VI3KJ1MH*Q(oeTX4iyceFI^2p z@gbq-pwnd%qO!1G@p{Hm!5mI#h#iMW$H^1g7w@v zBQ#5+eGU6Ga5s`56iSlT6+~8jc1*5v>qw@|E1Vg-hCsSPsU_tkogLW=%l8WBJe?zj zdUdxv^=}2PRHZjV@03Jy-&nI=zj&l@6wDDp`Fy()I-()8K0SWDXDgaZmG(R9%QLkS zciM)tlO|?^)RWuPVloc#5fD6XM&^^0JKB zEa!>oWnM%J{nSx=7)l04FKMBRlHw*XX*oT{@G5y{dOMGSm}L~mw1`fSbY#ki?;*eo z>;btWTNj+^_2ab*=xB=*o}a>o4*a$6#PAAk;J+5T_w1IZJt{C~e=8XzuckZE1qt0e z^ZTbW5++A^PHg|&9h!Sx+4OZ{bv*w(P#Ss{MxJSM>)!$}AiB3i%v785{GU#=72=RI z3I89JfJ1s-?n`lFA2y=?c~(FdNO=jR;KaDIkIz$|%4-7%OotD>%c26LfmQ7AdY@p# z$$or-0U$Bye-!9)(;z2);8?qwNr-<8uYcQjq2_x9t@(A>)a<|U*y04-fIQKNv?s~w zliPBM2=kLIHz0xazvTNu$+%>$r^6OsYC%Z>?eFP{LayMXI3M5)X*;sBs{q^Sf2*a` zxFp)%S|&gJ1T%hD;;pJ`?qT7evj0COZ8VU3Q@zzz0ReJ^@ylj^9wh=gDG-BP8f@Ql z)ROT=D-C8xw42cW1{yNSn_wQ=bN2MhW$|nSz-QN70B0F(f!DqUX6v4lM*mM(|MH&1 z-!J2Rnb*Hsa*$EIT_uzT_szLtbH+BIhe9t}Cp6&xgj`**41wGQjss zVP1Zm`zGZb;-8K@rA;w9v|nDG>{Y@(0tpAgV1@n}36<|Wkcr5Or7PcZvCXed@Sohyr zjqnO?5qr<8)IVxYMID=xsi7FGSn`Axc0;S~q_V=~XnOAv3lP@Geh8hV!HEDKO3jwf zd3}FBekR@k!w7^S#$&lBeiP)T^2&jahA|OK)&=rex;NIR|9;rR&f=cNj!wb*r1VL( z|COweooM^9OiuQnXR}`MQhIRwAFV{MbUQjccRv71yM7p-ifcA`=wxBtjV2cCChzhUrcm<5eK9^Dix+3fI0jZG$%kIU8?P_<_^>ghy&O_m6tvcqVWu^i1}x z|7rRu*oFtLN|r}>7Ff-TDB4dKj3Rn2{64eRIxXS-lR>=Q#kXActiqS{4?ogXp3l5` zx;E<#l5olt4~DcWQR!VY%`{}hDwwjF*I5(5;*-uxNBaG6}t zCFJxNOE@?^+ukVK0XGv&LkX8JpJ2xA$usD><_J>l!oy4x#FWaPfA;30>_$u|9_$Mz zz!`(+?uO5L{5=4(uEIlNlutRO(lo8_@_q7~{J&3(;#vA3US+(4(4h!W(;%gJxbirx5B>XVCx-&k+hbnvssCFm+8wZd06ol~%b4GvLxu;|BKo}jHxH%3-yF~f z)a!x*z$q*FTrUR&BIb0NEWbDYIX~k;t_v?Xmi`N6*-lQzpi2^-v_OB}Y@zTB{=ItE zXY=VQ-S2C3;PgZO*Fcu(guhiFc+h9u@)`2am^83A_f_>jVDFx7|3A8XuNS62J0w)H zU;4WrH}I*lMFjuXZnY5x7}hCi@ZXOX$`vVSkb1dkHUH~;?s)HpSNw?6B}~F7{q^_UNn8kTxSI6%u;Dhcw|p#G@NoX| zt21xZ0AGWyX?Xw%z+x}|=|nwGGIlQ>Opob>BwUGd$rL~~Ks7@zL)F2E)Zedj07)i} z=E^M3J1pgTb$7aI-1Jr!9{l;7a+!uVnynYMzNdd;TpYIOTmI?)}iJ@Z4`%-Q7!QvGtk`dWj7-7-bqv zDK=!V0Qb4tj^NMFxjNvY(nWJVKwcN;InUa*T>#1kB9ck*>pS65u|6l zls_{PU$efw^+)mcN}Kgawh~>CPy2MwPgvHVv?G(OTCxR}?9ZEX&CqMOxBc`-O4wKp zT(l4sa!E0E7ii!PH2?jEuRyzv6-V-q-4PIl@ncRW)@tp*tD8UN@ySv+kAnV>egqG| z8=DS2tp2>jrt27_3U2%Tf3)PR!B!bG@xJ`0Lp788Qr|)N$XDS5sP}pD_(Cr!6#+yi z1-^4uM}wrK<+su@4>fa3v8dtPu+qYo6G|qVz<1nVWrhPlY5|`xXyIaxe6J_szty4T ze3t0hS#c^Jhhv~h|G&hZe*sFIM*D7ip~9HfKl;sCauwQeet`S|5BJm5E?5{FpE{HW9Awr$=oKEl91W?5CIl^OFS!D&)U8!oN_PbG5fHjK3g0 zzXfpf-%8fbQ!edr`hO|RwoiA`23>pjnmXi<*mOlU8rtj(E0=@mdK?myhDafWHw%?U zo|J&&y~XW!n^u)@Mid4wW&kP|5vOVa7h`1MR6IQRQ_VtC=g=C&EJ=OiqF7>Mqn@6g zEFZV?$e9@sip;}o64ElKN7B7<7SzG5EEPLC<*Lj-qToCyX^oCd#}t7;GF32s?M)ay ziTjVhH`NZ^zFlh14;F<`%w$$x$3w{dm65GKn%*)23%v^Gt@bAII_HugLw%cX*sWy# zw}iOIJuJB?{U<>fDfsDQM8*q~Uo609W7qaRJ)G(mU@oEiWAJ9x;zaoJPni7^gdbkV znL3?VM0)hJuXj2vyFO_3d~~2>sdX~VAJ2>aJopK$q!tnr z7bdLhOH6|@7eVOBvlD!le3l-CoGjxXarK&)*dxnoe%!so77*PyI4;d1cww>bRC{!w zYOUGwKrENgOcnS?KmZxcXA1)kfjay3 zKal%xNfH(YQxl7im2>fYnX^QvQue(M{3f3Nc$ok)`DZE9QGx$fE*GzK^2I|Md42Si z*1rYq*hik6u0^g4d8$cDbdf)m_l+Hahyk2QN`0xT!?{xCjI?hx~w#F$NXwa%&chEA1ec- z*-%bZHy~6=fCli_86XWk(~+v`qfBANcl4+pdNnIsej&Jl6?QOpmfJE|8EF1CKg1t5 z9ok?qy&uw-i{F{*_QS974gV>;yu_x>SWGkCB2K34{oFG~1&KKrVW*Rm_2tWaTcv>* zvJ$}ym`|i4%zq6#dS1ycm+w zf^0YZ+u|V!u)=@$%;_w;WDs0vA__{_nF@C3_hOEdQ0fa#BGq{Fxp)yc9$pngKhDgT z*DnbB|6*YnKk*~n9X`q9GiQ0)OaaE`K?=B_X|*wor#4$mZ`tC`Z&y*tx+{zp|_FFA(=*$K>34vDNgkf#BG%s>m*`?D)I`f6S1 za94WgfzD5%f>c9?=4X{lr~?rTe2QO@HC%UPPwIvdfN)X1d_~x!>JuInAH2_JjoCf_ zpZ#<2#KLvzF{C2Re9*qm3J-zsm@=miLJacKySJp=W}!E*eph-=RmBq^z8FLN(KGR| zJeg4r`}8z2&^~}G3Ad`szfXqyYX`{F5JY^7Z!=H;g%hjMijnDa`jN`;hxiB&{WdU$ zJl&ycAFw5KxF(NLT842CUk;A@(-a!jDN&~w&@0+JtKtUyd%(Ww@Wabxx`%1~21R+Y z6lBD6<|JYaXB5H0|K6|2l<^$@E0g#p^7p@sdIpv|r}fv!Nj-_ENIbw+&r&r+e*Cho=zl=*`w;X5?Bmt$^0&rIDmZ$1L;S<+{|4^yf+tZxvxO;3ZopEeu^ zs7`Cj^aG%NbepcFkj}EnqxAnL<_&0nIp^=n-TU=grR(B6NqbJh8Q-jLWLkXfhI#21 zbC(F(&TN~6{L4X5vJP9)$TBh9sSmd@bTd?{Vq@G+Y0sg46gJme!~%i}m*)w61>1Ke z&_EQo-dUbw8{`>n;3Y4vlt6#H$H@xqA8yY84YdRc-?Akxb1awi&ZB+2-+w0j9F`2< z;0wh62|axJe`D?B+I;ueaUjUN>Z2VE9)9X|^_D9GNJiB;|{s%Q<(5kg;h$`Li-}LrA&NuKB z$#YcvXl(H0z#ErR?Mq9n8XpxfY&m2Io;jY1Vaqf+!+MRb;uEn2dT_phrz9R42Ry~| zf_3G8QR@t9wT?|!>GY2wL(k*|B^Uk>oLHz+r>0c>E*wu(n_8Pj1TU6r(_6T)7kmIaQ`jk60(D|?bW)9J`=Jk|7>Mx9{MwQ;7K6= zHiA6@o)c^?&;~s4!0Xy(_>yhE35-47B{2SCP;he5rl902hc)T?dPilbPAlc2L=dG; z$yIJVPX6^8#*o8Z)vwj)45L(;`Zwu{4)j0pz;lkrGwu21?F4%S_&8ZE7(DPigGcu< z$Ts|zmM;!rDh6|+o52Y!Qp2#B^sa$Q$Ntn@h@1@5%eW{NM49pD4$0L`dGxaz+kh$0 z2u`^Y!zE3#Rfh_P1;?FvfB07BKmTi6%roeJ;DP57o|o7nL2U$k1n|+;$zKj0c;J~H zCrnJO`i~IC&_&G{hH^1Sol?3ZIQ42)aBAuK;PjGf>eRCDosu%fSN=JUe*C z<%*e=|E@~czoOAqbkk%Q2B@?Zft+|}J-J2B?pEsz3ADBW_y1X3993(}PpQ&NF9kDY zSAv;xgF3DJIv2N8TKzp*|A32snBp=0nTBC+(ami*dFxd=L$O+`zsSWY%A!n;pU&|T zIqAo$QcKpW(yq=4N-YiM1W*5#uJmu4puP5Q^l!!S1rI#8=7~xGyqd> localizedValues = { "ar": "ليس لديك أي جدول" }, "verify": {"en": "VERIFY", "ar": "تحقق"}, + "pharmacy-intervention": {"en": "Pharmacy Intervention", "ar": "التدخل الصيدلاني"}, "referralDoctor": {"en": "Referral Doctor", "ar": "الطبيب المُحول إليه"}, "referringClinic": {"en": "Referring Clinic", "ar": "العيادة المُحول إليها"}, "frequency": {"en": "Frequency", "ar": "تكرر"}, @@ -83,8 +84,8 @@ const Map> localizedValues = { "ar": "المريض الذي حضر للموعد" }, "searchMedicineNameHere": {"en": "Search Medicine ", "ar": "ابحث هنا"}, - "youCanFind": {"en": "You Can Find ", "ar": "تستطيع ان تجد "}, - "itemsInSearch": {"en": "items in search", "ar": "عناصر في البحث"}, + "youCanFind": {"en": "You can find ", "ar": "تستطيع ان تجد "}, + "medicineSearchResult": {"en": "as a search result for", "ar": "كنتيجة بحث عن"}, "qr": {"en": "QR", "ar": "QR"}, "reader": {"en": "Reader", "ar": "قارىء رمز ال"}, "startScanning": {"en": "Start Scanning", "ar": "بدء المسح"}, @@ -537,6 +538,10 @@ const Map> localizedValues = { "selectSeverity": {"en": "Select Severity", "ar": "حدد الخطورة"}, "leaveCreated": {"en": "Leave has been created", "ar": "تم إنشاء الإجازة"}, "medications": {"en": "Medications", "ar": "الأدوية"}, + "medication": {"en": "Medication", "ar": "الدواء"}, + "createdByName": {"en": "Created By Name", "ar": "الدواء"}, + "statusDescription": {"en": "Status Description", "ar": "وصف الحالة"}, + "doctorComments": {"en": "Doctor Comments", "ar": "تعليقات الطبيب"}, "procedures": {"en": "Procedures", "ar": "الإجراءات"}, "vitalSignEmptyMsg": { "en": "There is no vital signs for this patient", @@ -663,6 +668,7 @@ const Map> localizedValues = { "progressNoteSOAP": {"en": "Progress Note", "ar": "ملاحظة التقدم"}, "addProgressNote": {"en": "Add Progress Note", "ar": "أضف ملاحظة التقدم"}, "createdBy": {"en": "Created By :", "ar": "أضيفت عن طريق: "}, + "riskScore": {"en": "Risk Score :", "ar": "درجة المخاطر"}, "editedBy": {"en": "Edited By :", "ar": "عدلت من : "}, "currentMedications": {"en": "Current Medications", "ar": "الأدوية الحالية"}, "noItem": { @@ -1053,6 +1059,8 @@ const Map> localizedValues = { "maritalStatus": {"en": "Marital Status", "ar": "الحالة الزوجية"}, "nursing": {"en": "Nursing", "ar": "تمريض"}, "diabetic": {"en": "Diabetic", "ar": "مرض السكري"}, + "pharmacy": {"en": "Pharmacy", "ar": "الصيدلاني"}, + "intervention": {"en": "Intervention", "ar": "التدخل"}, "chart": {"en": "Chart", "ar": "جدول"}, "operationTimeStart": { "en": "Operation Time Start :", @@ -1118,4 +1126,20 @@ const Map> localizedValues = { }, "planedProcedure": {"en": "Planed Procedure", "ar": "الإجراء المخطط"}, "moreDetails": {"en": "More Details", "ar": "المزيد من التفاصيل"}, + "VTE_Type": {"en": "VTE Type", "ar": "VTE Type"}, + "pharmacology": {"en": "Pharmacology", "ar": "علم العقاقير"}, + "reasonsThrombo": {"en": "Reasons Thrombo", "ar": "أسباب ثرومبو"}, + "youDoNotHaveFavoritePrescription": {"en": "You Don't Have Favorite Prescription", "ar": "ليس لديك وصفة طبية مفضلة"}, + "pleaseSelectItem": {"en": "please Select Item", "ar": "الرجاء اختيار عنصر"}, + "searchFavoriteTemplate": {"en": "search Favorites Template", "ar": "البحث في قالب المفضلة"}, + "sorryNoMatch": {"en": "Sorry No Match", "ar": "عذرا لا يوجد تطابق"}, + "thousandIsTheMAXForTheStrength": {"en": "1000 Is The MAX For The Strength", "ar": "ألف هو القيمة الأعلى"}, + "strengthCanNotBeZero": {"en": "Strength Can't Be Zero", "ar": "القوة لا يمكن أن تكون صفر "}, + "old": {"en": "Old", "ar":"القديمه"}, + "orderTypeDescription": {"en": "Order Type Description", "ar":"وصف نوع الطلب"}, + "doseDetails": {"en": "Dose Details", "ar":"تفاصيل الجرعة"}, + "selectCondition": {"en": "Select Condition", "ar":"قم بتحديد الشرط"}, + "yourOrderAddedSuccessfully": {"en": "Your Order Added Successfully", "ar":"تم إضافة طلبك بنجاح"}, + "youCannotAddOnlySpaces": {"en": "You Can't Add Only Spaces", "ar":""}, + "conditionDescription": {"en": "Condition Description", "ar":"لا يمكنك إضافة مسافات فقط"}, }; diff --git a/lib/core/model/Prescriptions/prescription_entity_model.dart b/lib/core/model/Prescriptions/prescription_entity_model.dart new file mode 100644 index 00000000..166cd599 --- /dev/null +++ b/lib/core/model/Prescriptions/prescription_entity_model.dart @@ -0,0 +1,145 @@ +class PrescriptionEntityModel { + dynamic appointmentNo; + dynamic clinicName; + dynamic createdBy; + dynamic createdOn; + dynamic doctorName; + dynamic doseDailyQuantity; + dynamic doseDailyUnitID; + dynamic doseDetail; + dynamic doseDurationDays; + dynamic doseTimingID; + dynamic episodeID; + dynamic frequencyID; + dynamic icdCode10ID; + dynamic indication; + dynamic isDispensed; + dynamic isMedicineCovered; + dynamic isSIG; + dynamic medicationName; + dynamic medicationPrice; + dynamic medicineCode; + dynamic orderTypeDescription; + dynamic qty; + dynamic quantity; + dynamic remarks; + dynamic routeID; + dynamic startDate; + dynamic status; + dynamic stopDate; + dynamic uom; + dynamic pharmacistRemarks; + dynamic pharmacyInervention; + dynamic refill; + dynamic mediSpanGPICode; + + PrescriptionEntityModel( + {this.appointmentNo, + this.clinicName, + this.createdBy, + this.createdOn, + this.doctorName, + this.doseDailyQuantity, + this.doseDailyUnitID, + this.doseDetail, + this.doseDurationDays, + this.doseTimingID, + this.episodeID, + this.frequencyID, + this.icdCode10ID, + this.indication, + this.isDispensed, + this.isMedicineCovered, + this.isSIG, + this.medicationName, + this.medicationPrice, + this.medicineCode, + this.orderTypeDescription, + this.qty, + this.quantity, + this.remarks, + this.routeID, + this.startDate, + this.status, + this.stopDate, + this.uom, + this.pharmacistRemarks, + this.mediSpanGPICode, + this.pharmacyInervention, + this.refill}); + + PrescriptionEntityModel.fromJson(Map json) { + appointmentNo = json['appointmentNo']; + clinicName = json['clinicName']; + createdBy = json['createdBy']; + createdOn = json['createdOn']; + doctorName = json['doctorName']; + doseDailyQuantity = json['doseDailyQuantity']; + doseDailyUnitID = json['doseDailyUnitID']; + doseDetail = json['doseDetail']; + doseDurationDays = json['doseDurationDays']; + doseTimingID = json['doseTimingID']; + episodeID = json['episodeID']; + frequencyID = json['frequencyID']; + icdCode10ID = json['icdCode10ID']; + indication = json['indication']; + isDispensed = json['isDispensed']; + isMedicineCovered = json['isMedicineCovered']; + isSIG = json['isSIG']; + medicationName = json['medicationName']; + medicationPrice = json['medicationPrice']; + medicineCode = json['medicineCode']; + orderTypeDescription = json['orderTypeDescription']; + qty = json['qty']; + quantity = json['quantity']; + remarks = json['remarks']; + routeID = json['routeID']; + startDate = json['startDate']; + status = json['status']; + stopDate = json['stopDate']; + uom = json['uom']; + pharmacistRemarks = json['pharmacistRemarks']; + mediSpanGPICode = json['mediSpanGPICode']; + refill = json['refill']; + pharmacyInervention = json['interventionID']; + } + + Map toJson() { + final Map data = new Map(); + data['appointmentNo'] = this.appointmentNo; + data['clinicName'] = this.clinicName; + data['createdBy'] = this.createdBy; + data['createdOn'] = this.createdOn; + data['doctorName'] = this.doctorName; + data['doseDailyQuantity'] = this.doseDailyQuantity; + data['doseDailyUnitID'] = this.doseDailyUnitID; + data['doseDetail'] = this.doseDetail; + data['doseDurationDays'] = this.doseDurationDays; + data['doseTimingID'] = this.doseTimingID; + data['episodeID'] = this.episodeID; + data['frequencyID'] = this.frequencyID; + data['icdCode10ID'] = this.icdCode10ID; + data['indication'] = this.indication; + data['isDispensed'] = this.isDispensed; + data['isMedicineCovered'] = this.isMedicineCovered; + data['isSIG'] = this.isSIG; + data['medicationName'] = this.medicationName; + data['medicationPrice'] = this.medicationPrice; + data['medicineCode'] = this.medicineCode; + data['orderTypeDescription'] = this.orderTypeDescription; + data['qty'] = this.qty; + data['quantity'] = this.quantity; + data['remarks'] = this.remarks; + data['routeID'] = this.routeID; + data['startDate'] = this.startDate; + data['status'] = this.status; + data['stopDate'] = this.stopDate; + data['uom'] = this.uom; + data['pharmacistRemarks'] = this.pharmacistRemarks; + data['mediSpanGPICode'] = this.mediSpanGPICode; + data['refill'] = this.refill; + data['interventionID'] = this.pharmacyInervention; + + return data; + } +} \ No newline at end of file diff --git a/lib/core/model/Prescriptions/prescription_model.dart b/lib/core/model/Prescriptions/prescription_model.dart index 52c3edec..a286908f 100644 --- a/lib/core/model/Prescriptions/prescription_model.dart +++ b/lib/core/model/Prescriptions/prescription_model.dart @@ -1,5 +1,7 @@ +import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_entity_model.dart'; + class PrescriptionModel { - List entityList; + List entityList; dynamic rowcount; dynamic statusMessage; @@ -7,9 +9,9 @@ class PrescriptionModel { PrescriptionModel.fromJson(Map json) { if (json['entityList'] != null) { - entityList = new List(); + entityList = new List(); json['entityList'].forEach((v) { - entityList.add(new EntityList.fromJson(v)); + entityList.add(new PrescriptionEntityModel.fromJson(v)); }); } rowcount = json['rowcount']; @@ -26,149 +28,3 @@ class PrescriptionModel { return data; } } - -class EntityList { - dynamic appointmentNo; - dynamic clinicName; - dynamic createdBy; - dynamic createdOn; - dynamic doctorName; - dynamic doseDailyQuantity; - dynamic doseDailyUnitID; - dynamic doseDetail; - dynamic doseDurationDays; - dynamic doseTimingID; - dynamic episodeID; - dynamic frequencyID; - dynamic icdCode10ID; - dynamic indication; - dynamic isDispensed; - dynamic isMedicineCovered; - dynamic isSIG; - dynamic medicationName; - dynamic medicationPrice; - dynamic medicineCode; - dynamic orderTypeDescription; - dynamic qty; - dynamic quantity; - dynamic remarks; - dynamic routeID; - dynamic startDate; - dynamic status; - dynamic stopDate; - dynamic uom; - dynamic pharmacistRemarks; - dynamic pharmacyInervention; - dynamic refill; - dynamic mediSpanGPICode; - - EntityList( - {this.appointmentNo, - this.clinicName, - this.createdBy, - this.createdOn, - this.doctorName, - this.doseDailyQuantity, - this.doseDailyUnitID, - this.doseDetail, - this.doseDurationDays, - this.doseTimingID, - this.episodeID, - this.frequencyID, - this.icdCode10ID, - this.indication, - this.isDispensed, - this.isMedicineCovered, - this.isSIG, - this.medicationName, - this.medicationPrice, - this.medicineCode, - this.orderTypeDescription, - this.qty, - this.quantity, - this.remarks, - this.routeID, - this.startDate, - this.status, - this.stopDate, - this.uom, - this.pharmacistRemarks, - this.mediSpanGPICode, - this.pharmacyInervention, - this.refill}); - - EntityList.fromJson(Map json) { - appointmentNo = json['appointmentNo']; - clinicName = json['clinicName']; - createdBy = json['createdBy']; - createdOn = json['createdOn']; - doctorName = json['doctorName']; - doseDailyQuantity = json['doseDailyQuantity']; - doseDailyUnitID = json['doseDailyUnitID']; - doseDetail = json['doseDetail']; - doseDurationDays = json['doseDurationDays']; - doseTimingID = json['doseTimingID']; - episodeID = json['episodeID']; - frequencyID = json['frequencyID']; - icdCode10ID = json['icdCode10ID']; - indication = json['indication']; - isDispensed = json['isDispensed']; - isMedicineCovered = json['isMedicineCovered']; - isSIG = json['isSIG']; - medicationName = json['medicationName']; - medicationPrice = json['medicationPrice']; - medicineCode = json['medicineCode']; - orderTypeDescription = json['orderTypeDescription']; - qty = json['qty']; - quantity = json['quantity']; - remarks = json['remarks']; - routeID = json['routeID']; - startDate = json['startDate']; - status = json['status']; - stopDate = json['stopDate']; - uom = json['uom']; - pharmacistRemarks = json['pharmacistRemarks']; - mediSpanGPICode = json['mediSpanGPICode']; - refill = json['refill']; - pharmacyInervention = json['interventionID']; - } - - Map toJson() { - final Map data = new Map(); - data['appointmentNo'] = this.appointmentNo; - data['clinicName'] = this.clinicName; - data['createdBy'] = this.createdBy; - data['createdOn'] = this.createdOn; - data['doctorName'] = this.doctorName; - data['doseDailyQuantity'] = this.doseDailyQuantity; - data['doseDailyUnitID'] = this.doseDailyUnitID; - data['doseDetail'] = this.doseDetail; - data['doseDurationDays'] = this.doseDurationDays; - data['doseTimingID'] = this.doseTimingID; - data['episodeID'] = this.episodeID; - data['frequencyID'] = this.frequencyID; - data['icdCode10ID'] = this.icdCode10ID; - data['indication'] = this.indication; - data['isDispensed'] = this.isDispensed; - data['isMedicineCovered'] = this.isMedicineCovered; - data['isSIG'] = this.isSIG; - data['medicationName'] = this.medicationName; - data['medicationPrice'] = this.medicationPrice; - data['medicineCode'] = this.medicineCode; - data['orderTypeDescription'] = this.orderTypeDescription; - data['qty'] = this.qty; - data['quantity'] = this.quantity; - data['remarks'] = this.remarks; - data['routeID'] = this.routeID; - data['startDate'] = this.startDate; - data['status'] = this.status; - data['stopDate'] = this.stopDate; - data['uom'] = this.uom; - data['pharmacistRemarks'] = this.pharmacistRemarks; - data['mediSpanGPICode'] = this.mediSpanGPICode; - data['refill'] = this.refill; - data['interventionID'] = this.pharmacyInervention; - - return data; - } -} diff --git a/lib/core/model/Prescriptions/prescription_req_model.dart b/lib/core/model/Prescriptions/prescription_req_model.dart index a45878d8..ec69ca33 100644 --- a/lib/core/model/Prescriptions/prescription_req_model.dart +++ b/lib/core/model/Prescriptions/prescription_req_model.dart @@ -1,26 +1,20 @@ class PrescriptionReqModel { - String vidaAuthTokenID; dynamic patientMRN; dynamic appNo; - dynamic admissionNo; PrescriptionReqModel( - {this.vidaAuthTokenID, this.patientMRN, this.appNo, this.admissionNo}); + { this.patientMRN, this.appNo}); PrescriptionReqModel.fromJson(Map json) { - vidaAuthTokenID = json['VidaAuthTokenID']; patientMRN = json['PatientMRN']; appNo = json['AppointmentNo']; - admissionNo = json['AdmissionNo']; + } Map toJson() { final Map data = new Map(); - data['VidaAuthTokenID'] = this.vidaAuthTokenID; data['PatientMRN'] = this.patientMRN; data['AppointmentNo'] = this.appNo; - data['AdmissionNo'] = this.admissionNo; - return data; } } diff --git a/lib/models/SOAP/Allergy_model.dart b/lib/core/model/SOAP/Allergy_model.dart similarity index 100% rename from lib/models/SOAP/Allergy_model.dart rename to lib/core/model/SOAP/Allergy_model.dart diff --git a/lib/models/SOAP/ChiefComplaint/GetChiefComplaintReqModel.dart b/lib/core/model/SOAP/ChiefComplaint/GetChiefComplaintReqModel.dart similarity index 100% rename from lib/models/SOAP/ChiefComplaint/GetChiefComplaintReqModel.dart rename to lib/core/model/SOAP/ChiefComplaint/GetChiefComplaintReqModel.dart diff --git a/lib/models/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart b/lib/core/model/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart similarity index 100% rename from lib/models/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart rename to lib/core/model/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart diff --git a/lib/models/SOAP/GeneralGetReqForSOAP.dart b/lib/core/model/SOAP/GeneralGetReqForSOAP.dart similarity index 100% rename from lib/models/SOAP/GeneralGetReqForSOAP.dart rename to lib/core/model/SOAP/GeneralGetReqForSOAP.dart diff --git a/lib/models/SOAP/GetAllergiesResModel.dart b/lib/core/model/SOAP/GetAllergiesResModel.dart similarity index 100% rename from lib/models/SOAP/GetAllergiesResModel.dart rename to lib/core/model/SOAP/GetAllergiesResModel.dart diff --git a/lib/models/SOAP/GetAssessmentReqModel.dart b/lib/core/model/SOAP/GetAssessmentReqModel.dart similarity index 100% rename from lib/models/SOAP/GetAssessmentReqModel.dart rename to lib/core/model/SOAP/GetAssessmentReqModel.dart diff --git a/lib/models/SOAP/GetAssessmentResModel.dart b/lib/core/model/SOAP/GetAssessmentResModel.dart similarity index 100% rename from lib/models/SOAP/GetAssessmentResModel.dart rename to lib/core/model/SOAP/GetAssessmentResModel.dart diff --git a/lib/models/SOAP/GetGetProgressNoteReqModel.dart b/lib/core/model/SOAP/GetGetProgressNoteReqModel.dart similarity index 100% rename from lib/models/SOAP/GetGetProgressNoteReqModel.dart rename to lib/core/model/SOAP/GetGetProgressNoteReqModel.dart diff --git a/lib/models/SOAP/GetGetProgressNoteResModel.dart b/lib/core/model/SOAP/GetGetProgressNoteResModel.dart similarity index 100% rename from lib/models/SOAP/GetGetProgressNoteResModel.dart rename to lib/core/model/SOAP/GetGetProgressNoteResModel.dart diff --git a/lib/models/SOAP/GetHistoryReqModel.dart b/lib/core/model/SOAP/GetHistoryReqModel.dart similarity index 100% rename from lib/models/SOAP/GetHistoryReqModel.dart rename to lib/core/model/SOAP/GetHistoryReqModel.dart diff --git a/lib/models/SOAP/GetHistoryResModel.dart b/lib/core/model/SOAP/GetHistoryResModel.dart similarity index 100% rename from lib/models/SOAP/GetHistoryResModel.dart rename to lib/core/model/SOAP/GetHistoryResModel.dart diff --git a/lib/models/SOAP/GetPhysicalExamListResModel.dart b/lib/core/model/SOAP/GetPhysicalExamListResModel.dart similarity index 100% rename from lib/models/SOAP/GetPhysicalExamListResModel.dart rename to lib/core/model/SOAP/GetPhysicalExamListResModel.dart diff --git a/lib/models/SOAP/GetPhysicalExamReqModel.dart b/lib/core/model/SOAP/GetPhysicalExamReqModel.dart similarity index 100% rename from lib/models/SOAP/GetPhysicalExamReqModel.dart rename to lib/core/model/SOAP/GetPhysicalExamReqModel.dart diff --git a/lib/models/SOAP/PatchAssessmentReqModel.dart b/lib/core/model/SOAP/PatchAssessmentReqModel.dart similarity index 100% rename from lib/models/SOAP/PatchAssessmentReqModel.dart rename to lib/core/model/SOAP/PatchAssessmentReqModel.dart diff --git a/lib/models/SOAP/PostEpisodeReqModel.dart b/lib/core/model/SOAP/PostEpisodeReqModel.dart similarity index 100% rename from lib/models/SOAP/PostEpisodeReqModel.dart rename to lib/core/model/SOAP/PostEpisodeReqModel.dart diff --git a/lib/models/SOAP/get_Allergies_request_model.dart b/lib/core/model/SOAP/get_Allergies_request_model.dart similarity index 100% rename from lib/models/SOAP/get_Allergies_request_model.dart rename to lib/core/model/SOAP/get_Allergies_request_model.dart diff --git a/lib/models/SOAP/in_patient/GetEpisodeForInpatientReqModel.dart b/lib/core/model/SOAP/in_patient/GetEpisodeForInpatientReqModel.dart similarity index 100% rename from lib/models/SOAP/in_patient/GetEpisodeForInpatientReqModel.dart rename to lib/core/model/SOAP/in_patient/GetEpisodeForInpatientReqModel.dart diff --git a/lib/models/SOAP/in_patient/PostEpisodeForInpatientRequestModel.dart b/lib/core/model/SOAP/in_patient/PostEpisodeForInpatientRequestModel.dart similarity index 100% rename from lib/models/SOAP/in_patient/PostEpisodeForInpatientRequestModel.dart rename to lib/core/model/SOAP/in_patient/PostEpisodeForInpatientRequestModel.dart diff --git a/lib/models/SOAP/master_key_model.dart b/lib/core/model/SOAP/master_key_model.dart similarity index 100% rename from lib/models/SOAP/master_key_model.dart rename to lib/core/model/SOAP/master_key_model.dart diff --git a/lib/models/SOAP/order-procedure.dart b/lib/core/model/SOAP/order-procedure.dart similarity index 100% rename from lib/models/SOAP/order-procedure.dart rename to lib/core/model/SOAP/order-procedure.dart diff --git a/lib/models/SOAP/post_allergy_request_model.dart b/lib/core/model/SOAP/post_allergy_request_model.dart similarity index 100% rename from lib/models/SOAP/post_allergy_request_model.dart rename to lib/core/model/SOAP/post_allergy_request_model.dart diff --git a/lib/models/SOAP/post_assessment_request_model.dart b/lib/core/model/SOAP/post_assessment_request_model.dart similarity index 100% rename from lib/models/SOAP/post_assessment_request_model.dart rename to lib/core/model/SOAP/post_assessment_request_model.dart diff --git a/lib/models/SOAP/post_chief_complaint_request_model.dart b/lib/core/model/SOAP/post_chief_complaint_request_model.dart similarity index 100% rename from lib/models/SOAP/post_chief_complaint_request_model.dart rename to lib/core/model/SOAP/post_chief_complaint_request_model.dart diff --git a/lib/models/SOAP/post_histories_request_model.dart b/lib/core/model/SOAP/post_histories_request_model.dart similarity index 100% rename from lib/models/SOAP/post_histories_request_model.dart rename to lib/core/model/SOAP/post_histories_request_model.dart diff --git a/lib/models/SOAP/post_physical_exam_request_model.dart b/lib/core/model/SOAP/post_physical_exam_request_model.dart similarity index 100% rename from lib/models/SOAP/post_physical_exam_request_model.dart rename to lib/core/model/SOAP/post_physical_exam_request_model.dart diff --git a/lib/models/SOAP/post_progress_note_request_model.dart b/lib/core/model/SOAP/post_progress_note_request_model.dart similarity index 100% rename from lib/models/SOAP/post_progress_note_request_model.dart rename to lib/core/model/SOAP/post_progress_note_request_model.dart diff --git a/lib/models/SOAP/selected_items/my_selected_allergy.dart b/lib/core/model/SOAP/selected_items/my_selected_allergy.dart similarity index 86% rename from lib/models/SOAP/selected_items/my_selected_allergy.dart rename to lib/core/model/SOAP/selected_items/my_selected_allergy.dart index be022adc..86fad1ec 100644 --- a/lib/models/SOAP/selected_items/my_selected_allergy.dart +++ b/lib/core/model/SOAP/selected_items/my_selected_allergy.dart @@ -1,4 +1,4 @@ -import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart'; class MySelectedAllergy { MasterKeyModel selectedAllergySeverity; diff --git a/lib/models/SOAP/selected_items/my_selected_assement.dart b/lib/core/model/SOAP/selected_items/my_selected_assement.dart similarity index 88% rename from lib/models/SOAP/selected_items/my_selected_assement.dart rename to lib/core/model/SOAP/selected_items/my_selected_assement.dart index 7ac3d979..ab4c9965 100644 --- a/lib/models/SOAP/selected_items/my_selected_assement.dart +++ b/lib/core/model/SOAP/selected_items/my_selected_assement.dart @@ -1,4 +1,4 @@ -import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart'; class MySelectedAssessment { MasterKeyModel selectedICD; diff --git a/lib/models/SOAP/selected_items/my_selected_examination.dart b/lib/core/model/SOAP/selected_items/my_selected_examination.dart similarity index 87% rename from lib/models/SOAP/selected_items/my_selected_examination.dart rename to lib/core/model/SOAP/selected_items/my_selected_examination.dart index 75f67ae2..1e8a128f 100644 --- a/lib/models/SOAP/selected_items/my_selected_examination.dart +++ b/lib/core/model/SOAP/selected_items/my_selected_examination.dart @@ -1,4 +1,4 @@ -import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart'; class MySelectedExamination { MasterKeyModel selectedExamination; diff --git a/lib/models/SOAP/selected_items/my_selected_history.dart b/lib/core/model/SOAP/selected_items/my_selected_history.dart similarity index 74% rename from lib/models/SOAP/selected_items/my_selected_history.dart rename to lib/core/model/SOAP/selected_items/my_selected_history.dart index 3769c418..2aa0b3e3 100644 --- a/lib/models/SOAP/selected_items/my_selected_history.dart +++ b/lib/core/model/SOAP/selected_items/my_selected_history.dart @@ -1,4 +1,4 @@ -import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart'; class MySelectedHistory { MasterKeyModel selectedHistory; diff --git a/lib/models/admisson_orders/admission_orders_model.dart b/lib/core/model/admisson_orders/admission_orders_model.dart similarity index 100% rename from lib/models/admisson_orders/admission_orders_model.dart rename to lib/core/model/admisson_orders/admission_orders_model.dart diff --git a/lib/models/admisson_orders/admission_orders_request_model.dart b/lib/core/model/admisson_orders/admission_orders_request_model.dart similarity index 100% rename from lib/models/admisson_orders/admission_orders_request_model.dart rename to lib/core/model/admisson_orders/admission_orders_request_model.dart diff --git a/lib/core/model/auth/check_activation_code_for_doctor_app_response_model.dart b/lib/core/model/auth/check_activation_code_for_doctor_app_response_model.dart index e39518e6..6fb7eb70 100644 --- a/lib/core/model/auth/check_activation_code_for_doctor_app_response_model.dart +++ b/lib/core/model/auth/check_activation_code_for_doctor_app_response_model.dart @@ -1,4 +1,4 @@ -import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; +import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; class CheckActivationCodeForDoctorAppResponseModel { String authenticationTokenID; diff --git a/lib/models/chart_axis_model.dart b/lib/core/model/chart_axis_model.dart similarity index 100% rename from lib/models/chart_axis_model.dart rename to lib/core/model/chart_axis_model.dart diff --git a/lib/models/countriesModel.dart b/lib/core/model/countriesModel.dart similarity index 100% rename from lib/models/countriesModel.dart rename to lib/core/model/countriesModel.dart diff --git a/lib/models/dashboard/dashboard_model.dart b/lib/core/model/dashboard/dashboard_model.dart similarity index 100% rename from lib/models/dashboard/dashboard_model.dart rename to lib/core/model/dashboard/dashboard_model.dart diff --git a/lib/models/dashboard/get_special_clinical_care_List_Respose_Model.dart b/lib/core/model/dashboard/get_special_clinical_care_List_Respose_Model.dart similarity index 100% rename from lib/models/dashboard/get_special_clinical_care_List_Respose_Model.dart rename to lib/core/model/dashboard/get_special_clinical_care_List_Respose_Model.dart diff --git a/lib/models/dashboard/get_special_clinical_care_mapping_List_Respose_Model.dart b/lib/core/model/dashboard/get_special_clinical_care_mapping_List_Respose_Model.dart similarity index 100% rename from lib/models/dashboard/get_special_clinical_care_mapping_List_Respose_Model.dart rename to lib/core/model/dashboard/get_special_clinical_care_mapping_List_Respose_Model.dart diff --git a/lib/models/discharge_summary/GetDischargeSummaryReqModel.dart b/lib/core/model/discharge_summary/GetDischargeSummaryReqModel.dart similarity index 100% rename from lib/models/discharge_summary/GetDischargeSummaryReqModel.dart rename to lib/core/model/discharge_summary/GetDischargeSummaryReqModel.dart diff --git a/lib/models/discharge_summary/GetDischargeSummaryResModel.dart b/lib/core/model/discharge_summary/GetDischargeSummaryResModel.dart similarity index 100% rename from lib/models/discharge_summary/GetDischargeSummaryResModel.dart rename to lib/core/model/discharge_summary/GetDischargeSummaryResModel.dart diff --git a/lib/models/doctor/clinic_model.dart b/lib/core/model/doctor/clinic_model.dart similarity index 100% rename from lib/models/doctor/clinic_model.dart rename to lib/core/model/doctor/clinic_model.dart diff --git a/lib/models/doctor/doctor_profile_model.dart b/lib/core/model/doctor/doctor_profile_model.dart similarity index 100% rename from lib/models/doctor/doctor_profile_model.dart rename to lib/core/model/doctor/doctor_profile_model.dart diff --git a/lib/models/doctor/list_doctor_working_hours_table_model.dart b/lib/core/model/doctor/list_doctor_working_hours_table_model.dart similarity index 100% rename from lib/models/doctor/list_doctor_working_hours_table_model.dart rename to lib/core/model/doctor/list_doctor_working_hours_table_model.dart diff --git a/lib/models/doctor/list_gt_my_patients_question_model.dart b/lib/core/model/doctor/list_gt_my_patients_question_model.dart similarity index 100% rename from lib/models/doctor/list_gt_my_patients_question_model.dart rename to lib/core/model/doctor/list_gt_my_patients_question_model.dart diff --git a/lib/models/doctor/profile_req_Model.dart b/lib/core/model/doctor/profile_req_Model.dart similarity index 100% rename from lib/models/doctor/profile_req_Model.dart rename to lib/core/model/doctor/profile_req_Model.dart diff --git a/lib/models/doctor/replay/request_create_doctor_response.dart b/lib/core/model/doctor/replay/request_create_doctor_response.dart similarity index 100% rename from lib/models/doctor/replay/request_create_doctor_response.dart rename to lib/core/model/doctor/replay/request_create_doctor_response.dart diff --git a/lib/models/doctor/replay/request_doctor_reply.dart b/lib/core/model/doctor/replay/request_doctor_reply.dart similarity index 100% rename from lib/models/doctor/replay/request_doctor_reply.dart rename to lib/core/model/doctor/replay/request_doctor_reply.dart diff --git a/lib/models/doctor/request_add_referred_doctor_remarks.dart b/lib/core/model/doctor/request_add_referred_doctor_remarks.dart similarity index 100% rename from lib/models/doctor/request_add_referred_doctor_remarks.dart rename to lib/core/model/doctor/request_add_referred_doctor_remarks.dart diff --git a/lib/models/doctor/request_schedule.dart b/lib/core/model/doctor/request_schedule.dart similarity index 100% rename from lib/models/doctor/request_schedule.dart rename to lib/core/model/doctor/request_schedule.dart diff --git a/lib/models/doctor/statstics_for_certain_doctor_request.dart b/lib/core/model/doctor/statstics_for_certain_doctor_request.dart similarity index 100% rename from lib/models/doctor/statstics_for_certain_doctor_request.dart rename to lib/core/model/doctor/statstics_for_certain_doctor_request.dart diff --git a/lib/models/doctor/user_model.dart b/lib/core/model/doctor/user_model.dart similarity index 100% rename from lib/models/doctor/user_model.dart rename to lib/core/model/doctor/user_model.dart diff --git a/lib/models/doctor/verify_referral_doctor_remarks.dart b/lib/core/model/doctor/verify_referral_doctor_remarks.dart similarity index 100% rename from lib/models/doctor/verify_referral_doctor_remarks.dart rename to lib/core/model/doctor/verify_referral_doctor_remarks.dart diff --git a/lib/core/model/labs/patient_lab_orders.dart b/lib/core/model/labs/patient_lab_orders.dart index a3a8d1ac..0aa732a5 100644 --- a/lib/core/model/labs/patient_lab_orders.dart +++ b/lib/core/model/labs/patient_lab_orders.dart @@ -26,6 +26,7 @@ class PatientLabOrders { String nationalityFlagURL; int noOfPatientsRate; DateTime orderDate; + DateTime createdOn; String orderNo; String patientID; String projectID; @@ -98,6 +99,7 @@ class PatientLabOrders { nationalityFlagURL = json['NationalityFlagURL']; noOfPatientsRate = json['NoOfPatientsRate']; orderDate = AppDateUtils.convertStringToDate(json['OrderDate']); + createdOn = AppDateUtils.convertStringToDate(json['CreatedOn']); orderNo = json['OrderNo'].toString(); patientID = json['PatientID'].toString(); projectID = json['ProjectID'].toString(); diff --git a/lib/models/livecare/end_call_req.dart b/lib/core/model/livecare/end_call_req.dart similarity index 100% rename from lib/models/livecare/end_call_req.dart rename to lib/core/model/livecare/end_call_req.dart diff --git a/lib/models/livecare/get_panding_req_list.dart b/lib/core/model/livecare/get_panding_req_list.dart similarity index 100% rename from lib/models/livecare/get_panding_req_list.dart rename to lib/core/model/livecare/get_panding_req_list.dart diff --git a/lib/models/livecare/get_pending_res_list.dart b/lib/core/model/livecare/get_pending_res_list.dart similarity index 100% rename from lib/models/livecare/get_pending_res_list.dart rename to lib/core/model/livecare/get_pending_res_list.dart diff --git a/lib/models/livecare/session_status_model.dart b/lib/core/model/livecare/session_status_model.dart similarity index 100% rename from lib/models/livecare/session_status_model.dart rename to lib/core/model/livecare/session_status_model.dart diff --git a/lib/models/livecare/start_call_req.dart b/lib/core/model/livecare/start_call_req.dart similarity index 100% rename from lib/models/livecare/start_call_req.dart rename to lib/core/model/livecare/start_call_req.dart diff --git a/lib/models/livecare/start_call_res.dart b/lib/core/model/livecare/start_call_res.dart similarity index 100% rename from lib/models/livecare/start_call_res.dart rename to lib/core/model/livecare/start_call_res.dart diff --git a/lib/models/livecare/transfer_to_admin.dart b/lib/core/model/livecare/transfer_to_admin.dart similarity index 100% rename from lib/models/livecare/transfer_to_admin.dart rename to lib/core/model/livecare/transfer_to_admin.dart diff --git a/lib/core/model/note/CreateNoteModel.dart b/lib/core/model/note/CreateNoteModel.dart index db672fcf..20e27289 100644 --- a/lib/core/model/note/CreateNoteModel.dart +++ b/lib/core/model/note/CreateNoteModel.dart @@ -18,6 +18,7 @@ class CreateNoteModel { String sessionID; bool isLoginForDoctorApp; bool patientOutSA; + int conditionId; CreateNoteModel( {this.visitType, @@ -38,7 +39,8 @@ class CreateNoteModel { this.tokenID, this.sessionID, this.isLoginForDoctorApp, - this.patientOutSA}); + this.patientOutSA, + this.conditionId}); CreateNoteModel.fromJson(Map json) { visitType = json['VisitType']; @@ -60,6 +62,7 @@ class CreateNoteModel { sessionID = json['SessionID']; isLoginForDoctorApp = json['IsLoginForDoctorApp']; patientOutSA = json['PatientOutSA']; + conditionId = json['ConditionId']; } Map toJson() { @@ -83,6 +86,7 @@ class CreateNoteModel { data['SessionID'] = this.sessionID; data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp; data['PatientOutSA'] = this.patientOutSA; + data['ConditionId'] = this.conditionId; return data; } } diff --git a/lib/core/model/note/note_model.dart b/lib/core/model/note/note_model.dart index 29a891fa..bef3a973 100644 --- a/lib/core/model/note/note_model.dart +++ b/lib/core/model/note/note_model.dart @@ -19,6 +19,8 @@ class NoteModel { Null doctorClinicName; String doctorName; String visitTypeDesc; + int condition; + String conditionDescription; NoteModel( {this.setupID, @@ -40,7 +42,10 @@ class NoteModel { this.admissionClinicName, this.doctorClinicName, this.doctorName, - this.visitTypeDesc}); + this.visitTypeDesc, + this.condition, + this.conditionDescription, + }); NoteModel.fromJson(Map json) { setupID = json['SetupID']; @@ -63,6 +68,8 @@ class NoteModel { doctorClinicName = json['DoctorClinicName']; doctorName = json['DoctorName']; visitTypeDesc = json['VisitTypeDesc']; + condition = json['Condition']; + conditionDescription = json['ConditionDescription']; } Map toJson() { @@ -87,6 +94,8 @@ class NoteModel { data['DoctorClinicName'] = this.doctorClinicName; data['DoctorName'] = this.doctorName; data['VisitTypeDesc'] = this.visitTypeDesc; + data['Condition'] = this.condition; + data['ConditionDescription'] = this.conditionDescription; return data; } } diff --git a/lib/core/model/note/stp_master_list_req_model.dart b/lib/core/model/note/stp_master_list_req_model.dart new file mode 100644 index 00000000..067a1623 --- /dev/null +++ b/lib/core/model/note/stp_master_list_req_model.dart @@ -0,0 +1,32 @@ +class StpMasterListRequestModel { + bool isDentalAllowedBackend; + int languageID; + int projectID; + int parameterGroup; + int parameterType; + + StpMasterListRequestModel( + {this.isDentalAllowedBackend, + this.languageID, + this.projectID, + this.parameterGroup, + this.parameterType}); + + StpMasterListRequestModel.fromJson(Map json) { + isDentalAllowedBackend = json['isDentalAllowedBackend']; + languageID = json['LanguageID']; + projectID = json['ProjectID']; + parameterGroup = json['parameterGroup']; + parameterType = json['parameterType']; + } + + Map toJson() { + final Map data = new Map(); + data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; + data['LanguageID'] = this.languageID; + data['ProjectID'] = this.projectID; + data['parameterGroup'] = this.parameterGroup; + data['parameterType'] = this.parameterType; + return data; + } +} \ No newline at end of file diff --git a/lib/core/model/note/stp_master_list_res_model.dart b/lib/core/model/note/stp_master_list_res_model.dart new file mode 100644 index 00000000..2533605a --- /dev/null +++ b/lib/core/model/note/stp_master_list_res_model.dart @@ -0,0 +1,22 @@ +class StpMasterListResponseModel { + int parameterCode; + String description; + Null descriptionN; + + StpMasterListResponseModel( + {this.parameterCode, this.description, this.descriptionN}); + + StpMasterListResponseModel.fromJson(Map json) { + parameterCode = json['ParameterCode']; + description = json['Description']; + descriptionN = json['DescriptionN']; + } + + Map toJson() { + final Map data = new Map(); + data['ParameterCode'] = this.parameterCode; + data['Description'] = this.description; + data['DescriptionN'] = this.descriptionN; + return data; + } +} \ No newline at end of file diff --git a/lib/core/model/note/update_note_model.dart b/lib/core/model/note/update_note_model.dart index f2d845ff..faedb6f7 100644 --- a/lib/core/model/note/update_note_model.dart +++ b/lib/core/model/note/update_note_model.dart @@ -16,6 +16,7 @@ class UpdateNoteReqModel { bool isLoginForDoctorApp; bool patientOutSA; int patientTypeID; + int conditionId; UpdateNoteReqModel( {this.projectID, @@ -34,7 +35,8 @@ class UpdateNoteReqModel { this.sessionID, this.isLoginForDoctorApp, this.patientOutSA, - this.patientTypeID}); + this.patientTypeID, + this.conditionId}); UpdateNoteReqModel.fromJson(Map json) { projectID = json['ProjectID']; @@ -54,6 +56,7 @@ class UpdateNoteReqModel { isLoginForDoctorApp = json['IsLoginForDoctorApp']; patientOutSA = json['PatientOutSA']; patientTypeID = json['PatientTypeID']; + conditionId = json['ConditionId']; } Map toJson() { @@ -75,6 +78,7 @@ class UpdateNoteReqModel { data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp; data['PatientOutSA'] = this.patientOutSA; data['PatientTypeID'] = this.patientTypeID; + data['ConditionId'] = this.conditionId; return data; } } diff --git a/lib/models/operation_report/create_update_operation_report_request_model.dart b/lib/core/model/operation_report/create_update_operation_report_request_model.dart similarity index 100% rename from lib/models/operation_report/create_update_operation_report_request_model.dart rename to lib/core/model/operation_report/create_update_operation_report_request_model.dart diff --git a/lib/models/operation_report/get_operation_details_request_modle.dart b/lib/core/model/operation_report/get_operation_details_request_modle.dart similarity index 100% rename from lib/models/operation_report/get_operation_details_request_modle.dart rename to lib/core/model/operation_report/get_operation_details_request_modle.dart diff --git a/lib/models/operation_report/get_operation_details_response_modle.dart b/lib/core/model/operation_report/get_operation_details_response_modle.dart similarity index 100% rename from lib/models/operation_report/get_operation_details_response_modle.dart rename to lib/core/model/operation_report/get_operation_details_response_modle.dart diff --git a/lib/models/operation_report/get_reservations_request_model.dart b/lib/core/model/operation_report/get_reservations_request_model.dart similarity index 100% rename from lib/models/operation_report/get_reservations_request_model.dart rename to lib/core/model/operation_report/get_reservations_request_model.dart diff --git a/lib/models/operation_report/get_reservations_response_model.dart b/lib/core/model/operation_report/get_reservations_response_model.dart similarity index 100% rename from lib/models/operation_report/get_reservations_response_model.dart rename to lib/core/model/operation_report/get_reservations_response_model.dart diff --git a/lib/models/patient/MedicalReport/MedicalReportTemplate.dart b/lib/core/model/patient/MedicalReport/MedicalReportTemplate.dart similarity index 100% rename from lib/models/patient/MedicalReport/MedicalReportTemplate.dart rename to lib/core/model/patient/MedicalReport/MedicalReportTemplate.dart diff --git a/lib/models/patient/MedicalReport/MeidcalReportModel.dart b/lib/core/model/patient/MedicalReport/MeidcalReportModel.dart similarity index 100% rename from lib/models/patient/MedicalReport/MeidcalReportModel.dart rename to lib/core/model/patient/MedicalReport/MeidcalReportModel.dart diff --git a/lib/models/patient/PatientArrivalEntity.dart b/lib/core/model/patient/PatientArrivalEntity.dart similarity index 100% rename from lib/models/patient/PatientArrivalEntity.dart rename to lib/core/model/patient/PatientArrivalEntity.dart diff --git a/lib/models/patient/get_clinic_by_project_id_request.dart b/lib/core/model/patient/get_clinic_by_project_id_request.dart similarity index 100% rename from lib/models/patient/get_clinic_by_project_id_request.dart rename to lib/core/model/patient/get_clinic_by_project_id_request.dart diff --git a/lib/models/patient/get_doctor_by_clinic_id_request.dart b/lib/core/model/patient/get_doctor_by_clinic_id_request.dart similarity index 100% rename from lib/models/patient/get_doctor_by_clinic_id_request.dart rename to lib/core/model/patient/get_doctor_by_clinic_id_request.dart diff --git a/lib/models/patient/get_list_stp_referral_frequency_request.dart b/lib/core/model/patient/get_list_stp_referral_frequency_request.dart similarity index 100% rename from lib/models/patient/get_list_stp_referral_frequency_request.dart rename to lib/core/model/patient/get_list_stp_referral_frequency_request.dart diff --git a/lib/models/patient/get_pending_patient_er_model.dart b/lib/core/model/patient/get_pending_patient_er_model.dart similarity index 100% rename from lib/models/patient/get_pending_patient_er_model.dart rename to lib/core/model/patient/get_pending_patient_er_model.dart diff --git a/lib/models/patient/insurance_aprovals_request.dart b/lib/core/model/patient/insurance_aprovals_request.dart similarity index 100% rename from lib/models/patient/insurance_aprovals_request.dart rename to lib/core/model/patient/insurance_aprovals_request.dart diff --git a/lib/models/patient/lab_orders/lab_orders_req_model.dart b/lib/core/model/patient/lab_orders/lab_orders_req_model.dart similarity index 100% rename from lib/models/patient/lab_orders/lab_orders_req_model.dart rename to lib/core/model/patient/lab_orders/lab_orders_req_model.dart diff --git a/lib/models/patient/lab_orders/lab_orders_res_model.dart b/lib/core/model/patient/lab_orders/lab_orders_res_model.dart similarity index 100% rename from lib/models/patient/lab_orders/lab_orders_res_model.dart rename to lib/core/model/patient/lab_orders/lab_orders_res_model.dart diff --git a/lib/models/patient/lab_result/lab_result.dart b/lib/core/model/patient/lab_result/lab_result.dart similarity index 100% rename from lib/models/patient/lab_result/lab_result.dart rename to lib/core/model/patient/lab_result/lab_result.dart diff --git a/lib/models/patient/lab_result/lab_result_req_model.dart b/lib/core/model/patient/lab_result/lab_result_req_model.dart similarity index 100% rename from lib/models/patient/lab_result/lab_result_req_model.dart rename to lib/core/model/patient/lab_result/lab_result_req_model.dart diff --git a/lib/models/patient/my_referral/PendingReferral.dart b/lib/core/model/patient/my_referral/PendingReferral.dart similarity index 100% rename from lib/models/patient/my_referral/PendingReferral.dart rename to lib/core/model/patient/my_referral/PendingReferral.dart diff --git a/lib/models/patient/my_referral/clinic-doctor.dart b/lib/core/model/patient/my_referral/clinic-doctor.dart similarity index 100% rename from lib/models/patient/my_referral/clinic-doctor.dart rename to lib/core/model/patient/my_referral/clinic-doctor.dart diff --git a/lib/models/patient/my_referral/my_referral_patient_model.dart b/lib/core/model/patient/my_referral/my_referral_patient_model.dart similarity index 100% rename from lib/models/patient/my_referral/my_referral_patient_model.dart rename to lib/core/model/patient/my_referral/my_referral_patient_model.dart diff --git a/lib/models/patient/my_referral/my_referred_patient_model.dart b/lib/core/model/patient/my_referral/my_referred_patient_model.dart similarity index 100% rename from lib/models/patient/my_referral/my_referred_patient_model.dart rename to lib/core/model/patient/my_referral/my_referred_patient_model.dart diff --git a/lib/models/patient/orders_request.dart b/lib/core/model/patient/orders_request.dart similarity index 100% rename from lib/models/patient/orders_request.dart rename to lib/core/model/patient/orders_request.dart diff --git a/lib/models/patient/patiant_info_model.dart b/lib/core/model/patient/patiant_info_model.dart similarity index 99% rename from lib/models/patient/patiant_info_model.dart rename to lib/core/model/patient/patiant_info_model.dart index 9e4ebeb2..99127cc9 100644 --- a/lib/models/patient/patiant_info_model.dart +++ b/lib/core/model/patient/patiant_info_model.dart @@ -1,6 +1,7 @@ // TODO = it have to be changed. import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/util/helpers.dart'; class PatiantInformtion { PatiantInformtion patientDetails; @@ -199,8 +200,8 @@ class PatiantInformtion { bedId = json["BedID"] ?? json["bedID"]; nursingStationId = json["NursingStationID"] ?? json["nursingStationID"]; description = json["Description"] ?? json["description"]; - clinicDescription = - json["ClinicDescription"] ?? json["clinicDescription"]; + clinicDescription = Helpers.convertToTitleCase( + json["ClinicDescription"] ?? json["clinicDescription"]??''); clinicDescriptionN = json["ClinicDescriptionN"] ?? json["clinicDescriptionN"]; nationalityName = json["NationalityName"] ?? diff --git a/lib/models/patient/patient_arrival/get_patient_arrival_list_request_model.dart b/lib/core/model/patient/patient_arrival/get_patient_arrival_list_request_model.dart similarity index 100% rename from lib/models/patient/patient_arrival/get_patient_arrival_list_request_model.dart rename to lib/core/model/patient/patient_arrival/get_patient_arrival_list_request_model.dart diff --git a/lib/models/patient/patient_model.dart b/lib/core/model/patient/patient_model.dart similarity index 100% rename from lib/models/patient/patient_model.dart rename to lib/core/model/patient/patient_model.dart diff --git a/lib/models/patient/prescription/prescription_report.dart b/lib/core/model/patient/prescription/prescription_report.dart similarity index 100% rename from lib/models/patient/prescription/prescription_report.dart rename to lib/core/model/patient/prescription/prescription_report.dart diff --git a/lib/models/patient/prescription/prescription_report_for_in_patient.dart b/lib/core/model/patient/prescription/prescription_report_for_in_patient.dart similarity index 100% rename from lib/models/patient/prescription/prescription_report_for_in_patient.dart rename to lib/core/model/patient/prescription/prescription_report_for_in_patient.dart diff --git a/lib/models/patient/prescription/prescription_req_model.dart b/lib/core/model/patient/prescription/prescription_req_model.dart similarity index 100% rename from lib/models/patient/prescription/prescription_req_model.dart rename to lib/core/model/patient/prescription/prescription_req_model.dart diff --git a/lib/models/patient/prescription/prescription_res_model.dart b/lib/core/model/patient/prescription/prescription_res_model.dart similarity index 97% rename from lib/models/patient/prescription/prescription_res_model.dart rename to lib/core/model/patient/prescription/prescription_res_model.dart index 9c7e296d..eed34296 100644 --- a/lib/models/patient/prescription/prescription_res_model.dart +++ b/lib/core/model/patient/prescription/prescription_res_model.dart @@ -16,7 +16,6 @@ class PrescriptionResModel { String name; int episodeID; int actualDoctorRate; - int admission; int clinicID; String companyName; String despensedStatus; @@ -51,7 +50,6 @@ class PrescriptionResModel { this.name, this.episodeID, this.actualDoctorRate, - this.admission, this.clinicID, this.companyName, this.despensedStatus, @@ -86,7 +84,6 @@ class PrescriptionResModel { name = json['Name']; episodeID = json['EpisodeID']; actualDoctorRate = json['ActualDoctorRate']; - admission = json['Admission']; clinicID = json['ClinicID']; companyName = json['CompanyName']; despensedStatus = json['Despensed_Status']; @@ -123,7 +120,6 @@ class PrescriptionResModel { data['Name'] = this.name; data['EpisodeID'] = this.episodeID; data['ActualDoctorRate'] = this.actualDoctorRate; - data['Admission'] = this.admission; data['ClinicID'] = this.clinicID; data['CompanyName'] = this.companyName; data['Despensed_Status'] = this.despensedStatus; diff --git a/lib/models/patient/prescription/request_prescription_report.dart b/lib/core/model/patient/prescription/request_prescription_report.dart similarity index 100% rename from lib/models/patient/prescription/request_prescription_report.dart rename to lib/core/model/patient/prescription/request_prescription_report.dart diff --git a/lib/models/patient/progress_note_request.dart b/lib/core/model/patient/progress_note_request.dart similarity index 100% rename from lib/models/patient/progress_note_request.dart rename to lib/core/model/patient/progress_note_request.dart diff --git a/lib/models/patient/radiology/radiology_req_model.dart b/lib/core/model/patient/radiology/radiology_req_model.dart similarity index 100% rename from lib/models/patient/radiology/radiology_req_model.dart rename to lib/core/model/patient/radiology/radiology_req_model.dart diff --git a/lib/models/patient/radiology/radiology_res_model.dart b/lib/core/model/patient/radiology/radiology_res_model.dart similarity index 100% rename from lib/models/patient/radiology/radiology_res_model.dart rename to lib/core/model/patient/radiology/radiology_res_model.dart diff --git a/lib/models/patient/reauest_prescription_report_for_in_patient.dart b/lib/core/model/patient/reauest_prescription_report_for_in_patient.dart similarity index 100% rename from lib/models/patient/reauest_prescription_report_for_in_patient.dart rename to lib/core/model/patient/reauest_prescription_report_for_in_patient.dart diff --git a/lib/models/patient/refer_to_doctor_request.dart b/lib/core/model/patient/refer_to_doctor_request.dart similarity index 100% rename from lib/models/patient/refer_to_doctor_request.dart rename to lib/core/model/patient/refer_to_doctor_request.dart diff --git a/lib/models/patient/request_my_referral_patient_model.dart b/lib/core/model/patient/request_my_referral_patient_model.dart similarity index 100% rename from lib/models/patient/request_my_referral_patient_model.dart rename to lib/core/model/patient/request_my_referral_patient_model.dart diff --git a/lib/models/patient/topten_users_res_model.dart b/lib/core/model/patient/topten_users_res_model.dart similarity index 87% rename from lib/models/patient/topten_users_res_model.dart rename to lib/core/model/patient/topten_users_res_model.dart index ac603cdb..cc47a2f8 100644 --- a/lib/models/patient/topten_users_res_model.dart +++ b/lib/core/model/patient/topten_users_res_model.dart @@ -6,7 +6,7 @@ *@desc: */ -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; //ModelResponse class ModelResponse { diff --git a/lib/models/patient/vital_sign/patient-vital-sign-data.dart b/lib/core/model/patient/vital_sign/patient-vital-sign-data.dart similarity index 100% rename from lib/models/patient/vital_sign/patient-vital-sign-data.dart rename to lib/core/model/patient/vital_sign/patient-vital-sign-data.dart diff --git a/lib/models/patient/vital_sign/patient-vital-sign-history.dart b/lib/core/model/patient/vital_sign/patient-vital-sign-history.dart similarity index 100% rename from lib/models/patient/vital_sign/patient-vital-sign-history.dart rename to lib/core/model/patient/vital_sign/patient-vital-sign-history.dart diff --git a/lib/models/patient/vital_sign/vital_sign_req_model.dart b/lib/core/model/patient/vital_sign/vital_sign_req_model.dart similarity index 100% rename from lib/models/patient/vital_sign/vital_sign_req_model.dart rename to lib/core/model/patient/vital_sign/vital_sign_req_model.dart diff --git a/lib/models/patient/vital_sign/vital_sign_res_model.dart b/lib/core/model/patient/vital_sign/vital_sign_res_model.dart similarity index 100% rename from lib/models/patient/vital_sign/vital_sign_res_model.dart rename to lib/core/model/patient/vital_sign/vital_sign_res_model.dart diff --git a/lib/models/pending_orders/pending_order_request_model.dart b/lib/core/model/pending_orders/pending_order_request_model.dart similarity index 100% rename from lib/models/pending_orders/pending_order_request_model.dart rename to lib/core/model/pending_orders/pending_order_request_model.dart diff --git a/lib/models/pending_orders/pending_orders_model.dart b/lib/core/model/pending_orders/pending_orders_model.dart similarity index 100% rename from lib/models/pending_orders/pending_orders_model.dart rename to lib/core/model/pending_orders/pending_orders_model.dart diff --git a/lib/models/pharmacies/pharmacies_List_request_model.dart b/lib/core/model/pharmacies/pharmacies_List_request_model.dart similarity index 100% rename from lib/models/pharmacies/pharmacies_List_request_model.dart rename to lib/core/model/pharmacies/pharmacies_List_request_model.dart diff --git a/lib/models/pharmacies/pharmacies_items_request_model.dart b/lib/core/model/pharmacies/pharmacies_items_request_model.dart similarity index 100% rename from lib/models/pharmacies/pharmacies_items_request_model.dart rename to lib/core/model/pharmacies/pharmacies_items_request_model.dart diff --git a/lib/core/model/pharmacy-intervention-model/accept_or_reject_req_model.dart b/lib/core/model/pharmacy-intervention-model/accept_or_reject_req_model.dart new file mode 100644 index 00000000..67b234de --- /dev/null +++ b/lib/core/model/pharmacy-intervention-model/accept_or_reject_req_model.dart @@ -0,0 +1,66 @@ +class AcceptOrRejectReqModel { + int patientID; + int projectID; + int admissionNo; + int prescriptionNo; + int orderNo; + String remarks; + int memberID; + int accessLevel; + int languageID; + int lineItemNo; + bool patientOutSA; + int interventionStatus; + int status; + + AcceptOrRejectReqModel( + {this.patientID, + this.projectID, + this.admissionNo, + this.prescriptionNo, + this.orderNo, + this.remarks, + this.memberID, + this.accessLevel, + this.languageID, + this.lineItemNo, + this.patientOutSA, + this.interventionStatus, + this.status + }); + + AcceptOrRejectReqModel.fromJson(Map json) { + patientID = json['PatientID']; + projectID = json['ProjectID']; + admissionNo = json['AdmissionNo']; + prescriptionNo = json['PrescriptionNo']; + orderNo = json['OrderNo']; + remarks = json['Remarks']; + memberID = json['MemberID']; + accessLevel = json['AccessLevel']; + languageID = json['LanguageID']; + lineItemNo = json['LineItemNo']; + patientOutSA = json['PatientOutSA']; + interventionStatus = json['InterventionStatus']; + status = json['Status']; + + } + + Map toJson() { + final Map data = new Map(); + data['PatientID'] = this.patientID; + data['ProjectID'] = this.projectID; + data['AdmissionNo'] = this.admissionNo; + data['PrescriptionNo'] = this.prescriptionNo; + data['OrderNo'] = this.orderNo; + data['Remarks'] = this.remarks; + data['MemberID'] = this.memberID; + data['AccessLevel'] = this.accessLevel; + data['LanguageID'] = this.languageID; + data['LineItemNo'] = this.lineItemNo; + data['PatientOutSA'] = this.patientOutSA; + data['InterventionStatus'] = this.interventionStatus; + data['Status'] = this.status; + return data; + } +} \ No newline at end of file diff --git a/lib/core/model/pharmacy-intervention-model/accept_or_reject_res_model.dart b/lib/core/model/pharmacy-intervention-model/accept_or_reject_res_model.dart new file mode 100644 index 00000000..7e2448f6 --- /dev/null +++ b/lib/core/model/pharmacy-intervention-model/accept_or_reject_res_model.dart @@ -0,0 +1,4 @@ +class AcceptOrRejectResModel { + + +} \ No newline at end of file diff --git a/lib/core/model/pharmacy-intervention-model/intervention_medication_history_req_model.dart b/lib/core/model/pharmacy-intervention-model/intervention_medication_history_req_model.dart new file mode 100644 index 00000000..122212b7 --- /dev/null +++ b/lib/core/model/pharmacy-intervention-model/intervention_medication_history_req_model.dart @@ -0,0 +1,32 @@ +class InterventionMedicationHistoryReqModel { + int projectID; + int patientID; + int admissionNo; + int orderNo; + int prescriptionNo; + + InterventionMedicationHistoryReqModel( + {this.projectID, + this.patientID, + this.admissionNo, + this.orderNo, + this.prescriptionNo}); + + InterventionMedicationHistoryReqModel.fromJson(Map json) { + projectID = json['ProjectID']; + patientID = json['PatientID']; + admissionNo = json['AdmissionNo']; + orderNo = json['OrderNo']; + prescriptionNo = json['PrescriptionNo']; + } + + Map toJson() { + final Map data = new Map(); + data['ProjectID'] = this.projectID; + data['PatientID'] = this.patientID; + data['AdmissionNo'] = this.admissionNo; + data['OrderNo'] = this.orderNo; + data['PrescriptionNo'] = this.prescriptionNo; + return data; + } +} \ No newline at end of file diff --git a/lib/core/model/pharmacy-intervention-model/intervention_medication_history_res_model.dart b/lib/core/model/pharmacy-intervention-model/intervention_medication_history_res_model.dart new file mode 100644 index 00000000..451cccb8 --- /dev/null +++ b/lib/core/model/pharmacy-intervention-model/intervention_medication_history_res_model.dart @@ -0,0 +1,96 @@ +class InterventionMedicationHistoryResModel { + String setupId; + String projectId; + int patientId; + int admissionNo; + int prescriptionId; + int orderNo; + int id; + int interventionId; + Null intervention; + String remark; + int commentedBy; + bool isDoctor; + bool isActive; + int createdBy; + String createdByName; + String createdByNameN; + String createdOn; + Null editedBy; + Null editedByName; + Null editedByNameN; + Null editedOn; + + InterventionMedicationHistoryResModel( + {this.setupId, + this.projectId, + this.patientId, + this.admissionNo, + this.prescriptionId, + this.orderNo, + this.id, + this.interventionId, + this.intervention, + this.remark, + this.commentedBy, + this.isDoctor, + this.isActive, + this.createdBy, + this.createdByName, + this.createdByNameN, + this.createdOn, + this.editedBy, + this.editedByName, + this.editedByNameN, + this.editedOn}); + + InterventionMedicationHistoryResModel.fromJson(Map json) { + setupId = json['SetupId']; + projectId = json['ProjectId']; + patientId = json['PatientId']; + admissionNo = json['AdmissionNo']; + prescriptionId = json['PrescriptionId']; + orderNo = json['OrderNo']; + id = json['Id']; + interventionId = json['InterventionId']; + intervention = json['Intervention']; + remark = json['Remark']; + commentedBy = json['CommentedBy']; + isDoctor = json['IsDoctor']; + isActive = json['IsActive']; + createdBy = json['CreatedBy']; + createdByName = json['CreatedByName']; + createdByNameN = json['CreatedByNameN']; + createdOn = json['CreatedOn']; + editedBy = json['EditedBy']; + editedByName = json['EditedByName']; + editedByNameN = json['EditedByNameN']; + editedOn = json['EditedOn']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupId'] = this.setupId; + data['ProjectId'] = this.projectId; + data['PatientId'] = this.patientId; + data['AdmissionNo'] = this.admissionNo; + data['PrescriptionId'] = this.prescriptionId; + data['OrderNo'] = this.orderNo; + data['Id'] = this.id; + data['InterventionId'] = this.interventionId; + data['Intervention'] = this.intervention; + data['Remark'] = this.remark; + data['CommentedBy'] = this.commentedBy; + data['IsDoctor'] = this.isDoctor; + data['IsActive'] = this.isActive; + data['CreatedBy'] = this.createdBy; + data['CreatedByName'] = this.createdByName; + data['CreatedByNameN'] = this.createdByNameN; + data['CreatedOn'] = this.createdOn; + data['EditedBy'] = this.editedBy; + data['EditedByName'] = this.editedByName; + data['EditedByNameN'] = this.editedByNameN; + data['EditedOn'] = this.editedOn; + return data; + } +} \ No newline at end of file diff --git a/lib/core/model/pharmacy-intervention-model/new_medication_req_model.dart b/lib/core/model/pharmacy-intervention-model/new_medication_req_model.dart new file mode 100644 index 00000000..92cde706 --- /dev/null +++ b/lib/core/model/pharmacy-intervention-model/new_medication_req_model.dart @@ -0,0 +1,25 @@ +class InterventionMedicationReqModel { + int projectID; + int patientID; + String fromDate; + String toDate; + + InterventionMedicationReqModel( + {this.projectID, this.patientID, this.fromDate, this.toDate}); + + InterventionMedicationReqModel.fromJson(Map json) { + projectID = json['ProjectID']; + patientID = json['PatientID']; + fromDate = json['FromDate']; + toDate = json['ToDate']; + } + + Map toJson() { + final Map data = new Map(); + data['ProjectID'] = this.projectID; + data['PatientID'] = this.patientID; + data['FromDate'] = this.fromDate; + data['ToDate'] = this.toDate; + return data; + } +} \ No newline at end of file diff --git a/lib/core/model/pharmacy-intervention-model/new_medication_res_model.dart b/lib/core/model/pharmacy-intervention-model/new_medication_res_model.dart new file mode 100644 index 00000000..5d3dca39 --- /dev/null +++ b/lib/core/model/pharmacy-intervention-model/new_medication_res_model.dart @@ -0,0 +1,100 @@ +class InterventionMedicationResModel { + String cS; + String iHR; + String setupID; + int projectID; + int accessLevel; + int patientID; + String patientName; + String description; + int admissionNo; + int orderNo; + int prescriptionNo; + int lineItemNo; + int itemID; + String medication; + String doctorComments; + String startDatetime; + String stopDatetime; + int status; + int createdBy; + int authorizedby; + Null pharmacyRemarks; + String statusDescription; + + InterventionMedicationResModel( + {this.cS, + this.iHR, + this.setupID, + this.projectID, + this.accessLevel, + this.patientID, + this.patientName, + this.description, + this.admissionNo, + this.orderNo, + this.prescriptionNo, + this.lineItemNo, + this.itemID, + this.medication, + this.doctorComments, + this.startDatetime, + this.stopDatetime, + this.status, + this.createdBy, + this.authorizedby, + this.pharmacyRemarks, + this.statusDescription}); + + InterventionMedicationResModel.fromJson(Map json) { + cS = json['CS']; + iHR = json['IHR']; + setupID = json['SetupID']; + projectID = json['ProjectID']; + accessLevel = json['AccessLevel']; + patientID = json['PatientID']; + patientName = json['PatientName']; + description = json['Description']; + admissionNo = json['AdmissionNo']; + orderNo = json['OrderNo']; + prescriptionNo = json['PrescriptionNo']; + lineItemNo = json['LineItemNo']; + itemID = json['ItemID']; + medication = json['Medication']; + doctorComments = json['DoctorComments']; + startDatetime = json['StartDatetime']; + stopDatetime = json['StopDatetime']; + status = json['Status']; + createdBy = json['CreatedBy']; + authorizedby = json['Authorizedby']; + pharmacyRemarks = json['PharmacyRemarks']; + statusDescription = json['StatusDescription']; + } + + Map toJson() { + final Map data = new Map(); + data['CS'] = this.cS; + data['IHR'] = this.iHR; + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['AccessLevel'] = this.accessLevel; + data['PatientID'] = this.patientID; + data['PatientName'] = this.patientName; + data['Description'] = this.description; + data['AdmissionNo'] = this.admissionNo; + data['OrderNo'] = this.orderNo; + data['PrescriptionNo'] = this.prescriptionNo; + data['LineItemNo'] = this.lineItemNo; + data['ItemID'] = this.itemID; + data['Medication'] = this.medication; + data['DoctorComments'] = this.doctorComments; + data['StartDatetime'] = this.startDatetime; + data['StopDatetime'] = this.stopDatetime; + data['Status'] = this.status; + data['CreatedBy'] = this.createdBy; + data['Authorizedby'] = this.authorizedby; + data['PharmacyRemarks'] = this.pharmacyRemarks; + data['StatusDescription'] = this.statusDescription; + return data; + } +} \ No newline at end of file diff --git a/lib/models/sickleave/add_sickleave_request.dart b/lib/core/model/sickleave/add_sickleave_request.dart similarity index 100% rename from lib/models/sickleave/add_sickleave_request.dart rename to lib/core/model/sickleave/add_sickleave_request.dart diff --git a/lib/models/sickleave/extend_sick_leave_request.dart b/lib/core/model/sickleave/extend_sick_leave_request.dart similarity index 100% rename from lib/models/sickleave/extend_sick_leave_request.dart rename to lib/core/model/sickleave/extend_sick_leave_request.dart diff --git a/lib/models/sickleave/get_all_sickleave_response.dart b/lib/core/model/sickleave/get_all_sickleave_response.dart similarity index 100% rename from lib/models/sickleave/get_all_sickleave_response.dart rename to lib/core/model/sickleave/get_all_sickleave_response.dart diff --git a/lib/models/sickleave/sick_leave_statisitics_model.dart b/lib/core/model/sickleave/sick_leave_statisitics_model.dart similarity index 100% rename from lib/models/sickleave/sick_leave_statisitics_model.dart rename to lib/core/model/sickleave/sick_leave_statisitics_model.dart diff --git a/lib/core/model/vte_assessment/vte_assessment_req_model.dart b/lib/core/model/vte_assessment/vte_assessment_req_model.dart new file mode 100644 index 00000000..1f0bd1fa --- /dev/null +++ b/lib/core/model/vte_assessment/vte_assessment_req_model.dart @@ -0,0 +1,22 @@ +class VteAssessmentRequestModel { + String setupID; + int parameterGroup; + int transactionNo; + + VteAssessmentRequestModel( + {this.setupID = "010266", this.parameterGroup = 7, this.transactionNo}); + + VteAssessmentRequestModel.fromJson(Map json) { + setupID = json['SetupID']; + parameterGroup = json['ParameterGroup']; + transactionNo = json['TransactionNo']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['ParameterGroup'] = this.parameterGroup; + data['TransactionNo'] = this.transactionNo; + return data; + } +} diff --git a/lib/core/model/vte_assessment/vte_assessment_res_model.dart b/lib/core/model/vte_assessment/vte_assessment_res_model.dart new file mode 100644 index 00000000..8bd2c441 --- /dev/null +++ b/lib/core/model/vte_assessment/vte_assessment_res_model.dart @@ -0,0 +1,48 @@ +class VteAssessmentResponseModel { + int lineItemNo; + String vTEType; + String ambulationProtocol; + String pharmacology; + String reasonsThrombo; + String riskScore; + int totalScore; + int createdBy; + String createdOn; + + VteAssessmentResponseModel( + {this.lineItemNo, + this.vTEType, + this.ambulationProtocol, + this.pharmacology, + this.reasonsThrombo, + this.riskScore, + this.totalScore, + this.createdBy, + this.createdOn}); + + VteAssessmentResponseModel.fromJson(Map json) { + lineItemNo = json['LineItemNo']; + vTEType = json['VTE_Type']; + ambulationProtocol = json['AmbulationProtocol']; + pharmacology = json['Pharmacology']; + reasonsThrombo = json['ReasonsThrombo']; + riskScore = json['Risk_Score']; + totalScore = json['Total_Score']; + createdBy = json['Created_By']; + createdOn = json['Created_On']; + } + + Map toJson() { + final Map data = new Map(); + data['LineItemNo'] = this.lineItemNo; + data['VTE_Type'] = this.vTEType; + data['AmbulationProtocol'] = this.ambulationProtocol; + data['Pharmacology'] = this.pharmacology; + data['ReasonsThrombo'] = this.reasonsThrombo; + data['Risk_Score'] = this.riskScore; + data['Total_Score'] = this.totalScore; + data['Created_By'] = this.createdBy; + data['Created_On'] = this.createdOn; + return data; + } +} diff --git a/lib/core/service/VideoCallService.dart b/lib/core/service/VideoCallService.dart index 288db1d5..6fdbf045 100644 --- a/lib/core/service/VideoCallService.dart +++ b/lib/core/service/VideoCallService.dart @@ -2,11 +2,11 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; import 'package:doctor_app_flutter/core/service/patient/LiveCarePatientServices.dart'; -import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; -import 'package:doctor_app_flutter/models/livecare/end_call_req.dart'; -import 'package:doctor_app_flutter/models/livecare/session_status_model.dart'; -import 'package:doctor_app_flutter/models/livecare/start_call_res.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; +import 'package:doctor_app_flutter/core/model/livecare/end_call_req.dart'; +import 'package:doctor_app_flutter/core/model/livecare/session_status_model.dart'; +import 'package:doctor_app_flutter/core/model/livecare/start_call_res.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/util/VideoChannel.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; diff --git a/lib/core/service/authentication_service.dart b/lib/core/service/authentication_service.dart index cb2879a6..4de0a7e4 100644 --- a/lib/core/service/authentication_service.dart +++ b/lib/core/service/authentication_service.dart @@ -8,9 +8,9 @@ import 'package:doctor_app_flutter/core/model/auth/insert_imei_model.dart'; import 'package:doctor_app_flutter/core/model/auth/new_login_information_response_model.dart'; import 'package:doctor_app_flutter/core/model/auth/send_activation_code_for_doctor_app_response_model.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; -import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; -import 'package:doctor_app_flutter/models/doctor/profile_req_Model.dart'; -import 'package:doctor_app_flutter/models/doctor/user_model.dart'; +import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; +import 'package:doctor_app_flutter/core/model/doctor/profile_req_Model.dart'; +import 'package:doctor_app_flutter/core/model/doctor/user_model.dart'; class AuthenticationService extends BaseService { List _imeiDetails = []; diff --git a/lib/core/service/base/base_service.dart b/lib/core/service/base/base_service.dart index ce588b88..9334a61b 100644 --- a/lib/core/service/base/base_service.dart +++ b/lib/core/service/base/base_service.dart @@ -1,7 +1,7 @@ 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/models/doctor/doctor_profile_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; class BaseService { diff --git a/lib/core/service/base/lookup-service.dart b/lib/core/service/base/lookup-service.dart index 6c8a32e9..f68aa01a 100644 --- a/lib/core/service/base/lookup-service.dart +++ b/lib/core/service/base/lookup-service.dart @@ -1,7 +1,7 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetAssessmentResModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GetAssessmentResModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart'; import 'base_service.dart'; diff --git a/lib/core/service/home/dasboard_service.dart b/lib/core/service/home/dasboard_service.dart index 8825fb7a..43d76c80 100644 --- a/lib/core/service/home/dasboard_service.dart +++ b/lib/core/service/home/dasboard_service.dart @@ -1,6 +1,6 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; -import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart'; +import 'package:doctor_app_flutter/core/model/dashboard/dashboard_model.dart'; class DashboardService extends BaseService { List _dashboardItemsList = []; diff --git a/lib/core/service/home/doctor_reply_service.dart b/lib/core/service/home/doctor_reply_service.dart index dd502e3e..c9561bf7 100644 --- a/lib/core/service/home/doctor_reply_service.dart +++ b/lib/core/service/home/doctor_reply_service.dart @@ -1,9 +1,9 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; -import 'package:doctor_app_flutter/models/doctor/list_gt_my_patients_question_model.dart'; -import 'package:doctor_app_flutter/models/doctor/replay/request_create_doctor_response.dart'; -import 'package:doctor_app_flutter/models/doctor/replay/request_doctor_reply.dart'; -import 'package:doctor_app_flutter/models/patient/my_referral/my_referral_patient_model.dart'; +import 'package:doctor_app_flutter/core/model/doctor/list_gt_my_patients_question_model.dart'; +import 'package:doctor_app_flutter/core/model/doctor/replay/request_create_doctor_response.dart'; +import 'package:doctor_app_flutter/core/model/doctor/replay/request_doctor_reply.dart'; +import 'package:doctor_app_flutter/core/model/patient/my_referral/my_referral_patient_model.dart'; class DoctorReplyService extends BaseService { List get listDoctorWorkingHoursTable => diff --git a/lib/core/service/home/scan_qr_service.dart b/lib/core/service/home/scan_qr_service.dart index bfbee1c2..dac56e17 100644 --- a/lib/core/service/home/scan_qr_service.dart +++ b/lib/core/service/home/scan_qr_service.dart @@ -1,7 +1,7 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; class ScanQrService extends BaseService { List myInPatientList = List(); diff --git a/lib/core/service/home/schedule_service.dart b/lib/core/service/home/schedule_service.dart index 0aac1e88..f884516f 100644 --- a/lib/core/service/home/schedule_service.dart +++ b/lib/core/service/home/schedule_service.dart @@ -1,7 +1,7 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; -import 'package:doctor_app_flutter/models/doctor/list_doctor_working_hours_table_model.dart'; -import 'package:doctor_app_flutter/models/doctor/request_schedule.dart'; +import 'package:doctor_app_flutter/core/model/doctor/list_doctor_working_hours_table_model.dart'; +import 'package:doctor_app_flutter/core/model/doctor/request_schedule.dart'; class ScheduleService extends BaseService { List get listDoctorWorkingHoursTable => diff --git a/lib/core/service/patient/DischargedPatientService.dart b/lib/core/service/patient/DischargedPatientService.dart index 2b353016..c270be8e 100644 --- a/lib/core/service/patient/DischargedPatientService.dart +++ b/lib/core/service/patient/DischargedPatientService.dart @@ -1,7 +1,7 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/model/referral/DischargeReferralPatient.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; class DischargedPatientService extends BaseService { List myDischargedPatients = List(); diff --git a/lib/core/service/patient/LiveCarePatientServices.dart b/lib/core/service/patient/LiveCarePatientServices.dart index 669621ae..bdf8d1b5 100644 --- a/lib/core/service/patient/LiveCarePatientServices.dart +++ b/lib/core/service/patient/LiveCarePatientServices.dart @@ -4,10 +4,10 @@ import 'package:doctor_app_flutter/core/model/live_care/PendingPatientERForDocto import 'package:doctor_app_flutter/core/model/live_care/add_patient_to_doctor_list_request_model.dart'; import 'package:doctor_app_flutter/core/model/live_care/live_care_login_reguest_model.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; -import 'package:doctor_app_flutter/models/livecare/end_call_req.dart'; -import 'package:doctor_app_flutter/models/livecare/start_call_req.dart'; -import 'package:doctor_app_flutter/models/livecare/start_call_res.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/livecare/end_call_req.dart'; +import 'package:doctor_app_flutter/core/model/livecare/start_call_req.dart'; +import 'package:doctor_app_flutter/core/model/livecare/start_call_res.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; class LiveCarePatientServices extends BaseService { List _patientList = []; diff --git a/lib/core/service/patient/MyReferralPatientService.dart b/lib/core/service/patient/MyReferralPatientService.dart index 2e8d9f7c..18146986 100644 --- a/lib/core/service/patient/MyReferralPatientService.dart +++ b/lib/core/service/patient/MyReferralPatientService.dart @@ -3,7 +3,7 @@ import 'package:doctor_app_flutter/core/model/referral/MyReferralPatientModel.da import 'package:doctor_app_flutter/core/model/referral/MyReferralPatientRequestModel.dart'; import 'package:doctor_app_flutter/core/model/referral/add_referred_remarks_request.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; -import 'package:doctor_app_flutter/models/doctor/request_add_referred_doctor_remarks.dart'; +import 'package:doctor_app_flutter/core/model/doctor/request_add_referred_doctor_remarks.dart'; class MyReferralInPatientService extends BaseService { List myReferralPatients = List(); diff --git a/lib/core/service/patient/out_patient_service.dart b/lib/core/service/patient/out_patient_service.dart index 304b5f96..74db4453 100644 --- a/lib/core/service/patient/out_patient_service.dart +++ b/lib/core/service/patient/out_patient_service.dart @@ -1,7 +1,7 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; class OutPatientService extends BaseService { List _patientList = []; diff --git a/lib/core/service/patient/patient-doctor-referral-service.dart b/lib/core/service/patient/patient-doctor-referral-service.dart index 200734fd..b61e18b9 100644 --- a/lib/core/service/patient/patient-doctor-referral-service.dart +++ b/lib/core/service/patient/patient-doctor-referral-service.dart @@ -1,14 +1,14 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/model/referral/MyReferralPatientModel.dart'; import 'package:doctor_app_flutter/lookups/hospital_lookup.dart'; -import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; -import 'package:doctor_app_flutter/models/patient/get_clinic_by_project_id_request.dart'; -import 'package:doctor_app_flutter/models/patient/get_doctor_by_clinic_id_request.dart'; -import 'package:doctor_app_flutter/models/patient/my_referral/PendingReferral.dart'; -import 'package:doctor_app_flutter/models/patient/my_referral/clinic-doctor.dart'; -import 'package:doctor_app_flutter/models/patient/my_referral/my_referred_patient_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; -import 'package:doctor_app_flutter/models/patient/request_my_referral_patient_model.dart'; +import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/get_clinic_by_project_id_request.dart'; +import 'package:doctor_app_flutter/core/model/patient/get_doctor_by_clinic_id_request.dart'; +import 'package:doctor_app_flutter/core/model/patient/my_referral/PendingReferral.dart'; +import 'package:doctor_app_flutter/core/model/patient/my_referral/clinic-doctor.dart'; +import 'package:doctor_app_flutter/core/model/patient/my_referral/my_referred_patient_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/request_my_referral_patient_model.dart'; import '../base/lookup-service.dart'; diff --git a/lib/core/service/patient/patientInPatientService.dart b/lib/core/service/patient/patientInPatientService.dart index 4a5774fb..86e7d236 100644 --- a/lib/core/service/patient/patientInPatientService.dart +++ b/lib/core/service/patient/patientInPatientService.dart @@ -1,7 +1,7 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; class PatientInPatientService extends BaseService { List inPatientList = List(); diff --git a/lib/core/service/patient/patient_service.dart b/lib/core/service/patient/patient_service.dart index 198905ed..7db9fd1b 100644 --- a/lib/core/service/patient/patient_service.dart +++ b/lib/core/service/patient/patient_service.dart @@ -5,27 +5,29 @@ import 'package:doctor_app_flutter/core/model/diabetic_chart/GetDiabeticChartVal import 'package:doctor_app_flutter/core/model/diabetic_chart/GetDiabeticChartValuesResponseModel.dart'; import 'package:doctor_app_flutter/core/model/diagnosis/GetDiagnosisForInPatientRequestModel.dart'; import 'package:doctor_app_flutter/core/model/diagnosis/GetDiagnosisForInPatientResponseModel.dart'; +import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/core/model/note/CreateNoteModel.dart'; import 'package:doctor_app_flutter/core/model/note/GetNursingProgressNoteRequestModel.dart'; import 'package:doctor_app_flutter/core/model/note/GetNursingProgressNoteResposeModel.dart'; import 'package:doctor_app_flutter/core/model/note/note_model.dart'; +import 'package:doctor_app_flutter/core/model/note/stp_master_list_req_model.dart'; +import 'package:doctor_app_flutter/core/model/note/stp_master_list_res_model.dart'; import 'package:doctor_app_flutter/core/model/note/update_note_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/get_clinic_by_project_id_request.dart'; +import 'package:doctor_app_flutter/core/model/patient/get_doctor_by_clinic_id_request.dart'; +import 'package:doctor_app_flutter/core/model/patient/get_list_stp_referral_frequency_request.dart'; +import 'package:doctor_app_flutter/core/model/patient/lab_orders/lab_orders_res_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/lab_result/lab_result.dart'; +import 'package:doctor_app_flutter/core/model/patient/lab_result/lab_result_req_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/prescription/prescription_report.dart'; +import 'package:doctor_app_flutter/core/model/patient/prescription/prescription_report_for_in_patient.dart'; +import 'package:doctor_app_flutter/core/model/patient/prescription/prescription_res_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/radiology/radiology_res_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/refer_to_doctor_request.dart'; +import 'package:doctor_app_flutter/core/model/patient/vital_sign/vital_sign_res_model.dart'; import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; -import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; -import 'package:doctor_app_flutter/models/patient/get_clinic_by_project_id_request.dart'; -import 'package:doctor_app_flutter/models/patient/get_doctor_by_clinic_id_request.dart'; -import 'package:doctor_app_flutter/models/patient/get_list_stp_referral_frequency_request.dart'; -import 'package:doctor_app_flutter/models/patient/lab_orders/lab_orders_res_model.dart'; -import 'package:doctor_app_flutter/models/patient/lab_result/lab_result.dart'; -import 'package:doctor_app_flutter/models/patient/lab_result/lab_result_req_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; -import 'package:doctor_app_flutter/models/patient/prescription/prescription_report.dart'; -import 'package:doctor_app_flutter/models/patient/prescription/prescription_report_for_in_patient.dart'; -import 'package:doctor_app_flutter/models/patient/prescription/prescription_res_model.dart'; -import 'package:doctor_app_flutter/models/patient/radiology/radiology_res_model.dart'; -import 'package:doctor_app_flutter/models/patient/refer_to_doctor_request.dart'; -import 'package:doctor_app_flutter/models/patient/vital_sign/vital_sign_res_model.dart'; class PatientService extends BaseService { List _patientVitalSignList = []; @@ -78,6 +80,8 @@ class PatientService extends BaseService { List get diabeticChartValuesList => _diabeticChartValuesList; + List stpMasterList = []; + // TODO: replace var with model var _insuranceApporvalsList = []; @@ -270,7 +274,7 @@ class PatientService extends BaseService { Future getPatientRadiology(patient) async { hasError = false; await baseAppClient.post( - GET_RADIOLOGY, + GET_IN_PATIENT_ORDERS, onSuccess: (dynamic response, int statusCode) { _patientRadiologyList = []; response['List_GetRadOreders'].forEach((v) { @@ -558,4 +562,22 @@ class PatientService extends BaseService { body: getDiabeticChartValuesRequestModel.toJson(), ); } + + Future getStpMasterList( + StpMasterListRequestModel stpMasterListRequestModel) async { + hasError = false; + + await baseAppClient.post( + GET_STP_MASTER_LIST, + onSuccess: (dynamic response, int statusCode) { + stpMasterList = []; + stpMasterList = response['List_STPMasterList']; + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + body: stpMasterListRequestModel.toJson(), + ); + } } diff --git a/lib/core/service/patient/profile/discharge_summary_servive.dart b/lib/core/service/patient/profile/discharge_summary_servive.dart index f43a5c2f..2b3476a3 100644 --- a/lib/core/service/patient/profile/discharge_summary_servive.dart +++ b/lib/core/service/patient/profile/discharge_summary_servive.dart @@ -1,7 +1,7 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; -import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryReqModel.dart'; -import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryResModel.dart'; +import 'package:doctor_app_flutter/core/model/discharge_summary/GetDischargeSummaryReqModel.dart'; +import 'package:doctor_app_flutter/core/model/discharge_summary/GetDischargeSummaryResModel.dart'; class DischargeSummaryService extends BaseService { List _pendingDischargeSummaryList = []; diff --git a/lib/core/service/patient/profile/intervention_medication_service.dart b/lib/core/service/patient/profile/intervention_medication_service.dart new file mode 100644 index 00000000..a48a560e --- /dev/null +++ b/lib/core/service/patient/profile/intervention_medication_service.dart @@ -0,0 +1,66 @@ +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/core/service/base/base_service.dart'; +import 'package:doctor_app_flutter/core/model/pharmacy-intervention-model/accept_or_reject_req_model.dart'; +import 'package:doctor_app_flutter/core/model/pharmacy-intervention-model/intervention_medication_history_req_model.dart'; +import 'package:doctor_app_flutter/core/model/pharmacy-intervention-model/intervention_medication_history_res_model.dart'; +import 'package:doctor_app_flutter/core/model/pharmacy-intervention-model/new_medication_req_model.dart'; +import 'package:doctor_app_flutter/core/model/pharmacy-intervention-model/new_medication_res_model.dart'; +class InterventionMedicationService extends BaseService { + + List _allInterventionList = []; + + List _allInterventionHistoryList = []; + + List get allInterventionList => + _allInterventionList; + + List get allInterventionHistoryList => + _allInterventionHistoryList; + + Future getInterventionMedication( + {InterventionMedicationReqModel interventionMedicationReqModel}) async { + hasError = false; + await baseAppClient.post(GET_INTERVENTION_MEDICATION, + onSuccess: (dynamic response, int statusCode) { + _allInterventionList.clear(); + response['List_InterventionMedications'].forEach( + (v) { + _allInterventionList.add(InterventionMedicationResModel.fromJson(v)); + }, + ); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: interventionMedicationReqModel.toJson()); + } + + Future getInterventionMedicationHistory( + {InterventionMedicationHistoryReqModel interventionMedicationHistoryReqModel}) async { + hasError = false; + await baseAppClient.post(GET_INTERVENTION_MEDICATION_HISTORY, + onSuccess: (dynamic response, int statusCode) { + _allInterventionHistoryList.clear(); + response['List_InterventionHistory'].forEach( + (v) { + _allInterventionHistoryList.add(InterventionMedicationHistoryResModel.fromJson(v)); + }, + ); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: interventionMedicationHistoryReqModel.toJson()); + } + + Future setAcceptedOrRejected( + {AcceptOrRejectReqModel acceptOrRejectReqModel}) async { + hasError = false; + await baseAppClient.post(SET_ACCEPTED_OR_REJECTED, + onSuccess: (dynamic response, int statusCode) { + _allInterventionHistoryList.clear(); + + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: acceptOrRejectReqModel.toJson()); + } +} diff --git a/lib/core/service/patient/profile/operation_report_servive.dart b/lib/core/service/patient/profile/operation_report_servive.dart index 1ff58d4d..0ef6a503 100644 --- a/lib/core/service/patient/profile/operation_report_servive.dart +++ b/lib/core/service/patient/profile/operation_report_servive.dart @@ -1,10 +1,10 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; -import 'package:doctor_app_flutter/models/operation_report/create_update_operation_report_request_model.dart'; -import 'package:doctor_app_flutter/models/operation_report/get_operation_details_request_modle.dart'; -import 'package:doctor_app_flutter/models/operation_report/get_operation_details_response_modle.dart'; -import 'package:doctor_app_flutter/models/operation_report/get_reservations_response_model.dart'; -import 'package:doctor_app_flutter/models/operation_report/get_reservations_request_model.dart'; +import 'package:doctor_app_flutter/core/model/operation_report/create_update_operation_report_request_model.dart'; +import 'package:doctor_app_flutter/core/model/operation_report/get_operation_details_request_modle.dart'; +import 'package:doctor_app_flutter/core/model/operation_report/get_operation_details_response_modle.dart'; +import 'package:doctor_app_flutter/core/model/operation_report/get_reservations_response_model.dart'; +import 'package:doctor_app_flutter/core/model/operation_report/get_reservations_request_model.dart'; class OperationReportService extends BaseService { List _reservationList = []; diff --git a/lib/core/service/patient/profile/vte_assessment_service.dart b/lib/core/service/patient/profile/vte_assessment_service.dart new file mode 100644 index 00000000..651f2b50 --- /dev/null +++ b/lib/core/service/patient/profile/vte_assessment_service.dart @@ -0,0 +1,30 @@ +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/core/model/vte_assessment/vte_assessment_req_model.dart'; +import 'package:doctor_app_flutter/core/model/vte_assessment/vte_assessment_res_model.dart'; +import 'package:doctor_app_flutter/core/service/base/base_service.dart'; +import 'package:doctor_app_flutter/core/model/discharge_summary/GetDischargeSummaryReqModel.dart'; +import 'package:doctor_app_flutter/core/model/discharge_summary/GetDischargeSummaryResModel.dart'; + +class VteAssessmentService extends BaseService { + + List _allVteHistoryList = []; + + List get allVteHistoryList => + _allVteHistoryList; + Future getVteAssessment( + {VteAssessmentRequestModel vteAssessmentRequestModel}) async { + hasError = false; + await baseAppClient.post(VTE_ASSESSMENT, + onSuccess: (dynamic response, int statusCode) { + _allVteHistoryList.clear(); + response['INP_VTEHistoryByTransactionNo_List'].forEach( + (v) { + _allVteHistoryList.add(VteAssessmentResponseModel.fromJson(v)); + }, + ); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: vteAssessmentRequestModel.toJson()); + } +} diff --git a/lib/core/service/patient/referral_patient_service.dart b/lib/core/service/patient/referral_patient_service.dart index 3aa9e0e8..2e79d41e 100644 --- a/lib/core/service/patient/referral_patient_service.dart +++ b/lib/core/service/patient/referral_patient_service.dart @@ -1,8 +1,8 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; -import 'package:doctor_app_flutter/models/doctor/request_add_referred_doctor_remarks.dart'; -import 'package:doctor_app_flutter/models/patient/my_referral/my_referral_patient_model.dart'; -import 'package:doctor_app_flutter/models/patient/request_my_referral_patient_model.dart'; +import 'package:doctor_app_flutter/core/model/doctor/request_add_referred_doctor_remarks.dart'; +import 'package:doctor_app_flutter/core/model/patient/my_referral/my_referral_patient_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/request_my_referral_patient_model.dart'; class ReferralPatientService extends BaseService { List _listMyReferralPatientModel = []; diff --git a/lib/core/service/patient_medical_file/insurance/InsuranceCardService.dart b/lib/core/service/patient_medical_file/insurance/InsuranceCardService.dart index 865e5086..1fcc4f78 100644 --- a/lib/core/service/patient_medical_file/insurance/InsuranceCardService.dart +++ b/lib/core/service/patient_medical_file/insurance/InsuranceCardService.dart @@ -3,7 +3,7 @@ import 'package:doctor_app_flutter/core/insurance_approval_request_model.dart'; import 'package:doctor_app_flutter/core/model/insurance/insurance_approval.dart'; import 'package:doctor_app_flutter/core/model/insurance/insurance_approval_in_patient_model.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; class InsuranceCardService extends BaseService { InsuranceApprovalModel _insuranceApprovalModel = InsuranceApprovalModel( @@ -34,7 +34,7 @@ class InsuranceCardService extends BaseService { hasError = false; insuranceApprovalInPatient.clear(); - await baseAppClient.post(GET_INSURANCE_IN_PATIENT, + await baseAppClient.post(PATIENT_INSURANCE_APPROVALS_URL, onSuccess: (dynamic response, int statusCode) { //prescriptionsList.clear(); response['List_ApprovalMain_InPatient'].forEach((prescriptions) { diff --git a/lib/core/service/patient_medical_file/lab_order/labs_service.dart b/lib/core/service/patient_medical_file/lab_order/labs_service.dart index 060de1ca..a7772e4d 100644 --- a/lib/core/service/patient_medical_file/lab_order/labs_service.dart +++ b/lib/core/service/patient_medical_file/lab_order/labs_service.dart @@ -8,7 +8,7 @@ import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart'; import 'package:doctor_app_flutter/core/model/labs/patient_lab_special_result.dart'; import 'package:doctor_app_flutter/core/model/labs/request_patient_lab_special_result.dart'; import 'package:doctor_app_flutter/core/model/labs/request_send_lab_report_email.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import '../../base/base_service.dart'; diff --git a/lib/core/service/patient_medical_file/medical_report/PatientMedicalReportService.dart b/lib/core/service/patient_medical_file/medical_report/PatientMedicalReportService.dart index eb8a10fb..f36959f1 100644 --- a/lib/core/service/patient_medical_file/medical_report/PatientMedicalReportService.dart +++ b/lib/core/service/patient_medical_file/medical_report/PatientMedicalReportService.dart @@ -1,8 +1,8 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; -import 'package:doctor_app_flutter/models/patient/MedicalReport/MedicalReportTemplate.dart'; -import 'package:doctor_app_flutter/models/patient/MedicalReport/MeidcalReportModel.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/MedicalReport/MedicalReportTemplate.dart'; +import 'package:doctor_app_flutter/core/model/patient/MedicalReport/MeidcalReportModel.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; class PatientMedicalReportService extends BaseService { List medicalReportList = []; diff --git a/lib/core/service/patient_medical_file/medical_report/medical_file_service.dart b/lib/core/service/patient_medical_file/medical_report/medical_file_service.dart index 8a85fa4f..19eda72e 100644 --- a/lib/core/service/patient_medical_file/medical_report/medical_file_service.dart +++ b/lib/core/service/patient_medical_file/medical_report/medical_file_service.dart @@ -9,10 +9,7 @@ class MedicalFileService extends BaseService { List get medicalFileList => _medicalFileList; MedicalFileRequestModel _fileRequestModel = MedicalFileRequestModel( - //patientMRN: 1231755, - vidaAuthTokenID: - "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMDAyIiwianRpIjoiNDM1MGNjZTYtYzc3MS00YjBiLThiNDItMGZhY2IzYzgxMjQ4IiwiZW1haWwiOiIiLCJpZCI6IjEwMDIiLCJOYW1lIjoiVEVNUCAtIERPQ1RPUiIsIkVtcGxveWVlSWQiOiI0NzA5IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiI0NzA5IiwiU0VTU0lPTklEIjoiMjE1OTYwNTQiLCJDbGluaWNJZCI6IjEiLCJyb2xlIjpbIkRPQ1RPUlMiLCJIRUFEIERPQ1RPUlMiLCJBRE1JTklTVFJBVE9SUyIsIlJFQ0VQVElPTklTVCIsIkVSIE5VUlNFIiwiRVIgUkVDRVBUSU9OSVNUIiwiUEhBUk1BQ1kgQUNDT1VOVCBTVEFGRiIsIlBIQVJNQUNZIE5VUlNFIiwiSU5QQVRJRU5UIFBIQVJNQUNJU1QiLCJBRE1JU1NJT04gU1RBRkYiLCJBUFBST1ZBTCBTVEFGRiIsIkNPTlNFTlQgIiwiTUVESUNBTCBSRVBPUlQgLSBTSUNLIExFQVZFIE1BTkFHRVIiXSwibmJmIjoxNjA5MjI1MjMwLCJleHAiOjE2MTAwODkyMzAsImlhdCI6MTYwOTIyNTIzMH0.rs7lTBQ1ON4PbR11PBkOyjf818DdeMKuqz2IrCJMYQU", - ); + ); Future getMedicalFile({int mrn}) async { _fileRequestModel = MedicalFileRequestModel(patientMRN: mrn); diff --git a/lib/core/service/patient_medical_file/prescription/medicine_service.dart b/lib/core/service/patient_medical_file/prescription/medicine_service.dart index 323bc2bd..5d059f99 100644 --- a/lib/core/service/patient_medical_file/prescription/medicine_service.dart +++ b/lib/core/service/patient_medical_file/prescription/medicine_service.dart @@ -1,8 +1,8 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetAssessmentResModel.dart'; -import 'package:doctor_app_flutter/models/pharmacies/pharmacies_List_request_model.dart'; -import 'package:doctor_app_flutter/models/pharmacies/pharmacies_items_request_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GetAssessmentResModel.dart'; +import 'package:doctor_app_flutter/core/model/pharmacies/pharmacies_List_request_model.dart'; +import 'package:doctor_app_flutter/core/model/pharmacies/pharmacies_items_request_model.dart'; class MedicineService extends BaseService { var _pharmacyItemsList = []; diff --git a/lib/core/service/patient_medical_file/prescription/prescription_service.dart b/lib/core/service/patient_medical_file/prescription/prescription_service.dart index f0594fe0..217a5c2f 100644 --- a/lib/core/service/patient_medical_file/prescription/prescription_service.dart +++ b/lib/core/service/patient_medical_file/prescription/prescription_service.dart @@ -1,24 +1,42 @@ import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/core/model/Prescriptions/Prescriptions.dart'; +import 'package:doctor_app_flutter/core/model/Prescriptions/get_medication_for_inpatient_model.dart'; +import 'package:doctor_app_flutter/core/model/Prescriptions/get_medication_for_inpatient_request_model.dart'; +import 'package:doctor_app_flutter/core/model/Prescriptions/perscription_pharmacy.dart'; import 'package:doctor_app_flutter/core/model/Prescriptions/post_prescrition_req_model.dart'; +import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_entity_model.dart'; +import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_in_patient.dart'; import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_model.dart'; +import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report.dart'; +import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report_enh.dart'; import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_req_model.dart'; +import 'package:doctor_app_flutter/core/model/Prescriptions/prescriptions_order.dart'; +import 'package:doctor_app_flutter/core/model/Prescriptions/request_get_list_pharmacy_for_prescriptions.dart'; +import 'package:doctor_app_flutter/core/model/Prescriptions/request_prescription_report.dart'; +import 'package:doctor_app_flutter/core/model/Prescriptions/request_prescription_report_enh.dart'; import 'package:doctor_app_flutter/core/model/calculate_box_request_model.dart'; import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart'; import 'package:doctor_app_flutter/core/model/search_drug/item_by_medicine_request_model.dart'; import 'package:doctor_app_flutter/core/model/search_drug/search_drug_model.dart'; import 'package:doctor_app_flutter/core/model/search_drug/search_drug_request_model.dart'; import 'package:doctor_app_flutter/core/service/base/lookup-service.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetAllergiesResModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetAssessmentReqModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetAssessmentResModel.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; -import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GetAllergiesResModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GetAssessmentReqModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GetAssessmentResModel.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/vital_sign/patient-vital-sign-data.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:flutter/cupertino.dart'; class PrescriptionService extends LookupService { List _prescriptionList = List(); List get prescriptionList => _prescriptionList; + + List _prescriptionListNew = List(); + + List get prescriptionListNew => _prescriptionListNew; + List _drugsList = List(); List get drugsList => _drugsList; @@ -37,7 +55,6 @@ class PrescriptionService extends LookupService { ItemByMedicineRequestModel _itemByMedicineRequestModel = ItemByMedicineRequestModel(); SearchDrugRequestModel _drugRequestModel = SearchDrugRequestModel( - //search: ["Acetaminophen"], search: ["Amoxicillin"], ); @@ -81,16 +98,23 @@ class PrescriptionService extends LookupService { }, body: getAssessmentReqModel.toJson()); } - Future getPrescription({int mrn}) async { + Future getPrescriptionListNew({int mrn, int appNo }) async { _prescriptionReqModel = PrescriptionReqModel( patientMRN: mrn, + appNo:appNo ); hasError = false; _prescriptionList.clear(); + _prescriptionListNew.clear(); await baseAppClient.post(GET_PRESCRIPTION_LIST, onSuccess: (dynamic response, int statusCode) { _prescriptionList .add(PrescriptionModel.fromJson(response['PrescriptionList'])); + if(response['PrescriptionList']!=null){ + response['PrescriptionList']["entityList"].forEach((prescriptions) { + _prescriptionListNew.add(PrescriptionEntityModel.fromJson(prescriptions)); + }); + } }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; @@ -167,56 +191,6 @@ class PrescriptionService extends LookupService { List allergy, PatiantInformtion patient, List prescription) async { - // Map request = { - // "Prescription": { - // "objPatientInfo": {"Gender": "Male", "Age": "21/06/1967"}, - // "objVitalSign": {"Height": "180", "Weight": "37"}, - // "objPrescriptionItems": [ - // { - // "DrugId": "83-20-00-30-20-03-03", - // "DrugName": "WARFARIN 1 MG TAB 28'S (N)", - // "Dose": "1", - // "DoseType": "04", - // "Unit": "actuation(s)", - // "FrequencyType": "1/3/Day", - // "Duration": "3/Day", - // "IsScreen": "true" - // }, - // { - // "DrugId": "64-20-00-10-00-03-15", - // "DrugName": "PANADOL 500 MG TAB 24'S(DIS)", - // "Dose": "1", - // "DoseType": "04", - // "Unit": "MG", - // "FrequencyType": "3/1/Day", - // "Duration": "4/Day", - // "RouteID": "24", - // "IsScreen": "true" - // } - // ], - // "objAllergies": { - // "Allergy": { - // "objProperties": {"Id": "26", "Name": "phenoxymethylpenicillin"} - // } - // }, - // "objDiagnosis": { - // "Diagnosis": { - // "objProperties": {"Id": "A01.1", "Name": "Paratyphoid fever A"} - // } - // }, - // "IsDoctor": "false", - // "IsPharmacist": "false" - // }, - // "IPAdress": "10.10.10.10", - // "Channel": 9, - // "LanguageID": 2, - // "VersionID": 5.3, - // "SessionID": "BlUSkYymTt", - // "IsLoginForDoctorApp": true, - // "PatientOutSA": 0, - // "TokenID": "@dm!n", - // "OutSA": true - // }; Map request = { "Prescription": { "objPatientInfo": { @@ -286,4 +260,186 @@ class PrescriptionService extends LookupService { }); return lstAssessmentsObj; } + + + + List prescriptionsList = List(); + List medicationForInPatient = List(); + List prescriptionsOrderList = List(); + List prescriptionInPatientList = List(); + + GetMedicationForInPatientRequestModel _getMedicationForInPatientRequestModel = + GetMedicationForInPatientRequestModel(); + + Future getPrescriptions(PatiantInformtion patient) async { + hasError = false; + Map body = Map(); + body['isDentalAllowedBackend'] = false; + await baseAppClient.postPatient(GET_PRESCRIPTION, patient: patient, + onSuccess: (dynamic response, int statusCode) { + prescriptionsList.clear(); + response['PatientPrescriptionList'].forEach((prescriptions) { + prescriptionsList.add(Prescriptions.fromJson(prescriptions)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + RequestPrescriptionReport _requestPrescriptionReport = + RequestPrescriptionReport( + appointmentNo: 0, isDentalAllowedBackend: false); + List prescriptionReportList = List(); + + Future getPrescriptionReport( + {Prescriptions prescriptions, + @required PatiantInformtion patient}) async { + hasError = false; + _requestPrescriptionReport.dischargeNo = prescriptions.dischargeNo; + _requestPrescriptionReport.projectID = prescriptions.projectID; + _requestPrescriptionReport.clinicID = prescriptions.clinicID; + _requestPrescriptionReport.setupID = prescriptions.setupID; + _requestPrescriptionReport.episodeID = prescriptions.episodeID; + _requestPrescriptionReport.appointmentNo = prescriptions.appointmentNo; + + await baseAppClient.postPatient( + prescriptions.isInOutPatient + ? GET_PRESCRIPTION_REPORT_ENH + : GET_PRESCRIPTION_REPORT_NEW, + patient: patient, onSuccess: (dynamic response, int statusCode) { + prescriptionReportList.clear(); + prescriptionReportEnhList.clear(); + if (prescriptions.isInOutPatient) { + response['ListPRM'].forEach((prescriptions) { + prescriptionReportList + .add(PrescriptionReport.fromJson(prescriptions)); + prescriptionReportEnhList + .add(PrescriptionReportEnh.fromJson(prescriptions)); + }); + } else { + response['INP_GetPrescriptionReport_List'].forEach((prescriptions) { + prescriptionReportList + .add(PrescriptionReport.fromJson(prescriptions)); + }); + } + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: _requestPrescriptionReport.toJson()); + } + + RequestGetListPharmacyForPrescriptions + requestGetListPharmacyForPrescriptions = + RequestGetListPharmacyForPrescriptions( + latitude: 0, + longitude: 0, + isDentalAllowedBackend: false, + ); + List pharmacyPrescriptionsList = List(); + + + RequestPrescriptionReportEnh _requestPrescriptionReportEnh = + RequestPrescriptionReportEnh( + isDentalAllowedBackend: false, + ); + + List prescriptionReportEnhList = List(); + + Future getPrescriptionReportEnh( + {PrescriptionsOrder prescriptionsOrder, + @required PatiantInformtion patient}) async { + ///This logic copy from the old app from class [order-history.component.ts] in line 45 + bool isInPatient = false; + prescriptionsList.forEach((element) { + if (prescriptionsOrder.appointmentNo == "0") { + if (element.dischargeNo == int.parse(prescriptionsOrder.dischargeID)) { + _requestPrescriptionReportEnh.appointmentNo = element.appointmentNo; + _requestPrescriptionReportEnh.clinicID = element.clinicID; + _requestPrescriptionReportEnh.projectID = element.projectID; + _requestPrescriptionReportEnh.episodeID = element.episodeID; + _requestPrescriptionReportEnh.setupID = element.setupID; + _requestPrescriptionReportEnh.dischargeNo = element.dischargeNo; + isInPatient = element.isInOutPatient; + } + } else { + if (int.parse(prescriptionsOrder.appointmentNo) == + element.appointmentNo) { + _requestPrescriptionReportEnh.appointmentNo = element.appointmentNo; + _requestPrescriptionReportEnh.clinicID = element.clinicID; + _requestPrescriptionReportEnh.projectID = element.projectID; + _requestPrescriptionReportEnh.episodeID = element.episodeID; + _requestPrescriptionReportEnh.setupID = element.setupID; + _requestPrescriptionReportEnh.dischargeNo = element.dischargeNo; + isInPatient = element.isInOutPatient; + + ///call inpGetPrescriptionReport + } + } + }); + + hasError = false; + + await baseAppClient.postPatient( + isInPatient ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT_NEW, + patient: patient, onSuccess: (dynamic response, int statusCode) { + prescriptionReportEnhList.clear(); + + if (isInPatient) { + response['ListPRM'].forEach((prescriptions) { + prescriptionReportEnhList + .add(PrescriptionReportEnh.fromJson(prescriptions)); + }); + } else { + response['INP_GetPrescriptionReport_List'].forEach((prescriptions) { + PrescriptionReportEnh reportEnh = + PrescriptionReportEnh.fromJson(prescriptions); + reportEnh.itemDescription = prescriptions['ItemDescriptionN']; + prescriptionReportEnhList.add(reportEnh); + }); + } + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: _requestPrescriptionReportEnh.toJson()); + } + + Future getPrescriptionsOrders() async { + Map body = Map(); + body['isDentalAllowedBackend'] = false; + await baseAppClient.post(GET_PRESCRIPTIONS_ALL_ORDERS, + onSuccess: (dynamic response, int statusCode) { + prescriptionsOrderList.clear(); + response['PatientER_GetPatientAllPresOrdersList'] + .forEach((prescriptionsOrder) { + prescriptionsOrderList + .add(PrescriptionsOrder.fromJson(prescriptionsOrder)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future getMedicationForInPatient(PatiantInformtion patient) async { + hasError = false; + _getMedicationForInPatientRequestModel = + GetMedicationForInPatientRequestModel( + isDentalAllowedBackend: false, + admissionNo: int.parse(patient.admissionNo), + tokenID: "@dm!n", + projectID: patient.projectId, + ); + await baseAppClient.postPatient(GET_MEDICATION_FOR_IN_PATIENT, + patient: patient, onSuccess: (dynamic response, int statusCode) { + medicationForInPatient.clear(); + response['List_GetMedicationForInpatient'].forEach((prescriptions) { + medicationForInPatient + .add(GetMedicationForInPatientModel.fromJson(prescriptions)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: _getMedicationForInPatientRequestModel.toJson()); + } } diff --git a/lib/core/service/patient_medical_file/prescription/prescriptions_service.dart b/lib/core/service/patient_medical_file/prescription/prescriptions_service.dart deleted file mode 100644 index 39b0c828..00000000 --- a/lib/core/service/patient_medical_file/prescription/prescriptions_service.dart +++ /dev/null @@ -1,238 +0,0 @@ -import 'package:doctor_app_flutter/config/config.dart'; -import 'package:doctor_app_flutter/core/model/Prescriptions/Prescriptions.dart'; -import 'package:doctor_app_flutter/core/model/Prescriptions/get_medication_for_inpatient_model.dart'; -import 'package:doctor_app_flutter/core/model/Prescriptions/get_medication_for_inpatient_request_model.dart'; -import 'package:doctor_app_flutter/core/model/Prescriptions/in_patient_prescription_model.dart'; -import 'package:doctor_app_flutter/core/model/Prescriptions/perscription_pharmacy.dart'; -import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_in_patient.dart'; -import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report.dart'; -import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report_enh.dart'; -import 'package:doctor_app_flutter/core/model/Prescriptions/prescriptions_order.dart'; -import 'package:doctor_app_flutter/core/model/Prescriptions/request_get_list_pharmacy_for_prescriptions.dart'; -import 'package:doctor_app_flutter/core/model/Prescriptions/request_prescription_report.dart'; -import 'package:doctor_app_flutter/core/model/Prescriptions/request_prescription_report_enh.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; -import 'package:flutter/cupertino.dart'; - -import '../../base/base_service.dart'; - -class PrescriptionsService extends BaseService { - List prescriptionsList = List(); - List medicationForInPatient = List(); - List prescriptionsOrderList = List(); - List prescriptionInPatientList = List(); - - InPatientPrescriptionRequestModel _inPatientPrescriptionRequestModel = - InPatientPrescriptionRequestModel(); - GetMedicationForInPatientRequestModel _getMedicationForInPatientRequestModel = - GetMedicationForInPatientRequestModel(); - - Future getPrescriptionInPatient({int mrn, String adn}) async { - _inPatientPrescriptionRequestModel = InPatientPrescriptionRequestModel( - patientMRN: mrn, - admissionNo: adn, - ); - hasError = false; - prescriptionInPatientList.clear(); - - await baseAppClient.post(GET_PRESCRIPTION_IN_PATIENT, - onSuccess: (dynamic response, int statusCode) { - prescriptionsList.clear(); - response['List_PrescriptionReportForInPatient'].forEach((prescriptions) { - prescriptionInPatientList - .add(PrescriotionInPatient.fromJson(prescriptions)); - }); - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, body: _inPatientPrescriptionRequestModel.toJson()); - } - - Future getPrescriptions(PatiantInformtion patient) async { - hasError = false; - Map body = Map(); - body['isDentalAllowedBackend'] = false; - await baseAppClient.postPatient(PRESCRIPTIONS, patient: patient, - onSuccess: (dynamic response, int statusCode) { - prescriptionsList.clear(); - response['PatientPrescriptionList'].forEach((prescriptions) { - prescriptionsList.add(Prescriptions.fromJson(prescriptions)); - }); - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, body: body); - } - - RequestPrescriptionReport _requestPrescriptionReport = - RequestPrescriptionReport( - appointmentNo: 0, isDentalAllowedBackend: false); - List prescriptionReportList = List(); - - Future getPrescriptionReport( - {Prescriptions prescriptions, - @required PatiantInformtion patient}) async { - hasError = false; - _requestPrescriptionReport.dischargeNo = prescriptions.dischargeNo; - _requestPrescriptionReport.projectID = prescriptions.projectID; - _requestPrescriptionReport.clinicID = prescriptions.clinicID; - _requestPrescriptionReport.setupID = prescriptions.setupID; - _requestPrescriptionReport.episodeID = prescriptions.episodeID; - _requestPrescriptionReport.appointmentNo = prescriptions.appointmentNo; - - await baseAppClient.postPatient( - prescriptions.isInOutPatient - ? GET_PRESCRIPTION_REPORT_ENH - : GET_PRESCRIPTION_REPORT_NEW, - patient: patient, onSuccess: (dynamic response, int statusCode) { - prescriptionReportList.clear(); - prescriptionReportEnhList.clear(); - if (prescriptions.isInOutPatient) { - response['ListPRM'].forEach((prescriptions) { - prescriptionReportList - .add(PrescriptionReport.fromJson(prescriptions)); - prescriptionReportEnhList - .add(PrescriptionReportEnh.fromJson(prescriptions)); - }); - } else { - response['INP_GetPrescriptionReport_List'].forEach((prescriptions) { - prescriptionReportList - .add(PrescriptionReport.fromJson(prescriptions)); - }); - } - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, body: _requestPrescriptionReport.toJson()); - } - - RequestGetListPharmacyForPrescriptions - requestGetListPharmacyForPrescriptions = - RequestGetListPharmacyForPrescriptions( - latitude: 0, - longitude: 0, - isDentalAllowedBackend: false, - ); - List pharmacyPrescriptionsList = List(); - - Future getListPharmacyForPrescriptions( - {int itemId, @required PatiantInformtion patient}) async { - hasError = false; - requestGetListPharmacyForPrescriptions.itemID = itemId; - await baseAppClient.postPatient(GET_PHARMACY_LIST, patient: patient, - onSuccess: (dynamic response, int statusCode) { - pharmacyPrescriptionsList.clear(); - response['PharmList'].forEach((prescriptions) { - pharmacyPrescriptionsList - .add(PharmacyPrescriptions.fromJson(prescriptions)); - }); - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, body: requestGetListPharmacyForPrescriptions.toJson()); - } - - RequestPrescriptionReportEnh _requestPrescriptionReportEnh = - RequestPrescriptionReportEnh( - isDentalAllowedBackend: false, - ); - - List prescriptionReportEnhList = List(); - - Future getPrescriptionReportEnh( - {PrescriptionsOrder prescriptionsOrder, - @required PatiantInformtion patient}) async { - ///This logic copy from the old app from class [order-history.component.ts] in line 45 - bool isInPatient = false; - prescriptionsList.forEach((element) { - if (prescriptionsOrder.appointmentNo == "0") { - if (element.dischargeNo == int.parse(prescriptionsOrder.dischargeID)) { - _requestPrescriptionReportEnh.appointmentNo = element.appointmentNo; - _requestPrescriptionReportEnh.clinicID = element.clinicID; - _requestPrescriptionReportEnh.projectID = element.projectID; - _requestPrescriptionReportEnh.episodeID = element.episodeID; - _requestPrescriptionReportEnh.setupID = element.setupID; - _requestPrescriptionReportEnh.dischargeNo = element.dischargeNo; - isInPatient = element.isInOutPatient; - } - } else { - if (int.parse(prescriptionsOrder.appointmentNo) == - element.appointmentNo) { - _requestPrescriptionReportEnh.appointmentNo = element.appointmentNo; - _requestPrescriptionReportEnh.clinicID = element.clinicID; - _requestPrescriptionReportEnh.projectID = element.projectID; - _requestPrescriptionReportEnh.episodeID = element.episodeID; - _requestPrescriptionReportEnh.setupID = element.setupID; - _requestPrescriptionReportEnh.dischargeNo = element.dischargeNo; - isInPatient = element.isInOutPatient; - - ///call inpGetPrescriptionReport - } - } - }); - - hasError = false; - - await baseAppClient.postPatient( - isInPatient ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT_NEW, - patient: patient, onSuccess: (dynamic response, int statusCode) { - prescriptionReportEnhList.clear(); - - if (isInPatient) { - response['ListPRM'].forEach((prescriptions) { - prescriptionReportEnhList - .add(PrescriptionReportEnh.fromJson(prescriptions)); - }); - } else { - response['INP_GetPrescriptionReport_List'].forEach((prescriptions) { - PrescriptionReportEnh reportEnh = - PrescriptionReportEnh.fromJson(prescriptions); - reportEnh.itemDescription = prescriptions['ItemDescriptionN']; - prescriptionReportEnhList.add(reportEnh); - }); - } - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, body: _requestPrescriptionReportEnh.toJson()); - } - - Future getPrescriptionsOrders() async { - Map body = Map(); - body['isDentalAllowedBackend'] = false; - await baseAppClient.post(GET_PRESCRIPTIONS_ALL_ORDERS, - onSuccess: (dynamic response, int statusCode) { - prescriptionsOrderList.clear(); - response['PatientER_GetPatientAllPresOrdersList'] - .forEach((prescriptionsOrder) { - prescriptionsOrderList - .add(PrescriptionsOrder.fromJson(prescriptionsOrder)); - }); - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, body: body); - } - - Future getMedicationForInPatient(PatiantInformtion patient) async { - hasError = false; - _getMedicationForInPatientRequestModel = - GetMedicationForInPatientRequestModel( - isDentalAllowedBackend: false, - admissionNo: int.parse(patient.admissionNo), - tokenID: "@dm!n", - projectID: patient.projectId, - ); - await baseAppClient.postPatient(GET_MEDICATION_FOR_IN_PATIENT, - patient: patient, onSuccess: (dynamic response, int statusCode) { - medicationForInPatient.clear(); - response['List_GetMedicationForInpatient'].forEach((prescriptions) { - medicationForInPatient - .add(GetMedicationForInPatientModel.fromJson(prescriptions)); - }); - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, body: _getMedicationForInPatientRequestModel.toJson()); - } -} diff --git a/lib/core/service/patient_medical_file/procedure/procedure_service.dart b/lib/core/service/patient_medical_file/procedure/procedure_service.dart index be674540..8370e968 100644 --- a/lib/core/service/patient_medical_file/procedure/procedure_service.dart +++ b/lib/core/service/patient_medical_file/procedure/procedure_service.dart @@ -43,15 +43,6 @@ class ProcedureService extends BaseService { ProcedureTempleteDetailsRequestModel(); GetProcedureReqModel _getProcedureReqModel = GetProcedureReqModel( - // clinicId: 17, - // pageSize: 10, - // pageIndex: 1, - // //patientMRN: 3120725, - // //categoryId: null, - // vidaAuthTokenID: - // "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxNDg1IiwianRpIjoiZjQ4YTk0OTQtYTczZS00MDI3LWI2MjgtNzc4MjAwMzUyYWEzIiwiZW1haWwiOiJNb2hhbWVkLlJlc3dhbkBjbG91ZHNvbHV0aW9uLXNhLmNvbSIsImlkIjoiMTQ4NSIsIk5hbWUiOiJTSEFLRVJBIFBBUlZFRU4gKFVTRUQgQlkgRVNFUlZJQ0VTKSIsIkVtcGxveWVlSWQiOiIxNDg1IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiIxNDg1IiwiU0VTU0lPTklEIjoiMjE1ODUyMTAiLCJDbGluaWNJZCI6IjMiLCJyb2xlIjoiRE9DVE9SUyIsIm5iZiI6MTYwODM2NDU2OCwiZXhwIjoxNjA5MjI4NTY4LCJpYXQiOjE2MDgzNjQ1Njh9.YLbvq5nxPn8o9ZYkcbc5YAX7Jy23Mm0s33oRmE8GHDI", - // - // search: ["lab"], ); GetProcedureReqModel _getProcedureCategoriseReqModel = GetProcedureReqModel( @@ -59,20 +50,16 @@ class ProcedureService extends BaseService { pageSize: 100, pageIndex: 1, patientMRN: 0, - //categoryId: null, - vidaAuthTokenID: - "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxNDg1IiwianRpIjoiZjQ4YTk0OTQtYTczZS00MDI3LWI2MjgtNzc4MjAwMzUyYWEzIiwiZW1haWwiOiJNb2hhbWVkLlJlc3dhbkBjbG91ZHNvbHV0aW9uLXNhLmNvbSIsImlkIjoiMTQ4NSIsIk5hbWUiOiJTSEFLRVJBIFBBUlZFRU4gKFVTRUQgQlkgRVNFUlZJQ0VTKSIsIkVtcGxveWVlSWQiOiIxNDg1IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiIxNDg1IiwiU0VTU0lPTklEIjoiMjE1ODUyMTAiLCJDbGluaWNJZCI6IjMiLCJyb2xlIjoiRE9DVE9SUyIsIm5iZiI6MTYwODM2NDU2OCwiZXhwIjoxNjA5MjI4NTY4LCJpYXQiOjE2MDgzNjQ1Njh9.YLbvq5nxPn8o9ZYkcbc5YAX7Jy23Mm0s33oRmE8GHDI", - - //search: ["DENTAL"], ); Future getProcedureTemplate( - {int doctorId, int projectId, int clinicId, String categoryID}) async { + {int doctorId, int projectId, int clinicId, String categoryID, bool isLocalBusy}) async { _procedureTempleteRequestModel = ProcedureTempleteRequestModel( // tokenID: "@dm!n", patientID: 0, searchType: 1, ); + hasError = false; await baseAppClient.post(GET_TEMPLETE_LIST /*GET_PROCEDURE_TEMPLETE*/, diff --git a/lib/core/service/patient_medical_file/radiology/radiology_service.dart b/lib/core/service/patient_medical_file/radiology/radiology_service.dart index 4a77fc31..965fa03b 100644 --- a/lib/core/service/patient_medical_file/radiology/radiology_service.dart +++ b/lib/core/service/patient_medical_file/radiology/radiology_service.dart @@ -1,6 +1,6 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/model/radiology/final_radiology.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:flutter/cupertino.dart'; import '../../base/base_service.dart'; diff --git a/lib/core/service/patient_medical_file/sick_leave/sickleave_service.dart b/lib/core/service/patient_medical_file/sick_leave/sickleave_service.dart index 9eb0777c..333ffeea 100644 --- a/lib/core/service/patient_medical_file/sick_leave/sickleave_service.dart +++ b/lib/core/service/patient_medical_file/sick_leave/sickleave_service.dart @@ -4,10 +4,10 @@ import 'package:doctor_app_flutter/core/model/sick_leave/sick_leave_patient_mode import 'package:doctor_app_flutter/core/model/sick_leave/sick_leave_patient_request_model.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; import 'package:doctor_app_flutter/core/viewModel/leave_rechdule_response.dart'; -import 'package:doctor_app_flutter/models/sickleave/add_sickleave_request.dart'; -import 'package:doctor_app_flutter/models/sickleave/extend_sick_leave_request.dart'; -import 'package:doctor_app_flutter/models/sickleave/get_all_sickleave_response.dart'; -import 'package:doctor_app_flutter/models/sickleave/sick_leave_statisitics_model.dart'; +import 'package:doctor_app_flutter/core/model/sickleave/add_sickleave_request.dart'; +import 'package:doctor_app_flutter/core/model/sickleave/extend_sick_leave_request.dart'; +import 'package:doctor_app_flutter/core/model/sickleave/get_all_sickleave_response.dart'; +import 'package:doctor_app_flutter/core/model/sickleave/sick_leave_statisitics_model.dart'; class SickLeaveService extends BaseService { SickLeaveStatisticsModel get sickLeavestatisitics => _statistics; @@ -186,7 +186,7 @@ class SickLeaveService extends BaseService { hasError = false; await baseAppClient.post( - GET_OFFTIME, + GET_MASTER_LOOKUP_LIST, onSuccess: (dynamic response, int statusCode) { offTime = []; response['MasterLookUpList']['entityList'].forEach((item) => { @@ -208,7 +208,7 @@ class SickLeaveService extends BaseService { hasError = false; await baseAppClient.post( - GET_OFFTIME, + GET_MASTER_LOOKUP_LIST, onSuccess: (dynamic response, int statusCode) { reasonse = []; reasonse = response['MasterLookUpList']['entityList']; diff --git a/lib/core/service/patient_medical_file/soap/SOAP_service.dart b/lib/core/service/patient_medical_file/soap/SOAP_service.dart index aedf5683..b8c187a3 100644 --- a/lib/core/service/patient_medical_file/soap/SOAP_service.dart +++ b/lib/core/service/patient_medical_file/soap/SOAP_service.dart @@ -1,28 +1,28 @@ import 'package:doctor_app_flutter/config/config.dart'; -import 'package:doctor_app_flutter/models/SOAP/ChiefComplaint/GetChiefComplaintReqModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/GeneralGetReqForSOAP.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetAllergiesResModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetAssessmentReqModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetAssessmentResModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteReqModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteResModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetHistoryReqModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetHistoryResModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetPhysicalExamListResModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetPhysicalExamReqModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/PatchAssessmentReqModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/PostEpisodeReqModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/get_Allergies_request_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/in_patient/GetEpisodeForInpatientReqModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/in_patient/PostEpisodeForInpatientRequestModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/post_allergy_request_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/post_assessment_request_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/post_chief_complaint_request_model.dart'; -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/core/model/SOAP/ChiefComplaint/GetChiefComplaintReqModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GeneralGetReqForSOAP.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GetAllergiesResModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GetAssessmentReqModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GetAssessmentResModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GetGetProgressNoteReqModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GetGetProgressNoteResModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GetHistoryReqModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GetHistoryResModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GetPhysicalExamListResModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GetPhysicalExamReqModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/PatchAssessmentReqModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/PostEpisodeReqModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/get_Allergies_request_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/in_patient/GetEpisodeForInpatientReqModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/in_patient/PostEpisodeForInpatientRequestModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/post_allergy_request_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/post_assessment_request_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/post_chief_complaint_request_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/post_histories_request_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/post_physical_exam_request_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/post_progress_note_request_model.dart'; import '../../base/lookup-service.dart'; @@ -229,7 +229,7 @@ class SOAPService extends LookupService { Future getPatientAllergy(GeneralGetReqForSOAP generalGetReqForSOAP) async { hasError = false; - await baseAppClient.post(GET_ALLERGY, + await baseAppClient.post(GET_ALLERGIES, onSuccess: (dynamic response, int statusCode) { print("Success"); patientAllergiesList.clear(); diff --git a/lib/core/service/patient_medical_file/ucaf/patient-ucaf-service.dart b/lib/core/service/patient_medical_file/ucaf/patient-ucaf-service.dart index 53fa257e..4305dbec 100644 --- a/lib/core/service/patient_medical_file/ucaf/patient-ucaf-service.dart +++ b/lib/core/service/patient_medical_file/ucaf/patient-ucaf-service.dart @@ -1,11 +1,11 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_model.dart'; import 'package:doctor_app_flutter/core/service/base/lookup-service.dart'; -import 'package:doctor_app_flutter/models/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetAssessmentResModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/order-procedure.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; -import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GetAssessmentResModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/order-procedure.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/vital_sign/patient-vital-sign-history.dart'; class UcafService extends LookupService { List patientChiefComplaintList; @@ -159,7 +159,7 @@ class UcafService extends LookupService { body['AppointmentNo'] = patient.appointmentNo; body['EpisodeID'] = patient.episodeNo; - await baseAppClient.post(GET_ORDER_PROCEDURE, + await baseAppClient.post(GET_PROCEDURE_LIST, onSuccess: (dynamic response, int statusCode) { print("Success"); orderProcedureList.clear(); diff --git a/lib/core/service/patient_medical_file/vital_sign/patient-vital-signs-service.dart b/lib/core/service/patient_medical_file/vital_sign/patient-vital-signs-service.dart index af6c46b4..a74969d1 100644 --- a/lib/core/service/patient_medical_file/vital_sign/patient-vital-signs-service.dart +++ b/lib/core/service/patient_medical_file/vital_sign/patient-vital-signs-service.dart @@ -1,8 +1,8 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; -import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart'; -import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/vital_sign/patient-vital-sign-data.dart'; +import 'package:doctor_app_flutter/core/model/patient/vital_sign/patient-vital-sign-history.dart'; class VitalSignsService extends BaseService { VitalSignData patientVitalSigns; diff --git a/lib/core/service/pending_order_service.dart b/lib/core/service/pending_order_service.dart index ddc21269..17f6ea12 100644 --- a/lib/core/service/pending_order_service.dart +++ b/lib/core/service/pending_order_service.dart @@ -1,9 +1,9 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; -import 'package:doctor_app_flutter/models/admisson_orders/admission_orders_model.dart'; -import 'package:doctor_app_flutter/models/admisson_orders/admission_orders_request_model.dart'; -import 'package:doctor_app_flutter/models/pending_orders/pending_order_request_model.dart'; -import 'package:doctor_app_flutter/models/pending_orders/pending_orders_model.dart'; +import 'package:doctor_app_flutter/core/model/admisson_orders/admission_orders_model.dart'; +import 'package:doctor_app_flutter/core/model/admisson_orders/admission_orders_request_model.dart'; +import 'package:doctor_app_flutter/core/model/pending_orders/pending_order_request_model.dart'; +import 'package:doctor_app_flutter/core/model/pending_orders/pending_orders_model.dart'; class PendingOrderService extends BaseService { List _pendingOrderList = List(); diff --git a/lib/core/service/special_clinics/special_clinic_service.dart b/lib/core/service/special_clinics/special_clinic_service.dart index b6fdd1ed..6ee126d5 100644 --- a/lib/core/service/special_clinics/special_clinic_service.dart +++ b/lib/core/service/special_clinics/special_clinic_service.dart @@ -1,7 +1,7 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; -import 'package:doctor_app_flutter/models/dashboard/get_special_clinical_care_List_Respose_Model.dart'; -import 'package:doctor_app_flutter/models/dashboard/get_special_clinical_care_mapping_List_Respose_Model.dart'; +import 'package:doctor_app_flutter/core/model/dashboard/get_special_clinical_care_List_Respose_Model.dart'; +import 'package:doctor_app_flutter/core/model/dashboard/get_special_clinical_care_mapping_List_Respose_Model.dart'; class SpecialClinicsService extends BaseService { List _specialClinicalCareList = []; diff --git a/lib/core/viewModel/DischargedPatientViewModel.dart b/lib/core/viewModel/DischargedPatientViewModel.dart index 9df347e2..a9903f20 100644 --- a/lib/core/viewModel/DischargedPatientViewModel.dart +++ b/lib/core/viewModel/DischargedPatientViewModel.dart @@ -1,6 +1,6 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/service/patient/DischargedPatientService.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import '../../locator.dart'; import 'base_view_model.dart'; diff --git a/lib/core/viewModel/InsuranceViewModel.dart b/lib/core/viewModel/InsuranceViewModel.dart index f7aea34f..7e9a4664 100644 --- a/lib/core/viewModel/InsuranceViewModel.dart +++ b/lib/core/viewModel/InsuranceViewModel.dart @@ -3,7 +3,7 @@ import 'package:doctor_app_flutter/core/model/insurance/insurance_approval.dart' import 'package:doctor_app_flutter/core/model/insurance/insurance_approval_in_patient_model.dart'; import 'package:doctor_app_flutter/core/service/patient_medical_file/insurance/InsuranceCardService.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import '../../locator.dart'; diff --git a/lib/core/viewModel/LiveCarePatientViewModel.dart b/lib/core/viewModel/LiveCarePatientViewModel.dart index 6ffa036e..485fb795 100644 --- a/lib/core/viewModel/LiveCarePatientViewModel.dart +++ b/lib/core/viewModel/LiveCarePatientViewModel.dart @@ -6,10 +6,10 @@ import 'package:doctor_app_flutter/core/model/live_care/live_care_login_reguest_ import 'package:doctor_app_flutter/core/service/home/dasboard_service.dart'; import 'package:doctor_app_flutter/core/service/patient/LiveCarePatientServices.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; -import 'package:doctor_app_flutter/models/livecare/end_call_req.dart'; -import 'package:doctor_app_flutter/models/livecare/start_call_req.dart'; -import 'package:doctor_app_flutter/models/livecare/start_call_res.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/livecare/end_call_req.dart'; +import 'package:doctor_app_flutter/core/model/livecare/start_call_req.dart'; +import 'package:doctor_app_flutter/core/model/livecare/start_call_res.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import '../../locator.dart'; diff --git a/lib/core/viewModel/PatientMedicalReportViewModel.dart b/lib/core/viewModel/PatientMedicalReportViewModel.dart index 7392cdd4..f42524b5 100644 --- a/lib/core/viewModel/PatientMedicalReportViewModel.dart +++ b/lib/core/viewModel/PatientMedicalReportViewModel.dart @@ -1,9 +1,9 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/service/patient_medical_file/medical_report/PatientMedicalReportService.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/MedicalReport/MedicalReportTemplate.dart'; -import 'package:doctor_app_flutter/models/patient/MedicalReport/MeidcalReportModel.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/MedicalReport/MedicalReportTemplate.dart'; +import 'package:doctor_app_flutter/core/model/patient/MedicalReport/MeidcalReportModel.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import '../../locator.dart'; diff --git a/lib/core/viewModel/PatientSearchViewModel.dart b/lib/core/viewModel/PatientSearchViewModel.dart index 5acc6f07..656a077f 100644 --- a/lib/core/viewModel/PatientSearchViewModel.dart +++ b/lib/core/viewModel/PatientSearchViewModel.dart @@ -5,8 +5,8 @@ import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestM import 'package:doctor_app_flutter/core/service/patient/out_patient_service.dart'; import 'package:doctor_app_flutter/core/service/patient/patientInPatientService.dart'; import 'package:doctor_app_flutter/core/service/special_clinics/special_clinic_service.dart'; -import 'package:doctor_app_flutter/models/dashboard/get_special_clinical_care_mapping_List_Respose_Model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/dashboard/get_special_clinical_care_mapping_List_Respose_Model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import '../../locator.dart'; @@ -126,7 +126,7 @@ class PatientSearchViewModel extends BaseViewModel { } else if (OutPatientFilterType.NextWeek == outPatientFilterType) { dateTo = AppDateUtils.convertDateToFormat( DateTime(DateTime.now().year, DateTime.now().month, - DateTime.now().day + 6), + DateTime.now().day + 7), 'yyyy-MM-dd'); dateFrom = AppDateUtils.convertDateToFormat( diff --git a/lib/core/viewModel/SOAP_view_model.dart b/lib/core/viewModel/SOAP_view_model.dart index b11f3d5f..654906a2 100644 --- a/lib/core/viewModel/SOAP_view_model.dart +++ b/lib/core/viewModel/SOAP_view_model.dart @@ -3,34 +3,34 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart'; import 'package:doctor_app_flutter/core/service/patient_medical_file/prescription/prescription_service.dart'; import 'package:doctor_app_flutter/core/service/patient_medical_file/soap/SOAP_service.dart'; -import 'package:doctor_app_flutter/models/SOAP/ChiefComplaint/GetChiefComplaintReqModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/GeneralGetReqForSOAP.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetAllergiesResModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetAssessmentReqModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetAssessmentResModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteReqModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteResModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetHistoryReqModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetHistoryResModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetPhysicalExamListResModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetPhysicalExamReqModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/PatchAssessmentReqModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/PostEpisodeReqModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/get_Allergies_request_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/in_patient/GetEpisodeForInpatientReqModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/in_patient/PostEpisodeForInpatientRequestModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/post_allergy_request_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/post_assessment_request_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/post_chief_complaint_request_model.dart'; -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/models/SOAP/selected_items/my_selected_allergy.dart'; -import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_examination.dart'; -import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_history.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/ChiefComplaint/GetChiefComplaintReqModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GeneralGetReqForSOAP.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GetAllergiesResModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GetAssessmentReqModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GetAssessmentResModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GetGetProgressNoteReqModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GetGetProgressNoteResModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GetHistoryReqModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GetHistoryResModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GetPhysicalExamListResModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GetPhysicalExamReqModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/PatchAssessmentReqModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/PostEpisodeReqModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/get_Allergies_request_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/in_patient/GetEpisodeForInpatientReqModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/in_patient/PostEpisodeForInpatientRequestModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/post_allergy_request_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/post_assessment_request_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/post_chief_complaint_request_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/post_histories_request_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/post_physical_exam_request_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/post_progress_note_request_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_allergy.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_examination.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_history.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/assessment/assessment_call_back.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/objective/objective_call_back.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/plan/plan_call_back.dart'; diff --git a/lib/core/viewModel/authentication_view_model.dart b/lib/core/viewModel/authentication_view_model.dart index b0f93602..5671aa55 100644 --- a/lib/core/viewModel/authentication_view_model.dart +++ b/lib/core/viewModel/authentication_view_model.dart @@ -17,10 +17,10 @@ import 'package:doctor_app_flutter/core/service/authentication_service.dart'; import 'package:doctor_app_flutter/core/service/hospitals/hospitals_service.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; import 'package:doctor_app_flutter/locator.dart'; -import 'package:doctor_app_flutter/models/doctor/clinic_model.dart'; -import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; -import 'package:doctor_app_flutter/models/doctor/profile_req_Model.dart'; -import 'package:doctor_app_flutter/models/doctor/user_model.dart'; +import 'package:doctor_app_flutter/core/model/doctor/clinic_model.dart'; +import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; +import 'package:doctor_app_flutter/core/model/doctor/profile_req_Model.dart'; +import 'package:doctor_app_flutter/core/model/doctor/user_model.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; diff --git a/lib/core/viewModel/base_view_model.dart b/lib/core/viewModel/base_view_model.dart index ecad0436..33467e06 100644 --- a/lib/core/viewModel/base_view_model.dart +++ b/lib/core/viewModel/base_view_model.dart @@ -1,6 +1,6 @@ import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; -import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; +import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:flutter/material.dart'; diff --git a/lib/core/viewModel/dashboard_view_model.dart b/lib/core/viewModel/dashboard_view_model.dart index dfe3c695..efeb65b0 100644 --- a/lib/core/viewModel/dashboard_view_model.dart +++ b/lib/core/viewModel/dashboard_view_model.dart @@ -3,9 +3,9 @@ import 'package:doctor_app_flutter/core/service/home/dasboard_service.dart'; import 'package:doctor_app_flutter/core/service/home/doctor_reply_service.dart'; import 'package:doctor_app_flutter/core/service/special_clinics/special_clinic_service.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart'; -import 'package:doctor_app_flutter/models/dashboard/get_special_clinical_care_List_Respose_Model.dart'; -import 'package:doctor_app_flutter/models/doctor/clinic_model.dart'; +import 'package:doctor_app_flutter/core/model/dashboard/dashboard_model.dart'; +import 'package:doctor_app_flutter/core/model/dashboard/get_special_clinical_care_List_Respose_Model.dart'; +import 'package:doctor_app_flutter/core/model/doctor/clinic_model.dart'; import 'package:firebase_messaging/firebase_messaging.dart'; import '../../locator.dart'; diff --git a/lib/core/viewModel/doctor_replay_view_model.dart b/lib/core/viewModel/doctor_replay_view_model.dart index 8a4abb11..e89f96f9 100644 --- a/lib/core/viewModel/doctor_replay_view_model.dart +++ b/lib/core/viewModel/doctor_replay_view_model.dart @@ -1,8 +1,8 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/service/home/doctor_reply_service.dart'; -import 'package:doctor_app_flutter/models/doctor/list_gt_my_patients_question_model.dart'; -import 'package:doctor_app_flutter/models/doctor/replay/request_create_doctor_response.dart'; -import 'package:doctor_app_flutter/models/doctor/replay/request_doctor_reply.dart'; +import 'package:doctor_app_flutter/core/model/doctor/list_gt_my_patients_question_model.dart'; +import 'package:doctor_app_flutter/core/model/doctor/replay/request_create_doctor_response.dart'; +import 'package:doctor_app_flutter/core/model/doctor/replay/request_doctor_reply.dart'; import '../../locator.dart'; import 'base_view_model.dart'; diff --git a/lib/core/viewModel/labs_view_model.dart b/lib/core/viewModel/labs_view_model.dart index 9dbb8b2f..aa2da342 100644 --- a/lib/core/viewModel/labs_view_model.dart +++ b/lib/core/viewModel/labs_view_model.dart @@ -8,7 +8,7 @@ import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart'; import 'package:doctor_app_flutter/core/model/labs/patient_lab_special_result.dart'; import 'package:doctor_app_flutter/core/service/patient_medical_file/lab_order/labs_service.dart'; import 'package:doctor_app_flutter/locator.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'base_view_model.dart'; diff --git a/lib/core/viewModel/livecare_view_model.dart b/lib/core/viewModel/livecare_view_model.dart index 5a3ddd26..b0b47086 100644 --- a/lib/core/viewModel/livecare_view_model.dart +++ b/lib/core/viewModel/livecare_view_model.dart @@ -1,12 +1,12 @@ import 'package:doctor_app_flutter/client/base_app_client.dart'; import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; -import 'package:doctor_app_flutter/models/livecare/end_call_req.dart'; -import 'package:doctor_app_flutter/models/livecare/get_panding_req_list.dart'; -import 'package:doctor_app_flutter/models/livecare/get_pending_res_list.dart'; -import 'package:doctor_app_flutter/models/livecare/start_call_req.dart'; -import 'package:doctor_app_flutter/models/livecare/start_call_res.dart'; -import 'package:doctor_app_flutter/models/livecare/transfer_to_admin.dart'; +import 'package:doctor_app_flutter/core/model/livecare/end_call_req.dart'; +import 'package:doctor_app_flutter/core/model/livecare/get_panding_req_list.dart'; +import 'package:doctor_app_flutter/core/model/livecare/get_pending_res_list.dart'; +import 'package:doctor_app_flutter/core/model/livecare/start_call_req.dart'; +import 'package:doctor_app_flutter/core/model/livecare/start_call_res.dart'; +import 'package:doctor_app_flutter/core/model/livecare/transfer_to_admin.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:flutter/cupertino.dart'; diff --git a/lib/core/viewModel/medicine_view_model.dart b/lib/core/viewModel/medicine_view_model.dart index 62e972ee..25916661 100644 --- a/lib/core/viewModel/medicine_view_model.dart +++ b/lib/core/viewModel/medicine_view_model.dart @@ -1,14 +1,22 @@ 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/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/core/model/procedure/procedure_template_details_model.dart'; import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart'; import 'package:doctor_app_flutter/core/service/patient_medical_file/prescription/medicine_service.dart'; import 'package:doctor_app_flutter/core/service/patient_medical_file/prescription/prescription_service.dart'; import 'package:doctor_app_flutter/core/service/patient_medical_file/procedure/procedure_service.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetAssessmentReqModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetAssessmentResModel.dart'; - +import 'package:doctor_app_flutter/core/model/SOAP/GetAssessmentReqModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GetAssessmentResModel.dart'; +import 'package:doctor_app_flutter/core/viewModel/prescription/prescription_view_model.dart'; +import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_container.dart'; +import 'package:flutter/cupertino.dart'; import '../../locator.dart'; +import '../../util/dr_app_toast_msg.dart'; +import '../../util/helpers.dart'; +import '../../widgets/shared/loader/gif_loader_dialog_utils.dart'; +import '../model/Prescriptions/post_prescrition_req_model.dart'; +import '../model/Prescriptions/prescription_model.dart'; import 'base_view_model.dart'; class MedicineViewModel extends BaseViewModel { @@ -17,6 +25,7 @@ class MedicineViewModel extends BaseViewModel { ProcedureService _procedureService = locator(); PrescriptionService _prescriptionService = locator(); + List get procedureTemplate => _procedureService.templateList; List templateList = List(); @@ -56,18 +65,22 @@ class MedicineViewModel extends BaseViewModel { List get itemMedicineListUnit => _prescriptionService.itemMedicineListUnit; - Future getItem({int itemID}) async { - //hasError = false; - //_insuranceCardService.clearInsuranceCard(); - setState(ViewState.Busy); + + Future getItem({int itemID, bool isLocalBusy = false}) async { + if (isLocalBusy) { + setState(ViewState.BusyLocal); + } else { + setState(ViewState.Busy); + } await _prescriptionService.getItem(itemID: itemID); if (_prescriptionService.hasError) { error = _prescriptionService.error; - setState(ViewState.Error); + setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); } + setTemplateListDependOnId() { procedureTemplate.forEach((element) { List templateListData = templateList @@ -90,31 +103,133 @@ class MedicineViewModel extends BaseViewModel { print(templateList.length.toString()); } - Future getProcedureTemplate({String categoryID}) async { - hasError = false; - setState(ViewState.Busy); - await _procedureService.getProcedureTemplate(categoryID: categoryID); - if (_procedureService.hasError) { - error = _procedureService.error; - setState(ViewState.ErrorLocal); + + + + getPrescriptionForDrug( + List prescriptionList, + MedicineViewModel model, + ) { + var prescriptionDetails = []; + if (prescriptionList.length > 0) { + prescriptionList[0].entityList.forEach((element) { + if (element.mediSpanGPICode != null) { + prescriptionDetails.add({ + 'DrugId': element.mediSpanGPICode, + 'DrugName': element.medicationName, + 'Dose': element.doseDailyQuantity, + 'DoseType': element.doseDailyUnitID, + 'Unit': element.uom, + 'FrequencyType': element.frequencyID, + 'Duration': element.doseDurationDays, + 'RouteID': element.routeID, + 'IsScreen': element.isSIG + }); + } + }); + } + return prescriptionDetails; + } + + + postPrescription( + {String duration, + String doseTimeIn, + String dose, + String drugId, + String strength, + String route, + String frequency, + String indication, + String instruction, + PrescriptionViewModel model, + DateTime doseTime, + String doseUnit, + String icdCode, + PatiantInformtion patient, + String patientType, + bool isLocalBusy = false, + BuildContext context, PrescriptionRequestModel prescriptionRequestModel}) async { + if (isLocalBusy) { + setState(ViewState.BusyLocal); + } else { + setState(ViewState.Busy); + } + PostPrescriptionReqModel postProcedureReqModel = + new PostPrescriptionReqModel(); + List prescriptionList = List(); + + postProcedureReqModel.appointmentNo = patient.appointmentNo; + postProcedureReqModel.clinicID = patient.clinicId; + postProcedureReqModel.episodeID = patient.episodeNo; + postProcedureReqModel.patientMRN = patient.patientMRN; + + prescriptionList.add(PrescriptionRequestModel( + covered: true, + dose: double.parse(dose), + itemId: drugId.isEmpty ? 1 : int.parse(drugId), + doseUnitId: int.parse(doseUnit), + route: route.isEmpty ? 1 : int.parse(route), + frequency: frequency.isEmpty ? 1 : int.parse(frequency), + remarks: instruction, + approvalRequired: true, + icdcode10Id: icdCode.toString(), + doseTime: doseTimeIn.isEmpty ? 1 : int.parse(doseTimeIn), + duration: duration.isEmpty ? 1 : int.parse(duration), + doseStartDate: doseTime.toIso8601String())); + postProcedureReqModel.prescriptionRequestModel = prescriptionList; + await _prescriptionService.postPrescription(postProcedureReqModel); + if (_prescriptionService.hasError) { + error = _prescriptionService.error; + if (isLocalBusy) { + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Error); + } } else { - setTemplateListDependOnId(); setState(ViewState.Idle); + // TODO Elham* to investigate why we are calling that + setTemplateListDependOnId(); } } - Future getPrescription({int mrn}) async { - //hasError = false; - //_insuranceCardService.clearInsuranceCard(); - setState(ViewState.Busy); - await _prescriptionService.getPrescription(mrn: mrn); + + + Future getAssessmentList ({PatiantInformtion patientInfo, bool isLocalBusy = false}) async { + if (isLocalBusy) { + setState(ViewState.BusyLocal); + } else { + setState(ViewState.Busy); + } + GetAssessmentReqModel getAssessmentReqModel = GetAssessmentReqModel( + patientMRN: patientInfo.patientMRN, + episodeID: patientInfo.episodeNo.toString(), + editedBy: '', + doctorID: '', + appointmentNo: patientInfo.appointmentNo); + if (medicationStrengthList.length == 0) { + await getMedicationStrength(isLocalBusy: true); + } + if (medicationDurationList.length == 0) { + await getMedicationDuration(isLocalBusy: true); + } + if (medicationDoseTimeList.length == 0) { + await getMedicationDoseTime(isLocalBusy: true); + } + await getPatientAssessment(getAssessmentReqModel, isLocalBusy: true); if (_prescriptionService.hasError) { error = _prescriptionService.error; - setState(ViewState.ErrorLocal); - } else + if (isLocalBusy) { + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Error); + } + } else { setState(ViewState.Idle); + } } + Future getMedicineItem(String itemName) async { setState(ViewState.Busy); await _medicineService.getMedicineItem(itemName); @@ -125,35 +240,93 @@ class MedicineViewModel extends BaseViewModel { setState(ViewState.Idle); } - Future getMedicationList({String drug}) async { - setState(ViewState.Busy); + + getMedicationList( + {String drug, bool isLocalBusy = false}) async { + if (isLocalBusy) { + setState(ViewState.BusyLocal); + } else { + setState(ViewState.Busy); + } + await getDoctorProfile(isGetProfile: true); await _prescriptionService.getMedicationList(drug: drug); if (_prescriptionService.hasError) { error = _prescriptionService.error; - setState(ViewState.Error); - } else + if (isLocalBusy) { + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Error); + } + } else { setState(ViewState.Idle); + } } Future getPatientAssessment( - GetAssessmentReqModel getAssessmentReqModel) async { - setState(ViewState.Busy); + GetAssessmentReqModel getAssessmentReqModel ,{bool isLocalBusy = false}) async { + if (isLocalBusy) { + setState(ViewState.BusyLocal); + } else { + setState(ViewState.Busy); + } await _prescriptionService.getPatientAssessment(getAssessmentReqModel); if (_prescriptionService.hasError) { error = _prescriptionService.error; - setState(ViewState.Error); + setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); } - Future getMedicationStrength() async { - setState(ViewState.Busy); + Future onInitiateAllPrescription({ + PrescriptionViewModel model, + PatiantInformtion patient, + ProcedureTempleteDetailsModel groupProcedures, + BuildContext context, + bool isLocalBusy = true + } + ) async { + if (isLocalBusy) { + setState(ViewState.BusyLocal); + } else { + setState(ViewState.Busy); + } + model.getItem( + itemID: int.parse( + groupProcedures.aliasN.replaceAll("item code ;", ""))); + + GetAssessmentReqModel getAssessmentReqModel = GetAssessmentReqModel( + patientMRN: patient.patientMRN, + episodeID: patient.episodeNo.toString(), + editedBy: '', + doctorID: '', + appointmentNo: patient.appointmentNo); + if (medicationStrengthList.length == 0) { + await getMedicationStrength(); + } + if (medicationDurationList.length == 0) { + await getMedicationDuration(); + } + if (medicationDoseTimeList.length == 0) { + await getMedicationDoseTime(); + } + await getPatientAssessment(getAssessmentReqModel); + } + + Future getMedicationStrength({bool isLocalBusy = false}) async { + if (isLocalBusy) { + setState(ViewState.BusyLocal); + } else { + setState(ViewState.Busy); + } await _prescriptionService .getMasterLookup(MasterKeysService.MedicationStrength); if (_prescriptionService.hasError) { error = _prescriptionService.error; - setState(ViewState.Error); - } else + if (isLocalBusy) { + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Error); + }} else setState(ViewState.Idle); } @@ -179,9 +352,12 @@ class MedicineViewModel extends BaseViewModel { setState(ViewState.Idle); } - Future getMedicationDoseTime() async { - setState(ViewState.Busy); - await _prescriptionService + Future getMedicationDoseTime({bool isLocalBusy = false}) async { + if (isLocalBusy) { + setState(ViewState.BusyLocal); + } else { + setState(ViewState.Busy); + } await _prescriptionService .getMasterLookup(MasterKeysService.MedicationDoseTime); if (_prescriptionService.hasError) { error = _prescriptionService.error; @@ -201,13 +377,17 @@ class MedicineViewModel extends BaseViewModel { setState(ViewState.Idle); } - Future getMedicationDuration() async { - setState(ViewState.Busy); + Future getMedicationDuration({bool isLocalBusy = false}) async { + if (isLocalBusy) { + setState(ViewState.BusyLocal); + } else { + setState(ViewState.Busy); + } await _prescriptionService .getMasterLookup(MasterKeysService.MedicationDuration); if (_prescriptionService.hasError) { error = _prescriptionService.error; - setState(ViewState.Error); + setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); } diff --git a/lib/core/viewModel/patient-referral-viewmodel.dart b/lib/core/viewModel/patient-referral-viewmodel.dart index 861c110b..7e18df05 100644 --- a/lib/core/viewModel/patient-referral-viewmodel.dart +++ b/lib/core/viewModel/patient-referral-viewmodel.dart @@ -7,11 +7,11 @@ import 'package:doctor_app_flutter/core/service/patient/MyReferralPatientService import 'package:doctor_app_flutter/core/service/patient/ReferralService.dart'; import 'package:doctor_app_flutter/core/service/patient/patient-doctor-referral-service.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; -import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; -import 'package:doctor_app_flutter/models/patient/my_referral/PendingReferral.dart'; -import 'package:doctor_app_flutter/models/patient/my_referral/clinic-doctor.dart'; -import 'package:doctor_app_flutter/models/patient/my_referral/my_referred_patient_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/my_referral/PendingReferral.dart'; +import 'package:doctor_app_flutter/core/model/patient/my_referral/clinic-doctor.dart'; +import 'package:doctor_app_flutter/core/model/patient/my_referral/my_referred_patient_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:flutter/cupertino.dart'; @@ -230,12 +230,12 @@ class PatientReferralViewModel extends BaseViewModel { Future makeReferral(PatiantInformtion patient, String isoStringDate, int projectID, int clinicID, int doctorID, String remarks) async { - setState(ViewState.Busy); + setState(ViewState.BusyLocal); await _referralPatientService.makeReferral( patient, isoStringDate, projectID, clinicID, doctorID, remarks); if (_referralPatientService.hasError) { error = _referralPatientService.error; - setState(ViewState.Error); + setState(ViewState.ErrorLocal); } else { setState(ViewState.Idle); } diff --git a/lib/core/viewModel/patient-ucaf-viewmodel.dart b/lib/core/viewModel/patient-ucaf-viewmodel.dart index 0b425ab8..de8bc2f5 100644 --- a/lib/core/viewModel/patient-ucaf-viewmodel.dart +++ b/lib/core/viewModel/patient-ucaf-viewmodel.dart @@ -4,12 +4,12 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_model.dart'; import 'package:doctor_app_flutter/core/service/patient_medical_file/ucaf/patient-ucaf-service.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetAssessmentResModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/order-procedure.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; -import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GetAssessmentResModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/order-procedure.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/vital_sign/patient-vital-sign-history.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:flutter/material.dart'; diff --git a/lib/core/viewModel/patient-vital-sign-viewmodel.dart b/lib/core/viewModel/patient-vital-sign-viewmodel.dart index bab2ff9f..fc4bfec3 100644 --- a/lib/core/viewModel/patient-vital-sign-viewmodel.dart +++ b/lib/core/viewModel/patient-vital-sign-viewmodel.dart @@ -1,9 +1,9 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/service/patient_medical_file/vital_sign/patient-vital-signs-service.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; -import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart'; -import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/vital_sign/patient-vital-sign-data.dart'; +import 'package:doctor_app_flutter/core/model/patient/vital_sign/patient-vital-sign-history.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import '../../locator.dart'; diff --git a/lib/core/viewModel/patient_view_model.dart b/lib/core/viewModel/patient_view_model.dart index 1d5f087a..242ba6c3 100644 --- a/lib/core/viewModel/patient_view_model.dart +++ b/lib/core/viewModel/patient_view_model.dart @@ -8,18 +8,20 @@ import 'package:doctor_app_flutter/core/model/note/GetNursingProgressNoteRequest import 'package:doctor_app_flutter/core/model/note/GetNursingProgressNoteResposeModel.dart'; import 'package:doctor_app_flutter/core/model/note/note_model.dart'; import 'package:doctor_app_flutter/core/model/note/update_note_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/lab_orders/lab_orders_res_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/lab_result/lab_result.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/prescription/prescription_report.dart'; +import 'package:doctor_app_flutter/core/model/patient/prescription/prescription_report_for_in_patient.dart'; +import 'package:doctor_app_flutter/core/model/patient/prescription/prescription_res_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/radiology/radiology_res_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/vital_sign/vital_sign_res_model.dart'; import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart'; import 'package:doctor_app_flutter/core/service/patient/patient_service.dart'; -import 'package:doctor_app_flutter/models/patient/lab_orders/lab_orders_res_model.dart'; -import 'package:doctor_app_flutter/models/patient/lab_result/lab_result.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; -import 'package:doctor_app_flutter/models/patient/prescription/prescription_report.dart'; -import 'package:doctor_app_flutter/models/patient/prescription/prescription_report_for_in_patient.dart'; -import 'package:doctor_app_flutter/models/patient/prescription/prescription_res_model.dart'; -import 'package:doctor_app_flutter/models/patient/radiology/radiology_res_model.dart'; -import 'package:doctor_app_flutter/models/patient/vital_sign/vital_sign_res_model.dart'; import '../../locator.dart'; +import '../model/note/stp_master_list_req_model.dart'; +import '../model/note/stp_master_list_res_model.dart'; import 'base_view_model.dart'; class PatientViewModel extends BaseViewModel { @@ -71,6 +73,9 @@ class PatientViewModel extends BaseViewModel { List get referralFrequencyList => _patientService.referalFrequancyList; + List get stpMasterList => + _patientService.stpMasterList; + Future getPatientList(patient, patientType, {bool isBusyLocal = false, isView}) async { var localRes; @@ -101,16 +106,6 @@ class PatientViewModel extends BaseViewModel { setState(ViewState.Idle); } - Future getOutPatientPrescriptions(patient) async { - setState(ViewState.Busy); - await _patientService.getOutPatientPrescriptions(patient); - if (_patientService.hasError) { - error = _patientService.error; - setState(ViewState.Error); - } else - setState(ViewState.Idle); - } - Future getInPatientPrescriptions(patient) async { setState(ViewState.Busy); await _patientService.getInPatientPrescriptions(patient); @@ -361,6 +356,32 @@ class PatientViewModel extends BaseViewModel { resultType: resultType, setupID: "010266"); await _patientService.getDiabeticChartValues(requestModel); + if (_patientService.hasError) { + error = _patientService.error; + if (isLocalBusy) + setState(ViewState.ErrorLocal); + else + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + Future getStpMasterList({bool isLocalBusy = false}) async { + if (isLocalBusy) + setState(ViewState.BusyLocal); + else + setState(ViewState.Busy); + + StpMasterListRequestModel requestModel = StpMasterListRequestModel( + isDentalAllowedBackend: false, + languageID: 1, + projectID: 15, + parameterGroup: 7, + parameterType: 362); + + await _patientService.getStpMasterList(requestModel); + if (_patientService.hasError) { error = _patientService.error; if (isLocalBusy) diff --git a/lib/core/viewModel/pednding_orders_view_model.dart b/lib/core/viewModel/pednding_orders_view_model.dart index 3f3e92be..d2bac7be 100644 --- a/lib/core/viewModel/pednding_orders_view_model.dart +++ b/lib/core/viewModel/pednding_orders_view_model.dart @@ -2,8 +2,8 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/service/pending_order_service.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; import 'package:doctor_app_flutter/locator.dart'; -import 'package:doctor_app_flutter/models/admisson_orders/admission_orders_model.dart'; -import 'package:doctor_app_flutter/models/pending_orders/pending_orders_model.dart'; +import 'package:doctor_app_flutter/core/model/admisson_orders/admission_orders_model.dart'; +import 'package:doctor_app_flutter/core/model/pending_orders/pending_orders_model.dart'; class PendingOrdersViewModel extends BaseViewModel { bool hasError = false; diff --git a/lib/core/viewModel/prescription_view_model.dart b/lib/core/viewModel/prescription/prescription_view_model.dart similarity index 53% rename from lib/core/viewModel/prescription_view_model.dart rename to lib/core/viewModel/prescription/prescription_view_model.dart index e329e31d..3c2b38a6 100644 --- a/lib/core/viewModel/prescription_view_model.dart +++ b/lib/core/viewModel/prescription/prescription_view_model.dart @@ -4,86 +4,57 @@ import 'package:doctor_app_flutter/core/model/Prescriptions/Prescriptions.dart'; import 'package:doctor_app_flutter/core/model/Prescriptions/get_medication_for_inpatient_model.dart'; import 'package:doctor_app_flutter/core/model/Prescriptions/perscription_pharmacy.dart'; import 'package:doctor_app_flutter/core/model/Prescriptions/post_prescrition_req_model.dart'; -import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_in_patient.dart'; +import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_entity_model.dart'; import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_model.dart'; import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report.dart'; import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report_enh.dart'; import 'package:doctor_app_flutter/core/model/Prescriptions/prescriptions_order.dart'; -import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GetAllergiesResModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GetAssessmentResModel.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/vital_sign/patient-vital-sign-data.dart'; import 'package:doctor_app_flutter/core/service/patient_medical_file/prescription/prescription_service.dart'; -import 'package:doctor_app_flutter/core/service/patient_medical_file/prescription/prescriptions_service.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; import 'package:doctor_app_flutter/locator.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetAllergiesResModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetAssessmentResModel.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; -import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart'; import 'package:flutter/cupertino.dart'; class PrescriptionViewModel extends BaseViewModel { FilterType filterType = FilterType.Clinic; bool hasError = false; + PrescriptionService _prescriptionService = locator(); - List get allMedicationList => - _prescriptionService.allMedicationList; List get medicationForInPatient => - _prescriptionsService.medicationForInPatient; + _prescriptionService.medicationForInPatient; List get prescriptionList => _prescriptionService.prescriptionList; - - List get drugsList => _prescriptionService.doctorsList; - - //List get allMedicationList => _prescriptionService.allMedicationList; - List get drugToDrug => _prescriptionService.drugToDrugList; - - List get itemMedicineList => _prescriptionService.itemMedicineList; - PrescriptionsService _prescriptionsService = locator(); - - List _prescriptionsOrderListClinic = List(); - List _prescriptionsOrderListHospital = List(); + List get prescriptionListNew => + _prescriptionService.prescriptionListNew; List get prescriptionReportList => - _prescriptionsService.prescriptionReportList; - - List get prescriptionsList => - _prescriptionsService.prescriptionsList; + _prescriptionService.prescriptionReportList; List get pharmacyPrescriptionsList => - _prescriptionsService.pharmacyPrescriptionsList; + _prescriptionService.pharmacyPrescriptionsList; List get prescriptionReportEnhList => - _prescriptionsService.prescriptionReportEnhList; + _prescriptionService.prescriptionReportEnhList; - List get prescriptionsOrderList => - filterType == FilterType.Clinic - ? _prescriptionsOrderListClinic - : _prescriptionsOrderListHospital; - List get inPatientPrescription => - _prescriptionsService.prescriptionInPatientList; - getPrescriptionsInPatient(PatiantInformtion patient) async { - setState(ViewState.Busy); - error = ""; - await _prescriptionsService.getPrescriptionInPatient( - mrn: patient.patientId, adn: patient.admissionNo); - if (_prescriptionsService.hasError) { - error = "No Prescription Found"; - setState(ViewState.Error); - } else { - _filterList(); - await _getPrescriptionsOrders(); + List get drugToDrug => _prescriptionService.drugToDrugList; + + List _prescriptionsOrderListClinic = List(); + List _prescriptionsOrderListHospital = List(); - setState(ViewState.Idle); - } - } + + List get prescriptionsList => + _prescriptionService.prescriptionsList; Future getItem({int itemID}) async { hasError = false; - //_insuranceCardService.clearInsuranceCard(); setState(ViewState.BusyLocal); await _prescriptionService.getItem(itemID: itemID); if (_prescriptionService.hasError) { @@ -93,11 +64,11 @@ class PrescriptionViewModel extends BaseViewModel { setState(ViewState.Idle); } - Future getPrescription({int mrn}) async { + Future getPrescriptionListNew({int mrn,int appNo, bool isLocalBusy = false}) async { hasError = false; - //_insuranceCardService.clearInsuranceCard(); - setState(ViewState.Busy); - await _prescriptionService.getPrescription(mrn: mrn); + if(isLocalBusy) + setState(ViewState.BusyLocal); else setState(ViewState.Busy); + await _prescriptionService.getPrescriptionListNew(mrn: mrn, appNo:appNo ); if (_prescriptionService.hasError) { error = _prescriptionService.error; setState(ViewState.ErrorLocal); @@ -108,54 +79,17 @@ class PrescriptionViewModel extends BaseViewModel { Future postPrescription( PostPrescriptionReqModel postProcedureReqModel, int mrn) async { hasError = false; - //_insuranceCardService.clearInsuranceCard(); - setState(ViewState.Busy); + setState(ViewState.BusyLocal); await _prescriptionService.postPrescription(postProcedureReqModel); if (_prescriptionService.hasError) { error = _prescriptionService.error; setState(ViewState.ErrorLocal); } else { - await getPrescription(mrn: mrn); + await getPrescriptionListNew(mrn: mrn); setState(ViewState.Idle); } } - Future getMedicationList({String drug}) async { - setState(ViewState.Busy); - await _prescriptionService.getMedicationList(drug: drug); - if (_prescriptionService.hasError) { - error = _prescriptionService.error; - setState(ViewState.Error); - } else - setState(ViewState.Idle); - } - - Future updatePrescription( - PostPrescriptionReqModel updatePrescriptionReqModel, int mrn) async { - hasError = false; - //_insuranceCardService.clearInsuranceCard(); - setState(ViewState.Busy); - await _prescriptionService.updatePrescription(updatePrescriptionReqModel); - if (_prescriptionService.hasError) { - error = _prescriptionService.error; - setState(ViewState.ErrorLocal); - } else { - await getPrescription(mrn: mrn); - setState(ViewState.Idle); - } - } - - Future getDrugs({String drugName}) async { - hasError = false; - //_insuranceCardService.clearInsuranceCard(); - setState(ViewState.BusyLocal); - await _prescriptionService.getDrugs(drugName: drugName); - if (_prescriptionService.hasError) { - error = _prescriptionService.error; - setState(ViewState.ErrorLocal); - } else - setState(ViewState.Idle); - } Future getDrugToDrug( VitalSignData vital, @@ -164,7 +98,7 @@ class PrescriptionViewModel extends BaseViewModel { PatiantInformtion patient, List prescription) async { hasError = false; - setState(ViewState.Busy); + setState(ViewState.BusyLocal); await _prescriptionService.getDrugToDrug( vital, lstAssessments, allergy, patient, prescription); if (_prescriptionService.hasError) { @@ -174,40 +108,9 @@ class PrescriptionViewModel extends BaseViewModel { setState(ViewState.Idle); } - setFilterType(FilterType filterType) { - this.filterType = filterType; - notifyListeners(); - } - - getPrescriptionReport( - {Prescriptions prescriptions, - @required PatiantInformtion patient}) async { - setState(ViewState.Busy); - await _prescriptionsService.getPrescriptionReport( - prescriptions: prescriptions, patient: patient); - if (_prescriptionsService.hasError) { - error = _prescriptionsService.error; - setState(ViewState.ErrorLocal); - } else { - setState(ViewState.Idle); - } - } - - getListPharmacyForPrescriptions( - {int itemId, @required PatiantInformtion patient}) async { - setState(ViewState.Busy); - await _prescriptionsService.getListPharmacyForPrescriptions( - itemId: itemId, patient: patient); - if (_prescriptionsService.hasError) { - error = _prescriptionsService.error; - setState(ViewState.Error); - } else { - setState(ViewState.Idle); - } - } void _filterList() { - _prescriptionsService.prescriptionsList.forEach((element) { + _prescriptionService.prescriptionsList.forEach((element) { /// PrescriptionsList list sort clinic List prescriptionsByClinic = _prescriptionsOrderListClinic @@ -245,39 +148,28 @@ class PrescriptionViewModel extends BaseViewModel { }); } - getPrescriptionReportEnh( - {PrescriptionsOrder prescriptionsOrder, - @required PatiantInformtion patient}) async { - setState(ViewState.Busy); - await _prescriptionsService.getPrescriptionReportEnh( - prescriptionsOrder: prescriptionsOrder, patient: patient); - if (_prescriptionsService.hasError) { - error = _prescriptionsService.error; - setState(ViewState.Error); - } else { - setState(ViewState.Idle); - } - } _getPrescriptionsOrders() async { - await _prescriptionsService.getPrescriptionsOrders(); - if (_prescriptionsService.hasError) { - error = _prescriptionsService.error; + await _prescriptionService.getPrescriptionsOrders(); + if (_prescriptionService.hasError) { + error = _prescriptionService.error; setState(ViewState.ErrorLocal); } else { setState(ViewState.Idle); } } - getPrescriptions(PatiantInformtion patient, {String patientType}) async { - setState(ViewState.Busy); - await _prescriptionsService.getPrescriptions(patient); - if (_prescriptionsService.hasError) { - error = _prescriptionsService.error; - if (patientType == "7") + getPrescriptions(PatiantInformtion patient, {String patientType, bool isLocalBusy = true}) async { + if(isLocalBusy) + setState(ViewState.BusyLocal); + else setState(ViewState.Busy); + await _prescriptionService.getPrescriptions(patient); + if (_prescriptionService.hasError) { + error = _prescriptionService.error; + if (isLocalBusy) setState(ViewState.ErrorLocal); else - setState(ViewState.ErrorLocal); + setState(ViewState.Error); } else { _filterList(); await _getPrescriptionsOrders(); @@ -288,9 +180,23 @@ class PrescriptionViewModel extends BaseViewModel { getMedicationForInPatient(PatiantInformtion patient) async { setState(ViewState.Busy); - await _prescriptionsService.getMedicationForInPatient(patient); - if (_prescriptionsService.hasError) { - error = _prescriptionsService.error; + await _prescriptionService.getMedicationForInPatient(patient); + if (_prescriptionService.hasError) { + error = _prescriptionService.error; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + getPrescriptionReport( + {Prescriptions prescriptions, + @required PatiantInformtion patient}) async { + setState(ViewState.Busy); + await _prescriptionService.getPrescriptionReport( + prescriptions: prescriptions, patient: patient); + if (_prescriptionService.hasError) { + error = _prescriptionService.error; setState(ViewState.ErrorLocal); } else { setState(ViewState.Idle); diff --git a/lib/core/viewModel/prescriptions_view_model.dart b/lib/core/viewModel/prescriptions_view_model.dart deleted file mode 100644 index b0928430..00000000 --- a/lib/core/viewModel/prescriptions_view_model.dart +++ /dev/null @@ -1,163 +0,0 @@ -import 'package:doctor_app_flutter/core/enum/filter_type.dart'; -import 'package:doctor_app_flutter/core/enum/viewstate.dart'; -import 'package:doctor_app_flutter/core/model/Prescriptions/Prescriptions.dart'; -import 'package:doctor_app_flutter/core/model/Prescriptions/get_medication_for_inpatient_model.dart'; -import 'package:doctor_app_flutter/core/model/Prescriptions/perscription_pharmacy.dart'; -import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report.dart'; -import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report_enh.dart'; -import 'package:doctor_app_flutter/core/model/Prescriptions/prescriptions_order.dart'; -import 'package:doctor_app_flutter/core/service/patient_medical_file/prescription/prescriptions_service.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; -import 'package:flutter/material.dart'; - -import '../../locator.dart'; -import 'base_view_model.dart'; - -class PrescriptionsViewModel extends BaseViewModel { - FilterType filterType = FilterType.Clinic; - PrescriptionsService _prescriptionsService = locator(); - - List _prescriptionsOrderListClinic = List(); - List _prescriptionsOrderListHospital = List(); - - List get prescriptionReportList => - _prescriptionsService.prescriptionReportList; - - List get prescriptionsList => - _prescriptionsService.prescriptionsList; - - List get pharmacyPrescriptionsList => - _prescriptionsService.pharmacyPrescriptionsList; - - List get prescriptionReportEnhList => - _prescriptionsService.prescriptionReportEnhList; - - List get prescriptionsOrderList => - filterType == FilterType.Clinic - ? _prescriptionsOrderListClinic - : _prescriptionsOrderListHospital; - - List get medicationForInPatient => - _prescriptionsService.medicationForInPatient; - - List _medicationForInPatient = List(); - - getPrescriptions(PatiantInformtion patient) async { - setState(ViewState.Busy); - await _prescriptionsService.getPrescriptions(patient); - if (_prescriptionsService.hasError) { - error = _prescriptionsService.error; - setState(ViewState.Error); - } else { - _filterList(); - await _getPrescriptionsOrders(); - - setState(ViewState.Idle); - } - } - - _getPrescriptionsOrders() async { - await _prescriptionsService.getPrescriptionsOrders(); - if (_prescriptionsService.hasError) { - error = _prescriptionsService.error; - setState(ViewState.ErrorLocal); - } else { - setState(ViewState.Idle); - } - } - - void _filterList() { - _prescriptionsService.prescriptionsList.forEach((element) { - /// PrescriptionsList list sort clinic - List prescriptionsByClinic = - _prescriptionsOrderListClinic - .where((elementClinic) => - elementClinic.filterName == element.clinicDescription) - .toList(); - - if (prescriptionsByClinic.length != 0) { - _prescriptionsOrderListClinic[ - _prescriptionsOrderListClinic.indexOf(prescriptionsByClinic[0])] - .prescriptionsList - .add(element); - } else { - _prescriptionsOrderListClinic.add(PrescriptionsList( - filterName: element.clinicDescription, prescriptions: element)); - } - - /// PrescriptionsList list sort via hospital - List prescriptionsByHospital = - _prescriptionsOrderListHospital - .where( - (elementClinic) => elementClinic.filterName == element.name, - ) - .toList(); - - if (prescriptionsByHospital.length != 0) { - _prescriptionsOrderListHospital[_prescriptionsOrderListHospital - .indexOf(prescriptionsByHospital[0])] - .prescriptionsList - .add(element); - } else { - _prescriptionsOrderListHospital.add(PrescriptionsList( - filterName: element.name, prescriptions: element)); - } - }); - } - - setFilterType(FilterType filterType) { - this.filterType = filterType; - notifyListeners(); - } - - getPrescriptionReport( - {Prescriptions prescriptions, - @required PatiantInformtion patient}) async { - setState(ViewState.Busy); - await _prescriptionsService.getPrescriptionReport( - prescriptions: prescriptions, patient: patient); - if (_prescriptionsService.hasError) { - error = _prescriptionsService.error; - setState(ViewState.ErrorLocal); - } else { - setState(ViewState.Idle); - } - } - - getListPharmacyForPrescriptions( - {int itemId, @required PatiantInformtion patient}) async { - setState(ViewState.Busy); - await _prescriptionsService.getListPharmacyForPrescriptions( - itemId: itemId, patient: patient); - if (_prescriptionsService.hasError) { - error = _prescriptionsService.error; - setState(ViewState.Error); - } else { - setState(ViewState.Idle); - } - } - - getPrescriptionReportEnh( - {PrescriptionsOrder prescriptionsOrder, - @required PatiantInformtion patient}) async { - setState(ViewState.Busy); - await _prescriptionsService.getPrescriptionReportEnh( - prescriptionsOrder: prescriptionsOrder, patient: patient); - if (_prescriptionsService.hasError) { - error = _prescriptionsService.error; - setState(ViewState.Error); - } else { - setState(ViewState.Idle); - } - } - - getMedicationForInPatient(PatiantInformtion patient) async { - await _prescriptionsService.getMedicationForInPatient(patient); - if (_prescriptionsService.hasError) { - error = _prescriptionsService.error; - setState(ViewState.ErrorLocal); - } else { - setState(ViewState.Idle); - } - } -} diff --git a/lib/core/viewModel/procedure_View_model.dart b/lib/core/viewModel/procedure_View_model.dart index 3466c373..2bcfad33 100644 --- a/lib/core/viewModel/procedure_View_model.dart +++ b/lib/core/viewModel/procedure_View_model.dart @@ -6,8 +6,7 @@ import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart'; import 'package:doctor_app_flutter/core/model/labs/patient_lab_special_result.dart'; import 'package:doctor_app_flutter/core/model/procedure/ControlsModel.dart'; import 'package:doctor_app_flutter/core/model/procedure/categories_procedure.dart'; -import 'package:doctor_app_flutter/core/model/procedure/categories_procedure.dart' - as cpe; +import 'package:doctor_app_flutter/core/model/procedure/categories_procedure.dart' as cpe; import 'package:doctor_app_flutter/core/model/procedure/get_ordered_procedure_model.dart'; import 'package:doctor_app_flutter/core/model/procedure/post_procedure_req_model.dart'; import 'package:doctor_app_flutter/core/model/procedure/procedure_template_details_model.dart'; @@ -20,11 +19,12 @@ import 'package:doctor_app_flutter/core/service/patient_medical_file/procedure/p import 'package:doctor_app_flutter/core/service/patient_medical_file/radiology/radiology_service.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; import 'package:doctor_app_flutter/locator.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/procedures/ProcedureType.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:flutter/cupertino.dart'; +import '../../widgets/shared/loader/gif_loader_dialog_utils.dart'; class ProcedureViewModel extends BaseViewModel { //TODO Hussam clean it @@ -117,17 +117,19 @@ class ProcedureViewModel extends BaseViewModel { setState(ViewState.Idle); } - Future getProcedureTemplate({String categoryID}) async { - hasError = false; - setState(ViewState.Busy); - await _procedureService.getProcedureTemplate(categoryID: categoryID); + Future getProcedureTemplate({String categoryID, bool isLocalBusy = false, BuildContext context}) async { + if (isLocalBusy) { + setState(ViewState.BusyLocal); + } else { + setState(ViewState.Busy); + } + await _procedureService.getProcedureTemplate(categoryID: categoryID, isLocalBusy: false); if (_procedureService.hasError) { error = _procedureService.error; setState(ViewState.ErrorLocal); - } else { + } else setTemplateListDependOnId(); setState(ViewState.Idle); - } } setTemplateListDependOnId() { diff --git a/lib/core/viewModel/profile/discharge_summary_view_model.dart b/lib/core/viewModel/profile/discharge_summary_view_model.dart index a1c32787..d6b8aa77 100644 --- a/lib/core/viewModel/profile/discharge_summary_view_model.dart +++ b/lib/core/viewModel/profile/discharge_summary_view_model.dart @@ -2,8 +2,8 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/service/patient/profile/discharge_summary_servive.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; import 'package:doctor_app_flutter/locator.dart'; -import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryReqModel.dart'; -import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryResModel.dart'; +import 'package:doctor_app_flutter/core/model/discharge_summary/GetDischargeSummaryReqModel.dart'; +import 'package:doctor_app_flutter/core/model/discharge_summary/GetDischargeSummaryResModel.dart'; class DischargeSummaryViewModel extends BaseViewModel { bool hasError = false; diff --git a/lib/core/viewModel/profile/intervention_medication_view_model.dart b/lib/core/viewModel/profile/intervention_medication_view_model.dart new file mode 100644 index 00000000..57e3be78 --- /dev/null +++ b/lib/core/viewModel/profile/intervention_medication_view_model.dart @@ -0,0 +1,147 @@ +import 'package:doctor_app_flutter/core/enum/viewstate.dart'; +import 'package:doctor_app_flutter/core/model/dashboard/get_special_clinical_care_mapping_List_Respose_Model.dart'; +import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; +import 'package:doctor_app_flutter/locator.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/pharmacy-intervention-model/accept_or_reject_req_model.dart'; +import 'package:doctor_app_flutter/core/model/pharmacy-intervention-model/intervention_medication_history_req_model.dart'; +import 'package:doctor_app_flutter/core/model/pharmacy-intervention-model/intervention_medication_history_res_model.dart'; +import 'package:doctor_app_flutter/core/model/pharmacy-intervention-model/new_medication_req_model.dart'; +import 'package:doctor_app_flutter/core/model/pharmacy-intervention-model/new_medication_res_model.dart'; + +import '../../../util/date-utils.dart'; +import '../../service/patient/profile/intervention_medication_service.dart'; +import '../../service/special_clinics/special_clinic_service.dart'; + +class InterventionMedicationViewModel extends BaseViewModel { + SpecialClinicsService _specialClinicsService = + locator(); + + List + get specialClinicalCareMappingList => + _specialClinicsService.specialClinicalCareMappingList; + + List filterData = []; + + DateTime selectedFromDate = DateTime.now(); + DateTime selectedToDate = DateTime.now().add(Duration(days: 1)); + + PatiantInformtion patient; + bool hasError = false; + InterventionMedicationService _interventionMedicationService = + locator(); + + List get allInterventionList => + _interventionMedicationService.allInterventionList; + + List get allInterventionHistoryList => + _interventionMedicationService.allInterventionHistoryList; + + Future getInterventionMedication({ + + int projectId, + int patientId, + DateTime fromDate, + DateTime toDate, + + }) async { + InterventionMedicationReqModel interventionMedicationReqModel = + InterventionMedicationReqModel( + + projectID: projectId, + patientID: patientId, + fromDate: AppDateUtils.convertDateToServerFormat(fromDate), + toDate: AppDateUtils.convertDateToServerFormat(toDate), + + ); + hasError = false; + setState(ViewState.Busy); + await _interventionMedicationService.getInterventionMedication( + interventionMedicationReqModel: interventionMedicationReqModel); + if (_interventionMedicationService.hasError) { + error = _interventionMedicationService.error; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + Future getInterventionMedicationHistory( + { + int projectId, + int patientId, + int admissionNo, + int prescriptionNo, + int orderNo, + + bool isBusyLocal = false}) async { + InterventionMedicationHistoryReqModel + interventionMedicationHistoryReqModel = + InterventionMedicationHistoryReqModel( + + projectID: projectId, + patientID: patientId, + admissionNo: admissionNo, + prescriptionNo: prescriptionNo, + orderNo: orderNo, + + ); + hasError = false; + if (isBusyLocal) + setState(ViewState.Busy); + else + setState(ViewState.Busy); + await _interventionMedicationService.getInterventionMedicationHistory( + interventionMedicationHistoryReqModel: + interventionMedicationHistoryReqModel); + if (_interventionMedicationService.hasError) { + error = _interventionMedicationService.error; + if (isBusyLocal) + setState(ViewState.ErrorLocal); + else + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + Future setAcceptedOrRejected({ + + String remarks, + int memberId, + int projectId, + int patientID, + int admissionNo, + int prescriptionNo, + int orderNo, + int interventionStatus, + int status, + + }) async { + AcceptOrRejectReqModel acceptOrRejectReqModel = AcceptOrRejectReqModel( + + projectID: projectId, + patientID: patientID, + admissionNo: admissionNo, + prescriptionNo: prescriptionNo, + orderNo: orderNo, + accessLevel: 4, + lineItemNo: 1, + remarks: remarks, + memberID: memberId, + interventionStatus: interventionStatus, + status: status + + ); + hasError = false; + setState(ViewState.BusyLocal); + await _interventionMedicationService.setAcceptedOrRejected( + acceptOrRejectReqModel: acceptOrRejectReqModel); + if (_interventionMedicationService.hasError) { + error = _interventionMedicationService.error; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } +} diff --git a/lib/core/viewModel/profile/operation_report_view_model.dart b/lib/core/viewModel/profile/operation_report_view_model.dart index 72d3a073..d57af118 100644 --- a/lib/core/viewModel/profile/operation_report_view_model.dart +++ b/lib/core/viewModel/profile/operation_report_view_model.dart @@ -2,10 +2,10 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/service/patient/profile/operation_report_servive.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; import 'package:doctor_app_flutter/locator.dart'; -import 'package:doctor_app_flutter/models/operation_report/create_update_operation_report_request_model.dart'; -import 'package:doctor_app_flutter/models/operation_report/get_operation_details_request_modle.dart'; -import 'package:doctor_app_flutter/models/operation_report/get_operation_details_response_modle.dart'; -import 'package:doctor_app_flutter/models/operation_report/get_reservations_response_model.dart'; +import 'package:doctor_app_flutter/core/model/operation_report/create_update_operation_report_request_model.dart'; +import 'package:doctor_app_flutter/core/model/operation_report/get_operation_details_request_modle.dart'; +import 'package:doctor_app_flutter/core/model/operation_report/get_operation_details_response_modle.dart'; +import 'package:doctor_app_flutter/core/model/operation_report/get_reservations_response_model.dart'; class OperationReportViewModel extends BaseViewModel { bool hasError = false; diff --git a/lib/core/viewModel/profile/pharmacy_intervention_view_model.dart b/lib/core/viewModel/profile/pharmacy_intervention_view_model.dart new file mode 100644 index 00000000..bb0bd453 --- /dev/null +++ b/lib/core/viewModel/profile/pharmacy_intervention_view_model.dart @@ -0,0 +1,45 @@ +import 'package:doctor_app_flutter/core/service/patient/out_patient_service.dart'; +import 'package:doctor_app_flutter/core/service/patient/patientInPatientService.dart'; +import 'package:doctor_app_flutter/core/service/special_clinics/special_clinic_service.dart'; +import 'package:doctor_app_flutter/core/model/dashboard/get_special_clinical_care_mapping_List_Respose_Model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; +import '../../../locator.dart'; +import '../base_view_model.dart'; + + + +class PharmacyInterventionViewModel extends BaseViewModel { + OutPatientService _outPatientService = locator(); + SpecialClinicsService _specialClinicsService = + locator(); + + List get patientList => _outPatientService.patientList; + + List + get specialClinicalCareMappingList => + _specialClinicsService.specialClinicalCareMappingList; + + List filterData = []; + + DateTime selectedFromDate; + DateTime selectedToDate; + + int firstSubsetIndex = 0; + int inPatientPageSize = 20; + int lastSubsetIndex = 20; + + List InpatientClinicList = []; + + + PatientInPatientService _inPatientService = + locator(); + + List get inPatientList => _inPatientService.inPatientList; + + List get myIinPatientList => + _inPatientService.myInPatientList; + + List filteredInPatientItems = List(); + List filteredMyInPatientItems = List(); + +} diff --git a/lib/core/viewModel/profile/vte_assessment_view_model.dart b/lib/core/viewModel/profile/vte_assessment_view_model.dart new file mode 100644 index 00000000..0ab3fa07 --- /dev/null +++ b/lib/core/viewModel/profile/vte_assessment_view_model.dart @@ -0,0 +1,37 @@ +import 'package:doctor_app_flutter/core/enum/viewstate.dart'; +import 'package:doctor_app_flutter/core/model/vte_assessment/vte_assessment_req_model.dart'; +import 'package:doctor_app_flutter/core/model/vte_assessment/vte_assessment_res_model.dart'; +import 'package:doctor_app_flutter/core/service/patient/profile/discharge_summary_servive.dart'; +import 'package:doctor_app_flutter/core/service/patient/profile/vte_assessment_service.dart'; +import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; +import 'package:doctor_app_flutter/locator.dart'; +import 'package:doctor_app_flutter/core/model/discharge_summary/GetDischargeSummaryReqModel.dart'; +import 'package:doctor_app_flutter/core/model/discharge_summary/GetDischargeSummaryResModel.dart'; + +class VteAssessmentViewModel extends BaseViewModel { + bool hasError = false; + VteAssessmentService _VteAssessmentService = + locator(); + + List get allVteHistoryList => + _VteAssessmentService.allVteHistoryList; + + Future getVteAssessment({ + int patientId, + int admissionNo, + }) async { + VteAssessmentRequestModel vteAssessmentRequestModel = + VteAssessmentRequestModel( + transactionNo: admissionNo); + hasError = false; + setState(ViewState.Busy); + await _VteAssessmentService.getVteAssessment( + vteAssessmentRequestModel: vteAssessmentRequestModel); + if (_VteAssessmentService.hasError) { + error = _VteAssessmentService.error; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } +} diff --git a/lib/core/viewModel/project_view_model.dart b/lib/core/viewModel/project_view_model.dart index 14d2a14b..ddf7c4ab 100644 --- a/lib/core/viewModel/project_view_model.dart +++ b/lib/core/viewModel/project_view_model.dart @@ -4,8 +4,8 @@ import 'package:connectivity/connectivity.dart'; import 'package:doctor_app_flutter/client/base_app_client.dart'; import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; -import 'package:doctor_app_flutter/models/doctor/clinic_model.dart'; -import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; +import 'package:doctor_app_flutter/core/model/doctor/clinic_model.dart'; +import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:flutter/cupertino.dart'; diff --git a/lib/core/viewModel/radiology_view_model.dart b/lib/core/viewModel/radiology_view_model.dart index d656de6c..98fbc59a 100644 --- a/lib/core/viewModel/radiology_view_model.dart +++ b/lib/core/viewModel/radiology_view_model.dart @@ -2,7 +2,7 @@ import 'package:doctor_app_flutter/core/enum/filter_type.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/model/radiology/final_radiology.dart'; import 'package:doctor_app_flutter/core/service/patient_medical_file/radiology/radiology_service.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:flutter/foundation.dart'; import '../../locator.dart'; diff --git a/lib/core/viewModel/referral_view_model.dart b/lib/core/viewModel/referral_view_model.dart index 892284e2..61c6d930 100644 --- a/lib/core/viewModel/referral_view_model.dart +++ b/lib/core/viewModel/referral_view_model.dart @@ -1,6 +1,6 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/service/patient/referral_patient_service.dart'; -import 'package:doctor_app_flutter/models/patient/my_referral/my_referral_patient_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/my_referral/my_referral_patient_model.dart'; import '../../locator.dart'; import 'base_view_model.dart'; diff --git a/lib/core/viewModel/scan_qr_view_model.dart b/lib/core/viewModel/scan_qr_view_model.dart index a5bdfa39..680d871e 100644 --- a/lib/core/viewModel/scan_qr_view_model.dart +++ b/lib/core/viewModel/scan_qr_view_model.dart @@ -3,7 +3,7 @@ import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestM import 'package:doctor_app_flutter/core/service/home/scan_qr_service.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; import 'package:doctor_app_flutter/locator.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; class ScanQrViewModel extends BaseViewModel { ScanQrService _scanQrService = locator(); diff --git a/lib/core/viewModel/schedule_view_model.dart b/lib/core/viewModel/schedule_view_model.dart index 3ee64c9b..04d49f36 100644 --- a/lib/core/viewModel/schedule_view_model.dart +++ b/lib/core/viewModel/schedule_view_model.dart @@ -1,6 +1,6 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/service/home/schedule_service.dart'; -import 'package:doctor_app_flutter/models/doctor/list_doctor_working_hours_table_model.dart'; +import 'package:doctor_app_flutter/core/model/doctor/list_doctor_working_hours_table_model.dart'; import '../../locator.dart'; import 'base_view_model.dart'; diff --git a/lib/core/viewModel/sick_leave_view_model.dart b/lib/core/viewModel/sick_leave_view_model.dart index 9a7ce4f2..7fe2ef9b 100644 --- a/lib/core/viewModel/sick_leave_view_model.dart +++ b/lib/core/viewModel/sick_leave_view_model.dart @@ -1,10 +1,10 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/service/patient/patient_service.dart'; import 'package:doctor_app_flutter/core/service/patient_medical_file/sick_leave/sickleave_service.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; -import 'package:doctor_app_flutter/models/sickleave/add_sickleave_request.dart'; -import 'package:doctor_app_flutter/models/sickleave/get_all_sickleave_response.dart'; -import 'package:doctor_app_flutter/models/sickleave/sick_leave_statisitics_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/sickleave/add_sickleave_request.dart'; +import 'package:doctor_app_flutter/core/model/sickleave/get_all_sickleave_response.dart'; +import 'package:doctor_app_flutter/core/model/sickleave/sick_leave_statisitics_model.dart'; import '../../locator.dart'; import 'base_view_model.dart'; diff --git a/lib/landing_page.dart b/lib/landing_page.dart index 89faeb0c..c069e7e7 100644 --- a/lib/landing_page.dart +++ b/lib/landing_page.dart @@ -49,16 +49,13 @@ class _LandingPageState extends State { backgroundColor: HexColor('#FFFFFF'), //textTheme: TextTheme(headline6: TextStyle(color: Colors.white)), title: currentTab != 0 - ? Padding( - padding: const EdgeInsets.only(right: 188,top: 36), - child: AppText( - getText(currentTab), - letterSpacing: -1.44, - fontWeight: FontWeight.w700, - fontSize: 24.0, - color: Color(0xff2B353E), - ), - ) + ? AppText( + getText(currentTab), + letterSpacing: -1.44, + fontWeight: FontWeight.w700, + fontSize: 24.0, + color: Color(0xff2B353E), + ) : SizedBox(), leading: Builder( builder: (BuildContext context) { diff --git a/lib/locator.dart b/lib/locator.dart index 28f4bfdf..0bdfe8e9 100644 --- a/lib/locator.dart +++ b/lib/locator.dart @@ -7,14 +7,13 @@ import 'package:doctor_app_flutter/core/viewModel/hospitals_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/medical_file_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/pednding_orders_view_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/prescription/prescription_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart'; import 'package:doctor_app_flutter/core/viewModel/profile/discharge_summary_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/profile/operation_report_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/scan_qr_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart'; import 'package:get_it/get_it.dart'; - import 'core/service/AnalyticsService.dart'; import 'core/service/NavigationService.dart'; import 'core/service/PatientRegistrationService.dart'; @@ -32,7 +31,9 @@ import 'core/service/patient/out_patient_service.dart'; import 'core/service/patient/patient-doctor-referral-service.dart'; import 'core/service/patient/patientInPatientService.dart'; import 'core/service/patient/patient_service.dart'; +import 'core/service/patient/profile/intervention_medication_service.dart'; import 'core/service/patient/profile/operation_report_servive.dart'; +import 'core/service/patient/profile/vte_assessment_service.dart'; import 'core/service/patient/referral_patient_service.dart'; import 'core/service/patient_medical_file/admission_request/patient-admission-request-service.dart'; import 'core/service/patient_medical_file/insurance/InsuranceCardService.dart'; @@ -41,7 +42,6 @@ import 'core/service/patient_medical_file/medical_report/PatientMedicalReportSer import 'core/service/patient_medical_file/medical_report/medical_file_service.dart'; import 'core/service/patient_medical_file/prescription/medicine_service.dart'; import 'core/service/patient_medical_file/prescription/prescription_service.dart'; -import 'core/service/patient_medical_file/prescription/prescriptions_service.dart'; import 'core/service/patient_medical_file/procedure/procedure_service.dart'; import 'core/service/patient_medical_file/radiology/radiology_service.dart'; import 'core/service/patient_medical_file/sick_leave/sickleave_service.dart'; @@ -64,7 +64,8 @@ import 'core/viewModel/patient-admission-request-viewmodel.dart'; import 'core/viewModel/patient-referral-viewmodel.dart'; import 'core/viewModel/patient-ucaf-viewmodel.dart'; import 'core/viewModel/patient-vital-sign-viewmodel.dart'; -import 'core/viewModel/prescriptions_view_model.dart'; +import 'core/viewModel/profile/intervention_medication_view_model.dart'; +import 'core/viewModel/profile/vte_assessment_view_model.dart'; import 'core/viewModel/radiology_view_model.dart'; import 'core/viewModel/referral_view_model.dart'; import 'core/viewModel/schedule_view_model.dart'; @@ -94,7 +95,6 @@ void setupLocator() { locator.registerLazySingleton(() => LabsService()); locator.registerLazySingleton(() => InsuranceCardService()); locator.registerLazySingleton(() => RadiologyService()); - locator.registerLazySingleton(() => PrescriptionsService()); locator.registerLazySingleton(() => ReferralService()); locator.registerLazySingleton(() => MyReferralInPatientService()); locator.registerLazySingleton(() => DischargedPatientService()); @@ -112,6 +112,8 @@ void setupLocator() { locator.registerLazySingleton(() => PendingOrderService()); locator.registerLazySingleton(() => PatientRegistrationService()); locator.registerLazySingleton(() => DischargeSummaryService()); + locator.registerLazySingleton(() => VteAssessmentService()); + locator.registerLazySingleton(() => InterventionMedicationService()); /// View Model locator.registerFactory(() => DoctorReplayViewModel()); @@ -133,7 +135,6 @@ void setupLocator() { locator.registerFactory(() => LabsViewModel()); locator.registerFactory(() => InsuranceViewModel()); locator.registerFactory(() => RadiologyViewModel()); - locator.registerFactory(() => PrescriptionsViewModel()); locator.registerFactory(() => DischargedPatientViewModel()); locator.registerFactory(() => PatientSearchViewModel()); locator.registerFactory(() => HospitalViewModel()); @@ -144,4 +145,6 @@ void setupLocator() { locator.registerFactory(() => PatientRegistrationViewModel()); locator.registerFactory(() => PendingOrdersViewModel()); locator.registerFactory(() => DischargeSummaryViewModel()); + locator.registerFactory(() => VteAssessmentViewModel()); + locator.registerFactory(() => InterventionMedicationViewModel()); } diff --git a/lib/routes.dart b/lib/routes.dart index 8f636d74..917b1c6c 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -18,11 +18,14 @@ import 'package:doctor_app_flutter/screens/patients/profile/notes/note/progress_ import 'package:doctor_app_flutter/screens/patients/profile/notes/nursing_note/nursing_note_screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/operation_report/operation_report.dart'; import 'package:doctor_app_flutter/screens/patients/profile/pending_orders/pending_orders_screen.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/pharmacy-intervention/pharmacy_intervention_screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/prescriptions/in_patient_prescription_details_screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/radiology/radiology_home_page.dart'; import 'package:doctor_app_flutter/screens/patients/profile/referral/refer-patient-screen-in-patient.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/update_soap_index.dart'; -import 'package:doctor_app_flutter/screens/prescription/prescriptions_page.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/vte_assessment/vte_assessment_screen.dart'; +import 'package:doctor_app_flutter/screens/prescription/new_prescriptions_page.dart'; +import 'package:doctor_app_flutter/screens/prescription/old_prescriptions_page.dart'; import 'package:doctor_app_flutter/screens/procedures/procedure_screen.dart'; import './screens/auth/login_screen.dart'; @@ -68,6 +71,7 @@ const String PATIENT_UCAF_REQUEST = 'patients/ucaf'; const String PATIENT_UCAF_DETAIL = 'patients/ucaf/detail'; const String PATIENT_ECG = 'patients/ecg'; const String IN_PATIENT_PRESCRIPTIONS_DETAILS = 'patients/prescription-details'; +const String ORDER_PRESCRIPTION_OLD = 'prescription/prescription_old'; const String ORDER_PRESCRIPTION_NEW = 'prescription/prescription_new'; const String ORDER_PROCEDURE = 'procedure/procedure'; const String ADD_SICKLEAVE = 'add-sickleave'; @@ -80,7 +84,11 @@ const String NURSING_PROGRESS_NOTE = 'nursing_progress_note'; const String DIAGNOSIS_FOR_IN_PATIENT = 'get_diagnosis_for_in_patient'; const String DIABETIC_CHART_VALUES = 'get_diabetic_chart_values'; +const String VTE_ASSESSMENT = 'vte_assessment '; const String DISCHARGE_SUMMARY = 'discharge_summary'; +const String PHARMACY_INTERVENTION = 'new_medication'; +const String INTERVENTION_MEDICATION = 'intervention_medication'; + //todo: change the routing way. var routes = { @@ -117,7 +125,8 @@ var routes = { ), IN_PATIENT_PRESCRIPTIONS_DETAILS: (_) => InpatientPrescriptionDetailsScreen(), ADD_SICKLEAVE: (_) => PatientSickLeaveScreen(), - ORDER_PRESCRIPTION_NEW: (_) => PrescriptionsPage(), + ORDER_PRESCRIPTION_OLD: (_) => OldPrescriptionsPage(), + ORDER_PRESCRIPTION_NEW: (_) => NewPrescriptionsPage(), ORDER_PROCEDURE: (_) => ProcedureScreen(), MY_REFERRAL_DETAIL: (_) => MyReferralDetailScreen(), PATIENT_UCAF_REQUEST: (_) => UCAFPagerScreen(), @@ -131,4 +140,6 @@ var routes = { DIAGNOSIS_FOR_IN_PATIENT: (_) => DiagnosisScreen(), ADMISSION_ORDERS: (_) => AdmissionOrdersScreen(), DIABETIC_CHART_VALUES: (_) => DiabeticChart(), + PHARMACY_INTERVENTION: (_) => PharmacyInterventionScreen(), + VTE_ASSESSMENT: (_) => VteAssessmentScreen(), }; diff --git a/lib/screens/doctor/doctor_replay/doctor_repaly_chat.dart b/lib/screens/doctor/doctor_replay/doctor_repaly_chat.dart index 1558e18d..8ee81b95 100644 --- a/lib/screens/doctor/doctor_replay/doctor_repaly_chat.dart +++ b/lib/screens/doctor/doctor_replay/doctor_repaly_chat.dart @@ -2,7 +2,7 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/doctor_replay_view_model.dart'; -import 'package:doctor_app_flutter/models/doctor/list_gt_my_patients_question_model.dart'; +import 'package:doctor_app_flutter/core/model/doctor/list_gt_my_patients_question_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; diff --git a/lib/screens/doctor/doctor_replay/doctor_reply_screen.dart b/lib/screens/doctor/doctor_replay/doctor_reply_screen.dart index 1583161a..685c4903 100644 --- a/lib/screens/doctor/doctor_replay/doctor_reply_screen.dart +++ b/lib/screens/doctor/doctor_replay/doctor_reply_screen.dart @@ -5,7 +5,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; - +import 'package:doctor_app_flutter/util/tab_helper.dart'; import 'all_doctor_questions.dart'; import 'not_replaied_Doctor_Questions.dart'; @@ -72,7 +72,7 @@ class _DoctorReplyScreenState extends State preferredSize: Size.fromHeight( MediaQuery.of(context).size.height * 0.070), child: Container( - color: Helpers.getBgTabColor(), + color: TabHelper.getBgTabColor(), child: TabBar( isScrollable: false, controller: _tabController, @@ -136,8 +136,8 @@ Widget tabWidget( return Center( child: Container( - height: Helpers.getTabHeight(context), - decoration: Helpers.getBoxTabsBoxDecoration( + height: TabHelper.getTabHeight(context), + decoration: TabHelper.getBoxTabsBoxDecoration( isActive: isActive, isFirst: isFirst, isMiddle: isMiddle, @@ -146,9 +146,9 @@ Widget tabWidget( child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Helpers.getTabText(title: title, isActive: isActive), + TabHelper.getTabText(title: title, isActive: isActive), if (counter != -1) - Helpers.getTabCounter(isActive: isActive, counter: counter) + TabHelper.getTabCounter(isActive: isActive, counter: counter) ], ), ), diff --git a/lib/screens/doctor/doctor_replay/doctor_reply_widget.dart b/lib/screens/doctor/doctor_replay/doctor_reply_widget.dart index dce1d38c..8c8324d8 100644 --- a/lib/screens/doctor/doctor_replay/doctor_reply_widget.dart +++ b/lib/screens/doctor/doctor_replay/doctor_reply_widget.dart @@ -2,7 +2,7 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; -import 'package:doctor_app_flutter/models/doctor/list_gt_my_patients_question_model.dart'; +import 'package:doctor_app_flutter/core/model/doctor/list_gt_my_patients_question_model.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; @@ -34,7 +34,7 @@ class _DoctorReplyWidgetState extends State { bgColor: widget.reply.infoStatus == 99 ? Color(0xFF2B353E) : widget.reply.infoStatus == 4 - ? IN_PROGRESS_COLOR + ? AppGlobal.inProgressColor : widget.reply.infoStatus == 3 ? Color(0xFFD02127) : AppGlobal.appGreenColor, @@ -78,7 +78,7 @@ class _DoctorReplyWidgetState extends State { color: widget.reply.infoStatus == 99 ? Color(0xFF2B353E) : widget.reply.infoStatus == 4 - ? IN_PROGRESS_COLOR + ? AppGlobal.inProgressColor : widget.reply.infoStatus == 3 ? Color(0xFFD02127) : AppGlobal.appGreenColor, @@ -207,10 +207,11 @@ class _DoctorReplyWidgetState extends State { label: TranslationBase.of(context).fileNumber, value: widget.reply.patientID.toString(), isCopyable: false, + isExpanded: false, ), CustomRow( - label: TranslationBase.of(context).age + " : ", - isCopyable: false, + label: TranslationBase.of(context).age + " : ", isCopyable: false, + isExpanded: false, value: "${AppDateUtils.getAgeByBirthday(widget.reply.dateofBirth, context)}", ), diff --git a/lib/screens/doctor/my_schedule_screen.dart b/lib/screens/doctor/my_schedule_screen.dart index 02c95a2b..de61ec98 100644 --- a/lib/screens/doctor/my_schedule_screen.dart +++ b/lib/screens/doctor/my_schedule_screen.dart @@ -22,7 +22,7 @@ class MyScheduleScreen extends StatelessWidget { ) : Container( color: HexColor("#EFEFEF"), - padding: EdgeInsetsDirectional.fromSTEB(21, 0, 21, 0), + padding: EdgeInsetsDirectional.fromSTEB(0, 0, 21, 0), child: ListView( children: [ Column( diff --git a/lib/screens/doctor/patient_arrival_screen.dart b/lib/screens/doctor/patient_arrival_screen.dart index 9054fc12..11ee6f29 100644 --- a/lib/screens/doctor/patient_arrival_screen.dart +++ b/lib/screens/doctor/patient_arrival_screen.dart @@ -1,6 +1,6 @@ import 'dart:ui'; -import 'package:doctor_app_flutter/models/patient/patient_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patient_model.dart'; import 'package:doctor_app_flutter/screens/reschedule-leaves/add-rescheduleleave.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; diff --git a/lib/screens/home/dashboard_referral_patient.dart b/lib/screens/home/dashboard_referral_patient.dart index 8b134f61..33bacd50 100644 --- a/lib/screens/home/dashboard_referral_patient.dart +++ b/lib/screens/home/dashboard_referral_patient.dart @@ -2,7 +2,7 @@ import 'package:charts_flutter/flutter.dart' as charts; import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/dashboard_view_model.dart'; -import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart'; +import 'package:doctor_app_flutter/core/model/dashboard/dashboard_model.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/dashboard/guage_chart.dart'; import 'package:doctor_app_flutter/widgets/dashboard/row_count.dart'; diff --git a/lib/screens/home/dashboard_slider-item-widget.dart b/lib/screens/home/dashboard_slider-item-widget.dart index d36f0094..9ee8d9d3 100644 --- a/lib/screens/home/dashboard_slider-item-widget.dart +++ b/lib/screens/home/dashboard_slider-item-widget.dart @@ -1,5 +1,5 @@ import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart'; +import 'package:doctor_app_flutter/core/model/dashboard/dashboard_model.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/widgets/dashboard/activity_button.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; diff --git a/lib/screens/home/dashboard_swipe_widget.dart b/lib/screens/home/dashboard_swipe_widget.dart index d89efd7d..9f4d45c9 100644 --- a/lib/screens/home/dashboard_swipe_widget.dart +++ b/lib/screens/home/dashboard_swipe_widget.dart @@ -1,6 +1,6 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/dashboard_view_model.dart'; -import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart'; +import 'package:doctor_app_flutter/core/model/dashboard/dashboard_model.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/dashboard/guage_chart.dart'; import 'package:doctor_app_flutter/widgets/dashboard/out_patient_stack.dart'; diff --git a/lib/screens/home/home_screen.dart b/lib/screens/home/home_screen.dart index df810361..0d8d4150 100644 --- a/lib/screens/home/home_screen.dart +++ b/lib/screens/home/home_screen.dart @@ -6,7 +6,7 @@ import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart import 'package:doctor_app_flutter/core/viewModel/dashboard_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; -import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; +import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/home/dashboard_slider-item-widget.dart'; import 'package:doctor_app_flutter/screens/home/dashboard_swipe_widget.dart'; @@ -424,24 +424,24 @@ class _HomeScreenState extends State { }, )); changeColorIndex(); - - patientCards.add(HomePatientCard( - gradient: backgroundColors[colorIndex], - backgroundIconColor: backgroundIconColors[colorIndex], - //TODO Elham* match the of the icon - cardIcon: DoctorApp.arrival_patients, - textColor: textColors[colorIndex], - text: TranslationBase.of(context).registerNewPatient, - onTap: () { - Navigator.push( - context, - FadePage( - page: RegisterPatientPage(), - ), - ); - }, - )); - changeColorIndex(); + //TODO Keep commented + // patientCards.add(HomePatientCard( + // gradient: backgroundColors[colorIndex], + // backgroundIconColor: backgroundIconColors[colorIndex], + // //TODO Elham* match the of the icon + // cardIcon: DoctorApp.arrival_patients, + // textColor: textColors[colorIndex], + // text: TranslationBase.of(context).registerNewPatient, + // onTap: () { + // Navigator.push( + // context, + // FadePage( + // page: RegisterPatientPage(), + // ), + // ); + // }, + // )); + // changeColorIndex(); patientCards.add(HomePatientCard( gradient: backgroundColors[colorIndex], diff --git a/lib/screens/live_care/end_call_screen.dart b/lib/screens/live_care/end_call_screen.dart index 87e36943..a68eff56 100644 --- a/lib/screens/live_care/end_call_screen.dart +++ b/lib/screens/live_care/end_call_screen.dart @@ -3,17 +3,17 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/LiveCarePatientViewModel.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; -import 'package:doctor_app_flutter/models/livecare/session_status_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/livecare/session_status_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/live_care/live-care_transfer_to_admin.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/PatientProfileCardModel.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/patient_profile_card_model.dart'; import 'package:doctor_app_flutter/util/VideoChannel.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; diff --git a/lib/screens/live_care/live-care_transfer_to_admin.dart b/lib/screens/live_care/live-care_transfer_to_admin.dart index b4f6cc88..4cd9a3a0 100644 --- a/lib/screens/live_care/live-care_transfer_to_admin.dart +++ b/lib/screens/live_care/live-care_transfer_to_admin.dart @@ -4,7 +4,7 @@ import 'package:doctor_app_flutter/core/provider/robot_provider.dart'; import 'package:doctor_app_flutter/core/viewModel/LiveCarePatientViewModel.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; @@ -32,7 +32,7 @@ class LivaCareTransferToAdmin extends StatefulWidget { class _LivaCareTransferToAdminState extends State { stt.SpeechToText speech = stt.SpeechToText(); - var reconizedWord; + var recognizedWord; var event = RobotProvider(); ProjectViewModel projectViewModel; @@ -168,7 +168,7 @@ class _LivaCareTransferToAdminState extends State { } void statusListener(String status) { - reconizedWord = status == 'listening' ? 'Lisening...' : 'Sorry....'; + recognizedWord = status == 'listening' ? 'Listening...' : 'Sorry....'; } void requestPermissions() async { @@ -178,14 +178,14 @@ class _LivaCareTransferToAdminState extends State { } void resultListener(result) { - reconizedWord = result.recognizedWords; - event.setValue({"searchText": reconizedWord}); + recognizedWord = result.recognizedWords; + event.setValue({"searchText": recognizedWord}); if (result.finalResult == true) { setState(() { SpeechToText.closeAlertDialog(context); speech.stop(); - noteController.text += reconizedWord + '\n'; + noteController.text += recognizedWord + '\n'; }); } else { print(result.finalResult); diff --git a/lib/screens/live_care/live_care_patient_screen.dart b/lib/screens/live_care/live_care_patient_screen.dart index 8943b68d..ff14cab2 100644 --- a/lib/screens/live_care/live_care_patient_screen.dart +++ b/lib/screens/live_care/live_care_patient_screen.dart @@ -3,7 +3,7 @@ import 'dart:async'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/LiveCarePatientViewModel.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_header.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; diff --git a/lib/screens/live_care/panding_list.dart b/lib/screens/live_care/panding_list.dart index fed2cad1..bfb55579 100644 --- a/lib/screens/live_care/panding_list.dart +++ b/lib/screens/live_care/panding_list.dart @@ -1,7 +1,7 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/livecare_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; -import 'package:doctor_app_flutter/models/livecare/get_pending_res_list.dart'; +import 'package:doctor_app_flutter/core/model/livecare/get_pending_res_list.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; diff --git a/lib/screens/live_care/video_call.dart b/lib/screens/live_care/video_call.dart index 1c149f07..93acd87a 100644 --- a/lib/screens/live_care/video_call.dart +++ b/lib/screens/live_care/video_call.dart @@ -4,9 +4,9 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/core/viewModel/LiveCarePatientViewModel.dart'; import 'package:doctor_app_flutter/core/viewModel/livecare_view_model.dart'; -import 'package:doctor_app_flutter/models/livecare/session_status_model.dart'; -import 'package:doctor_app_flutter/models/livecare/start_call_res.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/livecare/session_status_model.dart'; +import 'package:doctor_app_flutter/core/model/livecare/start_call_res.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/util/VideoChannel.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; diff --git a/lib/screens/medical-file/health_summary_page.dart b/lib/screens/medical-file/health_summary_page.dart index 9155ffc1..2424b09b 100644 --- a/lib/screens/medical-file/health_summary_page.dart +++ b/lib/screens/medical-file/health_summary_page.dart @@ -1,12 +1,12 @@ import 'package:doctor_app_flutter/core/service/AnalyticsService.dart'; import 'package:doctor_app_flutter/core/viewModel/medical_file_view_model.dart'; import 'package:doctor_app_flutter/locator.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/medical-file/medical_file_details.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/doctor_card.dart'; diff --git a/lib/screens/medical-file/medical_file_details.dart b/lib/screens/medical-file/medical_file_details.dart index eb76ead9..ee6df167 100644 --- a/lib/screens/medical-file/medical_file_details.dart +++ b/lib/screens/medical-file/medical_file_details.dart @@ -1,10 +1,10 @@ import 'package:doctor_app_flutter/core/viewModel/medical_file_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart'; diff --git a/lib/screens/medicine/medicine_search_screen.dart b/lib/screens/medicine/medicine_search_screen.dart index b0421609..3656c585 100644 --- a/lib/screens/medicine/medicine_search_screen.dart +++ b/lib/screens/medicine/medicine_search_screen.dart @@ -1,12 +1,11 @@ import 'dart:math'; - import 'package:autocomplete_textfield/autocomplete_textfield.dart'; -import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart'; import 'package:doctor_app_flutter/core/viewModel/medicine_view_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/medicine/pharmacies_list_screen.dart'; -import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_header.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; @@ -18,7 +17,7 @@ import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dar import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_field_custom_serach.dart'; import 'package:flutter/material.dart'; -import 'package:permission_handler/permission_handler.dart'; +import 'package:hexcolor/hexcolor.dart'; import 'package:speech_to_text/speech_recognition_error.dart'; import 'package:speech_to_text/speech_recognition_result.dart'; import 'package:speech_to_text/speech_to_text.dart'; @@ -42,44 +41,29 @@ class _MedicineSearchState extends State { Helpers helpers = new Helpers(); bool _hasSpeech = false; String _currentLocaleId = ""; - bool _isInit = true; final SpeechToText speech = SpeechToText(); String lastStatus = ''; - GetMedicationResponseModel _selectedMedication; GlobalKey key = new GlobalKey>(); - // String lastWords; - List _localeNames = []; String lastError; double level = 0.0; double minSoundLevel = 50000; double maxSoundLevel = -50000; - String reconizedWord; + String recognizedWord; @override void didChangeDependencies() { super.didChangeDependencies(); } - void requestPermissions() async { - Map statuses = await [ - Permission.microphone, - ].request(); - } Future initSpeechState() async { bool hasSpeech = await speech.initialize( onError: errorListener, onStatus: statusListener); - // if (hasSpeech) { - // _localeNames = await speech.locales(); - - // var systemLocale = await speech.systemLocale(); _currentLocaleId = TranslationBase.of(context).locale.languageCode == 'en' ? 'en-GB' : 'ar-SA'; // systemLocale.localeId; - // } - if (!mounted) return; setState(() { @@ -87,152 +71,136 @@ class _MedicineSearchState extends State { }); } - InputDecoration textFieldSelectorDecoration( - String hintText, String selectedText, bool isDropDown, - {IconData icon}) { - return InputDecoration( - focusedBorder: OutlineInputBorder( - borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), - borderRadius: BorderRadius.circular(8), - ), - enabledBorder: OutlineInputBorder( - borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), - borderRadius: BorderRadius.circular(8), - ), - disabledBorder: OutlineInputBorder( - borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), - borderRadius: BorderRadius.circular(8), - ), - hintText: selectedText != null ? selectedText : hintText, - suffixIcon: isDropDown ? Icon(icon ?? Icons.arrow_drop_down) : null, - hintStyle: TextStyle( - fontSize: 14, - color: Colors.grey.shade600, - ), - ); - } - @override Widget build(BuildContext context) { return BaseView(onModelReady: (model) async { - // if (model.allMedicationList.length == 0) - // await model.getMedicationList(); }, builder: (_, model, w) { myController.text = model.searchText; return AppScaffold( // baseViewModel: model, isShowAppBar: true, - appBar: PatientSearchHeader( + appBar: BottomSheetTitle( title: TranslationBase.of(context).searchMedicine, ), - //appBarTitle: TranslationBase.of(context).searchMedicine + "6", body: SingleChildScrollView( - child: FractionallySizedBox( - widthFactor: 0.97, - child: SingleChildScrollView( - child: Container( - // height: SizeConfig.screenHeight, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SizedBox( - height: 20, - ), - FractionallySizedBox( - widthFactor: 0.9, - child: AppTextFieldCustomSearch( - hintText: - TranslationBase.of(context).searchMedicineNameHere, - searchController: myController, - onFieldSubmitted: (value) { - searchMedicine(context, model); - }, - marginTop: 5, - ), - ), - SizedBox( - height: 20, - ), - FractionallySizedBox( - widthFactor: 0.9, - child: Container( - child: Wrap( - alignment: WrapAlignment.center, - children: [ - // TODO change it secondary button and add loading - AppButton( - title: TranslationBase.of(context).search, - onPressed: () async { - await searchMedicine(context, model); - }, - ), - ], - ), - ), - ), - Container( - margin: - EdgeInsets.only(left: SizeConfig.heightMultiplier * 2), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SizedBox( + height: 20, + ), + AppTextFieldCustomSearch( + hintText: + TranslationBase.of(context).searchMedicineNameHere, + searchController: myController, + onFieldSubmitted: (value) { + searchMedicine(context, model); + }, + marginTop: 5, + ), + Container( + margin: EdgeInsets.only(left: 16, right: 16, bottom: 16, top: 0), + + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: AppText( TranslationBase.of(context).youCanFind + (myController.text != '' ? model.pharmacyItemsList.length.toString() : '0') + " " + - TranslationBase.of(context).itemsInSearch, - fontWeight: FontWeight.bold, + TranslationBase.of(context).medicineSearchResult +" '${myController.text}'", + fontHeight: 1.4, + color: AppGlobal.appTextColor, + textAlign: TextAlign.start, + fontWeight: FontWeight.w600, + letterSpacing: -0.9, ), - ], - ), - ), - SizedBox( - height: 10, + ), + ], ), - if (myController.text != '') - Container( - height: MediaQuery.of(context).size.height * 0.6, - child: ListView.builder( - padding: const EdgeInsets.only(top: 20), + ), + SizedBox( + height: 5, + ), + if (myController.text != '') + Container( + margin: EdgeInsets.only(left: 16, right: 16, bottom: 16, top: 0), - scrollDirection: Axis.vertical, - // shrinkWrap: true, - itemCount: model.pharmacyItemsList == null - ? 0 - : model.pharmacyItemsList.length, - itemBuilder: (BuildContext context, int index) { - return InkWell( - child: MedicineItemWidget( - label: model.pharmacyItemsList[index] - ["ItemDescription"], - url: model.pharmacyItemsList[index] - ["ImageSRCUrl"], - ), - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => PharmaciesListScreen( - itemID: model.pharmacyItemsList[index] - ["ItemID"], - url: model.pharmacyItemsList[index] - ["ImageSRCUrl"]), - settings: RouteSettings( - name: 'PharmaciesListScreen'), - ), - ); - }, - ); - }, - ), + height: MediaQuery.of(context).size.height * 0.6, + child: ListView.builder( + padding: const EdgeInsets.only(top: 20), + scrollDirection: Axis.vertical, + itemCount: model.pharmacyItemsList == null + ? 0 + : model.pharmacyItemsList.length, + itemBuilder: (BuildContext context, int index) { + return InkWell( + child: MedicineItemWidget( + label: model.pharmacyItemsList[index] + ["ItemDescription"], + url: model.pharmacyItemsList[index] + ["ImageSRCUrl"], + ), + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => PharmaciesListScreen( + itemID: model.pharmacyItemsList[index] + ["ItemID"], + url: model.pharmacyItemsList[index] + ["ImageSRCUrl"]), + settings: RouteSettings( + name: 'PharmaciesListScreen'), + ), + ); + }, + ); + }, ), - ], - ), + ), + ], )), + bottomSheet: Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(0.0), + ), + border: Border.all(color: HexColor('#707070'), width: 0), + ), + height: MediaQuery.of(context).size.height * 0.1, + width: double.infinity, + child: Column( + children: [ + SizedBox( + height: 10, + ), + Container( + child: FractionallySizedBox( + widthFactor: .80, + child: Center( + child: AppButton( + fontWeight: FontWeight.w700, + title: TranslationBase.of(context).search, + onPressed: () async { + await searchMedicine(context, model); + }, + color: AppGlobal.appRedColor, + ), + ), + ), + ), + SizedBox( + height: 5, + ), + ], ), ), + ); }); } @@ -241,7 +209,6 @@ class _MedicineSearchState extends State { FocusScope.of(context).unfocus(); if (myController.text.isNullOrEmpty()) { Helpers.showErrorToast(TranslationBase.of(context).typeMedicineName); - //"Type Medicine Name") return; } if (myController.text.length < 3) { @@ -256,7 +223,6 @@ class _MedicineSearchState extends State { } startVoiceSearch() { - // lastWords = ""; lastError = ""; speech.listen( onResult: resultListener, @@ -272,18 +238,15 @@ class _MedicineSearchState extends State { void resultListener(SpeechRecognitionResult result) { setState(() { - // lastWords = "${result.recognizedWords} - ${result.finalResult}"; - reconizedWord = result.recognizedWords; + recognizedWord = result.recognizedWords; lastStatus = ''; - myController.text = reconizedWord; + myController.text = recognizedWord; Future.delayed(const Duration(seconds: 2), () { - // searchMedicine(context); }); }); } void errorListener(SpeechRecognitionError error) { - // print("Received error status: $error, listening: ${speech.isListening}"); setState(() { lastError = "${error.errorMsg} - ${error.permanent}"; }); @@ -291,23 +254,15 @@ class _MedicineSearchState extends State { void statusListener(String status) { // print( - // "Received listener status: $status, listening: ${speech.isListening}"); setState(() { lastStatus = status; }); } - // _switchLang(selectedVal) { - // setState(() { - // _currentLocaleId = selectedVal; - // }); - // print(selectedVal); - // } void soundLevelListener(double level) { minSoundLevel = min(minSoundLevel, level); maxSoundLevel = max(maxSoundLevel, level); - // print("sound level $level: $minSoundLevel - $maxSoundLevel "); setState(() { this.level = level; }); diff --git a/lib/screens/medicine/pharmacies_list_screen.dart b/lib/screens/medicine/pharmacies_list_screen.dart index a9e21274..4c0c27ea 100644 --- a/lib/screens/medicine/pharmacies_list_screen.dart +++ b/lib/screens/medicine/pharmacies_list_screen.dart @@ -1,21 +1,28 @@ import 'dart:convert'; import 'dart:typed_data'; +import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/service/AnalyticsService.dart'; import 'package:doctor_app_flutter/core/viewModel/medicine_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/medicine/medicine_item_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/card_with_bg_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; import 'package:flutter/material.dart'; import 'package:maps_launcher/maps_launcher.dart'; import 'package:provider/provider.dart'; import 'package:url_launcher/url_launcher.dart'; +import '../../locator.dart'; + DrAppSharedPreferances sharedPref = DrAppSharedPreferances(); class PharmaciesListScreen extends StatefulWidget { @@ -42,158 +49,98 @@ class _PharmaciesListState extends State { builder: (_, model, w) => AppScaffold( baseViewModel: model, appBarTitle: TranslationBase.of(context).pharmaciesList, - body: Container( - height: SizeConfig.screenHeight, - child: ListView( - shrinkWrap: true, - scrollDirection: Axis.vertical, - physics: const AlwaysScrollableScrollPhysics(), - children: [ - model.pharmaciesList.length > 0 - ? RoundedContainer( - child: Row( - children: [ - Expanded( - flex: 1, - child: ClipRRect( - borderRadius: - BorderRadius.all(Radius.circular(7)), - child: widget.url != null - ? Image.network( - widget.url, - height: - SizeConfig.imageSizeMultiplier * 21, - width: - SizeConfig.imageSizeMultiplier * 20, - fit: BoxFit.cover, - ) - : Container(), - ), - ), - Expanded( - flex: 3, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - AppText( - TranslationBase.of(context).description, - marginLeft: 10, - marginTop: 0, - marginRight: 10, - marginBottom: 2, - fontWeight: FontWeight.bold, - ), - AppText( - model.pharmaciesList[0]["ItemDescription"], - marginLeft: 10, - marginTop: 0, - marginRight: 10, - marginBottom: 10, - ), - AppText( - TranslationBase.of(context).price, - marginLeft: 10, - marginTop: 0, - marginRight: 10, - marginBottom: 2, - fontWeight: FontWeight.bold, - ), - AppText( - model.pharmaciesList[0]["SellingPrice"] - .toString(), - marginLeft: 10, - marginTop: 0, - marginRight: 10, - marginBottom: 10, - ), - ], - ), + body: Center( + child: FractionallySizedBox( + widthFactor: 0.95, + child: Container( + height: SizeConfig.screenHeight, + child: ListView( + shrinkWrap: true, + scrollDirection: Axis.vertical, + physics: const AlwaysScrollableScrollPhysics(), + children: [ + model.pharmaciesList.length > 0 + ? MedicineItemWidget( + label: model.pharmaciesList[0]["ItemDescription"], + url: widget.url, + showArrow: false, + showPrice: true, + price: model.pharmaciesList[0]["SellingPrice"] + .toString(), ) - ], - )) - : Container(), - Container( - margin: EdgeInsets.only( - top: SizeConfig.widthMultiplier * 2, - bottom: SizeConfig.widthMultiplier * 2, - right: SizeConfig.widthMultiplier * 4, - left: SizeConfig.widthMultiplier * 4, - ), - child: Align( - alignment: Alignment.centerLeft, - child: AppText( - TranslationBase.of(context).youCanFindItIn, - fontWeight: FontWeight.bold, + : Container(), + Container( + margin: EdgeInsets.only( + top: SizeConfig.widthMultiplier * 2, + bottom: SizeConfig.widthMultiplier * 2, + right: SizeConfig.widthMultiplier * 4, + left: SizeConfig.widthMultiplier * 4, + ), + child: Align( + alignment: Alignment.centerLeft, + child: AppText( + TranslationBase.of(context).youCanFindItIn, + fontWeight: FontWeight.bold, + ), + ), + alignment: projectsProvider.isArabic + ? Alignment.topRight + : Alignment.topLeft, ), - ), - alignment: projectsProvider.isArabic - ? Alignment.topRight - : Alignment.topLeft, - ), - Container( - width: SizeConfig.screenWidth * 0.99, - margin: EdgeInsets.only(left: 10, right: 10), - child: ListView.builder( - shrinkWrap: true, - physics: const NeverScrollableScrollPhysics(), - itemCount: model.pharmaciesList == null - ? 0 - : model.pharmaciesList.length, - itemBuilder: (BuildContext context, int index) { - return RoundedContainer( - margin: EdgeInsets.only(top: 5), - child: Row( - children: [ - Expanded( - flex: 1, - child: ClipRRect( - borderRadius: - BorderRadius.all(Radius.circular(7)), - child: Image.network( - model.pharmaciesList[index] - ["ProjectImageURL"], - height: SizeConfig.imageSizeMultiplier * 15, - width: SizeConfig.imageSizeMultiplier * 15, - fit: BoxFit.cover, - ), - ), - ), - Expanded( - flex: 4, - child: AppText( - model.pharmaciesList[index] - ["LocationDescription"], - margin: 10, - ), - ), - Expanded( - flex: 2, - child: Wrap( - direction: Axis.horizontal, - alignment: WrapAlignment.end, - crossAxisAlignment: WrapCrossAlignment.end, - children: [ - Padding( - padding: EdgeInsets.all(5), - child: InkWell( - child: Icon( - Icons.call, - color: Colors.red, - ), - onTap: () => launch("tel://" + - model.pharmaciesList[index] - ["PhoneNumber"]), + Container( + width: SizeConfig.screenWidth * 0.99, + margin: EdgeInsets.only(left: 10, right: 10), + child: ListView.builder( + shrinkWrap: true, + physics: const NeverScrollableScrollPhysics(), + itemCount: model.pharmaciesList == null + ? 0 + : model.pharmaciesList.length, + itemBuilder: (BuildContext context, int index) { + return CardWithBgWidget( + bgColor: Colors.transparent, + hasBorder: false, + widget: Row( + children: [ + Expanded( + flex: 1, + child: ClipRRect( + borderRadius: + BorderRadius.all(Radius.circular(7)), + child: Image.network( + model.pharmaciesList[index] + ["ProjectImageURL"], + height: + SizeConfig.imageSizeMultiplier * 15, + width: + SizeConfig.imageSizeMultiplier * 15, + fit: BoxFit.cover, ), ), - Padding( - padding: EdgeInsets.all(5), - child: InkWell( - child: Icon( - Icons.pin_drop, - color: Colors.red, - ), - onTap: () { + ), + Expanded( + flex: 4, + child: AppText( + Helpers.convertToTitleCase( + model.pharmaciesList[index] + ["LocationDescription"] ?? + ''), + margin: 10, + fontHeight: 1.4, + color: AppGlobal.appTextColor, + textAlign: TextAlign.start, + fontWeight: FontWeight.w600, + letterSpacing: -0.33, + ), + ), + + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.end, + children: [ + InkWell( + onTap: () async { MapsLauncher.launchCoordinates( double.parse( model.pharmaciesList[index] @@ -204,17 +151,123 @@ class _PharmaciesListState extends State { model.pharmaciesList[index] ["LocationDescription"]); }, + child: Container( + decoration: BoxDecoration( + color: Colors.grey, + borderRadius: + BorderRadius.circular(10), + ), + // color:Colors.red[600], + + child: Row( + children: [ + Icon( + Icons.pin_drop, + size: 15, + color: Colors.white, + ), + SizedBox( + width: 2, + ), + AppText( + "location", + fontSize: 8, + color: Colors.white, + ), + ], + ), + padding: EdgeInsets.all(6), + ), ), - ), - ], - ), + SizedBox( + height: 10, + ), + InkWell( + onTap: () { + launch("tel://" + + model.pharmaciesList[index] + ["PhoneNumber"]); + }, + child: Container( + decoration: BoxDecoration( + color: Colors.grey, + borderRadius: + BorderRadius.circular(10), + ), + // color:Colors.red[600], + + child: Row( + children: [ + Icon( + DoctorApp.call, + size: 12, + color: Colors.white, + ), + SizedBox( + width: 2, + ), + AppText( + "Call Now", + fontSize: 8, + color: Colors.white, + ), + ], + ), + padding: EdgeInsets.all(6), + ), + ), + ], + ), + // Expanded( + // flex: 2, + // child: Wrap( + // direction: Axis.horizontal, + // alignment: WrapAlignment.end, + // crossAxisAlignment: WrapCrossAlignment.end, + // children: [ + // Padding( + // padding: EdgeInsets.all(5), + // child: InkWell( + // child: Icon( + // Icons.call, + // color: Colors.red, + // ), + // onTap: () => launch("tel://" + + // model.pharmaciesList[index] + // ["PhoneNumber"]), + // ), + // ), + // Padding( + // padding: EdgeInsets.all(5), + // child: InkWell( + // child: Icon( + // Icons.pin_drop, + // color: Colors.red, + // ), + // onTap: () { + // MapsLauncher.launchCoordinates( + // double.parse( + // model.pharmaciesList[index] + // ["Latitude"]), + // double.parse( + // model.pharmaciesList[index] + // ["Longitude"]), + // model.pharmaciesList[index] + // ["LocationDescription"]); + // }, + // ), + // ), + // ], + // ), + // ), + ], ), - ], - ), - ); - }), - ) - ]), + ); + }), + ) + ]), + ), + ), ), ), ); diff --git a/lib/screens/patient-sick-leave/add_patient_sick_leave_screen.dart b/lib/screens/patient-sick-leave/add_patient_sick_leave_screen.dart index 9f3c7810..5958c5fe 100644 --- a/lib/screens/patient-sick-leave/add_patient_sick_leave_screen.dart +++ b/lib/screens/patient-sick-leave/add_patient_sick_leave_screen.dart @@ -3,8 +3,8 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; -import 'package:doctor_app_flutter/models/sickleave/add_sickleave_request.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/sickleave/add_sickleave_request.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; @@ -200,7 +200,7 @@ class _AddPatientSickLeaveScreenState extends State { Icon( DoctorApp.warning, size: 20, - color: IN_PROGRESS_COLOR, + color: AppGlobal.inProgressColor, ), SizedBox( width: 10, @@ -211,7 +211,7 @@ class _AddPatientSickLeaveScreenState extends State { .recommendedSickLeaveDays, textAlign: TextAlign.start, fontSize: 12, - color: IN_PROGRESS_COLOR, + color: AppGlobal.inProgressColor, ), ), ], diff --git a/lib/screens/patient-sick-leave/patient_sick_leave_screen.dart b/lib/screens/patient-sick-leave/patient_sick_leave_screen.dart index a2bc5a23..9fd5c7af 100644 --- a/lib/screens/patient-sick-leave/patient_sick_leave_screen.dart +++ b/lib/screens/patient-sick-leave/patient_sick_leave_screen.dart @@ -5,14 +5,14 @@ import 'package:doctor_app_flutter/core/service/AnalyticsService.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart'; import 'package:doctor_app_flutter/locator.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patient-sick-leave/add_patient_sick_leave_screen.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; diff --git a/lib/screens/patients/ECGPage.dart b/lib/screens/patients/ECGPage.dart index d477f0cb..53c145c9 100644 --- a/lib/screens/patients/ECGPage.dart +++ b/lib/screens/patients/ECGPage.dart @@ -2,11 +2,11 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/PatientMuseViewModel.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/cupertino.dart'; diff --git a/lib/screens/patients/In_patient/InPatientHeader.dart b/lib/screens/patients/In_patient/InPatientHeader.dart index b621b643..06041e00 100644 --- a/lib/screens/patients/In_patient/InPatientHeader.dart +++ b/lib/screens/patients/In_patient/InPatientHeader.dart @@ -1,6 +1,6 @@ import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/dashboard/get_special_clinical_care_List_Respose_Model.dart'; +import 'package:doctor_app_flutter/core/model/dashboard/get_special_clinical_care_List_Respose_Model.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/In_patient/in_patient_screen.dart b/lib/screens/patients/In_patient/in_patient_screen.dart index a2ef497a..b743b8f7 100644 --- a/lib/screens/patients/In_patient/in_patient_screen.dart +++ b/lib/screens/patients/In_patient/in_patient_screen.dart @@ -3,7 +3,7 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart'; import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/dashboard/get_special_clinical_care_List_Respose_Model.dart'; +import 'package:doctor_app_flutter/core/model/dashboard/get_special_clinical_care_List_Respose_Model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/In_patient/InPatientHeader.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; @@ -14,6 +14,7 @@ import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; +import '../../../util/tab_helper.dart'; import '../DischargedPatientPage.dart'; import 'in_patient_list_page.dart'; @@ -123,7 +124,7 @@ class _InPatientScreenState extends State color: Colors.white), child: Container( margin: EdgeInsets.only(top: 9), - color: Helpers.getBgTabColor(), + color: TabHelper.getBgTabColor(), child: TabBar( isScrollable: false, controller: _tabController, @@ -214,8 +215,8 @@ class _InPatientScreenState extends State return Center( child: Container( - height: Helpers.getTabHeight(context), - decoration: Helpers.getBoxTabsBoxDecoration( + height: TabHelper.getTabHeight(context), + decoration: TabHelper.getBoxTabsBoxDecoration( isActive: isActive, isFirst: isFirst, isMiddle: isMiddle, @@ -224,9 +225,9 @@ class _InPatientScreenState extends State child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Helpers.getTabText(title: title, isActive: isActive), + TabHelper.getTabText(title: title, isActive: isActive), if (counter != -1) - Helpers.getTabCounter(isActive: isActive, counter: counter) + TabHelper.getTabCounter(isActive: isActive, counter: counter) ], ), ), diff --git a/lib/screens/patients/ReferralDischargedPatientDetails.dart b/lib/screens/patients/ReferralDischargedPatientDetails.dart index 58f9db26..86b05a4e 100644 --- a/lib/screens/patients/ReferralDischargedPatientDetails.dart +++ b/lib/screens/patients/ReferralDischargedPatientDetails.dart @@ -3,7 +3,7 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/model/referral/DischargeReferralPatient.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; @@ -121,7 +121,7 @@ class ReferralDischargedPatientDetails extends StatelessWidget { fontSize: 1.9 * SizeConfig.textMultiplier, fontWeight: FontWeight.w700, color: referredPatient.referralStatus == 1 - ? Color(0xffc4aa54) + ? AppGlobal.inProgressColor : referredPatient.referralStatus == 46 ? AppGlobal.appGreenColor : Colors.red[700], diff --git a/lib/screens/patients/insurance_approval_screen_patient.dart b/lib/screens/patients/insurance_approval_screen_patient.dart index 53932c99..7ee9a950 100644 --- a/lib/screens/patients/insurance_approval_screen_patient.dart +++ b/lib/screens/patients/insurance_approval_screen_patient.dart @@ -3,11 +3,11 @@ import 'package:doctor_app_flutter/core/service/AnalyticsService.dart'; import 'package:doctor_app_flutter/core/viewModel/InsuranceViewModel.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/locator.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/patients/insurance_approvals_details.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/doctor_card_insurance.dart'; import 'package:flutter/cupertino.dart'; diff --git a/lib/screens/patients/insurance_approvals_details.dart b/lib/screens/patients/insurance_approvals_details.dart index 4695b7d4..254efa22 100644 --- a/lib/screens/patients/insurance_approvals_details.dart +++ b/lib/screens/patients/insurance_approvals_details.dart @@ -1,12 +1,12 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/InsuranceViewModel.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart'; @@ -14,6 +14,8 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; +import '../../config/config.dart'; + class InsuranceApprovalsDetails extends StatefulWidget { PatiantInformtion patient; int indexInsurance; @@ -106,7 +108,7 @@ class _InsuranceApprovalsDetailsState extends State { "Approved" || "${model.insuranceApprovalInPatient[indexInsurance].approvalStatusDescption}" == "تمت الموافقة" - ? Color(0xff359846) + ? AppGlobal.appGreenColor : Color(0xffD02127) : Color(0xffD02127), letterSpacing: -0.4, @@ -484,7 +486,7 @@ class _InsuranceApprovalsDetailsState extends State { null ? "${model.insuranceApproval[indexInsurance].approvalStatusDescption}" == "Approved" - ? Color(0xff359846) + ? AppGlobal.appGreenColor : Color(0xffD02127) : Color(0xffD02127), ), diff --git a/lib/screens/patients/out_patient/filter_date_page.dart b/lib/screens/patients/out_patient/filter_date_page.dart index 14ae707b..d03f19ee 100644 --- a/lib/screens/patients/out_patient/filter_date_page.dart +++ b/lib/screens/patients/out_patient/filter_date_page.dart @@ -12,6 +12,8 @@ import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; +import '../../../config/config.dart'; + class FilterDatePage extends StatefulWidget { final OutPatientFilterType outPatientFilterType; final PatientSearchViewModel patientSearchViewModel; @@ -144,7 +146,7 @@ class _FilterDatePageState extends State { child: AppButton( title: TranslationBase.of(context).search, padding: 10, - color: Color(0xFF359846), + color: AppGlobal.appGreenColor, onPressed: () async { if (widget.patientSearchViewModel.selectedFromDate == null || diff --git a/lib/screens/patients/out_patient/out_patient_screen.dart b/lib/screens/patients/out_patient/out_patient_screen.dart index d6db782d..04131ae2 100644 --- a/lib/screens/patients/out_patient/out_patient_screen.dart +++ b/lib/screens/patients/out_patient/out_patient_screen.dart @@ -6,7 +6,7 @@ import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart'; import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; -import 'package:doctor_app_flutter/models/patient/patient_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patient_model.dart'; import 'package:doctor_app_flutter/routes.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_header.dart'; @@ -21,6 +21,7 @@ import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:provider/provider.dart'; +import '../../../util/tab_helper.dart'; import 'filter_date_page.dart'; // ignore: must_be_immutable @@ -102,8 +103,8 @@ class _OutPatientsScreenState extends State { children: [ Container( // color: Colors.red, - height: Helpers.getTabHeight(context), - color: Helpers.getBgTabColor(), + height: TabHelper.getTabHeight(context), + color: TabHelper.getBgTabColor(), child: Row( mainAxisSize: MainAxisSize.max, crossAxisAlignment: CrossAxisAlignment.center, @@ -138,7 +139,7 @@ class _OutPatientsScreenState extends State { child: Center( child: Container( height: screenSize.height * 0.070, - decoration: Helpers.getBoxTabsBoxDecoration( + decoration: TabHelper.getBoxTabsBoxDecoration( isActive: _isActive, isFirst: _times.indexOf(item) == 0, isLast: @@ -150,12 +151,12 @@ class _OutPatientsScreenState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Helpers.getTabText( + TabHelper.getTabText( title: item, isActive: _isActive), _isActive && _activeLocation != 0 && model.state == ViewState.Idle - ? Helpers.getTabCounter( + ? TabHelper.getTabCounter( isActive: _isActive, counter: model.filterData.length) : Container(), diff --git a/lib/screens/patients/out_patient_prescription_details_screen.dart b/lib/screens/patients/out_patient_prescription_details_screen.dart index 0bad2313..fe40408e 100644 --- a/lib/screens/patients/out_patient_prescription_details_screen.dart +++ b/lib/screens/patients/out_patient_prescription_details_screen.dart @@ -1,6 +1,6 @@ import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/prescription/prescription_res_model.dart'; -import 'package:doctor_app_flutter/models/patient/prescription/request_prescription_report.dart'; +import 'package:doctor_app_flutter/core/model/patient/prescription/prescription_res_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/prescription/request_prescription_report.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/prescriptions/out_patient_prescription_details_item.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; diff --git a/lib/screens/patients/patient_search/patient_search_result_screen.dart b/lib/screens/patients/patient_search/patient_search_result_screen.dart index 3676fedf..6f2f3e73 100644 --- a/lib/screens/patients/patient_search/patient_search_result_screen.dart +++ b/lib/screens/patients/patient_search/patient_search_result_screen.dart @@ -4,7 +4,7 @@ import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart'; import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; -import 'package:doctor_app_flutter/models/patient/patient_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patient_model.dart'; import 'package:doctor_app_flutter/routes.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_header.dart'; diff --git a/lib/screens/patients/patient_search/patient_search_screen.dart b/lib/screens/patients/patient_search/patient_search_screen.dart index e1fdd033..94f18d81 100644 --- a/lib/screens/patients/patient_search/patient_search_screen.dart +++ b/lib/screens/patients/patient_search/patient_search_screen.dart @@ -117,7 +117,7 @@ class _PatientSearchScreenState extends State { onPressed: () { onSubmitSearch(); }, - color: Colors.red[800], + color: AppGlobal.appRedColor, ), ), ), diff --git a/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart b/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart index 995df353..c7b51da3 100644 --- a/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart +++ b/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart @@ -2,12 +2,13 @@ import 'package:doctor_app_flutter/config/config.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/model/Prescriptions/prescription_entity_model.dart'; import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_model.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetAssessmentResModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/order-procedure.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GetAssessmentResModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/order-procedure.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; @@ -339,7 +340,7 @@ class DiagnosisWidget extends StatelessWidget { class MedicationWidget extends StatelessWidget { final UcafViewModel model; - final EntityList prescription; + final PrescriptionEntityModel prescription; MedicationWidget(this.model, this.prescription); diff --git a/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart b/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart index ddad858f..ca907068 100644 --- a/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart +++ b/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart @@ -1,7 +1,7 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; @@ -38,6 +38,8 @@ class _UCAFInputScreenState extends State { final _whereController = TextEditingController(); final _managementsLineController = TextEditingController(); final _signsController = TextEditingController(); + + ///TODO Elham* fix this List conditionsData = [ {"name": "CHRONIC", "isChecked": false}, {"name": "RTA", "isChecked": false}, @@ -383,7 +385,7 @@ class _UCAFInputScreenState extends State { error: model.patientVitalSignsHistory == null || model.patientVitalSignsHistory.length == 0 ? TranslationBase.of(context).vitalSignEmptyMsg - : TranslationBase.of(context))) + : TranslationBase.of(context).chiefComplaintEmptyMsg)) : Container(), ), ); diff --git a/lib/screens/patients/profile/UCAF/page-stepper-widget.dart b/lib/screens/patients/profile/UCAF/page-stepper-widget.dart index 628f6663..4ab7f0f6 100644 --- a/lib/screens/patients/profile/UCAF/page-stepper-widget.dart +++ b/lib/screens/patients/profile/UCAF/page-stepper-widget.dart @@ -3,14 +3,8 @@ 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'; -/// * -/// By Mousa Zaid Mousa Abuzaid -/// At 13/4/2021 +import '../../../../config/config.dart'; -/* - All hex value from 100% to 0% alpha: used in line 122 - https://gist.github.com/lopspower/03fb1cc0ac9f32ef38f4 - */ class PageStepperWidget extends StatelessWidget { final int stepsCount; @@ -102,14 +96,14 @@ class StepWidget extends StatelessWidget { ? Color(0xFFCC9B14) : status == StepStatus.Locked ? Color(0xFFE3E3E3) - : Color(0xFF359846), + : AppGlobal.appGreenColor, shape: BoxShape.circle, border: Border.all( color: status == StepStatus.InProgress ? Color(0xFFCC9B14) : status == StepStatus.Locked ? Color(0xFFE3E3E3) - : Color(0xFF359846), + : AppGlobal.appGreenColor, width: 1), ), child: Center( @@ -127,7 +121,7 @@ class StepWidget extends StatelessWidget { width: dividerWidth, height: 2, color: status == StepStatus.Completed - ? Color(0xFF359846) + ? AppGlobal.appGreenColor : Color(0xFFCCCCCC), ), ], @@ -178,7 +172,7 @@ class StepWidget extends StatelessWidget { ? Color(0xFFCC9B14) : status == StepStatus.Locked ? Color(0xFF969696) - : Color(0xFF359846), + : AppGlobal.appGreenColor, ), ) ], diff --git a/lib/screens/patients/profile/UCAF/ucaf_pager_screen.dart b/lib/screens/patients/profile/UCAF/ucaf_pager_screen.dart index b2a28f9a..b370adfa 100644 --- a/lib/screens/patients/profile/UCAF/ucaf_pager_screen.dart +++ b/lib/screens/patients/profile/UCAF/ucaf_pager_screen.dart @@ -1,11 +1,11 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/UCAF/page-stepper-widget.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; diff --git a/lib/screens/patients/profile/admission-orders/admission_orders_screen.dart b/lib/screens/patients/profile/admission-orders/admission_orders_screen.dart index 9719b525..be98605e 100644 --- a/lib/screens/patients/profile/admission-orders/admission_orders_screen.dart +++ b/lib/screens/patients/profile/admission-orders/admission_orders_screen.dart @@ -1,11 +1,11 @@ import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/pednding_orders_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; diff --git a/lib/screens/patients/profile/admission-request/admission-request-first-screen.dart b/lib/screens/patients/profile/admission-request/admission-request-first-screen.dart index b74c2ef3..ef7cb9f5 100644 --- a/lib/screens/patients/profile/admission-request/admission-request-first-screen.dart +++ b/lib/screens/patients/profile/admission-request/admission-request-first-screen.dart @@ -5,11 +5,11 @@ import 'package:doctor_app_flutter/core/service/AnalyticsService.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-admission-request-viewmodel.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/locator.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; diff --git a/lib/screens/patients/profile/admission-request/admission-request-third-screen.dart b/lib/screens/patients/profile/admission-request/admission-request-third-screen.dart index fb805129..3f1bf4ec 100644 --- a/lib/screens/patients/profile/admission-request/admission-request-third-screen.dart +++ b/lib/screens/patients/profile/admission-request/admission-request-third-screen.dart @@ -6,11 +6,11 @@ import 'package:doctor_app_flutter/core/service/AnalyticsService.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-admission-request-viewmodel.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/locator.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; diff --git a/lib/screens/patients/profile/admission-request/admission-request_second-screen.dart b/lib/screens/patients/profile/admission-request/admission-request_second-screen.dart index 394112fa..c5fbe2df 100644 --- a/lib/screens/patients/profile/admission-request/admission-request_second-screen.dart +++ b/lib/screens/patients/profile/admission-request/admission-request_second-screen.dart @@ -7,12 +7,12 @@ import 'package:doctor_app_flutter/core/service/AnalyticsService.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-admission-request-viewmodel.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/locator.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; diff --git a/lib/screens/patients/profile/diabetic_chart/diabetic_chart.dart b/lib/screens/patients/profile/diabetic_chart/diabetic_chart.dart index de9f6476..fe769397 100644 --- a/lib/screens/patients/profile/diabetic_chart/diabetic_chart.dart +++ b/lib/screens/patients/profile/diabetic_chart/diabetic_chart.dart @@ -3,14 +3,14 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/model/diabetic_chart/DiabeticType.dart'; import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/diabetic_chart/line_chart_for_diabetic.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/charts/app_time_series_chart.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart'; diff --git a/lib/screens/patients/profile/diabetic_chart/diabetic_details_blood_pressurewideget.dart b/lib/screens/patients/profile/diabetic_chart/diabetic_details_blood_pressurewideget.dart index 5a84f94f..3eea87f9 100644 --- a/lib/screens/patients/profile/diabetic_chart/diabetic_details_blood_pressurewideget.dart +++ b/lib/screens/patients/profile/diabetic_chart/diabetic_details_blood_pressurewideget.dart @@ -1,7 +1,7 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/model/diabetic_chart/GetDiabeticChartValuesResponseModel.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart'; +import 'package:doctor_app_flutter/core/model/patient/vital_sign/patient-vital-sign-history.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; diff --git a/lib/screens/patients/profile/diagnosis/diagnosis_screen.dart b/lib/screens/patients/profile/diagnosis/diagnosis_screen.dart index 5a04c60a..e646252a 100644 --- a/lib/screens/patients/profile/diagnosis/diagnosis_screen.dart +++ b/lib/screens/patients/profile/diagnosis/diagnosis_screen.dart @@ -3,12 +3,12 @@ import 'package:doctor_app_flutter/core/model/diagnosis/GetDiagnosisForInPatient import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; diff --git a/lib/screens/patients/profile/discharge_summary/all_discharge_summary.dart b/lib/screens/patients/profile/discharge_summary/all_discharge_summary.dart index 56742976..48fa30b8 100644 --- a/lib/screens/patients/profile/discharge_summary/all_discharge_summary.dart +++ b/lib/screens/patients/profile/discharge_summary/all_discharge_summary.dart @@ -1,5 +1,5 @@ import 'package:doctor_app_flutter/core/viewModel/profile/discharge_summary_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/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/shared/app_scaffold_widget.dart'; diff --git a/lib/screens/patients/profile/discharge_summary/discharge_Summary_widget.dart b/lib/screens/patients/profile/discharge_summary/discharge_Summary_widget.dart index cf32675b..979fd207 100644 --- a/lib/screens/patients/profile/discharge_summary/discharge_Summary_widget.dart +++ b/lib/screens/patients/profile/discharge_summary/discharge_Summary_widget.dart @@ -1,6 +1,6 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryResModel.dart'; +import 'package:doctor_app_flutter/core/model/discharge_summary/GetDischargeSummaryResModel.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; diff --git a/lib/screens/patients/profile/discharge_summary/discharge_summary.dart b/lib/screens/patients/profile/discharge_summary/discharge_summary.dart index 0878994a..41961cd9 100644 --- a/lib/screens/patients/profile/discharge_summary/discharge_summary.dart +++ b/lib/screens/patients/profile/discharge_summary/discharge_summary.dart @@ -1,7 +1,7 @@ import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.dart'; diff --git a/lib/screens/patients/profile/discharge_summary/pending_discharge_summary.dart b/lib/screens/patients/profile/discharge_summary/pending_discharge_summary.dart index 4ee06e59..44b8aa93 100644 --- a/lib/screens/patients/profile/discharge_summary/pending_discharge_summary.dart +++ b/lib/screens/patients/profile/discharge_summary/pending_discharge_summary.dart @@ -1,5 +1,5 @@ import 'package:doctor_app_flutter/core/viewModel/profile/discharge_summary_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/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/shared/app_scaffold_widget.dart'; diff --git a/lib/screens/patients/profile/lab_result/FlowChartPage.dart b/lib/screens/patients/profile/lab_result/FlowChartPage.dart index 0f0c22c6..7eb53d0a 100644 --- a/lib/screens/patients/profile/lab_result/FlowChartPage.dart +++ b/lib/screens/patients/profile/lab_result/FlowChartPage.dart @@ -1,6 +1,6 @@ import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart'; import 'package:doctor_app_flutter/core/viewModel/labs_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/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/shared/app_scaffold_widget.dart'; diff --git a/lib/screens/patients/profile/lab_result/LabResultHistoryPage.dart b/lib/screens/patients/profile/lab_result/LabResultHistoryPage.dart index 3fff6106..2cb2b7b9 100644 --- a/lib/screens/patients/profile/lab_result/LabResultHistoryPage.dart +++ b/lib/screens/patients/profile/lab_result/LabResultHistoryPage.dart @@ -1,7 +1,7 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart'; import 'package:doctor_app_flutter/core/viewModel/labs_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/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/shared/app_scaffold_widget.dart'; @@ -16,7 +16,7 @@ class LabResultHistoryPage extends StatelessWidget { LabResultHistoryPage({this.patientLabOrder, this.filterName, this.patient}); -// TODO mosa UI changes +// TODO Elham* UI changes and add translation @override Widget build(BuildContext context) { return BaseView( diff --git a/lib/screens/patients/profile/lab_result/LabResultWidget.dart b/lib/screens/patients/profile/lab_result/LabResultWidget.dart index b212c067..166510d8 100644 --- a/lib/screens/patients/profile/lab_result/LabResultWidget.dart +++ b/lib/screens/patients/profile/lab_result/LabResultWidget.dart @@ -2,7 +2,7 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/model/labs/lab_result.dart'; import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/patients/profile/lab_result/FlowChartPage.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/lab_result/Lab_Result_details_wideget.dart b/lib/screens/patients/profile/lab_result/Lab_Result_details_wideget.dart index 940003e8..d60d1d73 100644 --- a/lib/screens/patients/profile/lab_result/Lab_Result_details_wideget.dart +++ b/lib/screens/patients/profile/lab_result/Lab_Result_details_wideget.dart @@ -24,12 +24,6 @@ class _VitalSignDetailsWidgetState extends State { Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); return Container( - /* decoration: BoxDecoration( - color: Colors.transparent, - borderRadius: BorderRadius.only( - topLeft: Radius.circular(10.0), topRight: Radius.circular(10.0)), - border: Border.all(color: Colors.grey, width: 1), - ),*/ margin: EdgeInsets.all(0), child: Container( color: Colors.transparent, diff --git a/lib/screens/patients/profile/lab_result/all_lab_special_result_page.dart b/lib/screens/patients/profile/lab_result/all_lab_special_result_page.dart index 24cf352a..25b02767 100644 --- a/lib/screens/patients/profile/lab_result/all_lab_special_result_page.dart +++ b/lib/screens/patients/profile/lab_result/all_lab_special_result_page.dart @@ -1,13 +1,13 @@ import 'package:doctor_app_flutter/core/viewModel/labs_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/lab_result/special_lab_result_details_page.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/doctor_card.dart'; import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; diff --git a/lib/screens/patients/profile/lab_result/lab_result_secreen.dart b/lib/screens/patients/profile/lab_result/lab_result_secreen.dart index 0a6af767..399a99ff 100644 --- a/lib/screens/patients/profile/lab_result/lab_result_secreen.dart +++ b/lib/screens/patients/profile/lab_result/lab_result_secreen.dart @@ -1,6 +1,6 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/lab_orders/lab_orders_res_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/lab_orders/lab_orders_res_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/doctor/lab_result_widget.dart'; @@ -75,7 +75,8 @@ class _LabResultState extends State { CardWithBgWidgetNew( widget: LabResultWidget( labResult: model.labResultList, - )) + ), + ) ], ), ), diff --git a/lib/screens/patients/profile/lab_result/laboratory_result_page.dart b/lib/screens/patients/profile/lab_result/laboratory_result_page.dart index 0ead8fea..c377d04e 100644 --- a/lib/screens/patients/profile/lab_result/laboratory_result_page.dart +++ b/lib/screens/patients/profile/lab_result/laboratory_result_page.dart @@ -1,8 +1,8 @@ import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart'; import 'package:doctor_app_flutter/core/viewModel/labs_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/lib/screens/patients/profile/lab_result/laboratory_result_widget.dart b/lib/screens/patients/profile/lab_result/laboratory_result_widget.dart index 529c7716..a90c72e1 100644 --- a/lib/screens/patients/profile/lab_result/laboratory_result_widget.dart +++ b/lib/screens/patients/profile/lab_result/laboratory_result_widget.dart @@ -2,7 +2,7 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart'; import 'package:doctor_app_flutter/core/viewModel/labs_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/lab_result/LabResultWidget.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; diff --git a/lib/screens/patients/profile/lab_result/labs_home_page.dart b/lib/screens/patients/profile/lab_result/labs_home_page.dart index 22453c13..07e57a33 100644 --- a/lib/screens/patients/profile/lab_result/labs_home_page.dart +++ b/lib/screens/patients/profile/lab_result/labs_home_page.dart @@ -1,6 +1,6 @@ import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/lab_result/laboratory_result_page.dart'; import 'package:doctor_app_flutter/screens/procedures/ProcedureType.dart'; @@ -9,7 +9,7 @@ import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; @@ -196,7 +196,7 @@ class _LabsHomePageState extends State { clinic: Helpers.convertToTitleCase(model.patientLabOrdersList[index].clinicDescription), appointmentDate: - model.patientLabOrdersList[index].orderDate, + model.patientLabOrdersList[index].createdOn, orderNo: model.patientLabOrdersList[index].orderNo, isShowTime: false, ), diff --git a/lib/screens/patients/profile/lab_result/special_lab_result_details_page.dart b/lib/screens/patients/profile/lab_result/special_lab_result_details_page.dart index 1883a8f2..871a0da3 100644 --- a/lib/screens/patients/profile/lab_result/special_lab_result_details_page.dart +++ b/lib/screens/patients/profile/lab_result/special_lab_result_details_page.dart @@ -1,9 +1,9 @@ import 'package:doctor_app_flutter/core/viewModel/PatientMedicalReportViewModel.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart'; import 'package:flutter/material.dart'; diff --git a/lib/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart b/lib/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart index 9bd1da29..54a7c75d 100644 --- a/lib/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart +++ b/lib/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart @@ -1,7 +1,7 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/PatientMedicalReportViewModel.dart'; -import 'package:doctor_app_flutter/models/patient/MedicalReport/MeidcalReportModel.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/MedicalReport/MeidcalReportModel.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; @@ -13,6 +13,8 @@ import 'package:flutter/material.dart'; import 'package:html_editor_enhanced/html_editor.dart'; import 'package:permission_handler/permission_handler.dart'; +import '../../../../config/config.dart'; + class AddVerifyMedicalReport extends StatefulWidget { final PatiantInformtion patient; final String patientType; @@ -157,7 +159,7 @@ class _AddVerifyMedicalReportState extends State { title: widget.status == MedicalReportStatus.ADD ? TranslationBase.of(context).add : TranslationBase.of(context).verify, - color: Color(0xff359846), + color: AppGlobal.appGreenColor, fontWeight: FontWeight.w700, onPressed: () async { txtOfMedicalReport = diff --git a/lib/screens/patients/profile/medical_report/MedicalReportDetailPage.dart b/lib/screens/patients/profile/medical_report/MedicalReportDetailPage.dart index eb28c528..227d5346 100644 --- a/lib/screens/patients/profile/medical_report/MedicalReportDetailPage.dart +++ b/lib/screens/patients/profile/medical_report/MedicalReportDetailPage.dart @@ -1,11 +1,11 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/PatientMedicalReportViewModel.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/MedicalReport/MeidcalReportModel.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/MedicalReport/MeidcalReportModel.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart'; diff --git a/lib/screens/patients/profile/medical_report/MedicalReportPage.dart b/lib/screens/patients/profile/medical_report/MedicalReportPage.dart index b124f2cc..249d5d0a 100644 --- a/lib/screens/patients/profile/medical_report/MedicalReportPage.dart +++ b/lib/screens/patients/profile/medical_report/MedicalReportPage.dart @@ -6,7 +6,7 @@ import 'package:doctor_app_flutter/core/viewModel/PatientMedicalReportViewModel. import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/locator.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; @@ -14,7 +14,7 @@ import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/large_avatar.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; diff --git a/lib/screens/patients/profile/notes/note/progress_note_screen.dart b/lib/screens/patients/profile/notes/note/progress_note_screen.dart index b8220939..657e5ed6 100644 --- a/lib/screens/patients/profile/notes/note/progress_note_screen.dart +++ b/lib/screens/patients/profile/notes/note/progress_note_screen.dart @@ -8,15 +8,15 @@ import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/locator.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; -import 'package:doctor_app_flutter/models/patient/progress_note_request.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/progress_note_request.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/notes/note/update_note.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; @@ -456,7 +456,7 @@ class _ProgressNoteState extends State { AppText( TranslationBase.of( context) - .createdBy, + .createdBy + ' ', fontSize: 10, ), Expanded( @@ -474,6 +474,26 @@ class _ProgressNoteState extends State { ), ], ), + Row( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + AppText( + TranslationBase.of(context).conditionDescription + ' : ', + fontSize: 10, + ), + Expanded( + child: AppText( + model.patientProgressNoteList[index].conditionDescription ?? '', + fontWeight: + FontWeight.w600, + fontSize: 12, + isCopyable: true, + ), + ), + ], + ), ], ), ), diff --git a/lib/screens/patients/profile/notes/note/update_note.dart b/lib/screens/patients/profile/notes/note/update_note.dart index 85b33f5e..9df70b35 100644 --- a/lib/screens/patients/profile/notes/note/update_note.dart +++ b/lib/screens/patients/profile/notes/note/update_note.dart @@ -2,16 +2,16 @@ import 'package:doctor_app_flutter/config/config.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/viewstate.dart'; +import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/core/model/note/CreateNoteModel.dart'; import 'package:doctor_app_flutter/core/model/note/note_model.dart'; import 'package:doctor_app_flutter/core/model/note/update_note_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/progress_note_request.dart'; import 'package:doctor_app_flutter/core/provider/robot_provider.dart'; import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; -import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; -import 'package:doctor_app_flutter/models/patient/progress_note_request.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; @@ -26,6 +26,8 @@ import 'package:permission_handler/permission_handler.dart'; import 'package:provider/provider.dart'; import 'package:speech_to_text/speech_recognition_error.dart'; import 'package:speech_to_text/speech_to_text.dart' as stt; +import '../../../../../widgets/shared/dialogs/dailog-list-select.dart'; +import '../../../../base/base_view.dart'; class UpdateNoteOrder extends StatefulWidget { final NoteModel note; @@ -33,6 +35,8 @@ class UpdateNoteOrder extends StatefulWidget { final PatiantInformtion patient; final int visitType; final bool isUpdate; + final List elementList; + final Function(dynamic) okFunction; const UpdateNoteOrder( {Key key, @@ -40,7 +44,9 @@ class UpdateNoteOrder extends StatefulWidget { this.patientModel, this.patient, this.visitType, - this.isUpdate}) + this.isUpdate, + this.elementList, + this.okFunction}) : super(key: key); @override @@ -48,10 +54,11 @@ class UpdateNoteOrder extends StatefulWidget { } class _UpdateNoteOrderState extends State { + dynamic selectValue; int selectedType; bool isSubmitted = false; stt.SpeechToText speech = stt.SpeechToText(); - var reconizedWord; + var recognizedWord; var event = RobotProvider(); ProjectViewModel projectViewModel; @@ -78,120 +85,35 @@ class _UpdateNoteOrderState extends State { @override Widget build(BuildContext context) { + String keyId = 'ParameterCode'; + projectViewModel = Provider.of(context); if (widget.note != null) { progressNoteController.text = widget.note.notes; - } + if(selectValue==null) + selectValue={}; + selectValue['ParameterCode'] = widget.note.condition; + selectValue['Description'] = widget.note.conditionDescription; - return AppScaffold( - isShowAppBar: false, - backgroundColor: Theme.of(context).scaffoldBackgroundColor, - body: SingleChildScrollView( - child: Container( - height: MediaQuery.of(context).size.height * 1.0, - child: Padding( - padding: EdgeInsets.all(0.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - BottomSheetTitle( - title: widget.visitType == 3 - ? (widget.isUpdate - ? TranslationBase.of(context).noteUpdate - : TranslationBase.of(context).noteAdd) + - TranslationBase.of(context).orderSheet - : (widget.isUpdate - ? TranslationBase.of(context).noteUpdate - : TranslationBase.of(context).noteAdd) + - TranslationBase.of(context).progressNote, - ), - SizedBox( - height: 10.0, - ), - Center( - child: FractionallySizedBox( - widthFactor: 0.9, - child: Column( - children: [ - Stack( - children: [ - AppTextFieldCustom( - hintText: widget.visitType == 3 - ? (widget.isUpdate - ? TranslationBase.of(context) - .noteUpdate - : TranslationBase.of(context) - .noteAdd) + - TranslationBase.of(context).orderSheet - : (widget.isUpdate - ? TranslationBase.of(context) - .noteUpdate - : TranslationBase.of(context) - .noteAdd) + - TranslationBase.of(context).progressNote, - //TranslationBase.of(context).addProgressNote, - controller: progressNoteController, - maxLines: 35, - minLines: 25, - hasBorder: true, + } - // isTextFieldHasSuffix: true, - validationError: - progressNoteController.text.isEmpty && - isSubmitted - ? TranslationBase.of(context).emptyMessage - : null, - ), - Positioned( - top: - -2, //MediaQuery.of(context).size.height * 0, - right: projectViewModel.isArabic - ? MediaQuery.of(context).size.width * 0.75 - : 15, - child: Column( - children: [ - IconButton( - icon: Icon(DoctorApp.speechtotext, - color: Colors.black, size: 35), - onPressed: () { - initSpeechState() - .then((value) => {onVoiceText()}); - }, - ), - ], - )) - ], - ), - ], - ), - ), - ), - ], - ), - ), - ), - ), - bottomSheet: Container( - height: progressNoteController.text.isNotEmpty ? 130 : 70, - margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5), - child: Column( - children: [ - if (progressNoteController.text.isNotEmpty) - Container( - margin: EdgeInsets.all(5), - child: AppButton( - title: TranslationBase.of(context).clearText, - onPressed: () { - setState(() { - progressNoteController.text = ''; - }); - }, - ), - ), - Container( - margin: EdgeInsets.all(5), - child: AppButton( + return BaseView( + onModelReady: (model) { + model.getStpMasterList(isLocalBusy: false); + }, + builder: (_, model, w) => AppScaffold( + isShowAppBar: false, + backgroundColor: Theme.of(context).scaffoldBackgroundColor, + body: SingleChildScrollView( + child: Container( + height: MediaQuery.of(context).size.height * 1.0, + child: Padding( + padding: EdgeInsets.all(0.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + BottomSheetTitle( title: widget.visitType == 3 ? (widget.isUpdate ? TranslationBase.of(context).noteUpdate @@ -201,73 +123,220 @@ class _UpdateNoteOrderState extends State { ? TranslationBase.of(context).noteUpdate : TranslationBase.of(context).noteAdd) + TranslationBase.of(context).progressNote, - color: Color(0xff359846), - // disabled: progressNoteController.text.isEmpty, - fontWeight: FontWeight.w700, - onPressed: () async { + ), + SizedBox( + height: 10.0, + ), + Container( + padding: EdgeInsets.only(right: 20, left: 20), + child: InkWell( + onTap: model.stpMasterList != null + ? () { + Helpers.hideKeyboard(context); + ListSelectDialog dialog = ListSelectDialog( + list: model.stpMasterList, + attributeName: 'Description', + attributeValueId: + model.stpMasterList.length == 1 + ? model.stpMasterList[0]['${keyId}'] + .toString() + : '${keyId}', + okText: TranslationBase.of(context).ok, + okFunction: (selectedValue) => { + setState(() { + selectValue = selectedValue; + selectValue['isDefault'] = true; + }) + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: (BuildContext context) { + return dialog; + }, + ); + } + : null, + child: AppTextFieldCustom( + hintText: TranslationBase.of(context).selectCondition,//'Select Condition', + dropDownText: model.stpMasterList.length == 1 + ? model.stpMasterList[0]['Description'] + : selectValue == null + ? null + : selectValue['Description'], + enabled: false, + isTextFieldHasSuffix: true, + ), + ), + ), + SizedBox( + height: 10.0, + ), + Center( + child: FractionallySizedBox( + widthFactor: 0.9, + child: Column( + children: [ + Stack( + children: [ + AppTextFieldCustom( + hintText: widget.visitType == 3 + ? (widget.isUpdate + ? TranslationBase.of(context) + .noteUpdate + : TranslationBase.of(context) + .noteAdd) + + TranslationBase.of(context).orderSheet + : (widget.isUpdate + ? TranslationBase.of(context) + .noteUpdate + : TranslationBase.of(context) + .noteAdd) + + TranslationBase.of(context) + .progressNote, + //TranslationBase.of(context).addProgressNote, + controller: progressNoteController, + maxLines: 35, + minLines: 25, + hasBorder: true, + + // isTextFieldHasSuffix: true, + validationError: progressNoteController + .text.isEmpty && + isSubmitted + ? TranslationBase.of(context).emptyMessage + : null, + ), + Positioned( + top: -2, + //MediaQuery.of(context).size.height * 0, + right: projectViewModel.isArabic + ? MediaQuery.of(context).size.width * 0.75 + : 15, + child: Column( + children: [ + IconButton( + icon: Icon(DoctorApp.speechtotext, + color: Colors.black, size: 35), + onPressed: () { + initSpeechState() + .then((value) => {onVoiceText()}); + }, + ), + ], + )) + ], + ), + ], + ), + ), + ), + ], + ), + ), + ), + ), + bottomSheet: Container( + height: progressNoteController.text.isNotEmpty ? 130 : 70, + margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5), + child: Column( + children: [ + if (progressNoteController.text.isNotEmpty) + Container( + margin: EdgeInsets.all(5), + child: AppButton( + title: TranslationBase.of(context).clearText, + onPressed: () { setState(() { - isSubmitted = true; + progressNoteController.text = ''; }); - if (progressNoteController.text.trim().isNotEmpty) { - GifLoaderDialogUtils.showMyDialog(context); - Map profile = await sharedPref.getObj(DOCTOR_PROFILE); + }, + ), + ), + Container( + margin: EdgeInsets.all(5), + child: AppButton( + title: widget.visitType == 3 + ? (widget.isUpdate + ? TranslationBase.of(context).noteUpdate + : TranslationBase.of(context).noteAdd) + + TranslationBase.of(context).orderSheet + : (widget.isUpdate + ? TranslationBase.of(context).noteUpdate + : TranslationBase.of(context).noteAdd) + + TranslationBase.of(context).progressNote, + color: AppGlobal.appGreenColor, + // disabled: progressNoteController.text.isEmpty, + fontWeight: FontWeight.w700, + onPressed: () async { + setState(() { + isSubmitted = true; + }); + if (progressNoteController.text.trim().isNotEmpty) { + GifLoaderDialogUtils.showMyDialog(context); + Map profile = await sharedPref.getObj(DOCTOR_PROFILE); - DoctorProfileModel doctorProfile = - DoctorProfileModel.fromJson(profile); + DoctorProfileModel doctorProfile = + DoctorProfileModel.fromJson(profile); - if (widget.isUpdate) { - UpdateNoteReqModel reqModel = UpdateNoteReqModel( - admissionNo: int.parse(widget.patient.admissionNo), - cancelledNote: false, - lineItemNo: widget.note.lineItemNo, - createdBy: widget.note.createdBy, - notes: progressNoteController.text, - verifiedNote: false, - patientTypeID: widget.patient.patientType, - patientOutSA: false, - ); - await widget.patientModel - .updatePatientProgressNote(reqModel); - } else { - CreateNoteModel reqModel = CreateNoteModel( - admissionNo: - int.parse(widget.patient.admissionNo), - createdBy: doctorProfile.doctorID, - visitType: widget.visitType, - patientID: widget.patient.patientId, - nursingRemarks: ' ', - patientTypeID: widget.patient.patientType, - patientOutSA: false, - notes: progressNoteController.text); + if (widget.isUpdate) { + UpdateNoteReqModel reqModel = UpdateNoteReqModel( + admissionNo: + int.parse(widget.patient.admissionNo), + cancelledNote: false, + lineItemNo: widget.note.lineItemNo, + createdBy: widget.note.createdBy, + notes: progressNoteController.text, + verifiedNote: false, + patientTypeID: widget.patient.patientType, + patientOutSA: false, + conditionId: selectValue['ParameterCode']); + await widget.patientModel + .updatePatientProgressNote(reqModel); + } else { + CreateNoteModel reqModel = CreateNoteModel( + admissionNo: + int.parse(widget.patient.admissionNo), + createdBy: doctorProfile.doctorID, + visitType: widget.visitType, + patientID: widget.patient.patientId, + nursingRemarks: ' ', + patientTypeID: widget.patient.patientType, + patientOutSA: false, + notes: progressNoteController.text, + conditionId: selectValue['ParameterCode']); - await widget.patientModel - .createPatientProgressNote(reqModel); - } + await widget.patientModel + .createPatientProgressNote(reqModel); + } - if (widget.patientModel.state == ViewState.ErrorLocal) { - Helpers.showErrorToast(widget.patientModel.error); + if (widget.patientModel.state == + ViewState.ErrorLocal) { + Helpers.showErrorToast(widget.patientModel.error); + } else { + ProgressNoteRequest progressNoteRequest = + ProgressNoteRequest( + visitType: widget.visitType, + // if equal 5 then this will return progress note + admissionNo: + int.parse(widget.patient.admissionNo), + projectID: widget.patient.projectId, + patientTypeID: widget.patient.patientType, + languageID: 2); + await widget.patientModel.getPatientProgressNote( + progressNoteRequest.toJson()); + } + GifLoaderDialogUtils.hideDialog(context); + DrAppToastMsg.showSuccesToast( + TranslationBase.of(context).yourOrderAddedSuccessfully); + Navigator.of(context).pop(); } else { - ProgressNoteRequest progressNoteRequest = - ProgressNoteRequest( - visitType: widget.visitType, - // if equal 5 then this will return progress note - admissionNo: - int.parse(widget.patient.admissionNo), - projectID: widget.patient.projectId, - patientTypeID: widget.patient.patientType, - languageID: 2); - await widget.patientModel.getPatientProgressNote( - progressNoteRequest.toJson()); + Helpers.showErrorToast(TranslationBase.of(context).youCannotAddOnlySpaces); } - GifLoaderDialogUtils.hideDialog(context); - DrAppToastMsg.showSuccesToast( - "Your Order added Successfully"); - Navigator.of(context).pop(); - } else { - Helpers.showErrorToast("You cant add only spaces"); - } - })), - ], + })), + ], + ), ), ), ); @@ -296,7 +365,7 @@ class _UpdateNoteOrderState extends State { } void statusListener(String status) { - reconizedWord = status == 'listening' ? 'Lisening...' : 'Sorry....'; + recognizedWord = status == 'listening' ? 'Listening...' : 'Sorry....'; } void requestPermissions() async { @@ -306,14 +375,14 @@ class _UpdateNoteOrderState extends State { } void resultListener(result) { - reconizedWord = result.recognizedWords; - event.setValue({"searchText": reconizedWord}); + recognizedWord = result.recognizedWords; + event.setValue({"searchText": recognizedWord}); if (result.finalResult == true) { setState(() { SpeechToText.closeAlertDialog(context); speech.stop(); - progressNoteController.text += reconizedWord + '\n'; + progressNoteController.text += recognizedWord + '\n'; }); } else { print(result.finalResult); diff --git a/lib/screens/patients/profile/notes/nursing_note/nursing_note_screen.dart b/lib/screens/patients/profile/notes/nursing_note/nursing_note_screen.dart index 06dc687a..b0cf2a2d 100644 --- a/lib/screens/patients/profile/notes/nursing_note/nursing_note_screen.dart +++ b/lib/screens/patients/profile/notes/nursing_note/nursing_note_screen.dart @@ -4,12 +4,12 @@ import 'package:doctor_app_flutter/core/model/note/note_model.dart'; import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; diff --git a/lib/screens/patients/profile/operation_report/operation_report.dart b/lib/screens/patients/profile/operation_report/operation_report.dart index 409e118d..0592b4d0 100644 --- a/lib/screens/patients/profile/operation_report/operation_report.dart +++ b/lib/screens/patients/profile/operation_report/operation_report.dart @@ -1,5 +1,6 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/model/note/note_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/core/service/AnalyticsService.dart'; import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/profile/operation_report_view_model.dart'; @@ -10,13 +11,12 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/operation_report/update_operation_report.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; -import '../../../../models/patient/patiant_info_model.dart'; import '../../../../util/dr_app_shared_pref.dart'; import '../../../../widgets/shared/app_scaffold_widget.dart'; import '../../../../widgets/shared/app_texts_widget.dart'; diff --git a/lib/screens/patients/profile/operation_report/update_operation_report.dart b/lib/screens/patients/profile/operation_report/update_operation_report.dart index 12f6739c..882bacc8 100644 --- a/lib/screens/patients/profile/operation_report/update_operation_report.dart +++ b/lib/screens/patients/profile/operation_report/update_operation_report.dart @@ -3,10 +3,10 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/provider/robot_provider.dart'; import 'package:doctor_app_flutter/core/viewModel/profile/operation_report_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/operation_report/create_update_operation_report_request_model.dart'; -import 'package:doctor_app_flutter/models/operation_report/get_operation_details_response_modle.dart'; -import 'package:doctor_app_flutter/models/operation_report/get_reservations_response_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/operation_report/create_update_operation_report_request_model.dart'; +import 'package:doctor_app_flutter/core/model/operation_report/get_operation_details_response_modle.dart'; +import 'package:doctor_app_flutter/core/model/operation_report/get_reservations_response_model.dart'; +import 'package:doctor_app_flutter/core/model/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/shared_soap_widgets/bottom_sheet_title.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; @@ -20,6 +20,8 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:speech_to_text/speech_to_text.dart' as stt; +import '../../../../config/config.dart'; + class UpdateOperationReport extends StatefulWidget { final GetReservationsResponseModel reservation; @@ -45,7 +47,7 @@ class _UpdateOperationReportState extends State { int selectedType; bool isSubmitted = false; stt.SpeechToText speech = stt.SpeechToText(); - var reconizedWord; + var recognizedWord; var event = RobotProvider(); ProjectViewModel projectViewModel; @@ -532,7 +534,7 @@ class _UpdateOperationReportState extends State { : TranslationBase.of(context).noteAdd) + " " + TranslationBase.of(context).operationReports, - color: Color(0xff359846), + color: AppGlobal.appGreenColor, // disabled: operationReportsController.text.isEmpty, fontWeight: FontWeight.w700, onPressed: () async { diff --git a/lib/screens/patients/profile/pending_orders/pending_orders_screen.dart b/lib/screens/patients/profile/pending_orders/pending_orders_screen.dart index 589c4680..ce6389b9 100644 --- a/lib/screens/patients/profile/pending_orders/pending_orders_screen.dart +++ b/lib/screens/patients/profile/pending_orders/pending_orders_screen.dart @@ -1,8 +1,8 @@ import 'package:doctor_app_flutter/core/viewModel/pednding_orders_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; diff --git a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication.dart b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication.dart new file mode 100644 index 00000000..d7904596 --- /dev/null +++ b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication.dart @@ -0,0 +1,206 @@ +import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart'; +import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; +import '../../../../core/viewModel/profile/intervention_medication_view_model.dart'; +import '../../../../widgets/transitions/fade_page.dart'; +import 'intervention_medication_history_screen.dart'; + +DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); + +class InterventionMedicationScreen extends StatefulWidget { + final PatiantInformtion patient; + final InterventionMedicationViewModel previousModel; + const InterventionMedicationScreen(this.patient, {Key key, this.previousModel}) : super(key: key); + + @override + _InterventionMedicationScreenState createState() => + _InterventionMedicationScreenState(); +} + +class _InterventionMedicationScreenState + extends State { + bool isDischargedPatient = false; + AuthenticationViewModel authenticationViewModel; + ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + authenticationViewModel = Provider.of(context); + projectViewModel = Provider.of(context); + + return BaseView( + onModelReady: (model) => model.getInterventionMedication( + patientId: widget.patient.patientId, + //admissionNo: int.parse(widget.patient.admissionNo), + fromDate: widget.previousModel.selectedFromDate, + toDate: widget.previousModel.selectedToDate, + ), + + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + backgroundColor: Theme.of(context).scaffoldBackgroundColor, + appBar: PatientProfileAppBar( + widget.patient, + isInpatient: true, + ), + body: model.allInterventionList == null || + model.allInterventionList.length == 0 + ? Center( + child: ErrorMessage( + error: TranslationBase.of(context).noDataAvailable, + ), + ) + : Container( + color: Colors.grey[200], + child: Column( + children: [ + Expanded( + child: Container( + child: ListView.builder( + itemCount: model.allInterventionList.length, + itemBuilder: (BuildContext ctxt, int index) { + return InkWell( + child: FractionallySizedBox( + widthFactor: 0.95, + child: CardWithBgWidget( + hasBorder: false, + bgColor: Colors.transparent, + widget: Column( + children: [ + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + width: MediaQuery.of(context) + .size + .width * + 0.60, + child: Column( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + CustomRow( + valueSize: 14, + label: '', + value: model.allInterventionList[index].cS, + ) + ], + ), + ), + Column( + children: [ + Row( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + AppText( + AppDateUtils.getDayMonthYearDateFormatted( + AppDateUtils.convertStringToDate(model + .allInterventionList[ + index] + .startDatetime), + isArabic: + projectViewModel + .isArabic, + isMonthShort: + true), + fontWeight: + FontWeight.w600, + fontSize: 14, + color: Color(0xFF2B353E), + ), + ], + ), + ], + ) + ], + ), + SizedBox( + height: 8, + ), + CustomRow( + labelSize: 12, + valueSize: 12, + label: TranslationBase.of(context).description, + value: model.allInterventionList[index].description, + ), + SizedBox( + height: 8, + ), + CustomRow( + labelSize: 12, + valueSize: 12, + label: TranslationBase.of(context).medication, + value: model.allInterventionList[index].medication, + ), + SizedBox( + height: 8, + ), + CustomRow( + labelSize: 12, + valueSize: 12, + label: TranslationBase.of(context).doctorComments, + value: model.allInterventionList[index].doctorComments, + ), + SizedBox( + height: 8, + ), + CustomRow( + labelSize: 12, + valueSize: 12, + label: TranslationBase.of(context).statusDescription, + value: model.allInterventionList[index].statusDescription, + ), + ], + ), + SizedBox( + height: 20, + ), + ], + ), + ), + ), + onTap: () { + Navigator.push( + context, + FadePage( + page: InterventionMedicationHistoryScreen(widget.patient, model.allInterventionList[index]), + ), + ); + }, + ); + }), + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart new file mode 100644 index 00000000..10239f50 --- /dev/null +++ b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication_history_screen.dart @@ -0,0 +1,299 @@ +import 'package:doctor_app_flutter/core/enum/viewstate.dart'; +import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/pharmacy-intervention-model/new_medication_res_model.dart'; +import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; +import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; +import 'package:doctor_app_flutter/util/helpers.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart'; +import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; +import '../../../../config/config.dart'; +import '../../../../core/viewModel/profile/intervention_medication_view_model.dart'; +import '../../../../widgets/shared/user-guid/CusomRow.dart'; + + +DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); + +class InterventionMedicationHistoryScreen extends StatefulWidget { + final PatiantInformtion patient; + final InterventionMedicationResModel interventionMedication; + const InterventionMedicationHistoryScreen(this.patient, this.interventionMedication, {Key key}) : super(key: key); + + @override + _InterventionMedicationHistoryScreenState createState() => _InterventionMedicationHistoryScreenState(); +} + +class _InterventionMedicationHistoryScreenState extends State { + bool isDischargedPatient = false; + AuthenticationViewModel authenticationViewModel; + ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + authenticationViewModel = Provider.of(context); + projectViewModel = Provider.of(context); + + return BaseView( + onModelReady: (model) => model.getInterventionMedicationHistory( + patientId: widget.patient.patientId, + projectId: widget.interventionMedication.projectID, + admissionNo: widget.interventionMedication.admissionNo, + prescriptionNo: widget.interventionMedication.prescriptionNo, + orderNo: widget.interventionMedication.orderNo, + ), + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + backgroundColor: Theme.of(context).scaffoldBackgroundColor, + appBar: PatientProfileAppBar( + widget.patient, + isInpatient: true, + ), + body: model.allInterventionHistoryList == null || + model.allInterventionHistoryList.length == 0 + ? Center( + child: ErrorMessage( + error: TranslationBase.of(context).noDataAvailable, + ), + ) + : Container( + color: Colors.grey[200], + child: Column( + children: [ + Expanded( + child: Container( + child: ListView.builder( + itemCount: model.allInterventionHistoryList.length, + itemBuilder: (BuildContext ctxt, int index) { + return FractionallySizedBox( + widthFactor: 0.95, + child: CardWithBgWidget( + hasBorder: false, + bgColor: Colors.transparent, + widget: Column( + children: [ + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + width: MediaQuery.of(context) + .size + .width * + 0.60, + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + CustomRow( + labelSize: 12, + valueSize: 12, + label: TranslationBase.of(context).createdByName, + value: model.allInterventionHistoryList[index].createdByName, + ), + ], + ), + ), + Column( + children: [ + Row( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + AppText( + + AppDateUtils.getDayMonthYearDateFormatted( + AppDateUtils.convertStringToDate( + model + .allInterventionHistoryList[ + index].createdOn) + ,isArabic: + projectViewModel + .isArabic, + isMonthShort: true), + fontWeight: FontWeight.w600, + fontSize: 14, + color: Color(0xFF2B353E), + ), + ], + ), + ], + ) + ], + ), + SizedBox( + height: 8, + ), + CustomRow( + labelSize: 12, + valueSize: 12, + label: TranslationBase.of(context).remarks, + value: model.allInterventionHistoryList[index].remark, + ), + SizedBox( + height: 8, + ), + SizedBox( + height: 8, + ), + SizedBox( + height: 8, + ), + Row( + crossAxisAlignment: + CrossAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment.end, + children: [ + InkWell( + onTap: () async { + + GifLoaderDialogUtils.showMyDialog(context); + await model.setAcceptedOrRejected( + remarks: "", + memberId: model.allInterventionHistoryList[index].commentedBy, + prescriptionNo: model.allInterventionHistoryList[index].prescriptionId, + patientID: model.allInterventionHistoryList[index].patientId, + orderNo: model.allInterventionHistoryList[index].orderNo, + admissionNo: model.allInterventionHistoryList[index].admissionNo, + interventionStatus: 1, + status: 61 + ); + if(model.state == ViewState.ErrorLocal) { + GifLoaderDialogUtils.hideDialog(context); + + Helpers.showErrorToast(model.error); + } else { + await model.getInterventionMedicationHistory(patientId: widget.patient.patientId, + projectId: widget.interventionMedication.projectID, + admissionNo: widget.interventionMedication.admissionNo, + prescriptionNo: widget.interventionMedication.prescriptionNo, + orderNo: widget.interventionMedication.orderNo,); + GifLoaderDialogUtils.hideDialog(context); + DrAppToastMsg.showSuccesToast( + "Has been Successfully accepted"); + } + }, + child: Container( + decoration: BoxDecoration( + color: AppGlobal.appGreenColor, + borderRadius: + BorderRadius.circular(10), + ), + // color:Colors.red[600], + + child: Row( + children: [ + + SizedBox( + width: 2, + ), + AppText( + TranslationBase.of(context) + .accept, + fontSize: 10, + color: Colors.white, + ), + ], + ), + padding: EdgeInsets.all(6), + ), + ), + SizedBox( + width: 10, + ), + InkWell( + onTap: () async { + + GifLoaderDialogUtils.showMyDialog(context); + await model.setAcceptedOrRejected( + remarks: "", + memberId: model.allInterventionHistoryList[index].commentedBy, + prescriptionNo: model.allInterventionHistoryList[index].prescriptionId, + patientID: model.allInterventionHistoryList[index].patientId, + orderNo: model.allInterventionHistoryList[index].orderNo, + admissionNo: model.allInterventionHistoryList[index].admissionNo, + interventionStatus: 2, + status: 61 + ); + if(model.state == ViewState.ErrorLocal) { + GifLoaderDialogUtils.hideDialog(context); + + Helpers.showErrorToast(model.error); + } else { + await model.getInterventionMedicationHistory(patientId: widget.patient.patientId, + projectId: widget.interventionMedication.projectID, + admissionNo: widget.interventionMedication.admissionNo, + prescriptionNo: widget.interventionMedication.prescriptionNo, + orderNo: widget.interventionMedication.orderNo,); + GifLoaderDialogUtils.hideDialog(context); + + DrAppToastMsg.showSuccesToast( + "Has been Successfully Rejected"); + } + }, + child: Container( + decoration: BoxDecoration( + color: AppGlobal.appRedColor, + borderRadius: + BorderRadius.circular(10), + ), + // color:Colors.red[600], + + child: Row( + children: [ + + SizedBox( + width: 2, + ), + AppText( + TranslationBase.of(context) + .reject, + fontSize: 10, + color: Colors.white, + ), + ], + ), + padding: EdgeInsets.all(6), + ), + ), + ], + ), + ], + ), + SizedBox( + height: 20, + ), + ], + ), + ), + ); + }), + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/screens/patients/profile/pharmacy-intervention/pharmacy_intervention_screen.dart b/lib/screens/patients/profile/pharmacy-intervention/pharmacy_intervention_screen.dart new file mode 100644 index 00000000..191ac79e --- /dev/null +++ b/lib/screens/patients/profile/pharmacy-intervention/pharmacy_intervention_screen.dart @@ -0,0 +1,262 @@ +import 'package:doctor_app_flutter/core/enum/filter_type.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/util/helpers.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; + +import '../../../../config/config.dart'; +import '../../../../core/viewModel/profile/intervention_medication_view_model.dart'; +import '../../../base/base_view.dart'; +import 'intervention_medication.dart'; + +class PharmacyInterventionScreen extends StatefulWidget { + final OutPatientFilterType outPatientFilterType; + + const PharmacyInterventionScreen({ + Key key, + this.outPatientFilterType, + }) : super(key: key); + + @override + _PharmacyInterventionScreenState createState() => + _PharmacyInterventionScreenState(); +} + +class _PharmacyInterventionScreenState + extends State { + @override + void initState() { + // TODO: implement initState + super.initState(); + } + + @override + Widget build(BuildContext context) { + final routeArgs = ModalRoute.of(context).settings.arguments as Map; + PatiantInformtion patient = routeArgs['patient']; + return BaseView( + builder: (_, model, w) => AppScaffold( + isShowAppBar: false, + backgroundColor: Theme.of(context).scaffoldBackgroundColor, + body: SingleChildScrollView( + child: Container( + height: MediaQuery.of(context).size.height * 1.0, + child: Padding( + padding: EdgeInsets.all(0.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + BottomSheetTitle( + title: (OutPatientFilterType.Previous == + widget.outPatientFilterType) + ? "" + : TranslationBase.of(context).pharmacyIntervention, + ), + SizedBox( + height: 10.0, + ), + Center( + child: FractionallySizedBox( + widthFactor: 0.9, + child: Column( + children: [ + Container( + color: Colors.white, + child: InkWell( + onTap: () => selectDate( + context, + model, + firstDate: DateTime( + DateTime.now().year - 20, + DateTime.now().month, + DateTime.now().day), + lastDate: DateTime( + DateTime.now().year, + DateTime.now().month, + DateTime.now().day + 100), + selectedDate: model.selectedFromDate != null + ? model.selectedFromDate + : DateTime.now(), + ), + child: TextField( + decoration: textFieldSelectorDecoration( + TranslationBase.of(context).fromDate, + "${AppDateUtils.convertStringToDateFormat(model.selectedFromDate.toString(), "yyyy-MM-dd")}" + , + true, + suffixIcon: Icon( + Icons.calendar_today, + color: Colors.black, + )), + enabled: false, + ), + ), + ), + SizedBox( + height: 10, + ), + Container( + color: Colors.white, + child: InkWell( + onTap: () => selectDate( + context, + model, + isFromDate: false, + firstDate: DateTime( + DateTime.now().year - 20, + DateTime.now().month, + DateTime.now().day), + lastDate: DateTime( + DateTime.now().year, + DateTime.now().month, + DateTime.now().day + 100), + selectedDate: model.selectedToDate != null + ? model.selectedToDate + : DateTime.now().add(Duration(days: 1)), + ), + child: TextField( + decoration: textFieldSelectorDecoration( + TranslationBase.of(context).toDate, + "${AppDateUtils.convertStringToDateFormat(model.selectedToDate.toString(), "yyyy-MM-dd")}" + , + true, + suffixIcon: Icon( + Icons.calendar_today, + color: Colors.black, + )), + enabled: false, + ), + ), + ), + ], + ), + ), + ), + ], + ), + ), + ), + ), + bottomSheet: Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(0.0), + ), + border: Border.all(color: HexColor('#707070'), width: 0), + ), + height: MediaQuery.of(context).size.height * 0.1, + width: double.infinity, + child: Column( + children: [ + SizedBox( + height: 10, + ), + Container( + child: FractionallySizedBox( + widthFactor: .80, + child: Center( + child: AppButton( + title: TranslationBase.of(context).search, + padding: 5, + color: AppGlobal.appGreenColor, + onPressed: () async { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + InterventionMedicationScreen( + patient, + previousModel: model, + )), + ); + }, + ), + ), + ), + ), + SizedBox( + height: 5, + ), + ], + ), + ))); + } + + selectDate(BuildContext context, InterventionMedicationViewModel model, + {bool isFromDate = true, + DateTime firstDate, + lastDate, + selectedDate}) async { + Helpers.hideKeyboard(context); + final DateTime picked = await showDatePicker( + context: context, + initialDate: selectedDate, + firstDate: firstDate, + lastDate: lastDate, + initialEntryMode: DatePickerEntryMode.calendar, + ); + if (picked != null) { + if (isFromDate) { + setState(() { + model.selectedFromDate = picked; + var date = picked.add(Duration(days: 1)); + if (date.isBefore(lastDate)) { + model.selectedToDate = date; + } else + model.selectedToDate = lastDate; + }); + } else { + setState(() { + model.selectedToDate = picked; + }); + } + } + } + + InputDecoration textFieldSelectorDecoration( + String hintText, String selectedText, bool isDropDown, + {Icon suffixIcon}) { + return InputDecoration( + focusedBorder: OutlineInputBorder( + borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), + borderRadius: BorderRadius.circular(8), + ), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Color(0xFFEFEFEF), width: 2.0), + borderRadius: BorderRadius.circular(8), + ), + disabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Color(0xFFEFEFEF), width: 2.0), + borderRadius: BorderRadius.circular(8), + ), + hintText: selectedText != null ? selectedText : hintText, + suffixIcon: isDropDown + ? suffixIcon != null + ? suffixIcon + : Icon( + Icons.keyboard_arrow_down_sharp, + color: Color(0xff2E303A), + ) + : null, + hintStyle: TextStyle( + fontSize: 13, + color: Color(0xff2E303A), + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + ), + labelText: selectedText != null ? '$hintText\n$selectedText' : null, + labelStyle: TextStyle( + fontSize: 13, + color: Color(0xff2E303A), + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + ), + ); + } +} diff --git a/lib/screens/patients/profile/prescriptions/in_patient_prescription_details_screen.dart b/lib/screens/patients/profile/prescriptions/in_patient_prescription_details_screen.dart index ca8be2c0..c3aab3f4 100644 --- a/lib/screens/patients/profile/prescriptions/in_patient_prescription_details_screen.dart +++ b/lib/screens/patients/profile/prescriptions/in_patient_prescription_details_screen.dart @@ -1,5 +1,5 @@ import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:doctor_app_flutter/models/patient/prescription/prescription_report_for_in_patient.dart'; +import 'package:doctor_app_flutter/core/model/patient/prescription/prescription_report_for_in_patient.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; diff --git a/lib/screens/patients/profile/prescriptions/out_patient_prescription_details_item.dart b/lib/screens/patients/profile/prescriptions/out_patient_prescription_details_item.dart index a7e0f7e2..c6f96dde 100644 --- a/lib/screens/patients/profile/prescriptions/out_patient_prescription_details_item.dart +++ b/lib/screens/patients/profile/prescriptions/out_patient_prescription_details_item.dart @@ -1,5 +1,5 @@ import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:doctor_app_flutter/models/patient/prescription/prescription_report.dart'; +import 'package:doctor_app_flutter/core/model/patient/prescription/prescription_report.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/lib/screens/patients/profile/profile_screen/PatientProfileCardModel.dart b/lib/screens/patients/profile/profile_screen/patient_profile_card_model.dart similarity index 100% rename from lib/screens/patients/profile/profile_screen/PatientProfileCardModel.dart rename to lib/screens/patients/profile/profile_screen/patient_profile_card_model.dart diff --git a/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart b/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart index 0c12b913..a80c975b 100644 --- a/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart +++ b/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart @@ -7,9 +7,9 @@ import 'package:doctor_app_flutter/core/service/AnalyticsService.dart'; import 'package:doctor_app_flutter/core/service/VideoCallService.dart'; import 'package:doctor_app_flutter/core/viewModel/LiveCarePatientViewModel.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/PostEpisodeReqModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/in_patient/PostEpisodeForInpatientRequestModel.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/PostEpisodeReqModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/in_patient/PostEpisodeForInpatientRequestModel.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/live_care/end_call_screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart'; @@ -18,7 +18,7 @@ import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/profi import 'package:doctor_app_flutter/util/NotificationPermissionUtils.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-header-new-design-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; diff --git a/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart b/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart index 22d784e7..d4c20025 100644 --- a/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart +++ b/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart @@ -1,5 +1,5 @@ -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/PatientProfileCardModel.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/patient_profile_card_model.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart'; import 'package:flutter/material.dart'; @@ -58,12 +58,19 @@ class ProfileGridForInPatient extends StatelessWidget { RADIOLOGY_PATIENT, 'assets/images/svgs/profile_screen/Radiology.svg', isInPatient: isInpatient), + PatientProfileCardModel( + TranslationBase.of(context).patient, + TranslationBase.of(context).prescription + ' (${TranslationBase.of(context).old})', + ORDER_PRESCRIPTION_OLD, + 'assets/images/svgs/profile_screen/order prescription.svg', + isInPatient: isInpatient), PatientProfileCardModel( TranslationBase.of(context).patient, TranslationBase.of(context).prescription, ORDER_PRESCRIPTION_NEW, 'assets/images/svgs/profile_screen/order prescription.svg', isInPatient: isInpatient), + PatientProfileCardModel( TranslationBase.of(context).progress, TranslationBase.of(context).note, @@ -167,6 +174,20 @@ class ProfileGridForInPatient extends StatelessWidget { 'assets/images/svgs/profile_screen/diabetic chart.svg', isInPatient: isInpatient, ), + PatientProfileCardModel( + "VTE", + "Assessment", + VTE_ASSESSMENT, + 'assets/images/svgs/profile_screen/diabetic chart.svg', + isInPatient: isInpatient, + ), + PatientProfileCardModel( + TranslationBase.of(context).pharmacy, + TranslationBase.of(context).intervention, + PHARMACY_INTERVENTION, + 'assets/images/svgs/profile_screen/medical report.svg', + isInPatient: isInpatient, + ), ]; return Padding( diff --git a/lib/screens/patients/profile/profile_screen/profile_gird_for_other.dart b/lib/screens/patients/profile/profile_screen/profile_gird_for_other.dart index 797fc6a3..b2f844dd 100644 --- a/lib/screens/patients/profile/profile_screen/profile_gird_for_other.dart +++ b/lib/screens/patients/profile/profile_screen/profile_gird_for_other.dart @@ -1,5 +1,5 @@ -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/PatientProfileCardModel.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/patient_profile_card_model.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart'; import 'package:flutter/material.dart'; @@ -58,6 +58,12 @@ class ProfileGridForOther extends StatelessWidget { isInPatient: isInpatient), PatientProfileCardModel( TranslationBase.of(context).orders, + TranslationBase.of(context).prescription + ' (${TranslationBase.of(context).old})', + ORDER_PRESCRIPTION_OLD, + 'assets/images/svgs/profile_screen/order prescription.svg', + isInPatient: isInpatient), + PatientProfileCardModel( + TranslationBase.of(context).patient, TranslationBase.of(context).prescription, ORDER_PRESCRIPTION_NEW, 'assets/images/svgs/profile_screen/order prescription.svg', diff --git a/lib/screens/patients/profile/profile_screen/profile_gird_for_search.dart b/lib/screens/patients/profile/profile_screen/profile_gird_for_search.dart index ef195a9c..8e54c8ca 100644 --- a/lib/screens/patients/profile/profile_screen/profile_gird_for_search.dart +++ b/lib/screens/patients/profile/profile_screen/profile_gird_for_search.dart @@ -1,5 +1,5 @@ -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/PatientProfileCardModel.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/profile_screen/patient_profile_card_model.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart'; import 'package:flutter/material.dart'; @@ -55,6 +55,12 @@ class ProfileGridForSearch extends StatelessWidget { isInPatient: isInpatient), PatientProfileCardModel( TranslationBase.of(context).orders, + TranslationBase.of(context).prescription + ' (${TranslationBase.of(context).old})', + ORDER_PRESCRIPTION_OLD, + 'assets/images/svgs/profile_screen/order prescription.svg', + isInPatient: isInpatient), + PatientProfileCardModel( + TranslationBase.of(context).patient, TranslationBase.of(context).prescription, ORDER_PRESCRIPTION_NEW, 'assets/images/svgs/profile_screen/order prescription.svg', diff --git a/lib/screens/patients/profile/radiology/radiology_details_page.dart b/lib/screens/patients/profile/radiology/radiology_details_page.dart index df3bbb06..bc9ec56a 100644 --- a/lib/screens/patients/profile/radiology/radiology_details_page.dart +++ b/lib/screens/patients/profile/radiology/radiology_details_page.dart @@ -1,10 +1,10 @@ import 'package:doctor_app_flutter/core/model/radiology/final_radiology.dart'; import 'package:doctor_app_flutter/core/service/AnalyticsService.dart'; import 'package:doctor_app_flutter/core/viewModel/radiology_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; @@ -50,7 +50,7 @@ class RadiologyDetailsPage extends StatelessWidget { ), isShowAppBar: true, baseViewModel: model, - body: SingleChildScrollView( + body: SingleChildScrollView( child: Column( mainAxisSize: MainAxisSize.max, crossAxisAlignment: CrossAxisAlignment.center, diff --git a/lib/screens/patients/profile/radiology/radiology_home_page.dart b/lib/screens/patients/profile/radiology/radiology_home_page.dart index 6c3d93f7..99a300d4 100644 --- a/lib/screens/patients/profile/radiology/radiology_home_page.dart +++ b/lib/screens/patients/profile/radiology/radiology_home_page.dart @@ -1,6 +1,6 @@ import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/radiology/radiology_details_page.dart'; import 'package:doctor_app_flutter/screens/procedures/ProcedureType.dart'; @@ -9,7 +9,7 @@ import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/doctor_card.dart'; diff --git a/lib/screens/patients/profile/referral/AddReplayOnReferralPatient.dart b/lib/screens/patients/profile/referral/AddReplayOnReferralPatient.dart index 0c2c4d8d..835339ea 100644 --- a/lib/screens/patients/profile/referral/AddReplayOnReferralPatient.dart +++ b/lib/screens/patients/profile/referral/AddReplayOnReferralPatient.dart @@ -46,7 +46,7 @@ class _AddReplayOnReferralPatientState int replay = 1; int reject = 2; stt.SpeechToText speech = stt.SpeechToText(); - var reconizedWord; + var recognizedWord; var event = RobotProvider(); TextEditingController replayOnReferralController = TextEditingController(); @@ -248,7 +248,7 @@ class _AddReplayOnReferralPatientState void errorListener(SpeechRecognitionError error) {} void statusListener(String status) { - reconizedWord = status == 'listening' ? 'Lisening...' : 'Sorry....'; + recognizedWord = status == 'listening' ? 'Listening...' : 'Sorry....'; } void requestPermissions() async { @@ -258,13 +258,13 @@ class _AddReplayOnReferralPatientState } void resultListener(result) { - reconizedWord = result.recognizedWords; - event.setValue({"searchText": reconizedWord}); + recognizedWord = result.recognizedWords; + event.setValue({"searchText": recognizedWord}); if (result.finalResult == true) { setState(() { SpeechToText.closeAlertDialog(context); - replayOnReferralController.text += reconizedWord + '\n'; + replayOnReferralController.text += recognizedWord + '\n'; }); } } diff --git a/lib/screens/patients/profile/referral/my-referral-detail-screen.dart b/lib/screens/patients/profile/referral/my-referral-detail-screen.dart index 8d9293fe..87fe16ba 100644 --- a/lib/screens/patients/profile/referral/my-referral-detail-screen.dart +++ b/lib/screens/patients/profile/referral/my-referral-detail-screen.dart @@ -110,7 +110,7 @@ class MyReferralDetailScreen extends StatelessWidget { fontSize: 1.9 * SizeConfig.textMultiplier, fontWeight: FontWeight.w700, color: referralPatient.referralStatus == 1 - ? Color(0xffc4aa54) + ? AppGlobal.inProgressColor : referralPatient.referralStatus == 46 || referralPatient diff --git a/lib/screens/patients/profile/referral/patient_referral_screen.dart b/lib/screens/patients/profile/referral/patient_referral_screen.dart index 687f1463..c620de1c 100644 --- a/lib/screens/patients/profile/referral/patient_referral_screen.dart +++ b/lib/screens/patients/profile/referral/patient_referral_screen.dart @@ -10,6 +10,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; +import '../../../../util/tab_helper.dart'; import '../../ReferralDischargedPatientPage.dart'; import 'my-referral-inpatient-screen.dart'; @@ -60,8 +61,8 @@ class _PatientReferralScreen extends State Size.fromHeight(MediaQuery.of(context).size.height * 0.070), child: Center( child: Container( - height: Helpers.getTabHeight(context), - color: Helpers.getBgTabColor(), + height: TabHelper.getTabHeight(context), + color: TabHelper.getBgTabColor(), child: Center( child: TabBar( isScrollable: false, @@ -75,36 +76,36 @@ class _PatientReferralScreen extends State unselectedLabelColor: Colors.grey[800], tabs: [ Container( - decoration: Helpers.getBoxTabsBoxDecoration( + decoration: TabHelper.getBoxTabsBoxDecoration( isActive: index == 0, isFirst: true, projectViewModel: projectsProvider), child: Center( - child: Helpers.getTabText( + child: TabHelper.getTabText( title: TranslationBase.of(context) .myReferredPatient, isActive: index == 0)), ), Center( child: Container( - decoration: Helpers.getBoxTabsBoxDecoration( + decoration: TabHelper.getBoxTabsBoxDecoration( isActive: index == 1, isMiddle: true, projectViewModel: projectsProvider), child: Center( - child: Helpers.getTabText( + child: TabHelper.getTabText( title: TranslationBase.of(context).referral, isActive: index == 1)), ), ), Center( child: Container( - decoration: Helpers.getBoxTabsBoxDecoration( + decoration: TabHelper.getBoxTabsBoxDecoration( isActive: index == 2, isLast: true, projectViewModel: projectsProvider), child: Center( - child: Helpers.getTabText( + child: TabHelper.getTabText( title: TranslationBase.of(context).discharged, isActive: index == 2), ), diff --git a/lib/screens/patients/profile/referral/refer-patient-screen-in-patient.dart b/lib/screens/patients/profile/referral/refer-patient-screen-in-patient.dart index 48b161b6..e7c8d2ad 100644 --- a/lib/screens/patients/profile/referral/refer-patient-screen-in-patient.dart +++ b/lib/screens/patients/profile/referral/refer-patient-screen-in-patient.dart @@ -4,13 +4,13 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/provider/robot_provider.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/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/shared_soap_widgets/bottom_sheet_dialog_button.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; @@ -51,7 +51,7 @@ class _PatientMakeInPatientReferralScreenState String doctorError; String frequencyError; stt.SpeechToText speech = stt.SpeechToText(); - var reconizedWord; + var recognizedWord; var event = RobotProvider(); @override @@ -90,7 +90,7 @@ class _PatientMakeInPatientReferralScreenState } void statusListener(String status) { - reconizedWord = status == 'listening' ? 'Lisening...' : 'Sorry....'; + recognizedWord = status == 'listening' ? 'Listening...' : 'Sorry....'; } void requestPermissions() async { @@ -100,14 +100,14 @@ class _PatientMakeInPatientReferralScreenState } void resultListener(result) { - reconizedWord = result.recognizedWords; - event.setValue({"searchText": reconizedWord}); + recognizedWord = result.recognizedWords; + event.setValue({"searchText": recognizedWord}); if (result.finalResult == true) { setState(() { SpeechToText.closeAlertDialog(context); speech.stop(); - _remarksController.text += reconizedWord + '\n'; + _remarksController.text += recognizedWord + '\n'; }); } else { print(result.finalResult); diff --git a/lib/screens/patients/profile/referral/refer-patient-screen.dart b/lib/screens/patients/profile/referral/refer-patient-screen.dart index d5098e8e..0dc92eb2 100644 --- a/lib/screens/patients/profile/referral/refer-patient-screen.dart +++ b/lib/screens/patients/profile/referral/refer-patient-screen.dart @@ -1,26 +1,22 @@ -import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/service/AnalyticsService.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart'; import 'package:doctor_app_flutter/locator.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/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/shared_soap_widgets/bottom_sheet_dialog_button.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/patient-referral-item-widget.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:hexcolor/hexcolor.dart'; class PatientMakeReferralScreen extends StatefulWidget { // previous design page is: ReferPatientScreen @@ -152,9 +148,6 @@ class _PatientMakeReferralScreenState extends State { .referredByDoctorInfo, clinicDescription: null, ), - SizedBox( - height: 10, - ), ], ), if (model.patientReferral.length == 0) @@ -208,7 +201,7 @@ class _PatientMakeReferralScreenState extends State { TranslationBase.of(context).referralSuccessMsg); Navigator.pop(context); }); - }), + }) ], ), ), diff --git a/lib/screens/patients/profile/referral/referral_patient_detail_in-paint.dart b/lib/screens/patients/profile/referral/referral_patient_detail_in-paint.dart index 66c443c8..464d8e49 100644 --- a/lib/screens/patients/profile/referral/referral_patient_detail_in-paint.dart +++ b/lib/screens/patients/profile/referral/referral_patient_detail_in-paint.dart @@ -5,7 +5,7 @@ import 'package:doctor_app_flutter/core/service/AnalyticsService.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/locator.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; @@ -156,7 +156,7 @@ class ReferralPatientDetailScreen extends StatelessWidget { fontSize: 1.7 * SizeConfig.textMultiplier, fontWeight: FontWeight.w700, color: referredPatient.referralStatus == 1 - ? Color(0xffc4aa54) + ? AppGlobal.inProgressColor : referredPatient.referralStatus == 46 || referredPatient diff --git a/lib/screens/patients/profile/referral/referred-patient-screen.dart b/lib/screens/patients/profile/referral/referred-patient-screen.dart index fe40a7e6..f1467f64 100644 --- a/lib/screens/patients/profile/referral/referred-patient-screen.dart +++ b/lib/screens/patients/profile/referral/referred-patient-screen.dart @@ -1,4 +1,5 @@ import 'package:doctor_app_flutter/core/enum/PatientType.dart'; +import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/referral/referred_patient_detail_in-paint.dart'; @@ -11,7 +12,6 @@ import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; - import '../../../../widgets/shared/errors/error_message.dart'; class ReferredPatientScreen extends StatefulWidget { @@ -49,16 +49,15 @@ class _ReferredPatientScreenState extends State { }, ), ), - model.listMyReferredPatientModel == null || - model.listMyReferredPatientModel.length == 0 - ? Center( + if (model.listMyReferredPatientModel == null || + model.listMyReferredPatientModel.length == 0) Center( child: ErrorMessage( error: TranslationBase.of(context).referralEmptyMsg, - )) - : Expanded( + )) else Expanded( child: SingleChildScrollView( // DoctorApplication.svc/REST/GtMyReferredPatient child: Container( + child: Column( children: [ ListView.builder( @@ -86,23 +85,30 @@ class _ReferredPatientScreenState extends State { referralStatusCode: model .getReferredPatientItem(index) .referralStatus, - patientName: - "${model.getReferredPatientItem(index).firstName} ${model.getReferredPatientItem(index).middleName} ${model.getReferredPatientItem(index).lastName}", + patientName: "${model.getReferredPatientItem(index).firstName} ${model.getReferredPatientItem(index).middleName} ${model.getReferredPatientItem(index).lastName}", + patientGender: model .getReferredPatientItem(index) .gender, - referredDate: AppDateUtils - .convertDateFromServerFormat( - model - .getReferredPatientItem(index) - .referralDate, - "dd/MM/yyyy"), - referredTime: AppDateUtils - .convertDateFromServerFormat( - model - .getReferredPatientItem(index) - .referralDate, - "hh:mm a"), + referredDate: model.state == ViewState.BusyLocal ?"": + AppDateUtils.getDayMonthYearDateFormatted( + patientType == PatientType.IN_PATIENT? + AppDateUtils.getDateTimeFromServerFormat( + model.getReferredPatientItem(index).referralDate, + ):AppDateUtils.getDateTimeFromString( + model.getReferredPatientItem(index).referralDate, + ), + isMonthShort: true + ), + referredTime:model.state == ViewState.BusyLocal ?"":AppDateUtils.getHour( + patientType == PatientType.IN_PATIENT? + AppDateUtils.getDateTimeFromServerFormat( + model.getReferredPatientItem(index).referralDate, + ):AppDateUtils.getDateTimeFromString( + model.getReferredPatientItem(index).referralDate, + ), + // isMonthShort: true + ), patientID: "${model.getReferredPatientItem(index).patientID}", isSameBranch: model @@ -121,8 +127,8 @@ class _ReferredPatientScreenState extends State { doctorAvatar: model .getReferredPatientItem(index) .doctorImageURL, - referralDoctorName: - "${TranslationBase.of(context).dr} ${model.getReferredPatientItem(index).referralDoctorName}", + referralDoctorName: "${TranslationBase.of(context).dr} ${model.getReferredPatientItem(index).referralDoctorName}", + clinicDescription: model .getReferredPatientItem(index) .referralClinicDescription, diff --git a/lib/screens/patients/profile/referral/referred_patient_detail_in-paint.dart b/lib/screens/patients/profile/referral/referred_patient_detail_in-paint.dart index 401da0aa..518c9f9c 100644 --- a/lib/screens/patients/profile/referral/referred_patient_detail_in-paint.dart +++ b/lib/screens/patients/profile/referral/referred_patient_detail_in-paint.dart @@ -4,8 +4,8 @@ import 'package:doctor_app_flutter/core/enum/PatientType.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; -import 'package:doctor_app_flutter/models/patient/my_referral/my_referred_patient_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/my_referral/my_referred_patient_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; @@ -15,7 +15,6 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:flutter/material.dart'; - import '../../../../routes.dart'; class ReferredPatientDetailScreen extends StatelessWidget { @@ -156,7 +155,7 @@ class ReferredPatientDetailScreen extends StatelessWidget { fontSize: 1.9 * SizeConfig.textMultiplier, fontWeight: FontWeight.w700, color: referredPatient.referralStatus == 1 - ? Color(0xffc4aa54) + ? AppGlobal.inProgressColor : referredPatient.referralStatus == 46 ? AppGlobal.appGreenColor : Colors.red[700], 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 bef369f8..dc18fe9c 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 @@ -4,12 +4,12 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.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/PatchAssessmentReqModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/post_assessment_request_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_assement.dart'; -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/core/model/SOAP/PatchAssessmentReqModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/post_assessment_request_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_assement.dart'; +import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; +import 'package:doctor_app_flutter/core/model/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/shared_soap_widgets/bottom_sheet_dialog_button.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart'; diff --git a/lib/screens/patients/profile/soap_update/assessment/update_assessment_page.dart b/lib/screens/patients/profile/soap_update/assessment/update_assessment_page.dart index c7e82b5f..22a32070 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 @@ -3,9 +3,9 @@ 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/icons_app/doctor_app_icons.dart'; -import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_assement.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_assement.dart'; +import 'package:doctor_app_flutter/core/model/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/shared_soap_widgets/remark_text.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/soap_utils.dart'; @@ -142,318 +142,327 @@ class _UpdateAssessmentPageState extends State return Container( margin: EdgeInsets.only( left: 5, right: 5, top: 15, bottom: 15), - child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - crossAxisAlignment: - CrossAxisAlignment.start, + child: Column( children: [ - Column( - crossAxisAlignment: - CrossAxisAlignment.start, + Row( + children: [ - RichText( - text: new TextSpan( - style: new TextStyle( - fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3.6, - color: Color(0xFF2E303A), - fontFamily: 'Poppins', - fontWeight: FontWeight.w600, - letterSpacing: -0.4), - children: [ - new TextSpan( - text: "ICD : ".toUpperCase(), - ), - new TextSpan( - text: assessment - .selectedICD.code - .trim() - .toUpperCase() ?? - ""), - ], - ), - ), - Container( - width: MediaQuery.of(context) - .size - .width * - 0.50, - child: RichText( - text: new TextSpan( - style: new TextStyle( - fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 5, - color: Color(0xFF2E303A), - fontFamily: 'Poppins', - fontWeight: FontWeight.w600, - letterSpacing: -0.64, - ), - children: [ - new TextSpan( - text: assessment - .selectedICD.description - .toString(), - ), - ], - ), - ), - ), - RichText( - text: new TextSpan( - style: new TextStyle( + RichText( + text: new TextSpan( + style: new TextStyle( fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3.5, + .getTextMultiplierBasedOnWidth() * + 3.6, color: Color(0xFF2E303A), fontFamily: 'Poppins', fontWeight: FontWeight.w600, + letterSpacing: -0.4), + children: [ + new TextSpan( + text: "ICD : ".toUpperCase(), ), - children: [ - new TextSpan( - text: TranslationBase.of( - context) - .appointmentNo, - style: new TextStyle( - fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3, - letterSpacing: -0.4, - color: Color(0xFF575757), - ), - ), - new TextSpan( - text: assessment.appointmentId - .toString() ?? - "", - style: new TextStyle( - fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3.6, - letterSpacing: -0.48, - color: Color(0xFF2B353E), - ), - ), - ], - ), + new TextSpan( + text: assessment + .selectedICD.code + .trim() + .toUpperCase() ?? + ""), + ], ), - RichText( - text: new TextSpan( - style: new TextStyle( - fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3, - color: Color(0xFF2E303A), - fontFamily: 'Poppins', - fontWeight: FontWeight.w600), - children: [ - new TextSpan( - text: TranslationBase.of( - context) - .condition + - " : ", - style: new TextStyle( - letterSpacing: -0.4, - color: Color(0xFF575757), + ), + Column( + crossAxisAlignment: + CrossAxisAlignment.end, + children: [ + AppText( + assessment.createdOn != null + ? AppDateUtils + .getDayMonthYearDateFormatted( + DateTime.parse( + assessment + .createdOn), isMonthShort: true) + : AppDateUtils + .getDayMonthYearDateFormatted( + DateTime.now()), + fontWeight: FontWeight.w600, + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3.6, + ), + AppText( + assessment.createdOn != null + ? AppDateUtils.getHour( + DateTime.parse( + assessment + .createdOn)) + : AppDateUtils.getHour( + DateTime.now()), + fontWeight: FontWeight.w600, + color: Color(0xFF575757), + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3.6, + ), + ], + ), + ], + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + + Container( + width: MediaQuery.of(context) + .size + .width * + 0.50, + child: RichText( + text: new TextSpan( + style: new TextStyle( + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 4.3, + color: Color(0xFF2E303A), + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + letterSpacing: -0.64, + ), + children: [ + new TextSpan( + text: assessment + .selectedICD.description + .toString(), + ), + ], ), ), - new TextSpan( - text: projectViewModel - .isArabic - ? assessment - .selectedDiagnosisCondition - .nameAr - : assessment - .selectedDiagnosisCondition - .nameEn, + ), + RichText( + text: new TextSpan( style: new TextStyle( fontSize: SizeConfig .getTextMultiplierBasedOnWidth() * - 3.6, - letterSpacing: -0.48, - color: Color(0xFF2B353E), + 3.5, + color: Color(0xFF2E303A), + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, ), - ), - ], - ), - ), - RichText( - text: new TextSpan( - style: new TextStyle( - fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3, - color: Color(0xFF2E303A), - fontFamily: 'Poppins', - fontWeight: FontWeight.w600), - children: [ - new TextSpan( - text: TranslationBase.of( + children: [ + new TextSpan( + text: TranslationBase.of( context) - .dType + - ' : ', - style: new TextStyle( - letterSpacing: -0.4, - color: Color(0xFF575757), - ), + .appointmentNo, + style: new TextStyle( + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3, + letterSpacing: -0.4, + color: Color(0xFF575757), + ), + ), + new TextSpan( + text: assessment.appointmentId + .toString() ?? + "", + style: new TextStyle( + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3.6, + letterSpacing: -0.48, + color: Color(0xFF2B353E), + ), + ), + ], ), - new TextSpan( - text: projectViewModel - .isArabic - ? assessment - .selectedDiagnosisType - .nameAr - : assessment - .selectedDiagnosisType - .nameEn, + ), + RichText( + text: new TextSpan( style: new TextStyle( - fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3.6, - letterSpacing: -0.48, - color: Color(0xFF2B353E), - ), - ), - ], - ), - ), - if (assessment.doctorName != null) - RichText( - text: new TextSpan( - style: new TextStyle( - fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3.6, - color: Color(0xFF2E303A), - fontFamily: 'Poppins', - fontWeight: - FontWeight.w600), - children: [ - new TextSpan( - text: TranslationBase.of( - context) - .doctor + - ' : ', - style: new TextStyle( fontSize: SizeConfig .getTextMultiplierBasedOnWidth() * 3, - letterSpacing: -0.4, - color: Color(0xFF575757), + color: Color(0xFF2E303A), + fontFamily: 'Poppins', + fontWeight: FontWeight.w600), + children: [ + new TextSpan( + text: TranslationBase.of( + context) + .condition + + " : ", + style: new TextStyle( + letterSpacing: -0.4, + color: Color(0xFF575757), + ), ), - ), - new TextSpan( - text: - assessment.doctorName ?? - '', - style: new TextStyle( + new TextSpan( + text: projectViewModel + .isArabic + ? assessment + .selectedDiagnosisCondition + .nameAr + : assessment + .selectedDiagnosisCondition + .nameEn, + style: new TextStyle( + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3.6, + letterSpacing: -0.48, + color: Color(0xFF2B353E), + ), + ), + ], + ), + ), + RichText( + text: new TextSpan( + style: new TextStyle( fontSize: SizeConfig .getTextMultiplierBasedOnWidth() * - 3.6, - letterSpacing: -0.48, - color: Color(0xFF2B353E), + 3, + color: Color(0xFF2E303A), + fontFamily: 'Poppins', + fontWeight: FontWeight.w600), + children: [ + new TextSpan( + text: TranslationBase.of( + context) + .dType + + ' : ', + style: new TextStyle( + letterSpacing: -0.4, + color: Color(0xFF575757), + ), ), - ), - ], + new TextSpan( + text: projectViewModel + .isArabic + ? assessment + .selectedDiagnosisType + .nameAr + : assessment + .selectedDiagnosisType + .nameEn, + style: new TextStyle( + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3.6, + letterSpacing: -0.48, + color: Color(0xFF2B353E), + ), + ), + ], + ), ), - ), - SizedBox( - height: 6, - ), - Row( - mainAxisAlignment: - MainAxisAlignment.start, - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ + if (assessment.doctorName != null) + RichText( + text: new TextSpan( + style: new TextStyle( + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3.6, + color: Color(0xFF2E303A), + fontFamily: 'Poppins', + fontWeight: + FontWeight.w600), + children: [ + new TextSpan( + text: TranslationBase.of( + context) + .doctor + + ' : ', + style: new TextStyle( + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3, + letterSpacing: -0.4, + color: Color(0xFF575757), + ), + ), + new TextSpan( + text: + assessment.doctorName ?? + '', + style: new TextStyle( + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3.6, + letterSpacing: -0.48, + color: Color(0xFF2B353E), + ), + ), + ], + ), + ), SizedBox( height: 6, ), - AppText( - (assessment.remark != null && - assessment.remark != - '') - ? TranslationBase.of( - context) - .remarks + - " : " - : '', - fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3, - color: Color(0xFF2E303A), - fontFamily: 'Poppins', - fontWeight: FontWeight.w600), - RemarkText( - remark: assessment.remark ?? "", - ), - ], - ), - ], - ), - Column( - crossAxisAlignment: - CrossAxisAlignment.end, - children: [ - Row( - children: [ - Column( + Row( + mainAxisAlignment: + MainAxisAlignment.start, crossAxisAlignment: - CrossAxisAlignment.end, + CrossAxisAlignment.start, children: [ - AppText( - assessment.createdOn != null - ? AppDateUtils - .getDayMonthYearDateFormatted( - DateTime.parse( - assessment - .createdOn)) - : AppDateUtils - .getDayMonthYearDateFormatted( - DateTime.now()), - fontWeight: FontWeight.w600, - fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3.6, + SizedBox( + height: 6, ), AppText( - assessment.createdOn != null - ? AppDateUtils.getHour( - DateTime.parse( - assessment - .createdOn)) - : AppDateUtils.getHour( - DateTime.now()), - fontWeight: FontWeight.w600, - color: Color(0xFF575757), - fontSize: SizeConfig - .getTextMultiplierBasedOnWidth() * - 3.6, + (assessment.remark != null && + assessment.remark != + '') + ? TranslationBase.of( + context) + .remarks + + " : " + : '', + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3, + color: Color(0xFF2E303A), + fontFamily: 'Poppins', + fontWeight: FontWeight.w600), + RemarkText( + remark: assessment.remark ?? "", ), ], ), ], ), - SizedBox( - height: MediaQuery.of(context) - .size - .height * - 0.05, + Column( + crossAxisAlignment: + CrossAxisAlignment.end, + children: [ + + SizedBox( + height: MediaQuery.of(context) + .size + .height * + 0.05, + ), + InkWell( + onTap: () { + openAssessmentDialog(context, + isUpdate: true, + assessment: assessment, + model: model); + }, + child: Icon( + DoctorApp.edit, + size: 18, + ), + ) + ], ), - InkWell( - onTap: () { - openAssessmentDialog(context, - isUpdate: true, - assessment: assessment, - model: model); - }, - child: Icon( - DoctorApp.edit, - size: 18, - ), - ) ], ), ], diff --git a/lib/screens/patients/profile/soap_update/objective/add_examination_page.dart b/lib/screens/patients/profile/soap_update/objective/add_examination_page.dart index 81b296d3..59bf42c7 100644 --- a/lib/screens/patients/profile/soap_update/objective/add_examination_page.dart +++ b/lib/screens/patients/profile/soap_update/objective/add_examination_page.dart @@ -1,8 +1,8 @@ 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'; -import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_examination.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_examination.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_dialog_button.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart'; diff --git a/lib/screens/patients/profile/soap_update/objective/add_examination_widget.dart b/lib/screens/patients/profile/soap_update/objective/add_examination_widget.dart index 18e5d154..fa174f42 100644 --- a/lib/screens/patients/profile/soap_update/objective/add_examination_widget.dart +++ b/lib/screens/patients/profile/soap_update/objective/add_examination_widget.dart @@ -1,8 +1,8 @@ // ignore: must_be_immutable import 'package:doctor_app_flutter/config/size_config.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/selected_items/my_selected_examination.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_examination.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart'; diff --git a/lib/screens/patients/profile/soap_update/objective/examination_item_card.dart b/lib/screens/patients/profile/soap_update/objective/examination_item_card.dart index 89691cf2..193aea9d 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 @@ -1,7 +1,7 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_examination.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_examination.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/remark_text.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/remove_button.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.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 index b7f7ef2a..edc3dcce 100644 --- 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 @@ -1,5 +1,5 @@ -import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_examination.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_examination.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart'; 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 bb30eebc..0be5d2a6 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 @@ -4,11 +4,11 @@ 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'; -import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/post_physical_exam_request_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_examination.dart'; -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/core/model/SOAP/master_key_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/post_physical_exam_request_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_examination.dart'; +import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; +import 'package:doctor_app_flutter/core/model/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/soap_utils.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; diff --git a/lib/screens/patients/profile/soap_update/plan/update_plan_page.dart b/lib/screens/patients/profile/soap_update/plan/update_plan_page.dart index 37a6096e..22f18b3e 100644 --- a/lib/screens/patients/profile/soap_update/plan/update_plan_page.dart +++ b/lib/screens/patients/profile/soap_update/plan/update_plan_page.dart @@ -3,11 +3,11 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteReqModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteResModel.dart'; -import 'package:doctor_app_flutter/models/SOAP/post_progress_note_request_model.dart'; -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/core/model/SOAP/GetGetProgressNoteReqModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GetGetProgressNoteResModel.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/post_progress_note_request_model.dart'; +import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; +import 'package:doctor_app_flutter/core/model/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/plan/plan_call_back.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; diff --git a/lib/screens/patients/profile/soap_update/shared_soap_widgets/SOAP_step_header.dart b/lib/screens/patients/profile/soap_update/shared_soap_widgets/SOAP_step_header.dart index da7453b2..7d9e3d82 100644 --- a/lib/screens/patients/profile/soap_update/shared_soap_widgets/SOAP_step_header.dart +++ b/lib/screens/patients/profile/soap_update/shared_soap_widgets/SOAP_step_header.dart @@ -1,5 +1,5 @@ import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/steper/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/shared_soap_widgets/bottom_sheet_dialog_button.dart b/lib/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_dialog_button.dart index 92275fb4..440e1e3e 100644 --- a/lib/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_dialog_button.dart +++ b/lib/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_dialog_button.dart @@ -3,6 +3,8 @@ import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dar import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; +import '../../../../../config/config.dart'; + class BottomSheetDialogButton extends StatelessWidget { final Function onTap; final String label; @@ -33,7 +35,7 @@ class BottomSheetDialogButton extends StatelessWidget { child: Center( child: AppButton( title: label, - color: Color(0xFF359846), + color: AppGlobal.appGreenColor, onPressed: onTap, ), ), diff --git a/lib/screens/patients/profile/soap_update/shared_soap_widgets/steper/status_Label.dart b/lib/screens/patients/profile/soap_update/shared_soap_widgets/steper/status_Label.dart index ea75d348..95b3d061 100644 --- a/lib/screens/patients/profile/soap_update/shared_soap_widgets/steper/status_Label.dart +++ b/lib/screens/patients/profile/soap_update/shared_soap_widgets/steper/status_Label.dart @@ -4,6 +4,8 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; +import '../../../../../../config/config.dart'; + class StatusLabel extends StatelessWidget { const StatusLabel({ Key key, @@ -39,11 +41,11 @@ class StatusLabel extends StatelessWidget { : TranslationBase.of(context).locked, fontWeight: FontWeight.bold, textAlign: TextAlign.center, - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 2.7, + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 2.5, color: stepId == selectedStepId ? Color(0xFFCC9B14) : stepId < selectedStepId - ? Color(0xFF359846) + ? AppGlobal.appGreenColor : Color(0xFF969696), ), ), diff --git a/lib/screens/patients/profile/soap_update/shared_soap_widgets/steper/steps_widget.dart b/lib/screens/patients/profile/soap_update/shared_soap_widgets/steper/steps_widget.dart index bd31e4ce..cb1cb2f1 100644 --- a/lib/screens/patients/profile/soap_update/shared_soap_widgets/steper/steps_widget.dart +++ b/lib/screens/patients/profile/soap_update/shared_soap_widgets/steper/steps_widget.dart @@ -1,12 +1,13 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/steper/status_Label.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:provider/provider.dart'; +import '../../../../../../config/config.dart'; import 'Step_details_widget.dart'; class StepsWidget extends StatelessWidget { @@ -85,7 +86,7 @@ class StepsWidget extends StatelessWidget { color: index == 0 ? Color(0xFFCC9B14) : index > 0 - ? Color(0xFF359846) + ? AppGlobal.appGreenColor : Color(0xFFCCCCCC), ), child: Center( @@ -137,7 +138,7 @@ class StepsWidget extends StatelessWidget { color: index == 1 ? Color(0xFFCC9B14) : index > 1 - ? Color(0xFF359846) + ? AppGlobal.appGreenColor : Color(0xFFCCCCCC), ), child: Center( @@ -192,7 +193,7 @@ class StepsWidget extends StatelessWidget { color: index == 2 ? Color(0xFFCC9B14) : index > 2 - ? Color(0xFF359846) + ? AppGlobal.appGreenColor : Color(0xFFCCCCCC), ), child: Center( @@ -245,7 +246,7 @@ class StepsWidget extends StatelessWidget { color: index == 3 ? Color(0xFFCC9B14) : index > 3 - ? Color(0xFF359846) + ? AppGlobal.appGreenColor : Color(0xFFCCCCCC), ), child: Center( @@ -323,7 +324,7 @@ class StepsWidget extends StatelessWidget { color: index == 0 ? Color(0xFFCC9B14) : index > 0 - ? Color(0xFF359846) + ? AppGlobal.appGreenColor : Color(0xFFCCCCCC), ), child: Center( @@ -375,7 +376,7 @@ class StepsWidget extends StatelessWidget { color: index == 1 ? Color(0xFFCC9B14) : index > 1 - ? Color(0xFF359846) + ? AppGlobal.appGreenColor : Color(0xFFCCCCCC), ), child: Center( diff --git a/lib/screens/patients/profile/soap_update/soap_utils.dart b/lib/screens/patients/profile/soap_update/soap_utils.dart index 77ba1028..29ed59d7 100644 --- a/lib/screens/patients/profile/soap_update/soap_utils.dart +++ b/lib/screens/patients/profile/soap_update/soap_utils.dart @@ -1,7 +1,7 @@ -import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_allergy.dart'; -import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_assement.dart'; -import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_examination.dart'; -import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_history.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_allergy.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_assement.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_examination.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_history.dart'; class SoapUtils { static MySelectedHistory generateMySelectedHistory( 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 09495bb6..6d8ff628 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 @@ -2,8 +2,8 @@ import 'package:autocomplete_textfield/autocomplete_textfield.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'; -import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_allergy.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_allergy.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_dialog_button.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; diff --git a/lib/screens/patients/profile/soap_update/subjective/allergies/allergies_item.dart b/lib/screens/patients/profile/soap_update/subjective/allergies/allergies_item.dart index 7d22fa26..72b198b6 100644 --- a/lib/screens/patients/profile/soap_update/subjective/allergies/allergies_item.dart +++ b/lib/screens/patients/profile/soap_update/subjective/allergies/allergies_item.dart @@ -1,8 +1,8 @@ import 'package:doctor_app_flutter/config/size_config.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/selected_items/my_selected_allergy.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_allergy.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; diff --git a/lib/screens/patients/profile/soap_update/subjective/allergies/master_key_checkbox_search_allergies_widget.dart b/lib/screens/patients/profile/soap_update/subjective/allergies/master_key_checkbox_search_allergies_widget.dart index 44456897..3f00cbc8 100644 --- a/lib/screens/patients/profile/soap_update/subjective/allergies/master_key_checkbox_search_allergies_widget.dart +++ b/lib/screens/patients/profile/soap_update/subjective/allergies/master_key_checkbox_search_allergies_widget.dart @@ -1,6 +1,6 @@ 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/selected_items/my_selected_allergy.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_allergy.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart'; 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 283907bd..84bd1c9b 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,6 +1,6 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_allergy.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_allergy.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/remark_text.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/remove_button.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; 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 b10d831d..9d6c5ddc 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 @@ -1,8 +1,8 @@ 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'; -import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_history.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_history.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_dialog_button.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/soap_utils.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 07b83abb..e7438c65 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,7 +1,7 @@ import 'package:doctor_app_flutter/config/size_config.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/selected_items/my_selected_history.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_history.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/remove_button.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/subjective/medication/add_medication.dart b/lib/screens/patients/profile/soap_update/subjective/medication/add_medication.dart index 72330be3..f8c3527d 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 @@ -5,7 +5,7 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/model/search_drug/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/core/model/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_dialog_button.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; 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 9fe4cf64..a8889849 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,4 +1,4 @@ -import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_allergy.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_allergy.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:flutter/material.dart'; 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 fd5e6b45..075126fb 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,10 +1,10 @@ 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/selected_items/my_selected_allergy.dart'; -import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_history.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_allergy.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_history.dart'; +import 'package:doctor_app_flutter/core/model/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/soap_utils.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/subjective/subjective_call_back.dart'; diff --git a/lib/screens/patients/profile/soap_update/update_soap_index.dart b/lib/screens/patients/profile/soap_update/update_soap_index.dart index fd6a62d8..acd1e827 100644 --- a/lib/screens/patients/profile/soap_update/update_soap_index.dart +++ b/lib/screens/patients/profile/soap_update/update_soap_index.dart @@ -1,13 +1,13 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_allergy.dart'; -import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_history.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_allergy.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_history.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/subjective/update_subjective_page.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:flutter/cupertino.dart'; diff --git a/lib/screens/patients/profile/vital_sign/LineChartCurved.dart b/lib/screens/patients/profile/vital_sign/LineChartCurved.dart index 8fa55b37..d1fcfef1 100644 --- a/lib/screens/patients/profile/vital_sign/LineChartCurved.dart +++ b/lib/screens/patients/profile/vital_sign/LineChartCurved.dart @@ -16,8 +16,8 @@ class LineChartCurved extends StatelessWidget { List yAxixs = List(); // DateFormat format = DateFormat("yyyy-MM-dd"); - DateFormat yearFormat = DateFormat("yyyy/MMM"); - DateFormat monthFormat = DateFormat("MMM"); + DateFormat yearFormat = DateFormat("yyyy/MMM/dd"); + DateFormat monthFormat = DateFormat("dd/MMM"); bool isDatesSameYear = true; @override @@ -96,6 +96,7 @@ class LineChartCurved extends StatelessWidget { } } + LineChartData sampleData1(context) { return LineChartData( lineTouchData: LineTouchData( @@ -162,31 +163,25 @@ class LineChartCurved extends StatelessWidget { return ''; }, ), - leftTitles: SideTitles( - showTitles: true, - getTextStyles: (context, value) { - return TextStyle( + leftTitles: SideTitles( + showTitles: true, + getTextStyles: (cxt, value) => const TextStyle( color: Colors.black, + fontWeight: FontWeight.bold, fontSize: 10, - ); - }, - getTitles: (value) { - // if (timeSeries.length < 10) { - // return '${value.toInt()}'; - // } else { - // if (value == getMinY()) - // return '${value.toInt()}'; - // if (value == getMaxY()) + ), + interval:getInterval(), + + // getTitles: (value) { + // if (value.toInt() == 0) // return '${value.toInt()}'; - // if (yAxixs.contains(value)) { + // else if (value.toInt() % horizontalInterval == 0) // return '${value.toInt()}'; - // } - // return ''; - // } - return '${value.toInt()}'; - }, - margin: 12, - ), + // else + // return ''; + // }, + margin: 12, + ), ), borderData: FlBorderData( show: true, @@ -208,12 +203,44 @@ class LineChartCurved extends StatelessWidget { ), minX: 0, maxX: (timeSeries.length - 1).toDouble(), - maxY: getMaxY() + 0.3, - minY: getMinY(), + maxY: getMaxY() + getInterval(), + minY: 0, lineBarsData: getData(context), ); } + // double getMaxY() { + // double max = 0; + // timeSeries.forEach((element) { + // double resultValueDouble = element.sales; + // if (resultValueDouble > max) max = resultValueDouble; + // }); + // + // return max.roundToDouble(); + // } + // + // double getMinY() { + // double min = timeSeries[0].sales; + // timeSeries.forEach((element) { + // double resultValueDouble = element.sales; + // if (resultValueDouble < min) min = resultValueDouble; + // }); + // int value = min.toInt(); + // + // return value.toDouble(); + // } + + + double getInterval(){ + + return getMaxY() - getMinY() <= 100 + ? 20 + : getMaxY() - getMinY() <= 1000 + ? 100 + : 200; + + } + double getMaxY() { double max = 0; timeSeries.forEach((element) { diff --git a/lib/screens/patients/profile/vital_sign/LineChartCurvedBloodPressure.dart b/lib/screens/patients/profile/vital_sign/LineChartCurvedBloodPressure.dart index 0af3c575..a84cd045 100644 --- a/lib/screens/patients/profile/vital_sign/LineChartCurvedBloodPressure.dart +++ b/lib/screens/patients/profile/vital_sign/LineChartCurvedBloodPressure.dart @@ -168,12 +168,12 @@ class LineChartCurvedBloodPressure extends StatelessWidget { ), leftTitles: SideTitles( showTitles: true, - getTextStyles: (context, value) { - return TextStyle( - color: Colors.black, - fontSize: 10, - ); - }, + getTextStyles: (cxt, value) => const TextStyle( + color: Colors.black, + fontWeight: FontWeight.bold, + fontSize: 10, + ), + interval:getInterval(), getTitles: (value) { return '${value.toInt()}'; }, @@ -199,23 +199,31 @@ class LineChartCurvedBloodPressure extends StatelessWidget { ), ), minX: 0, - maxX: (timeSeries1.length - 1).toDouble(), - maxY: getMaxY() + 0.3, - minY: getMinY(), + maxX: 0, + maxY: getMaxY() + getInterval(), + minY: 0, lineBarsData: getData(context), ); } + double getInterval(){ + + return getMaxY() - getMinY() <= 100 + ? 20 + : getMaxY() - getMinY() <= 1000 + ? 100 + : 200; + + } + + + double getMaxY() { double max = 0; timeSeries1.forEach((element) { double resultValueDouble = element.sales; if (resultValueDouble > max) max = resultValueDouble; }); - timeSeries2.forEach((element) { - double resultValueDouble = element.sales; - if (resultValueDouble > max) max = resultValueDouble; - }); return max.roundToDouble(); } @@ -226,15 +234,39 @@ class LineChartCurvedBloodPressure extends StatelessWidget { double resultValueDouble = element.sales; if (resultValueDouble < min) min = resultValueDouble; }); - timeSeries2.forEach((element) { - double resultValueDouble = element.sales; - if (resultValueDouble < min) min = resultValueDouble; - }); - int value = min.toInt(); return value.toDouble(); } + // double getMaxY() { + // double max = 0; + // timeSeries1.forEach((element) { + // double resultValueDouble = element.sales; + // if (resultValueDouble > max) max = resultValueDouble; + // }); + // timeSeries2.forEach((element) { + // double resultValueDouble = element.sales; + // if (resultValueDouble > max) max = resultValueDouble; + // }); + // + // return max.roundToDouble(); + // } + // + // double getMinY() { + // double min = timeSeries1[0].sales; + // timeSeries1.forEach((element) { + // double resultValueDouble = element.sales; + // if (resultValueDouble < min) min = resultValueDouble; + // }); + // timeSeries2.forEach((element) { + // double resultValueDouble = element.sales; + // if (resultValueDouble < min) min = resultValueDouble; + // }); + // + // int value = min.toInt(); + // + // return value.toDouble(); + // } List getData(context) { List spots = List(); diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_detail_pain_scale.dart b/lib/screens/patients/profile/vital_sign/vital_sign_detail_pain_scale.dart index af67f3e3..f4ea6d75 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_detail_pain_scale.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_detail_pain_scale.dart @@ -1,6 +1,6 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-vital-sign-viewmodel.dart'; -import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart'; +import 'package:doctor_app_flutter/core/model/patient/vital_sign/patient-vital-sign-history.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; @@ -79,14 +79,18 @@ class VitalSignDetailPainScale extends StatelessWidget { margin: EdgeInsets.symmetric(horizontal: 16), padding: EdgeInsets.only(left: 8), child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ Expanded( flex: 2, child: Column( crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, children: [ Row( mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ Expanded( child: Container( @@ -268,13 +272,24 @@ class VitalSignDetailPainScale extends StatelessWidget { ), Expanded( child: Container( - padding: EdgeInsets.all(8), + padding: EdgeInsets.symmetric(horizontal: 8), child: Center( - child: AppText( - "${AppDateUtils.convertDateFromServerFormat(vitalList[index].createdOn, "E , dd MMM, yyyy hh:mm a")}", - fontWeight: FontWeight.w700, - color: Color(0XFF28353E), - fontSize: SizeConfig.textMultiplier * 1.6, + child: Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + AppText( + "${AppDateUtils.convertDateFromServerFormat(vitalList[index].createdOn, "E , dd MMM")}", + fontWeight: FontWeight.w700, + color: Color(0XFF28353E), + fontSize: SizeConfig.textMultiplier * 1.6, + ), + AppText( + "${AppDateUtils.convertDateFromServerFormat(vitalList[index].createdOn, "hh:mm a")}", + fontWeight: FontWeight.w700, + color: Color(0XFF28353E), + fontSize: SizeConfig.textMultiplier * 1.6, + ), + ], ), ), ), diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_details_blood_pressurewideget.dart b/lib/screens/patients/profile/vital_sign/vital_sign_details_blood_pressurewideget.dart index ab10a76e..5042f707 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_details_blood_pressurewideget.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_details_blood_pressurewideget.dart @@ -1,6 +1,6 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart'; +import 'package:doctor_app_flutter/core/model/patient/vital_sign/patient-vital-sign-history.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart b/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart index 33c796b0..1bfe3643 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart @@ -3,12 +3,12 @@ import 'package:doctor_app_flutter/core/service/AnalyticsService.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-vital-sign-viewmodel.dart'; import 'package:doctor_app_flutter/locator.dart'; import 'package:doctor_app_flutter/lookups/patient_lookup.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_item.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart'; diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_details_wideget.dart b/lib/screens/patients/profile/vital_sign/vital_sign_details_wideget.dart index 085a11ba..37b1552b 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_details_wideget.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_details_wideget.dart @@ -1,6 +1,6 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart'; +import 'package:doctor_app_flutter/core/model/patient/vital_sign/patient-vital-sign-history.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart b/lib/screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart index 26f418e8..d0c13672 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart @@ -1,13 +1,13 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/lookups/patient_lookup.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; -import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/vital_sign/patient-vital-sign-history.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_detail_pain_scale.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; diff --git a/lib/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart b/lib/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart index 4c0d07af..c0db764c 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart @@ -1,5 +1,5 @@ import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart'; +import 'package:doctor_app_flutter/core/model/patient/vital_sign/patient-vital-sign-history.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_details_wideget.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; diff --git a/lib/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart b/lib/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart index 92483ff4..aac05ceb 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart @@ -1,5 +1,5 @@ import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart'; +import 'package:doctor_app_flutter/core/model/patient/vital_sign/patient-vital-sign-history.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_details_blood_pressurewideget.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; diff --git a/lib/screens/patients/profile/vte_assessment/vte_assessment_screen.dart b/lib/screens/patients/profile/vte_assessment/vte_assessment_screen.dart new file mode 100644 index 00000000..e619185e --- /dev/null +++ b/lib/screens/patients/profile/vte_assessment/vte_assessment_screen.dart @@ -0,0 +1,282 @@ +import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; +import 'package:doctor_app_flutter/core/model/diagnosis/GetDiagnosisForInPatientRequestModel.dart'; +import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/profile/vte_assessment_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); + +class VteAssessmentScreen extends StatefulWidget { + const VteAssessmentScreen({Key key}) : super(key: key); + + @override + _ProgressNoteState createState() => _ProgressNoteState(); +} + +class _ProgressNoteState extends State { + bool isDischargedPatient = false; + AuthenticationViewModel authenticationViewModel; + ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + authenticationViewModel = Provider.of(context); + projectViewModel = Provider.of(context); + final routeArgs = ModalRoute.of(context).settings.arguments as Map; + PatiantInformtion patient = routeArgs['patient']; + if (routeArgs.containsKey('isDischargedPatient')) + isDischargedPatient = routeArgs['isDischargedPatient']; + return BaseView( + onModelReady: (model) => model.getVteAssessment(patientId: patient.patientId, + // admissionNo: 2016023498 + + admissionNo:int.parse(patient.admissionNo) + ), + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + backgroundColor: Theme.of(context).scaffoldBackgroundColor, + appBar: PatientProfileAppBar( + patient, + isInpatient: true, + ), + body: model.allVteHistoryList == null || + model.allVteHistoryList.length == 0 + ? Center( + child: ErrorMessage( + error: TranslationBase.of(context).noDataAvailable, + ), + ) + : Container( + color: Colors.grey[200], + child: Column( + children: [ + Expanded( + child: Container( + child: ListView.builder( + itemCount: model.allVteHistoryList.length, + itemBuilder: (BuildContext ctxt, int index) { + return FractionallySizedBox( + widthFactor: 0.95, + child: CardWithBgWidget( + hasBorder: false, + bgColor: Colors.transparent, + widget: Column( + children: [ + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + width: MediaQuery.of(context) + .size + .width * + 0.60, + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Row( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + AppText( + model + .allVteHistoryList[ + index].riskScore, + fontWeight: FontWeight.w600, + fontSize: 14, + ), + + ], + ), + ], + ), + ), + Column( + children: [ + AppText( + model + .allVteHistoryList[ + index] + .createdOn != + null + ? AppDateUtils.getDayMonthYearDateFormatted( + AppDateUtils + .getDateTimeFromString(model + .allVteHistoryList[ + index] + .createdOn), + isArabic: + projectViewModel + .isArabic, + isMonthShort: true) + : AppDateUtils + .getDayMonthYearDateFormatted( + DateTime.now(), + isArabic: + projectViewModel + .isArabic), + fontWeight: FontWeight.w600, + fontSize: 14, + isCopyable: true, + ), + AppText( + model + .allVteHistoryList[ + index] + .createdOn != + null + ? AppDateUtils.getHour( + AppDateUtils + .getDateTimeFromString(model + .allVteHistoryList[ + index] + .createdOn)) + : AppDateUtils.getHour( + DateTime.now()), + fontWeight: FontWeight.w600, + fontSize: 14, + isCopyable: true, + ), + ], + crossAxisAlignment: + CrossAxisAlignment.end, + ) + ], + ), + SizedBox( + height: 8, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .VTE_Type + + " : ", + fontSize: 12, + ), + Expanded( + child: AppText( + model + .allVteHistoryList[ + index] + .vTEType, + fontSize: 12, + isCopyable: true, + ), + ), + ]), + SizedBox( + height: 8, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .pharmacology + + " : ", + fontSize: 12, + ), + Expanded( + child: AppText( + model + .allVteHistoryList[ + index] + .pharmacology, + fontSize: 12, + isCopyable: true, + ), + ), + ]), + SizedBox( + height: 8, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .reasonsThrombo + + " : ", + fontSize: 12, + ), + Expanded( + child: AppText( + model + .allVteHistoryList[ + index] + .reasonsThrombo, + fontSize: 12, + isCopyable: true, + ), + ), + ]), + SizedBox( + height: 8, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + "Ambulation Protocol : ", + fontSize: 12, + ), + Expanded( + child: AppText( + model + .allVteHistoryList[ + index] + .ambulationProtocol, + fontSize: 12, + isCopyable: true, + ), + ), + ]) + ], + ), + SizedBox( + height: 20, + ), + ], + ), + ), + ); + }), + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart b/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart index f3d1ba6b..17bdac40 100644 --- a/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart +++ b/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart @@ -6,7 +6,7 @@ import 'package:doctor_app_flutter/core/viewModel/PatientRegistrationViewModel.d import 'package:doctor_app_flutter/core/viewModel/profile/operation_report_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; diff --git a/lib/screens/patients/register_patient/RegisterPatientPage.dart b/lib/screens/patients/register_patient/RegisterPatientPage.dart index 59747e37..671511b9 100644 --- a/lib/screens/patients/register_patient/RegisterPatientPage.dart +++ b/lib/screens/patients/register_patient/RegisterPatientPage.dart @@ -158,8 +158,8 @@ class _RegisterPatientPageState extends State hasBorder: true, vPadding: 12, hPadding: 8, - borderColor: Color(0xFF359846), - color: Color(0xFF359846), + borderColor: AppGlobal.appGreenColor, + color: AppGlobal.appGreenColor, fontColor: Colors.white, onPressed: () {}, ), diff --git a/lib/screens/prescription/add_prescription/add_drug/add_drug_widget.dart b/lib/screens/prescription/add_prescription/add_drug/add_drug_widget.dart new file mode 100644 index 00000000..854ec4ae --- /dev/null +++ b/lib/screens/prescription/add_prescription/add_drug/add_drug_widget.dart @@ -0,0 +1,146 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/enum/viewstate.dart'; +import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/medicine_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/prescription/prescription_view_model.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_dialog_button.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart'; +import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; +import 'package:doctor_app_flutter/util/helpers.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'drug_to_drug.dart'; + +class AddDrugWidget extends StatefulWidget { + final PatiantInformtion patient; + final List prescriptionList; + final MedicineViewModel medicineModel; + final PrescriptionViewModel modelPrescription; + final dynamic units; + final dynamic route; + final dynamic frequency; + final dynamic duration; + final dynamic doseTime; + final dynamic uom; + final dynamic x; + final GetMedicationResponseModel selectedMedication; + final String strength; + final String indication; + final String instruction; + final DateTime selectedDate; + + const AddDrugWidget( + {Key key, + this.patient, + this.prescriptionList, + this.medicineModel, + this.modelPrescription, + this.units, + this.route, + this.frequency, + this.duration, + this.doseTime, + this.uom, + this.x, + this.selectedMedication, + this.strength, + this.indication, + this.instruction, + this.selectedDate}) + : super(key: key); + + @override + _AddDrugWidgetState createState() => _AddDrugWidgetState(); +} + +class _AddDrugWidgetState extends State { + @override + Widget build(BuildContext context) { + return AppScaffold( + baseViewModel: widget.medicineModel, + appBar: + BottomSheetTitle(title: TranslationBase.of(context).addMedication), + body: Container( + height: SizeConfig.realScreenHeight * .8, + width: SizeConfig.realScreenWidth, + child: SingleChildScrollView( + child: Column( + children: [ + DrugToDrug( + widget.patient, + widget.medicineModel.getPrescriptionForDrug( + widget.prescriptionList, widget.medicineModel), + widget.medicineModel.patientAssessmentList), + ], + )), + ), + bottomSheet: widget.medicineModel.state == ViewState.BusyLocal || + widget.medicineModel.state == ViewState.Busy + ? Container( + height: 0, + ) + : BottomSheetDialogButton( + label: TranslationBase.of(context).addMedication, + onTap: () async { + GifLoaderDialogUtils.showMyDialog(context); + await widget.medicineModel.postPrescription( + isLocalBusy: true, + icdCode: widget.medicineModel.patientAssessmentList.isNotEmpty + ? widget.medicineModel.patientAssessmentList[0] + .icdCode10ID.isEmpty + ? "test" + : widget.medicineModel.patientAssessmentList[0] + .icdCode10ID + .toString() + : "test", + dose: widget.strength, + doseUnit: + widget.medicineModel.itemMedicineListUnit.length == 1 + ? widget.medicineModel + .itemMedicineListUnit[0]['parameterCode'] + .toString() + : widget.units['parameterCode'].toString(), + patient: widget.patient, + doseTimeIn: widget.doseTime['id'].toString(), + model: widget.modelPrescription, + duration: widget.duration['id'].toString(), + frequency: widget.medicineModel.itemMedicineList.length == 1 + ? widget + .medicineModel.itemMedicineList[0]['parameterCode'] + .toString() + : widget.frequency['parameterCode'].toString(), + route: widget.medicineModel.itemMedicineListRoute.length == 1 + ? widget.medicineModel + .itemMedicineListRoute[0]['parameterCode'] + .toString() + : widget.route['parameterCode'].toString(), + drugId: widget.selectedMedication.itemId.toString(), + strength: widget.strength, + indication: widget.indication, + instruction: widget.instruction, + doseTime: widget.selectedDate, + ); + if (widget.medicineModel.state == ViewState.ErrorLocal) { + GifLoaderDialogUtils.hideDialog(context); + Helpers.showErrorToast(widget.medicineModel.error); + } else if (widget.modelPrescription.state == ViewState.Idle) { + await widget.modelPrescription.getPrescriptionListNew( + appNo: widget.patient.appointmentNo, + mrn: widget.patient.patientMRN, + isLocalBusy: true); + GifLoaderDialogUtils.hideDialog(context); + DrAppToastMsg.showSuccesToast( + TranslationBase.of(context).medicationHasBeenAdded); + Navigator.of(context).pop(); + Navigator.of(context).pop(); + } + }, + ), + ); + } +} diff --git a/lib/screens/prescription/drugtodrug.dart b/lib/screens/prescription/add_prescription/add_drug/drug_to_drug.dart similarity index 66% rename from lib/screens/prescription/drugtodrug.dart rename to lib/screens/prescription/add_prescription/add_drug/drug_to_drug.dart index 78f5afae..2ce61af0 100644 --- a/lib/screens/prescription/drugtodrug.dart +++ b/lib/screens/prescription/add_prescription/add_drug/drug_to_drug.dart @@ -4,13 +4,14 @@ 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'; import 'package:doctor_app_flutter/core/viewModel/patient-vital-sign-viewmodel.dart'; -import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/GeneralGetReqForSOAP.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetAssessmentResModel.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/prescription/prescription_view_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GeneralGetReqForSOAP.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GetAssessmentResModel.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/medicine/medicine_search_screen.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_container.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:flutter/material.dart'; @@ -28,6 +29,7 @@ class DrugToDrug extends StatefulWidget { class _DrugToDrug extends State { int typeID = 1; bool isLoaded = false; + /// TODO Elham* fix this List> expandableList = [ {'name': 'CRITICAL', 'level': 'LEVEL_4'}, {'name': 'HIGH', 'level': 'LEVEL_3'}, @@ -35,18 +37,10 @@ class _DrugToDrug extends State { {'name': 'LOW', 'level': 'LEVEL_1'}, {'name': 'INFO', 'level': 'INFO'}, ]; - GeneralGetReqForSOAP generalGetReqForSOAP = GeneralGetReqForSOAP( - patientMRN: 2954208, - //widget.patient.patientMRN, - episodeId: 210011002, - //widget.patient.episodeNo, - appointmentNo: 2016055308, - //widget.patient.appointmentNo, - doctorID: '', - editedBy: ''); - VitalSignsViewModel model = new VitalSignsViewModel(); - SOAPViewModel model2 = new SOAPViewModel(); + + VitalSignsViewModel vitalSignsViewModel = new VitalSignsViewModel(); + SOAPViewModel soapViewModel = new SOAPViewModel(); @override void initState() { @@ -59,18 +53,18 @@ class _DrugToDrug extends State { Widget build(BuildContext context) { return isLoaded == true ? BaseView( - onModelReady: (model3) => model3.getDrugToDrug( - model.patientVitalSigns, + onModelReady: (prescriptionViewModel) => prescriptionViewModel.getDrugToDrug( + vitalSignsViewModel.patientVitalSigns, widget.listAssessment, - model2.patientAllergiesList, + soapViewModel.patientAllergiesList, widget.patient, widget.prescription), - builder: (BuildContext context, PrescriptionViewModel model3, + builder: (BuildContext context, PrescriptionViewModel prescriptionViewModel, Widget child) => NetworkBaseView( - baseViewModel: model3, + baseViewModel: prescriptionViewModel, child: Container( - height: SizeConfig.realScreenHeight * .4, + height: SizeConfig.realScreenHeight * .9, child: new ListView.builder( itemCount: expandableList.length, itemBuilder: (context, i) { @@ -80,7 +74,7 @@ class _DrugToDrug extends State { ' ' + '(' + getDrugInfo(expandableList[i]['level'], - model3) + prescriptionViewModel) .length .toString() + ')', @@ -88,7 +82,7 @@ class _DrugToDrug extends State { fontWeight: FontWeight.bold, ), children: getDrugInfo( - expandableList[i]['level'], model3) + expandableList[i]['level'], prescriptionViewModel) .map((item) { return Container( padding: EdgeInsets.all(10), @@ -100,10 +94,8 @@ class _DrugToDrug extends State { })))) : Container( height: SizeConfig.realScreenHeight * .45, - child: Center( - child: CircularProgressIndicator( - valueColor: AlwaysStoppedAnimation(Colors.black), - ))); + child: GifLoaderContainer() + ); } getTypeID() async { @@ -114,17 +106,28 @@ class _DrugToDrug extends State { } getRequestedData() async { - await model.getPatientVitalSign(widget.patient); - await model2.getPatientAllergy(generalGetReqForSOAP); - await model2.getMasterLookup(MasterKeysService.DiagnosisType); - if (model.state == ViewState.Idle && model2.state == ViewState.Idle) { + + + GeneralGetReqForSOAP generalGetReqForSOAP = GeneralGetReqForSOAP( + /// TODO Elham* fix this today + patientMRN: widget.patient.patientMRN, + episodeId: widget.patient.episodeNo, + appointmentNo: + widget.patient.appointmentNo, + doctorID: '', + editedBy: ''); + + await vitalSignsViewModel.getPatientVitalSign(widget.patient); + await soapViewModel.getPatientAllergy(generalGetReqForSOAP); + await soapViewModel.getMasterLookup(MasterKeysService.DiagnosisType); + if (vitalSignsViewModel.state == ViewState.Idle && soapViewModel.state == ViewState.Idle) { setState(() { isLoaded = true; }); } } - List getDrugInfo(level, model3) { - return model3.drugToDrug.where((i) => i['Severity'] == level).toList(); + List getDrugInfo(level, prescriptionViewModel) { + return prescriptionViewModel.drugToDrug.where((i) => i['Severity'] == level).toList(); } } diff --git a/lib/screens/prescription/add_prescription/add_prescription.dart b/lib/screens/prescription/add_prescription/add_prescription.dart new file mode 100644 index 00000000..074a01fe --- /dev/null +++ b/lib/screens/prescription/add_prescription/add_prescription.dart @@ -0,0 +1,171 @@ +import 'package:autocomplete_textfield/autocomplete_textfield.dart'; +import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart'; +import 'package:doctor_app_flutter/core/provider/robot_provider.dart'; +import 'package:doctor_app_flutter/core/viewModel/medicine_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/prescription/prescription_view_model.dart'; +import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/screens/prescription/add_prescription/prescription_form_widget.dart'; +import 'package:doctor_app_flutter/screens/prescription/add_prescription/search_preescription_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; +import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; +import 'package:flutter/material.dart'; +import 'package:speech_to_text/speech_to_text.dart' as stt; + +class AddPrescription extends StatefulWidget { + final PrescriptionViewModel prescriptionViewModel; + final PatiantInformtion patient; + final List prescriptionList; + + AddPrescription( + this.prescriptionViewModel, this.patient, this.prescriptionList); + + @override + _AddPrescriptionState createState() => _AddPrescriptionState(); +} + +class _AddPrescriptionState extends State { + String routeError; + String frequencyError; + String doseTimeError; + String durationError; + String unitError; + String strengthError; + int selectedType; + + bool visibilitySearch = true; + + TextEditingController strengthController = TextEditingController(); + TextEditingController unitController = TextEditingController(); + TextEditingController indicationController = TextEditingController(); + TextEditingController instructionController = TextEditingController(); + + bool visibilityPrescriptionForm = false; + + final myController = TextEditingController(); + DateTime selectedDate; + int strengthChar; + GetMedicationResponseModel _selectedMedication; + MedicineViewModel medicineViewModel; + + GlobalKey key = + new GlobalKey>(); + + TextEditingController drugIdController = TextEditingController(); + TextEditingController doseController = TextEditingController(); + final searchController = TextEditingController(); + stt.SpeechToText speech = stt.SpeechToText(); + var event = RobotProvider(); + var recognizedWord; + + final GlobalKey formKey = GlobalKey(); + final double spaceBetweenTextFields = 12; + dynamic route; + dynamic frequency; + dynamic duration; + dynamic doseTime; + dynamic indication; + dynamic units; + dynamic uom; + dynamic box; + dynamic x; + + PatiantInformtion patient; + + @override + Widget build(BuildContext context) { + return BaseView( + builder: ( + BuildContext context, + MedicineViewModel model, + Widget child, + ) => + NetworkBaseView( + baseViewModel: model, + child: GestureDetector( + onTap: () { + FocusScope.of(context).requestFocus(new FocusNode()); + }, + child: DraggableScrollableSheet( + initialChildSize: 0.98, + maxChildSize: 0.98, + minChildSize: 0.9, + builder: + (BuildContext context, ScrollController scrollController) { + return SingleChildScrollView( + child: Container( + height: MediaQuery.of(context).size.height * 1.65, + color: Color(0xffF8F8F8), + child: Padding( + padding: EdgeInsets.symmetric( + horizontal: 12.0, vertical: 10.0), + child: Column( + children: [ + Column( + children: [ + SizedBox( + height: 60, + ), + ], + ), + SizedBox( + height: spaceBetweenTextFields, + ), + Container( + child: Column( + children: [ + Visibility( + visible: visibilitySearch, + child: SearchPrescriptionWidget( + spaceBetweenTextFields: + spaceBetweenTextFields, + medicineViewModel: model, + prescriptionViewModel: + widget.prescriptionViewModel, + onItemSelected: + (GetMedicationResponseModel + medication) async { + setState(() { + visibilitySearch = !visibilitySearch; + _selectedMedication = medication; + }); + GifLoaderDialogUtils.showMyDialog(context); + await model.getAssessmentList(patientInfo: widget.patient, isLocalBusy: true); + GifLoaderDialogUtils.hideDialog(context); + }, + + ), + ), + Visibility( + visible: !visibilitySearch, + child: Container( + child: Column( + children: [ + PrescriptionFormWidget( + patient: widget.patient, + prescriptionViewModel: + widget.prescriptionViewModel, + medicineViewModel: model, + prescriptionList: + widget.prescriptionList, + selectedMedication: _selectedMedication, + ), + ], + ), + ), + ), + ], + ), + ), + ], + ), + ), + ), + ); + }), + ), + ), + ); + } +} diff --git a/lib/screens/prescription/add_prescription/prescription_form_widget.dart b/lib/screens/prescription/add_prescription/prescription_form_widget.dart new file mode 100644 index 00000000..13ec5a15 --- /dev/null +++ b/lib/screens/prescription/add_prescription/prescription_form_widget.dart @@ -0,0 +1,547 @@ +import 'package:autocomplete_textfield/autocomplete_textfield.dart'; +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart'; +import 'package:doctor_app_flutter/core/provider/robot_provider.dart'; +import 'package:doctor_app_flutter/core/service/AnalyticsService.dart'; +import 'package:doctor_app_flutter/core/viewModel/medicine_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/prescription/prescription_view_model.dart'; +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; +import 'package:doctor_app_flutter/locator.dart'; +import 'package:doctor_app_flutter/screens/prescription/prescription_text_filed.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; +import 'package:doctor_app_flutter/util/helpers.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/speech-text-popup.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:hexcolor/hexcolor.dart'; +import 'package:speech_to_text/speech_recognition_error.dart'; +import 'package:speech_to_text/speech_to_text.dart' as stt; +import '../../../widgets/transitions/slide_up_page.dart'; +import 'add_drug/add_drug_widget.dart'; + +class PrescriptionFormWidget extends StatefulWidget { + final PatiantInformtion patient; + final List prescriptionList; + final PrescriptionViewModel prescriptionViewModel; + final MedicineViewModel medicineViewModel; + final GetMedicationResponseModel selectedMedication; + + const PrescriptionFormWidget( + {Key key, + this.patient, + this.prescriptionList, + this.prescriptionViewModel, + this.medicineViewModel, + this.selectedMedication}); + + @override + _PrescriptionFormWidgetState createState() => _PrescriptionFormWidgetState(); +} + +class _PrescriptionFormWidgetState extends State { + String routeError; + String frequencyError; + String doseTimeError; + String durationError; + String unitError; + String strengthError; + + int selectedType; + + TextEditingController strengthController = TextEditingController(); + TextEditingController unitController = TextEditingController(); + TextEditingController indicationController = TextEditingController(); + TextEditingController instructionController = TextEditingController(); + + bool visibilityPrescriptionForm = false; + bool visibilitySearch = true; + + final myController = TextEditingController(); + DateTime selectedDate; + int strengthChar; + GlobalKey key = + new GlobalKey>(); + + TextEditingController drugIdController = TextEditingController(); + TextEditingController doseController = TextEditingController(); + final searchController = TextEditingController(); + stt.SpeechToText speech = stt.SpeechToText(); + var event = RobotProvider(); + var recognizedWord; + + final GlobalKey formKey = GlobalKey(); + final double spaceBetweenTextFields = 12; + dynamic route; + dynamic frequency; + dynamic duration; + dynamic doseTime; + dynamic units; + dynamic uom; + dynamic box; + dynamic x; + + setSelectedType(int val) { + setState(() { + selectedType = val; + }); + } + + onVoiceText() async { + new SpeechToText(context: context).showAlertDialog(context); + var lang = TranslationBase.of(AppGlobal.CONTEX).locale.languageCode; + bool available = await speech.initialize( + onStatus: statusListener, onError: errorListener); + if (available) { + speech.listen( + onResult: resultListener, + listenMode: stt.ListenMode.confirmation, + localeId: lang == 'en' ? 'en-US' : 'ar-SA', + ); + } else { + print("The user has denied the use of speech recognition."); + } + } + + void errorListener(SpeechRecognitionError error) { + event.setValue({"searchText": 'null'}); + print(error); + } + + void statusListener(String status) { + recognizedWord = status == 'listening' ? 'Listening...' : 'Sorry....'; + } + + void resultListener(result) { + recognizedWord = result.recognizedWords; + event.setValue({"searchText": recognizedWord}); + + if (result.finalResult == true) { + setState(() { + SpeechToText.closeAlertDialog(context); + speech.stop(); + instructionController.text += recognizedWord + '\n'; + }); + } else { + print(result.finalResult); + } + } + + Future initSpeechState() async { + bool hasSpeech = await speech.initialize( + onError: errorListener, onStatus: statusListener); + print(hasSpeech); + if (!mounted) return; + } + + @override + Widget build(BuildContext context) { + final screenSize = MediaQuery.of(context).size; + return Form( + key: formKey, + child: Column( + children: [ + AppText( + widget.selectedMedication?.description ?? "", + fontWeight: FontWeight.w600, + ), + SizedBox( + height: 15.0, + ), + Container( + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SizedBox( + width: 6, + ), + AppText( + TranslationBase.of(context).orderType, + fontWeight: FontWeight.w500, + ), + SizedBox( + width: 18, + ), + Radio( + activeColor: AppGlobal.appRedColor, + value: 1, + groupValue: selectedType, + onChanged: (value) { + setSelectedType(value); + }, + ), + Text(TranslationBase.of(context).regular), + ], + ), + ), + Row( + children: [ + Container( + width: MediaQuery.of(context).size.width * 0.35, + child: AppTextFieldCustom( + validationError: strengthError, + hintText: TranslationBase.of(context).strength, + isTextFieldHasSuffix: false, + enabled: true, + controller: strengthController, + onChanged: (String value) { + setState(() { + strengthChar = value.length; + }); + if (strengthChar >= 5) { + DrAppToastMsg.showErrorToast( + TranslationBase.of(context) + .only5DigitsAllowedForStrength, + ); + } + }, + inputType: TextInputType.numberWithOptions( + decimal: true, + ), + ), + ), + SizedBox( + width: 5.0, + ), + PrescriptionTextFiled( + width: MediaQuery.of(context).size.width * 0.510, + element: + widget.medicineViewModel.itemMedicineListUnit.length == 1 + ? widget.medicineViewModel.itemMedicineListUnit[0] + : units, + elementError: unitError, + keyName: 'description', + keyId: 'parameterCode', + hintText: TranslationBase.of(context).unit, + elementList: widget.medicineViewModel.itemMedicineListUnit, + okFunction: (selectedValue) { + setState(() { + units = selectedValue; + units['isDefault'] = true; + }); + }, + ), + ], + ), + SizedBox(height: spaceBetweenTextFields), + PrescriptionTextFiled( + elementList: widget.medicineViewModel.itemMedicineListRoute, + element: widget.medicineViewModel.itemMedicineListRoute.length == 1 + ? route = widget.medicineViewModel.itemMedicineListRoute[0] + : route, + elementError: routeError, + keyId: 'parameterCode', + keyName: 'description', + okFunction: (selectedValue) { + setState(() { + route = selectedValue; + route['isDefault'] = true; + }); + }, + hintText: TranslationBase.of(context).route, + ), + SizedBox(height: spaceBetweenTextFields), + PrescriptionTextFiled( + hintText: TranslationBase.of(context).frequency, + elementError: frequencyError, + // element: frequency, + element: widget.medicineViewModel.itemMedicineListRoute.length == 1 + ? frequency = widget.medicineViewModel.itemMedicineListRoute[0] + : frequency, + elementList: widget.medicineViewModel.itemMedicineList, + keyId: 'parameterCode', + keyName: 'description', + okFunction: (selectedValue) { + setState(() { + frequency = selectedValue; + frequency['isDefault'] = true; + if (widget.selectedMedication != null && + duration != null && + frequency != null && + strengthController.text != null) { + widget.medicineViewModel.getBoxQuantity( + freq: frequency['parameterCode'], + duration: duration['id'], + itemCode: widget.selectedMedication.itemId, + strength: double.parse(strengthController.text)); + + return; + } + }); + }), + SizedBox(height: spaceBetweenTextFields), + PrescriptionTextFiled( + hintText: TranslationBase.of(context).doseTime, + elementError: doseTimeError, + element: doseTime, + elementList: widget.medicineViewModel.medicationDoseTimeList, + keyId: 'id', + keyName: 'nameEn', + okFunction: (selectedValue) { + setState(() { + doseTime = selectedValue; + }); + }), + SizedBox(height: spaceBetweenTextFields), + if (widget.medicineViewModel.patientAssessmentList.isNotEmpty) + Container( + height: screenSize.height * 0.070, + width: double.infinity, + color: Colors.white, + child: Row( + children: [ + Container( + width: MediaQuery.of(context).size.width * 0.29, + child: AppTextFieldCustom( + hintText: widget + .medicineViewModel.patientAssessmentList[0].icdCode10ID + .toString(), + enabled: true, + ), + ), + Container( + width: MediaQuery.of(context).size.width * 0.57, + color: Colors.white, + child: AppTextFieldCustom( + maxLines: 5, + hintText: widget + .medicineViewModel.patientAssessmentList[0].asciiDesc + .toString(), + enabled: true, + ), + ), + ], + ), + ), + SizedBox(height: spaceBetweenTextFields), Container( + color: Colors.transparent, + child: InkWell( + onTap: () => selectDate(context, widget.prescriptionViewModel), + child: AppTextFieldCustom( + validationError: strengthError, + hintText: TranslationBase.of(context).date, + isTextFieldHasSuffix: true, + suffixIcon: IconButton( + icon: Icon( + Icons.calendar_today, + color: Colors.black, + ), + ), + dropDownText: selectedDate != null + ? "${AppDateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}" + : null, + enabled: false, + ), + ), + ), + SizedBox(height: spaceBetweenTextFields), + PrescriptionTextFiled( + element: duration, + elementError: durationError, + hintText: TranslationBase.of(context).duration, + elementList: widget.medicineViewModel.medicationDurationList, + keyName: 'nameEn', + keyId: 'id', + okFunction: (selectedValue) { + setState(() { + duration = selectedValue; + if (widget.selectedMedication != null && + duration != null && + frequency != null && + strengthController.text != null) { + box = widget.medicineViewModel.boxQuintity; + return; + } + }); + }, + ), + SizedBox(height: spaceBetweenTextFields), + Container( + color: Colors.white, + child: AppTextFieldCustom( + hintText: "UOM", + isTextFieldHasSuffix: false, + dropDownText: uom != null ? uom : null, + enabled: false, + ), + ), + SizedBox(height: spaceBetweenTextFields), + Container( + color: Colors.white, + child: AppTextFieldCustom( + hintText: TranslationBase.of(context).boxQuantity, + isTextFieldHasSuffix: false, + dropDownText: box != null + ? widget.medicineViewModel.boxQuintity.toString() + : null, + enabled: false, + ), + ), + SizedBox(height: spaceBetweenTextFields), + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + border: Border.all(width: 1.0, color: HexColor("#CCCCCC"))), + child: Stack( + children: [ + TextFields( + maxLines: 6, + minLines: 4, + hintText: TranslationBase.of(context).instruction, + controller: instructionController, + ), + Positioned( + top: 0, + right: 15, + child: IconButton( + icon: Icon( + DoctorApp.speechtotext, + color: Colors.black, + size: 35, + ), + onPressed: () { + initSpeechState().then((value) => {onVoiceText()}); + }, + ), + ), + ], + ), + ), + SizedBox(height: spaceBetweenTextFields), + Container( + margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5), + child: Wrap( + alignment: WrapAlignment.center, + children: [ + AppButton( + color: Color(0xff359846), + title: TranslationBase.of(context).addMedication, + fontWeight: FontWeight.w600, + onPressed: () async { + addMedicationButton(widget.medicineViewModel); + }, + ), + ], + ), + ), + ], + ), + ); + } + + selectDate(BuildContext context, PrescriptionViewModel model) async { + Helpers.hideKeyboard(context); + DateTime selectedDate; + selectedDate = DateTime.now(); + final DateTime picked = await showDatePicker( + context: context, + initialDate: selectedDate, + firstDate: DateTime.now(), + lastDate: DateTime(2040), + initialEntryMode: DatePickerEntryMode.calendar, + ); + if (picked != null && picked != selectedDate) { + setState(() { + this.selectedDate = picked; + }); + } + } + + addMedicationButton(MedicineViewModel model) async { + await locator().logEvent( + eventCategory: "Add Prescription Form", + eventAction: "Add Prescription", + ); + if (duration != null && + doseTime != null && + frequency != null && + selectedDate != null && + strengthController.text != "") { + if (widget.selectedMedication.isNarcotic == true) { + DrAppToastMsg.showErrorToast(TranslationBase.of(context) + .narcoticMedicineCanOnlyBePrescribedFromVida); + Navigator.pop(context); + return; + } + + if (double.parse(strengthController.text) > 1000.0) { + DrAppToastMsg.showErrorToast(TranslationBase.of(context).thousandIsTheMAXForTheStrength); + return; + } + if (double.parse(strengthController.text) < 0.0) { + DrAppToastMsg.showErrorToast(TranslationBase.of(context).strengthCanNotBeZero); + return; + } + + if (formKey.currentState.validate()) { + Navigator.push( + context, + SlideUpPageRoute( + widget: AddDrugWidget( + patient: widget.patient, + medicineModel: widget.medicineViewModel, + modelPrescription: widget.prescriptionViewModel, + prescriptionList: widget.prescriptionList, + route: route, + doseTime: doseTime, + duration: duration, + frequency: frequency, + units: units, + uom: uom, + x: x, + selectedMedication: widget.selectedMedication, + strength: strengthController.text, + indication: indicationController.text, + instruction: instructionController.text, + selectedDate: selectedDate, + ), + ), + ); + // Navigator.pop(context); + // openDrugToDrug(model, prescriptionViewModel); + } + } else { + setState(() { + if (duration == null) { + durationError = TranslationBase.of(context).fieldRequired; + } else { + durationError = null; + } + if (doseTime == null) { + doseTimeError = TranslationBase.of(context).fieldRequired; + } else { + doseTimeError = null; + } + if (route == null) { + routeError = TranslationBase.of(context).fieldRequired; + } else { + routeError = null; + } + if (frequency == null) { + frequencyError = TranslationBase.of(context).fieldRequired; + } else { + frequencyError = null; + } + if (units == null) { + unitError = TranslationBase.of(context).fieldRequired; + } else { + unitError = null; + } + if (strengthController.text == "") { + strengthError = TranslationBase.of(context).fieldRequired; + } else { + strengthError = null; + } + }); + } + formKey.currentState.save(); + } +} diff --git a/lib/screens/prescription/add_prescription/search_preescription_widget.dart b/lib/screens/prescription/add_prescription/search_preescription_widget.dart new file mode 100644 index 00000000..8adeddd4 --- /dev/null +++ b/lib/screens/prescription/add_prescription/search_preescription_widget.dart @@ -0,0 +1,137 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; +import '../../../config/config.dart'; +import '../../../core/model/search_drug/get_medication_response_model.dart'; +import '../../../core/viewModel/medicine_view_model.dart'; +import '../../../core/viewModel/prescription/prescription_view_model.dart'; +import '../../../util/helpers.dart'; +import '../../../util/translations_delegate_base.dart'; +import '../../../widgets/medicine/medicine_item_widget.dart'; +import '../../../widgets/shared/buttons/app_buttons_widget.dart'; +import '../../../widgets/shared/loader/gif_loader_dialog_utils.dart'; +import '../../../widgets/shared/network_base_view.dart'; +import '../../../widgets/shared/text_fields/app_text_form_field.dart'; +import '../../base/base_view.dart'; + +final myController = TextEditingController(); + +class SearchPrescriptionWidget extends StatelessWidget { + final double spaceBetweenTextFields; + final MedicineViewModel medicineViewModel; + final PrescriptionViewModel prescriptionViewModel; + final Function(GetMedicationResponseModel) onItemSelected; + + const SearchPrescriptionWidget( + {Key key, + this.spaceBetweenTextFields, + this.medicineViewModel, + this.prescriptionViewModel, + this.onItemSelected}) + : super(key: key); + + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) async {}, + builder: ( + BuildContext context, + MedicineViewModel model, + Widget child, + ) => + NetworkBaseView( + baseViewModel: model, + child: Column( + children: [ + FractionallySizedBox( + widthFactor: 0.9, + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + border: Border.all(width: 1.0, color: HexColor("#CCCCCC"))), + padding: EdgeInsets.all(10), + child: AppTextFormField( + borderColor: Colors.white, + hintText: TranslationBase.of(context).searchMedicineNameHere, + controller: myController, + onSaved: (value) {}, + onFieldSubmitted: (value) { + searchMedicine(context, model); + }, + inputFormatter: ONLY_LETTERS, + ), + ), + ), + SizedBox( + height: 15.0, + ), + Container( + child: Column( + children: [ + FractionallySizedBox( + widthFactor: 0.8, + child: Container( + child: Wrap( + alignment: WrapAlignment.center, + children: [ + AppButton( + title: TranslationBase.of(context).search, + onPressed: () async { + await searchMedicine( + context, + model, + ); + }, + ), + ], + ), + ), + ), + if (myController.text != '') + Container( + height: MediaQuery.of(context).size.height * 0.5, + child: ListView.builder( + padding: const EdgeInsets.only(top: 20), + scrollDirection: Axis.vertical, + itemCount: model.allMedicationList == null + ? 0 + : model.allMedicationList.length, + itemBuilder: (BuildContext context, int index) { + return InkWell( + child: MedicineItemWidget( + label: + model.allMedicationList[index].description), + onTap: () async { + GifLoaderDialogUtils.showMyDialog(context); + await model.getItem(itemID: model.allMedicationList[index].itemId, isLocalBusy: true); + GifLoaderDialogUtils.hideDialog(context); + onItemSelected(model.allMedicationList[index]); + // uom = _selectedMedication.uom; + }, + ); + }, + ), + ), + ], + ), + ), + SizedBox( + height: spaceBetweenTextFields, + ), + ], + ), + ), + ); + } + + searchMedicine(context, MedicineViewModel model) async { + FocusScope.of(context).unfocus(); + if (myController.text.length < 3) { + Helpers.showErrorToast(TranslationBase.of(context).moreThan3Letter); + return; + } + GifLoaderDialogUtils.showMyDialog(context); + await model.getMedicationList(drug: myController.text, isLocalBusy: true); + GifLoaderDialogUtils.hideDialog(context); + } +} diff --git a/lib/screens/prescription/add_prescription_form.dart b/lib/screens/prescription/add_prescription_form.dart deleted file mode 100644 index 8c07afcf..00000000 --- a/lib/screens/prescription/add_prescription_form.dart +++ /dev/null @@ -1,1177 +0,0 @@ -import 'package:autocomplete_textfield/autocomplete_textfield.dart'; -import 'package:doctor_app_flutter/config/config.dart'; -import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:doctor_app_flutter/core/enum/viewstate.dart'; -import 'package:doctor_app_flutter/core/model/Prescriptions/post_prescrition_req_model.dart'; -import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_model.dart'; -import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart'; -import 'package:doctor_app_flutter/core/provider/robot_provider.dart'; -import 'package:doctor_app_flutter/core/service/AnalyticsService.dart'; -import 'package:doctor_app_flutter/core/viewModel/medicine_view_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; -import 'package:doctor_app_flutter/locator.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetAssessmentReqModel.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/prescription/drugtodrug.dart'; -import 'package:doctor_app_flutter/screens/prescription/prescription_text_filed.dart'; -import 'package:doctor_app_flutter/util/date-utils.dart'; -import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; -import 'package:doctor_app_flutter/util/helpers.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/medicine/medicine_item_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; -import 'package:doctor_app_flutter/widgets/shared/speech-text-popup.dart'; -import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; -import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:hexcolor/hexcolor.dart'; -import 'package:permission_handler/permission_handler.dart'; -import 'package:provider/provider.dart'; -import 'package:speech_to_text/speech_recognition_error.dart'; -import 'package:speech_to_text/speech_to_text.dart' as stt; - -addPrescriptionForm(context, PrescriptionViewModel model, - PatiantInformtion patient, prescription) { - showModalBottomSheet( - isScrollControlled: true, - context: context, - builder: (BuildContext bc) { - return PrescriptionFormWidget(model, patient, prescription); - }); -} - -postPrescription( - {String duration, - String doseTimeIn, - String dose, - String drugId, - String strength, - String route, - String frequency, - String indication, - String instruction, - PrescriptionViewModel model, - DateTime doseTime, - String doseUnit, - String icdCode, - PatiantInformtion patient, - String patientType}) async { - PostPrescriptionReqModel postProcedureReqModel = - new PostPrescriptionReqModel(); - List prescriptionList = List(); - - postProcedureReqModel.appointmentNo = patient.appointmentNo; - postProcedureReqModel.clinicID = patient.clinicId; - postProcedureReqModel.episodeID = patient.episodeNo; - postProcedureReqModel.patientMRN = patient.patientMRN; - - prescriptionList.add(PrescriptionRequestModel( - covered: true, - dose: double.parse(dose), - itemId: drugId.isEmpty ? 1 : int.parse(drugId), - doseUnitId: int.parse(doseUnit), - route: route.isEmpty ? 1 : int.parse(route), - frequency: frequency.isEmpty ? 1 : int.parse(frequency), - remarks: instruction, - approvalRequired: true, - icdcode10Id: icdCode.toString(), - doseTime: doseTimeIn.isEmpty ? 1 : int.parse(doseTimeIn), - duration: duration.isEmpty ? 1 : int.parse(duration), - doseStartDate: doseTime.toIso8601String())); - postProcedureReqModel.prescriptionRequestModel = prescriptionList; - await model.postPrescription(postProcedureReqModel, patient.patientMRN); - - if (model.state == ViewState.ErrorLocal) { - Helpers.showErrorToast(model.error); - } else if (model.state == ViewState.Idle) { - model.getPrescriptions(patient); - DrAppToastMsg.showSuccesToast('Medication has been added'); - } -} - -class PrescriptionFormWidget extends StatefulWidget { - final PrescriptionViewModel model; - final PatiantInformtion patient; - final List prescriptionList; - - PrescriptionFormWidget(this.model, this.patient, this.prescriptionList); - - @override - _PrescriptionFormWidgetState createState() => _PrescriptionFormWidgetState(); -} - -class _PrescriptionFormWidgetState extends State { - String routeError; - String frequencyError; - String doseTimeError; - String durationError; - String unitError; - String strengthError; - - int selectedType; - - TextEditingController strengthController = TextEditingController(); - TextEditingController indicationController = TextEditingController(); - TextEditingController instructionController = TextEditingController(); - - bool visbiltyPrescriptionForm = false; - bool visbiltySearch = true; - - final myController = TextEditingController(); - DateTime selectedDate; - int strengthChar; - GetMedicationResponseModel _selectedMedication; - GlobalKey key = - new GlobalKey>(); - - TextEditingController drugIdController = TextEditingController(); - TextEditingController doseController = TextEditingController(); - final searchController = TextEditingController(); - stt.SpeechToText speech = stt.SpeechToText(); - var event = RobotProvider(); - var reconizedWord; - - final GlobalKey formKey = GlobalKey(); - final double spaceBetweenTextFileds = 12; - dynamic route; - dynamic frequency; - dynamic duration; - dynamic doseTime; - dynamic indication; - dynamic units; - dynamic uom; - dynamic box; - dynamic x; - - @override - void initState() { - requestPermissions(); - event.controller.stream.listen((p) { - if (p['startPopUp'] == 'true') { - if (this.mounted) { - initSpeechState().then((value) => {onVoiceText()}); - } - } - }); - selectedType = 1; - super.initState(); - } - - setSelectedType(int val) { - setState(() { - selectedType = val; - }); - } - - onVoiceText() async { - new SpeechToText(context: context).showAlertDialog(context); - var lang = TranslationBase.of(AppGlobal.CONTEX).locale.languageCode; - bool available = await speech.initialize( - onStatus: statusListener, onError: errorListener); - if (available) { - speech.listen( - onResult: resultListener, - listenMode: stt.ListenMode.confirmation, - localeId: lang == 'en' ? 'en-US' : 'ar-SA', - ); - } else { - print("The user has denied the use of speech recognition."); - } - } - - void errorListener(SpeechRecognitionError error) { - event.setValue({"searchText": 'null'}); - print(error); - } - - void statusListener(String status) { - reconizedWord = status == 'listening' ? 'Lisening...' : 'Sorry....'; - } - - void requestPermissions() async { - Map statuses = await [ - Permission.microphone, - ].request(); - } - - void resultListener(result) { - reconizedWord = result.recognizedWords; - event.setValue({"searchText": reconizedWord}); - - if (result.finalResult == true) { - setState(() { - SpeechToText.closeAlertDialog(context); - speech.stop(); - instructionController.text += reconizedWord + '\n'; - }); - } else { - print(result.finalResult); - } - } - - Future initSpeechState() async { - bool hasSpeech = await speech.initialize( - onError: errorListener, onStatus: statusListener); - print(hasSpeech); - if (!mounted) return; - } - - @override - Widget build(BuildContext context) { - final screenSize = MediaQuery.of(context).size; - ProjectViewModel projectViewModel = Provider.of(context); - return BaseView( - onModelReady: (model) async { - x = model.patientAssessmentList.map((element) { - return element.icdCode10ID; - }); - GetAssessmentReqModel getAssessmentReqModel = GetAssessmentReqModel( - patientMRN: widget.patient.patientMRN, - episodeID: widget.patient.episodeNo.toString(), - editedBy: '', - doctorID: '', - appointmentNo: widget.patient.appointmentNo); - if (model.medicationStrengthList.length == 0) { - await model.getMedicationStrength(); - } - if (model.medicationDurationList.length == 0) { - await model.getMedicationDuration(); - } - if (model.medicationDoseTimeList.length == 0) { - await model.getMedicationDoseTime(); - } - await model.getPatientAssessment(getAssessmentReqModel); - }, - builder: ( - BuildContext context, - MedicineViewModel model, - Widget child, - ) => - NetworkBaseView( - baseViewModel: model, - child: GestureDetector( - onTap: () { - FocusScope.of(context).requestFocus(new FocusNode()); - }, - child: DraggableScrollableSheet( - initialChildSize: 0.98, - maxChildSize: 0.98, - minChildSize: 0.9, - builder: - (BuildContext context, ScrollController scrollController) { - return SingleChildScrollView( - child: Container( - height: MediaQuery.of(context).size.height * 1.65, - color: Color(0xffF8F8F8), - child: Padding( - padding: EdgeInsets.symmetric( - horizontal: 12.0, vertical: 10.0), - child: Column( - children: [ - Column( - children: [ - SizedBox( - height: 60, - ), - ], - ), - SizedBox( - height: spaceBetweenTextFileds, - ), - Container( - child: Form( - key: formKey, - child: Column( - children: [ - FractionallySizedBox( - widthFactor: 0.9, - child: Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.all( - Radius.circular(6.0)), - border: Border.all( - width: 1.0, - color: HexColor("#CCCCCC"))), - padding: EdgeInsets.all(10), - child: AppTextFormField( - onTap: () { - visbiltyPrescriptionForm = false; - visbiltySearch = true; - }, - borderColor: Colors.white, - hintText: TranslationBase.of(context) - .searchMedicineNameHere, - controller: myController, - onSaved: (value) {}, - onFieldSubmitted: (value) { - searchMedicine(context, model); - }, - inputFormatter: ONLY_LETTERS, - ), - ), - ), - SizedBox( - height: 15.0, - ), - Visibility( - visible: visbiltySearch, - child: Container( - child: Column( - children: [ - FractionallySizedBox( - widthFactor: 0.8, - child: Container( - child: Wrap( - alignment: WrapAlignment.center, - children: [ - // TODO change it secondary button and add loading - AppButton( - title: TranslationBase.of( - context) - .search, - onPressed: () async { - await searchMedicine( - context, model); - }, - ), - ], - ), - ), - ), - if (myController.text != '') - Container( - height: MediaQuery.of(context) - .size - .height * - 0.5, - child: ListView.builder( - padding: const EdgeInsets.only( - top: 20), - scrollDirection: Axis.vertical, - itemCount: - model.allMedicationList == - null - ? 0 - : model - .allMedicationList - .length, - itemBuilder: - (BuildContext context, - int index) { - return InkWell( - child: MedicineItemWidget( - label: model - .allMedicationList[ - index] - .description), - onTap: () { - model.getItem( - itemID: model - .allMedicationList[ - index] - .itemId); - visbiltyPrescriptionForm = - true; - visbiltySearch = false; - _selectedMedication = - model.allMedicationList[ - index]; - uom = _selectedMedication - .uom; - }, - ); - }, - ), - ), - ], - ), - ), - ), - SizedBox( - height: spaceBetweenTextFileds, - ), - Visibility( - visible: visbiltyPrescriptionForm, - child: Container( - child: Column( - children: [ - AppText( - _selectedMedication?.description ?? - "", - bold: true, - ), - Container( - child: Row( - children: [ - AppText( - TranslationBase.of(context) - .orderType, - fontWeight: FontWeight.w600, - ), - Radio( - activeColor: - Color(0xFFB9382C), - value: 1, - groupValue: selectedType, - onChanged: (value) { - setSelectedType(value); - }, - ), - Text(TranslationBase.of(context) - .regular), - ], - ), - ), - SizedBox( - height: spaceBetweenTextFileds), - Container( - width: double.infinity, - child: Row( - children: [ - Container( - width: MediaQuery.of(context) - .size - .width * - 0.35, - child: AppTextFieldCustom( - //height: 40, - validationError: - strengthError, - hintText: 'Strength', - isTextFieldHasSuffix: false, - enabled: true, - controller: - strengthController, - onChanged: (String value) { - setState(() { - strengthChar = - value.length; - }); - if (strengthChar >= 5) { - DrAppToastMsg - .showErrorToast( - TranslationBase.of( - context) - .only5DigitsAllowedForStrength, - ); - } - }, - inputType: TextInputType - .numberWithOptions( - decimal: true, - ), - ), - ), - SizedBox( - width: 5.0, - ), - PrescriptionTextFiled( - width: MediaQuery.of(context) - .size - .width * - 0.510, - element: model - .itemMedicineListUnit - .length == - 1 - ? model - .itemMedicineListUnit[0] - : units, - elementError: unitError, - keyName: 'description', - keyId: 'parameterCode', - hintText: 'Unit', - elementList: model - .itemMedicineListUnit, - okFunction: (selectedValue) { - setState(() { - units = selectedValue; - units['isDefault'] = true; - }); - }, - ), - ], - ), - ), - SizedBox( - height: spaceBetweenTextFileds), - PrescriptionTextFiled( - elementList: - model.itemMedicineListRoute, - element: model.itemMedicineListRoute - .length == - 1 - ? model.itemMedicineListRoute[0] - : route, - elementError: routeError, - keyId: 'parameterCode', - keyName: 'description', - okFunction: (selectedValue) { - setState(() { - route = selectedValue; - route['isDefault'] = true; - }); - }, - hintText: - TranslationBase.of(context) - .route, - ), - SizedBox( - height: spaceBetweenTextFileds), - PrescriptionTextFiled( - hintText: - TranslationBase.of(context) - .frequency, - elementError: frequencyError, - element: frequency, - elementList: - model.itemMedicineList, - keyId: 'parameterCode', - keyName: 'description', - okFunction: (selectedValue) { - setState(() { - frequency = selectedValue; - frequency['isDefault'] = true; - if (_selectedMedication != - null && - duration != null && - frequency != null && - strengthController.text != - null) { - model.getBoxQuantity( - freq: frequency[ - 'parameterCode'], - duration: - duration['id'], - itemCode: - _selectedMedication - .itemId, - strength: double.parse( - strengthController - .text)); - - return; - } - }); - }), - SizedBox( - height: spaceBetweenTextFileds), - PrescriptionTextFiled( - hintText: - TranslationBase.of(context) - .doseTime, - elementError: doseTimeError, - element: doseTime, - elementList: - model.medicationDoseTimeList, - keyId: 'id', - keyName: 'nameEn', - okFunction: (selectedValue) { - setState(() { - doseTime = selectedValue; - }); - }), - SizedBox( - height: spaceBetweenTextFileds), - if (model - .patientAssessmentList.isNotEmpty) - Container( - height: screenSize.height * 0.070, - width: double.infinity, - color: Colors.white, - child: Row( - children: [ - Container( - width: - MediaQuery.of(context) - .size - .width * - 0.29, - child: TextField( - decoration: - textFieldSelectorDecoration( - model - .patientAssessmentList[ - 0] - .icdCode10ID - .toString(), - indication != null - ? indication[ - 'name'] - : null, - false), - enabled: true, - readOnly: true, - ), - ), - Container( - width: - MediaQuery.of(context) - .size - .width * - 0.57, - color: Colors.white, - child: TextField( - maxLines: 5, - decoration: - textFieldSelectorDecoration( - model - .patientAssessmentList[ - 0] - .asciiDesc - .toString(), - indication != null - ? indication[ - 'name'] - : null, - false), - enabled: true, - readOnly: true, - ), - ), - ], - ), - ), - SizedBox( - height: spaceBetweenTextFileds), - Container( - height: screenSize.height * 0.070, - color: Colors.white, - child: InkWell( - onTap: () => selectDate( - context, widget.model), - child: TextField( - decoration: - textFieldSelectorDecoration( - TranslationBase.of( - context) - .date, - selectedDate != null - ? "${AppDateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}" - : null, - true, - suffixIcon: Icon( - Icons.calendar_today, - color: Colors.black, - )), - enabled: false, - ), - ), - ), - SizedBox( - height: spaceBetweenTextFileds), - PrescriptionTextFiled( - element: duration, - elementError: durationError, - hintText: - TranslationBase.of(context) - .duration, - elementList: - model.medicationDurationList, - keyName: 'nameEn', - keyId: 'id', - okFunction: (selectedValue) { - setState(() { - duration = selectedValue; - if (_selectedMedication != - null && - duration != null && - frequency != null && - strengthController.text != - null) { - model.getBoxQuantity( - freq: frequency[ - 'parameterCode'], - duration: duration['id'], - itemCode: - _selectedMedication - .itemId, - strength: double.parse( - strengthController - .text), - ); - box = model.boxQuintity; - - return; - } - }); - }, - ), - SizedBox( - height: spaceBetweenTextFileds), - Container( - color: Colors.white, - child: AppTextFieldCustom( - hintText: "UOM", - isTextFieldHasSuffix: false, - dropDownText: - uom != null ? uom : null, - enabled: false, - ), - ), - SizedBox( - height: spaceBetweenTextFileds), - Container( - color: Colors.white, - child: AppTextFieldCustom( - hintText: - TranslationBase.of(context) - .boxQuantity, - isTextFieldHasSuffix: false, - dropDownText: box != null - ? model.boxQuintity.toString() - : null, - enabled: false, - ), - ), - SizedBox( - height: spaceBetweenTextFileds), - Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.all( - Radius.circular(6.0)), - border: Border.all( - width: 1.0, - color: - HexColor("#CCCCCC"))), - child: Stack( - children: [ - TextFields( - maxLines: 6, - minLines: 4, - hintText: TranslationBase.of( - context) - .instruction, - controller: - instructionController, - //keyboardType: TextInputType.number, - ), - Positioned( - top: 0, - right: 15, - child: IconButton( - icon: Icon( - DoctorApp.speechtotext, - color: Colors.black, - size: 35, - ), - onPressed: () { - initSpeechState().then( - (value) => - {onVoiceText()}); - }, - ), - ), - ], - ), - ), - SizedBox( - height: spaceBetweenTextFileds), - Container( - margin: EdgeInsets.all( - SizeConfig.widthMultiplier * 5), - child: Wrap( - alignment: WrapAlignment.center, - children: [ - AppButton( - color: Color(0xff359846), - title: TranslationBase.of( - context) - .addMedication, - fontWeight: FontWeight.w600, - onPressed: () async { - await locator< - AnalyticsService>() - .logEvent( - eventCategory: - "Add Prescription Form", - eventAction: - "Add Prescription", - ); - if (duration != null && - doseTime != null && - frequency != null && - selectedDate != null && - strengthController - .text != - "") { - if (_selectedMedication - .isNarcotic == - true) { - DrAppToastMsg.showErrorToast( - TranslationBase.of( - context) - .narcoticMedicineCanOnlyBePrescribedFromVida); - Navigator.pop(context); - return; - } - - if (double.parse( - strengthController - .text) > - 1000.0) { - DrAppToastMsg - .showErrorToast( - "1000 is the MAX for the strength"); - return; - } - if (double.parse( - strengthController - .text) < - 0.0) { - DrAppToastMsg - .showErrorToast( - "strength can't be zero"); - return; - } - - if (formKey.currentState - .validate()) { - Navigator.pop(context); - openDrugToDrug(model); - { - // postProcedure( - // icdCode: model - // .patientAssessmentList - // .isNotEmpty - // ? model - // .patientAssessmentList[ - // 0] - // .icdCode10ID - // .isEmpty - // ? "test" - // : model - // .patientAssessmentList[ - // 0] - // .icdCode10ID - // .toString() - // : "test", - // // icdCode: model - // // .patientAssessmentList - // // .map((value) => value - // // .icdCode10ID - // // .trim()) - // // .toList() - // // .join(' '), - // dose: strengthController - // .text, - // doseUnit: model - // .itemMedicineListUnit - // .length == - // 1 - // ? model - // .itemMedicineListUnit[ - // 0][ - // 'parameterCode'] - // .toString() - // : units['parameterCode'] - // .toString(), - // patient: widget.patient, - // doseTimeIn: - // doseTime['id'] - // .toString(), - // model: widget.model, - // duration: duration['id'] - // .toString(), - // frequency: model - // .itemMedicineList - // .length == - // 1 - // ? model - // .itemMedicineList[ - // 0][ - // 'parameterCode'] - // .toString() - // : frequency[ - // 'parameterCode'] - // .toString(), - // route: model.itemMedicineListRoute - // .length == - // 1 - // ? model - // .itemMedicineListRoute[ - // 0][ - // 'parameterCode'] - // .toString() - // : route['parameterCode'] - // .toString(), - // drugId: - // _selectedMedication - // .itemId - // .toString(), - // strength: - // strengthController - // .text, - // indication: - // indicationController - // .text, - // instruction: - // instructionController - // .text, - // doseTime: selectedDate, - // ); - } - } - } else { - setState(() { - if (duration == null) { - durationError = - TranslationBase.of( - context) - .fieldRequired; - } else { - durationError = null; - } - if (doseTime == null) { - doseTimeError = - TranslationBase.of( - context) - .fieldRequired; - } else { - doseTimeError = null; - } - if (route == null) { - routeError = - TranslationBase.of( - context) - .fieldRequired; - } else { - routeError = null; - } - if (frequency == null) { - frequencyError = - TranslationBase.of( - context) - .fieldRequired; - } else { - frequencyError = null; - } - if (units == null) { - unitError = - TranslationBase.of( - context) - .fieldRequired; - } else { - unitError = null; - } - if (strengthController - .text == - "") { - strengthError = - TranslationBase.of( - context) - .fieldRequired; - } else { - strengthError = null; - } - }); - } - - formKey.currentState.save(); - }, - ), - ], - ), - ), - ], - ), - ), - ), - ], - ), - ), - ), - ], - ), - ), - ), - ); - }), - ), - ), - ); - } - - selectDate(BuildContext context, PrescriptionViewModel model) async { - Helpers.hideKeyboard(context); - DateTime selectedDate; - selectedDate = DateTime.now(); - final DateTime picked = await showDatePicker( - context: context, - initialDate: selectedDate, - firstDate: DateTime.now(), - lastDate: DateTime(2040), - initialEntryMode: DatePickerEntryMode.calendar, - ); - if (picked != null && picked != selectedDate) { - setState(() { - this.selectedDate = picked; - }); - } - } - - InputDecoration textFieldSelectorDecoration( - String hintText, String selectedText, bool isDropDown, - {Icon suffixIcon}) { - return InputDecoration( - focusedBorder: OutlineInputBorder( - borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), - borderRadius: BorderRadius.circular(8), - ), - enabledBorder: OutlineInputBorder( - borderSide: BorderSide(color: Color(0xFFEFEFEF), width: 2.0), - borderRadius: BorderRadius.circular(8), - ), - disabledBorder: OutlineInputBorder( - borderSide: BorderSide(color: Color(0xFFEFEFEF), width: 2.0), - borderRadius: BorderRadius.circular(8), - ), - hintText: selectedText != null ? selectedText : hintText, - suffixIcon: isDropDown - ? suffixIcon != null - ? suffixIcon - : Icon( - Icons.keyboard_arrow_down_sharp, - color: Color(0xff2E303A), - ) - : null, - hintStyle: TextStyle( - fontSize: 13, - color: Color(0xff2E303A), - fontFamily: 'Poppins', - fontWeight: FontWeight.w600, - ), - labelText: selectedText != null ? '$hintText\n$selectedText' : null, - labelStyle: TextStyle( - fontSize: 13, - color: Color(0xff2E303A), - fontFamily: 'Poppins', - fontWeight: FontWeight.w600, - ), - ); - } - - openDrugToDrug(model) { - showModalBottomSheet( - context: context, - builder: (context) { - return Container( - height: SizeConfig.realScreenHeight * .8, - width: SizeConfig.realScreenWidth, - child: SingleChildScrollView( - child: Column( - // mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - DrugToDrug( - widget.patient, - getPriscriptionforDrug(widget.prescriptionList, model), - model.patientAssessmentList), - Container( - margin: EdgeInsets.all(SizeConfig.widthMultiplier * 3), - child: AppButton( - title: TranslationBase.of(context).addMedication, - onPressed: () { - Navigator.pop(context); - - postPrescription( - icdCode: model.patientAssessmentList.isNotEmpty - ? model.patientAssessmentList[0].icdCode10ID - .isEmpty - ? "test" - : model.patientAssessmentList[0].icdCode10ID - .toString() - : "test", - dose: strengthController.text, - doseUnit: model.itemMedicineListUnit.length == 1 - ? model.itemMedicineListUnit[0]['parameterCode'] - .toString() - : units['parameterCode'].toString(), - patient: widget.patient, - doseTimeIn: doseTime['id'].toString(), - model: widget.model, - duration: duration['id'].toString(), - frequency: model.itemMedicineList.length == 1 - ? model.itemMedicineList[0]['parameterCode'] - .toString() - : frequency['parameterCode'].toString(), - route: model.itemMedicineListRoute.length == 1 - ? model.itemMedicineListRoute[0]['parameterCode'] - .toString() - : route['parameterCode'].toString(), - drugId: _selectedMedication.itemId.toString(), - strength: strengthController.text, - indication: indicationController.text, - instruction: instructionController.text, - doseTime: selectedDate, - ); - }, - )) - ], - )), - - //], - //) - ); - }); - } - - getPriscriptionforDrug( - List prescriptionList, MedicineViewModel model) { - var prescriptionDetails = []; - if (prescriptionList.length > 0) { - prescriptionList[0].entityList.forEach((element) { - if (element.mediSpanGPICode != null) { - prescriptionDetails.add({ - 'DrugId': element.mediSpanGPICode, - 'DrugName': element.medicationName, - 'Dose': element.doseDailyQuantity, - 'DoseType': element.doseDailyUnitID, - 'Unit': element.uom, - 'FrequencyType': element.frequencyID, - 'Duration': element.doseDurationDays, - 'RouteID': element.routeID, - 'IsScreen': element.isSIG - }); - } - }); - } - if (_selectedMedication.mediSpanGPICode != null) { - prescriptionDetails.add({ - 'DrugId': _selectedMedication.mediSpanGPICode, - 'DrugName': _selectedMedication.description, - 'Dose': strengthController.text, - 'DoseType': model.itemMedicineListUnit.length == 1 - ? model.itemMedicineListUnit[0]['parameterCode'].toString() - : units['parameterCode'].toString(), - 'Unit': model.itemMedicineListUnit.length == 1 - ? model.itemMedicineListUnit[0]['description'] - : units['description'], - 'FrequencyType': model.itemMedicineList.length == 1 - ? model.itemMedicineList[0]['parameterCode'].toString() - : frequency['parameterCode'].toString(), - 'Duration': duration['id'].toString(), - 'RouteID': model.itemMedicineListRoute.length == 1 - ? model.itemMedicineListRoute[0]['parameterCode'].toString() - : route['parameterCode'].toString(), - 'IsScreen': true - }); - } - return prescriptionDetails; - } - - searchMedicine(context, MedicineViewModel model) async { - FocusScope.of(context).unfocus(); - if (myController.text.length < 3) { - Helpers.showErrorToast(TranslationBase.of(context).moreThan3Letter); - return; - } - await model.getMedicationList(drug: myController.text); - } -} diff --git a/lib/screens/prescription/new_prescriptions_page.dart b/lib/screens/prescription/new_prescriptions_page.dart new file mode 100644 index 00000000..d6403602 --- /dev/null +++ b/lib/screens/prescription/new_prescriptions_page.dart @@ -0,0 +1,180 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/viewModel/prescription/prescription_view_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/screens/prescription/prescriptions_items/prescription_items_in_patient.dart'; +import 'package:doctor_app_flutter/screens/prescription/prescriptions_items/prescription_items_out_patient.dart'; +import 'package:doctor_app_flutter/screens/procedures/ProcedureType.dart'; +import 'package:doctor_app_flutter/screens/procedures/base_add_procedure_tab_page.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/doctor_card.dart'; +import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; +import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart'; +import 'package:doctor_app_flutter/widgets/shared/user-guid/in_patient_doctor_card.dart'; +import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; +import 'package:doctor_app_flutter/widgets/transitions/slide_up_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import '../../util/helpers.dart'; +import '../../widgets/shared/errors/error_message.dart'; + +class NewPrescriptionsPage extends StatelessWidget { + @override + Widget build(BuildContext context) { + final routeArgs = ModalRoute.of(context).settings.arguments as Map; + PatiantInformtion patient = routeArgs['patient']; + bool isInpatient = routeArgs['isInpatient']; + bool isFromLiveCare = routeArgs['isFromLiveCare']; + return BaseView( + onModelReady: (model) async { + model.getPrescriptionListNew( + mrn: patient.patientMRN, appNo: patient.appointmentNo); + }, + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + isShowAppBar: true, + backgroundColor: Colors.grey[100], + appBar: PatientProfileAppBar( + patient, + isInpatient: isInpatient, + ), + body: FractionallySizedBox( + widthFactor: 1.0, + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 12, + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + ServiceTitle( + title: TranslationBase.of(context).orders, + subTitle: TranslationBase.of(context).prescriptions, + ), + ], + ), + ), + if ((patient.patientStatusType != null && + patient.patientStatusType == 43) || + (isFromLiveCare && patient.appointmentNo != null)) + AddNewOrder( + onTap: () { + Navigator.push( + context, + SlideUpPageRoute( + widget: BaseAddProcedureTabPage( + patient: patient, + prescriptionModel: model, + procedureType: ProcedureType.PRESCRIPTION, + ), + settingRoute: 'AddProcedureTabPage'), + ); + }, + label: TranslationBase.of(context) + .applyForNewPrescriptionsOrder, + ), + Center( + child: FractionallySizedBox( + widthFactor: 0.92, + child: ListView.builder( + physics: BouncingScrollPhysics(), + itemCount: model.prescriptionListNew.length, + shrinkWrap: true, + itemBuilder: (BuildContext ctxt, int index) { + return InkWell( + child: CardWithBgWidget( + bgColor: Colors.transparent, + widget: Column( + children: [ + CustomRow( + label: "", + value: Helpers.convertToTitleCase(model + .prescriptionListNew[index] + .medicationName), + valueSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3.5, + ), + SizedBox( + height: 10, + ), + CustomRow( + label: TranslationBase.of(context).doctorName + ': ', //"Doctor Name :", + value: model + .prescriptionListNew[index].doctorName, + ), + CustomRow( + label: TranslationBase.of(context).orderTypeDescription + ': ',//"Order Type Description :", + value: model.prescriptionListNew[index] + .orderTypeDescription, + ), + CustomRow( + label: TranslationBase.of(context).status + ': ', + value: + model.prescriptionListNew[index].status, + ), + CustomRow( + label: TranslationBase.of(context).indication + ': ', //"indication :", + value: model + .prescriptionListNew[index].indication, + ), + CustomRow( + label: TranslationBase.of(context).doseDetails + ': ', //"doseDetail :", + value: model + .prescriptionListNew[index].doseDetail, + ), + CustomRow( + label: TranslationBase.of(context).quantity + ': ',//"quantity :", + value: model + .prescriptionListNew[index].quantity + .toString(), + ),CustomRow( + label: TranslationBase.of(context).startDate + ': ', //"start Date :", + value: model + .prescriptionListNew[index].startDate + .toString(), + ),CustomRow( + label: TranslationBase.of(context).stopDate + ': ',//"stop Date :", + value: model + .prescriptionListNew[index].stopDate + .toString(), + ), + if(model + .prescriptionListNew[index].remarks != null&& model + .prescriptionListNew[index].remarks!= "") + CustomRow( + label: TranslationBase.of(context).remarks + ': ',//"Remark :", + value: model + .prescriptionListNew[index].remarks + .toString(), + ), + ], + ), + ),); + }), + ), + ), + if (model.prescriptionListNew.isEmpty && + patient.patientStatusType != 43) + Center( + child: ErrorMessage( + error: TranslationBase.of(context).noPrescriptionsFound, + )) + ], + ), + ), + )), + ); + } +} diff --git a/lib/screens/prescription/old_prescriptions_page.dart b/lib/screens/prescription/old_prescriptions_page.dart new file mode 100644 index 00000000..19d12416 --- /dev/null +++ b/lib/screens/prescription/old_prescriptions_page.dart @@ -0,0 +1,234 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/viewModel/prescription/prescription_view_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/screens/prescription/prescriptions_items/prescription_items_in_patient.dart'; +import 'package:doctor_app_flutter/screens/prescription/prescriptions_items/prescription_items_out_patient.dart'; +import 'package:doctor_app_flutter/screens/procedures/ProcedureType.dart'; +import 'package:doctor_app_flutter/screens/procedures/base_add_procedure_tab_page.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/doctor_card.dart'; +import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; +import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart'; +import 'package:doctor_app_flutter/widgets/shared/user-guid/in_patient_doctor_card.dart'; +import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; +import 'package:doctor_app_flutter/widgets/transitions/slide_up_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import '../../util/helpers.dart'; +import '../../widgets/shared/errors/error_message.dart'; + +class OldPrescriptionsPage extends StatelessWidget { + @override + Widget build(BuildContext context) { + final routeArgs = ModalRoute.of(context).settings.arguments as Map; + PatiantInformtion patient = routeArgs['patient']; + String patientType = routeArgs['patientType']; + String arrivalType = routeArgs['arrivalType']; + bool isInpatient = routeArgs['isInpatient']; + bool isFromLiveCare = routeArgs['isFromLiveCare']; + return BaseView( + onModelReady: (model) async { + patient.admissionNo == null + ? model.getPrescriptions(patient, + patientType: patientType, isLocalBusy: false) + : model.getMedicationForInPatient(patient); + }, + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + isShowAppBar: true, + backgroundColor: Colors.grey[100], + appBar: PatientProfileAppBar( + patient, + isInpatient: isInpatient, + ), + body: patient.admissionNo == null + ? FractionallySizedBox( + widthFactor: 1.0, + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 12, + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + ServiceTitle( + title: TranslationBase.of(context).orders, + subTitle: TranslationBase.of(context) + .prescriptions + "(${TranslationBase.of(context) + .old }) ", + ), + ], + ), + ), + ListView.builder( + physics: BouncingScrollPhysics(), + itemCount: model.prescriptionsList.length, + shrinkWrap: true, + itemBuilder: (BuildContext ctxt, int index) { + return InkWell( + onTap: () => Navigator.push( + context, + FadePage( + page: PrescriptionItemsPage( + prescriptions: model + .prescriptionsList[index], + patient: patient, + arrivalType: arrivalType, + ), + ), + ), + child: Column( + children: [ + DoctorCard( + doctorName: + Helpers.convertToTitleCase(model + .prescriptionsList[index] + .doctorName), + profileUrl: model + .prescriptionsList[index] + .doctorImageURL, + branch: model + .prescriptionsList[index].name, + clinic: model.prescriptionsList[index] + .clinicDescription, + isPrescriptions: true, + appointmentDate: AppDateUtils + .getDateTimeFromServerFormat( + model.prescriptionsList[index] + .appointmentDate, + ), + ), + ], + )); + }), + if (model.prescriptionsList.isEmpty && + patient.patientStatusType != 43) + Center( + child: ErrorMessage( + error: TranslationBase.of(context) + .noPrescriptionsFound, + )) + ], + ), + ), + ) + : Center( + child: FractionallySizedBox( + widthFactor: 0.9, + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 12, + ), + ServiceTitle( + title: TranslationBase.of(context).orders, + subTitle: TranslationBase.of(context) + .prescriptions + "(${TranslationBase.of(context) + .old }) ", + ), + model.medicationForInPatient.length == 0? + Center( + child: ErrorMessage( + error: TranslationBase.of(context) + .noPrescriptionsFound, + )): ListView.builder( + scrollDirection: Axis.vertical, + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemCount: model.medicationForInPatient.length, + itemBuilder: (context, index) { + //model.medicationForInPatient.length, + return InkWell( + child: CardWithBgWidget( + bgColor: Colors.transparent, + widget: Column( + children: [ + CustomRow( + label: "", + value: Helpers.convertToTitleCase(model + .medicationForInPatient[index] + .pHRItemDescription), + valueSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3.5, + ), + SizedBox( + height: 10, + ), + CustomRow( + label: "Doctor Name :", + value: Helpers.convertToTitleCase(model + .medicationForInPatient[index] + .doctorName + .toString()), + ), + CustomRow( + label: "Status :", + value: Helpers.convertToTitleCase(model + .medicationForInPatient[index] + .statusDescription + .toString()), + ), + CustomRow( + label: "dose :", + value: Helpers.convertToTitleCase(model + .medicationForInPatient[index] + .dose + .toString()), + ), CustomRow( + label: "comments :", + value: Helpers.convertToTitleCase(model + .medicationForInPatient[index] + .comments + .toString()), + ), + + ], + ), + ), + onTap: () => Navigator.push( + context, + FadePage( + page: PrescriptionItemsInPatientPage( + prescriptionIndex: index, + prescriptions: + model.medicationForInPatient[index], + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + startOn: AppDateUtils + .getDateTimeFromServerFormat( + model.medicationForInPatient[index] + .startDatetime, + ), + stopOn: AppDateUtils + .getDateTimeFromServerFormat( + model.medicationForInPatient[index] + .stopDatetime, + ), + ), + ), + ), + ); + }), + ], + ), + ), + ), + ))); + } +} diff --git a/lib/screens/prescription/prescription_authorazation_form.dart b/lib/screens/prescription/prescription_authorazation_form.dart deleted file mode 100644 index 8b137891..00000000 --- a/lib/screens/prescription/prescription_authorazation_form.dart +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/screens/prescription/prescription_checkout_screen.dart b/lib/screens/prescription/prescription_checkout_screen.dart index 608dd643..3930cffd 100644 --- a/lib/screens/prescription/prescription_checkout_screen.dart +++ b/lib/screens/prescription/prescription_checkout_screen.dart @@ -8,10 +8,10 @@ import 'package:doctor_app_flutter/core/model/procedure/procedure_template_detai import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart'; import 'package:doctor_app_flutter/core/provider/robot_provider.dart'; import 'package:doctor_app_flutter/core/viewModel/medicine_view_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/prescription/prescription_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; -import 'package:doctor_app_flutter/models/SOAP/GetAssessmentReqModel.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/GetAssessmentReqModel.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/prescription/prescription_text_filed.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; @@ -97,7 +97,7 @@ class _PrescriptionCheckOutScreenState Helpers.showErrorToast(model.error); } else if (model.state == ViewState.Idle) { model.getPrescriptions(patient); - DrAppToastMsg.showSuccesToast('Medication has been added'); + DrAppToastMsg.showSuccesToast(TranslationBase.of(context).medicationHasBeenAdded); } } @@ -114,8 +114,8 @@ class _PrescriptionCheckOutScreenState TextEditingController indicationController = TextEditingController(); TextEditingController instructionController = TextEditingController(); - bool visbiltyPrescriptionForm = true; - bool visbiltySearch = true; + bool visibilityPrescriptionForm = true; + bool visibilitySearch = true; final myController = TextEditingController(); DateTime selectedDate; @@ -129,10 +129,10 @@ class _PrescriptionCheckOutScreenState final searchController = TextEditingController(); stt.SpeechToText speech = stt.SpeechToText(); var event = RobotProvider(); - var reconizedWord; + var recognizedWord; final GlobalKey formKey = GlobalKey(); - final double spaceBetweenTextFileds = 12; + final double spaceBetweenTextFields = 12; dynamic route; dynamic frequency; dynamic duration; @@ -179,7 +179,7 @@ class _PrescriptionCheckOutScreenState } void statusListener(String status) { - reconizedWord = status == 'listening' ? 'Lisening...' : 'Sorry....'; + recognizedWord = status == 'listening' ? 'Listening...' : 'Sorry....'; } void requestPermissions() async { @@ -189,14 +189,14 @@ class _PrescriptionCheckOutScreenState } void resultListener(result) { - reconizedWord = result.recognizedWords; - event.setValue({"searchText": reconizedWord}); + recognizedWord = result.recognizedWords; + event.setValue({"searchText": recognizedWord}); if (result.finalResult == true) { setState(() { SpeechToText.closeAlertDialog(context); speech.stop(); - instructionController.text += reconizedWord + '\n'; + instructionController.text += recognizedWord + '\n'; }); } else { print(result.finalResult); @@ -221,6 +221,7 @@ class _PrescriptionCheckOutScreenState final screenSize = MediaQuery.of(context).size; return BaseView( onModelReady: (model) async { + // TODO Elham* move this logic to the model model.getItem( itemID: int.parse( widget.groupProcedures.aliasN.replaceAll("item code ;", ""))); @@ -299,7 +300,7 @@ class _PrescriptionCheckOutScreenState ], ), SizedBox( - height: spaceBetweenTextFileds, + height: spaceBetweenTextFields, ), Container( child: Form( @@ -316,10 +317,10 @@ class _PrescriptionCheckOutScreenState ), ), SizedBox( - height: spaceBetweenTextFileds, + height: spaceBetweenTextFields, ), Visibility( - visible: visbiltyPrescriptionForm, + visible: visibilityPrescriptionForm, child: Container( child: Column( children: [ @@ -337,7 +338,7 @@ class _PrescriptionCheckOutScreenState fontWeight: FontWeight.w600, ), Radio( - activeColor: Color(0xFFB9382C), + activeColor: AppGlobal.appRedColor, value: 1, groupValue: selectedType, onChanged: (value) { @@ -349,7 +350,7 @@ class _PrescriptionCheckOutScreenState ], ), ), - SizedBox(height: spaceBetweenTextFileds), + SizedBox(height: spaceBetweenTextFields), Container( width: double.infinity, child: Row( @@ -362,7 +363,7 @@ class _PrescriptionCheckOutScreenState child: AppTextFieldCustom( height: 40, validationError: strengthError, - hintText: 'Strength', + hintText: TranslationBase.of(context).strength, isTextFieldHasSuffix: false, enabled: true, controller: strengthController, @@ -410,7 +411,7 @@ class _PrescriptionCheckOutScreenState ], ), ), - SizedBox(height: spaceBetweenTextFileds), + SizedBox(height: spaceBetweenTextFields), PrescriptionTextFiled( elementList: model.itemMedicineListRoute, @@ -427,7 +428,7 @@ class _PrescriptionCheckOutScreenState hintText: TranslationBase.of(context).route, ), - SizedBox(height: spaceBetweenTextFileds), + SizedBox(height: spaceBetweenTextFields), PrescriptionTextFiled( hintText: TranslationBase.of(context) .frequency, @@ -460,7 +461,7 @@ class _PrescriptionCheckOutScreenState } }); }), - SizedBox(height: spaceBetweenTextFileds), + SizedBox(height: spaceBetweenTextFields), PrescriptionTextFiled( hintText: TranslationBase.of(context) .doseTime, @@ -475,7 +476,7 @@ class _PrescriptionCheckOutScreenState doseTime = selectedValue; }); }), - SizedBox(height: spaceBetweenTextFileds), + SizedBox(height: spaceBetweenTextFields), if (model .patientAssessmentList.isNotEmpty) Container( @@ -533,7 +534,7 @@ class _PrescriptionCheckOutScreenState ], ), ), - SizedBox(height: spaceBetweenTextFileds), + SizedBox(height: spaceBetweenTextFields), Container( height: screenSize.height * 0.070, color: Colors.white, @@ -556,7 +557,7 @@ class _PrescriptionCheckOutScreenState ), ), ), - SizedBox(height: spaceBetweenTextFileds), + SizedBox(height: spaceBetweenTextFields), PrescriptionTextFiled( element: duration, elementError: durationError, @@ -590,9 +591,9 @@ class _PrescriptionCheckOutScreenState }); }, ), - SizedBox(height: spaceBetweenTextFileds), - SizedBox(height: spaceBetweenTextFileds), - SizedBox(height: spaceBetweenTextFileds), + SizedBox(height: spaceBetweenTextFields), + SizedBox(height: spaceBetweenTextFields), + SizedBox(height: spaceBetweenTextFields), Container( decoration: BoxDecoration( borderRadius: BorderRadius.all( @@ -630,7 +631,7 @@ class _PrescriptionCheckOutScreenState ], ), ), - SizedBox(height: spaceBetweenTextFileds), + SizedBox(height: spaceBetweenTextFields), Container( margin: EdgeInsets.all( SizeConfig.widthMultiplier * 5), @@ -638,7 +639,7 @@ class _PrescriptionCheckOutScreenState alignment: WrapAlignment.center, children: [ AppButton( - color: Color(0xff359846), + color: AppGlobal.appGreenColor, title: TranslationBase.of(context) .addMedication, fontWeight: FontWeight.w600, @@ -651,19 +652,12 @@ class _PrescriptionCheckOutScreenState selectedDate != null && strengthController.text != "") { - // if (_selectedMedication.isNarcotic == true) { - // DrAppToastMsg.showErrorToast(TranslationBase.of(context) - // .narcoticMedicineCanOnlyBePrescribedFromVida); - // Navigator.pop(context); - // return; - // } - if (double.parse( strengthController .text) > 1000.0) { DrAppToastMsg.showErrorToast( - "1000 is the MAX for the strength"); + TranslationBase.of(context).thousandIsTheMAXForTheStrength,); return; } if (double.parse( @@ -671,14 +665,12 @@ class _PrescriptionCheckOutScreenState .text) < 0.0) { DrAppToastMsg.showErrorToast( - "strength can't be zero"); + TranslationBase.of(context).strengthCanNotBeZero,); return; } - if (formKey.currentState .validate()) { Navigator.pop(context); - // openDrugToDrug(model); { postPrescription( icdCode: model @@ -696,13 +688,6 @@ class _PrescriptionCheckOutScreenState .icdCode10ID .toString() : "test", - // icdCode: model - // .patientAssessmentList - // .map((value) => value - // .icdCode10ID - // .trim()) - // .toList() - // .join(' '), dose: strengthController .text, doseUnit: model @@ -862,6 +847,8 @@ class _PrescriptionCheckOutScreenState } } + /// TODO Elham* Use it from the textfeild utils + InputDecoration textFieldSelectorDecoration( String hintText, String selectedText, bool isDropDown, {Icon suffixIcon}) { diff --git a/lib/screens/prescription/prescription_details_page.dart b/lib/screens/prescription/prescription_details_page.dart deleted file mode 100644 index 623cee90..00000000 --- a/lib/screens/prescription/prescription_details_page.dart +++ /dev/null @@ -1,168 +0,0 @@ -import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report.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:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; - -class PrescriptionDetailsPage extends StatelessWidget { - final PrescriptionReport prescriptionReport; - - PrescriptionDetailsPage({Key key, this.prescriptionReport}); - - @override - Widget build(BuildContext context) { - return AppScaffold( - isShowAppBar: true, - appBarTitle: TranslationBase.of(context).prescriptions, - body: SingleChildScrollView( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - width: double.infinity, - margin: EdgeInsets.only(top: 10, left: 10, right: 10), - padding: EdgeInsets.all(8.0), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.all( - Radius.circular(10.0), - ), - border: Border.all(color: Colors.grey[200], width: 0.5), - ), - child: Row( - children: [ - ClipRRect( - borderRadius: BorderRadius.all(Radius.circular(5)), - child: Image.network( - prescriptionReport.imageSRCUrl, - fit: BoxFit.cover, - width: 60, - height: 70, - ), - ), - Expanded( - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Center( - child: AppText( - prescriptionReport.itemDescription.isNotEmpty - ? prescriptionReport.itemDescription - : prescriptionReport.itemDescriptionN), - ), - ), - ) - ], - ), - ), - Container( - color: Colors.white, - margin: EdgeInsets.only(top: 10, left: 10, right: 10), - child: Table( - border: TableBorder.symmetric( - inside: BorderSide(width: 0.5), - outside: BorderSide(width: 0.5)), - children: [ - TableRow( - children: [ - Container( - color: Colors.white, - height: 30, - width: double.infinity, - child: Center( - child: AppText( - TranslationBase.of(context).route, - fontSize: 14, - ))), - Container( - color: Colors.white, - height: 30, - width: double.infinity, - child: Center( - child: AppText( - TranslationBase.of(context).frequency, - fontSize: 14, - ))), - Container( - color: Colors.white, - width: double.infinity, - padding: EdgeInsets.symmetric(horizontal: 4), - child: Center( - child: AppText( - "${TranslationBase.of(context).dailyDoses}", - fontSize: 14, - ))), - Container( - color: Colors.white, - height: 30, - width: double.infinity, - child: Center( - child: AppText( - TranslationBase.of(context).duration, - fontSize: 14, - ))), - ], - ), - TableRow( - children: [ - Container( - color: Colors.white, - height: 50, - width: double.infinity, - child: - Center(child: Text(prescriptionReport.routeN))), - Container( - color: Colors.white, - height: 50, - width: double.infinity, - child: Center( - child: - Text(prescriptionReport.frequencyN ?? ''))), - Container( - color: Colors.white, - height: 50, - width: double.infinity, - child: Center( - child: Text( - '${prescriptionReport.doseDailyQuantity}'))), - Container( - color: Colors.white, - height: 50, - width: double.infinity, - child: - Center(child: Text('${prescriptionReport.days}'))) - ], - ), - ], - ), - ), - Container( - margin: EdgeInsets.only(top: 10, left: 10, right: 10), - width: double.infinity, - color: Colors.white, - padding: EdgeInsets.all(5), - child: Center( - child: Column( - children: [ - AppText(TranslationBase.of(context).notes), - SizedBox( - height: 5, - ), - Divider( - height: 0.5, - color: Colors.grey[300], - ), - SizedBox( - height: 5, - ), - AppText(prescriptionReport.remarks ?? ''), - ], - ), - ), - ) - ], - ), - ), - ); - } -} diff --git a/lib/screens/prescription/prescription_item_in_patient_page.dart b/lib/screens/prescription/prescription_item_in_patient_page.dart deleted file mode 100644 index eb95257b..00000000 --- a/lib/screens/prescription/prescription_item_in_patient_page.dart +++ /dev/null @@ -1,235 +0,0 @@ -import 'package:doctor_app_flutter/core/model/Prescriptions/get_medication_for_inpatient_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; -import 'package:doctor_app_flutter/screens/base/base_view.dart'; -import 'package:doctor_app_flutter/util/date-utils.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - -class PrescriptionItemsInPatientPage extends StatelessWidget { - final GetMedicationForInPatientModel prescriptions; - final PatiantInformtion patient; - final String patientType; - final String arrivalType; - final DateTime startOn; - final DateTime stopOn; - final int prescriptionIndex; - - PrescriptionItemsInPatientPage( - {Key key, - this.prescriptions, - this.patient, - this.patientType, - this.arrivalType, - this.stopOn, - this.startOn, - this.prescriptionIndex}); - - @override - Widget build(BuildContext context) { - ProjectViewModel projectViewModel = Provider.of(context); - return BaseView( - onModelReady: (model) async { - if (model.medicationForInPatient.length == 0) { - await model.getMedicationForInPatient(patient); - } - }, - builder: (_, model, widget) => AppScaffold( - isShowAppBar: true, - backgroundColor: Colors.grey[100], - baseViewModel: model, - appBar: PatientProfileAppBar(patient), - body: SingleChildScrollView( - child: Container( - child: Column( - children: [ - Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(12), - color: Colors.white, - ), - margin: EdgeInsets.all(12), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - margin: EdgeInsets.only(left: 18, right: 18), - child: AppText( - prescriptions.pHRItemDescription, - bold: true, - ), - ), - SizedBox( - height: 12, - ), - Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - SizedBox( - width: 18, - ), - SizedBox( - width: 10, - ), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - AppText( - TranslationBase.of(context).direction, - color: Colors.grey, - ), - Expanded( - child: AppText(" " + - prescriptions - .directionDescription - .toString() ?? - '')), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context).route, - color: Colors.grey, - ), - AppText(" " + - prescriptions.routeDescription - .toString() ?? - ''), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context).refill, - color: Colors.grey, - ), - Expanded( - child: AppText(" " + - prescriptions - .refillDescription - .toString() ?? - '')), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context).startDate, - color: Colors.grey, - ), - Expanded( - child: AppText( - '${AppDateUtils.getDayMonthYearDateFormatted(startOn, isArabic: projectViewModel.isArabic)}', - color: Colors.black, - fontWeight: FontWeight.w600, - fontSize: 14, - ), - ), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context).stopDate, - color: Colors.grey, - ), - Expanded( - child: AppText( - '${AppDateUtils.getDayMonthYearDateFormatted(stopOn, isArabic: projectViewModel.isArabic)}', - color: Colors.black, - fontWeight: FontWeight.w600, - fontSize: 14, - ), - ), - ], - ), - Row( - children: [ - AppText( - 'UOM', - color: Colors.grey, - ), - AppText(" " + - prescriptions.uomDescription - .toString() ?? - ''), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context).dailyDoses, - color: Colors.grey, - ), - AppText( - " " + prescriptions.dose.toString() ?? - ''), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context).status, - color: Colors.grey, - ), - AppText(" " + - prescriptions.statusDescription - .toString() ?? - ''), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context).processed, - color: Colors.grey, - ), - AppText(" " + - prescriptions.doctorName - .toString() ?? - ''), - ], - ), - // Row( - // children: [ - // AppText( - // TranslationBase.of(context).num, - // color: Colors.grey, - // ), - // AppText(" " + prescriptions.dose.toString() ?? ''), - // ], - // ), - SizedBox( - height: 12, - ), - AppText(prescriptions.comments ?? ''), - ], - ), - ) - ], - ) - ], - ), - ), - ), - ], - ), - ), - ), - ), - ); - } -} diff --git a/lib/screens/prescription/prescription_items_page.dart b/lib/screens/prescription/prescription_items_page.dart deleted file mode 100644 index 751a3deb..00000000 --- a/lib/screens/prescription/prescription_items_page.dart +++ /dev/null @@ -1,373 +0,0 @@ -import 'package:doctor_app_flutter/core/model/Prescriptions/Prescriptions.dart'; -import 'package:doctor_app_flutter/core/viewModel/prescriptions_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; -import 'package:doctor_app_flutter/screens/base/base_view.dart'; -import 'package:doctor_app_flutter/util/date-utils.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/dialogs/ShowImageDialog.dart'; -import 'package:eva_icons_flutter/eva_icons_flutter.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; - -class PrescriptionItemsPage extends StatelessWidget { - final Prescriptions prescriptions; - final PatiantInformtion patient; - final String patientType; - final String arrivalType; - - PrescriptionItemsPage( - {Key key, - this.prescriptions, - this.patient, - this.patientType, - this.arrivalType}); - - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.getPrescriptionReport( - prescriptions: prescriptions, patient: patient), - builder: (_, model, widget) => AppScaffold( - isShowAppBar: true, - backgroundColor: Colors.grey[100], - baseViewModel: model, - appBar: PatientProfileAppBar( - patient, - clinic: prescriptions.clinicDescription, - branch: prescriptions.name, - isPrescriptions: true, - appointmentDate: AppDateUtils.getDateTimeFromServerFormat( - prescriptions.appointmentDate), - doctorName: prescriptions.doctorName, - profileUrl: prescriptions.doctorImageURL, - isAppointmentHeader: true, - ), - body: SingleChildScrollView( - child: Container( - child: Column( - children: [ - if (!prescriptions.isInOutPatient) - ...List.generate( - model.prescriptionReportList.length, - (index) => Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(12), - color: Colors.white, - ), - margin: EdgeInsets.all(12), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - margin: - EdgeInsets.only(left: 18, right: 18), - child: AppText( - model.prescriptionReportList[index] - .itemDescription.isNotEmpty - ? model - .prescriptionReportList[index] - .itemDescription - : model - .prescriptionReportList[index] - .itemDescriptionN, - bold: true, - )), - SizedBox( - height: 12, - ), - Row( - children: [ - SizedBox( - width: 18, - ), - Container( - decoration: BoxDecoration( - shape: BoxShape.circle, - border: Border.all( - width: 0.5, - color: Colors.grey)), - height: 55, - width: 55, - child: InkWell( - onTap: () { - showDialog( - context: context, - builder: (ctx) => - ShowImageDialog( - imageUrl: model - .prescriptionReportEnhList[ - index] - .imageSRCUrl, - )); - }, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Image.network( - model - .prescriptionReportList[index] - .imageSRCUrl, - fit: BoxFit.cover, - ), - ), - ), - ), - SizedBox( - width: 10, - ), - Expanded( - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Row( - children: [ - AppText( - TranslationBase.of(context) - .route, - color: Colors.grey, - ), - Expanded( - child: AppText(" " + - model - .prescriptionReportList[ - index] - .routeN)), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context) - .frequency, - color: Colors.grey, - ), - AppText(" " + - model - .prescriptionReportList[ - index] - .frequencyN ?? - ''), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context) - .dailyDoses, - color: Colors.grey, - ), - AppText(" " + - model - .prescriptionReportList[ - index] - .doseDailyQuantity ?? - ''), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context) - .duration, - color: Colors.grey, - ), - AppText(" " + - model - .prescriptionReportList[ - index] - .days - .toString() ?? - ''), - ], - ), - SizedBox( - height: 12, - ), - AppText(model - .prescriptionReportList[ - index] - .remarks ?? - ''), - ], - ), - ) - ], - ) - ], - ), - ), - )) - else - ...List.generate( - model.prescriptionReportEnhList.length, - (index) => Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(12), - color: Colors.white, - ), - margin: EdgeInsets.all(12), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - margin: EdgeInsets.only(left: 18, right: 18), - child: AppText( - model.prescriptionReportEnhList[index] - .itemDescription, - bold: true, - ), - ), - SizedBox( - height: 12, - ), - Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - SizedBox( - width: 18, - ), - Container( - decoration: BoxDecoration( - shape: BoxShape.circle, - border: Border.all( - width: 0.5, color: Colors.grey)), - height: 55, - width: 55, - child: InkWell( - onTap: () { - showDialog( - context: context, - builder: (ctx) => ShowImageDialog( - imageUrl: model - .prescriptionReportEnhList[ - index] - .imageSRCUrl, - )); - }, - child: Stack( - children: [ - Padding( - padding: const EdgeInsets.all(8.0), - child: Image.network( - model - .prescriptionReportEnhList[ - index] - .imageSRCUrl, - fit: BoxFit.cover, - ), - ), - Positioned( - top: 10, - right: 10, - child: Icon( - EvaIcons.search, - color: Colors.grey, - size: 35, - )) - ], - ), - ), - ), - SizedBox( - width: 10, - ), - Expanded( - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Row( - children: [ - AppText( - TranslationBase.of(context).route, - color: Colors.grey, - ), - Expanded( - child: AppText(" " + - model - .prescriptionReportEnhList[ - index] - .route ?? - '')), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context) - .frequency, - color: Colors.grey, - ), - AppText(" " + - model - .prescriptionReportEnhList[ - index] - .frequency ?? - ''), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context) - .dailyDoses, - color: Colors.grey, - ), - AppText(" " + - model - .prescriptionReportEnhList[ - index] - .doseDailyQuantity - .toString() ?? - ''), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context) - .duration, - color: Colors.grey, - ), - AppText(" " + - model - .prescriptionReportList[ - index] - .days - .toString() ?? - ''), - ], - ), - SizedBox( - height: 12, - ), - AppText(model - .prescriptionReportEnhList[index] - .remarks ?? - ''), - ], - ), - ) - ], - ) - ], - ), - ), - ), - ), - ], - ), - ), - ), - ), - ); - } -} diff --git a/lib/screens/prescription/prescription_text_filed.dart b/lib/screens/prescription/prescription_text_filed.dart index 8f2676bc..95b70182 100644 --- a/lib/screens/prescription/prescription_text_filed.dart +++ b/lib/screens/prescription/prescription_text_filed.dart @@ -44,7 +44,7 @@ class _PrescriptionTextFiledState extends State { list: widget.elementList, attributeName: '${widget.keyName}', attributeValueId: widget.elementList.length == 1 - ? widget.elementList[0]['${widget.keyId}'] + ? widget.elementList[0]['${widget.keyId}'].toString() : '${widget.keyId}', okText: TranslationBase.of(context).ok, okFunction: (selectedValue) => diff --git a/lib/screens/prescription/prescription_warnings.dart b/lib/screens/prescription/prescription_warnings.dart deleted file mode 100644 index c91ce9c9..00000000 --- a/lib/screens/prescription/prescription_warnings.dart +++ /dev/null @@ -1,168 +0,0 @@ -import 'package:doctor_app_flutter/config/config.dart'; -import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart'; -import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; - -void prescriptionWarning(context) { - showModalBottomSheet( - context: context, - isScrollControlled: true, - builder: (BuildContext bc) { - return SingleChildScrollView( - child: Padding( - padding: const EdgeInsets.all(12.0), - child: Container( - height: 600, - child: Column( - children: [ - ...List.generate( - 5, - (index) => Container( - child: ExpansionTile( - title: AppText('Prescription warning and alerts(0)'), - children: [ - Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - AppText( - 'DOSESCREENINGRESULTFORETCETC', - color: Color(0XFFB8382C), - ) - ], - ) - ], - ), - ), - ), - SizedBox( - height: 10.0, - ), - Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(6.0)), - border: - Border.all(width: 1.0, color: HexColor("#CCCCCC"))), - child: AppTextFormField( - labelText: 'Remarks', - borderColor: Colors.white, - textInputType: TextInputType.number, - inputFormatter: ONLY_NUMBERS, - ), - ), - SizedBox( - height: 95.0, - ), - Container( - margin: EdgeInsets.all(SizeConfig.widthMultiplier * 2), - child: Wrap( - alignment: WrapAlignment.center, - children: [ - AppButton( - title: 'CONTINUE', - onPressed: () { - Navigator.pop(context); - authorizationForm(context); - }, - ), - ], - ), - ), - Container( - margin: EdgeInsets.all(SizeConfig.widthMultiplier * 2), - child: Wrap( - alignment: WrapAlignment.center, - children: [ - AppButton( - color: Colors.white, - title: 'remove', - fontColor: Colors.red, - onPressed: () { - Navigator.pop(context); - prescriptionWarning(context); - }, - ), - ], - ), - ), - ], - ), - ), - )); - }); -} - -void authorizationForm(context) { - showModalBottomSheet( - context: context, - isScrollControlled: true, - builder: (BuildContext bc) { - return Container( - height: 500, - child: Form( - child: Padding( - padding: EdgeInsets.symmetric(horizontal: 20.0, vertical: 10.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - 'Prescription authorization'.toUpperCase(), - fontWeight: FontWeight.w900, - ), - SizedBox( - height: 30.0, - ), - Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(6.0)), - border: Border.all( - width: 1.0, color: HexColor("#CCCCCC"))), - child: AppTextFormField( - labelText: 'Auth ID', - borderColor: Colors.white, - textInputType: TextInputType.number, - inputFormatter: ONLY_NUMBERS, - ), - ), - SizedBox( - height: 12.0, - ), - Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(6.0)), - border: Border.all( - width: 1.0, color: HexColor("#CCCCCC"))), - child: AppTextFormField( - labelText: 'Password', - borderColor: Colors.white, - textInputType: TextInputType.text, - inputFormatter: ONLY_LETTERS, - obscureText: true, - ), - ), - SizedBox( - height: 190.0, - ), - Container( - margin: EdgeInsets.all(SizeConfig.widthMultiplier * 2), - child: Wrap( - alignment: WrapAlignment.center, - children: [ - AppButton( - title: 'CONTINUE', - onPressed: () { - Navigator.pop(context); - authorizationForm(context); - }, - ), - ], - ), - ), - ], - ), - ), - )); - }); -} diff --git a/lib/screens/prescription/prescriptions_items/preacription_items_widget.dart b/lib/screens/prescription/prescriptions_items/preacription_items_widget.dart new file mode 100644 index 00000000..70fa1765 --- /dev/null +++ b/lib/screens/prescription/prescriptions_items/preacription_items_widget.dart @@ -0,0 +1,157 @@ +import 'package:doctor_app_flutter/core/viewModel/prescription/prescription_view_model.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart'; +import 'package:eva_icons_flutter/eva_icons_flutter.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import '../../../widgets/shared/dialogs/ShowImageDialog.dart'; + + +class PrescriptionItemsWidget extends StatelessWidget { + final String itemDescription; + final String route; + final String frequency; + final dynamic dailyDoses; + final String imageSRCUrl; + final String remarks; + final int days; + final PrescriptionViewModel prescriptionViewModel; + + + + PrescriptionItemsWidget( + {this.itemDescription, + this.route, + this.frequency, + this.dailyDoses, + this.imageSRCUrl, + this.remarks, + this.days, this.prescriptionViewModel, + }); + + @override + Widget build(BuildContext context) { + return Column( + children: [ + ...List.generate( + // TODO Elham* List.generate to list.builder + prescriptionViewModel.prescriptionReportEnhList.length, + (index) => Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12), + color: Colors.white, + ), + margin: EdgeInsets.all(12), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(left: 18, right: 18), + child: AppText( + prescriptionViewModel.prescriptionReportEnhList[index].itemDescription, + bold: true, + ), + ), + SizedBox( + height: 12, + ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + width: 18, + ), + Container( + decoration: BoxDecoration( + shape: BoxShape.circle, + border: Border.all( + width: 0.5, color: Colors.grey)), + height: 55, + width: 55, + child: InkWell( + onTap: () { + showDialog( + context: context, + builder: (ctx) => ShowImageDialog( + imageUrl: prescriptionViewModel.prescriptionReportEnhList[index].imageSRCUrl, + )); + }, + child: Stack( + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Image.network( + prescriptionViewModel.prescriptionReportEnhList[index].imageSRCUrl, + fit: BoxFit.cover, + ), + ), + Positioned( + top: 10, + right: 10, + child: Icon( + EvaIcons.search, + color: Colors.grey, + size: 35, + )) + ], + ), + ), + ), + SizedBox( + width: 10, + ), + Expanded( + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + CustomRow( + label: TranslationBase.of(context).route + ' : ', + value: " " + prescriptionViewModel.prescriptionReportEnhList[index].route ?? '', + labelSize: 13, + valueSize: 13, + ), + CustomRow( + label: TranslationBase.of(context).frequency + ' : ', + value: " " + prescriptionViewModel.prescriptionReportEnhList[index].frequency ?? '', + labelSize: 13, + valueSize: 13, + ), + CustomRow( + label: TranslationBase.of(context).dailyDoses + ' : ', + value: " " + prescriptionViewModel.prescriptionReportEnhList[index].doseDailyQuantity.toString() ?? '', + labelSize: 13, + valueSize: 13, + ), + CustomRow( + label: TranslationBase.of(context).duration + ' : ', + value: " " + prescriptionViewModel.prescriptionReportList[index].days.toString() ?? '', + labelSize: 13, + valueSize: 13, + ), + SizedBox( + height: 12, + ), + CustomRow( + label: '', + value: prescriptionViewModel.prescriptionReportList[index].remarks ?? '', + valueSize: 14, + ), + ], + ), + ) + ], + ) + ], + ), + ), + ), + ), + ], + ); + } +} diff --git a/lib/screens/prescription/prescriptions_items/prescription_items_in_patient.dart b/lib/screens/prescription/prescriptions_items/prescription_items_in_patient.dart new file mode 100644 index 00000000..cc21e1e3 --- /dev/null +++ b/lib/screens/prescription/prescriptions_items/prescription_items_in_patient.dart @@ -0,0 +1,187 @@ +import 'package:doctor_app_flutter/core/model/Prescriptions/get_medication_for_inpatient_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/prescription/prescription_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class PrescriptionItemsInPatientPage extends StatelessWidget { + final GetMedicationForInPatientModel prescriptions; + final PatiantInformtion patient; + final String patientType; + final String arrivalType; + final DateTime startOn; + final DateTime stopOn; + final int prescriptionIndex; + + PrescriptionItemsInPatientPage( + {Key key, + this.prescriptions, + this.patient, + this.patientType, + this.arrivalType, + this.stopOn, + this.startOn, + this.prescriptionIndex}); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) async { + if (model.medicationForInPatient.length == 0) { + await model.getMedicationForInPatient(patient); + } + }, + builder: (_, model, widget) => AppScaffold( + isShowAppBar: true, + backgroundColor: Colors.grey[100], + baseViewModel: model, + appBar: PatientProfileAppBar(patient), + body: SingleChildScrollView( + child: Container( + child: Column( + children: [ + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12), + color: Colors.white, + ), + margin: EdgeInsets.all(12), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(left: 18, right: 18), + child: AppText( + prescriptions.pHRItemDescription, + bold: true, + ), + ), + SizedBox( + height: 12, + ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + width: 18, + ), + SizedBox( + width: 10, + ), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + CustomRow( + label: TranslationBase.of(context).direction + ' :', + value: " " + prescriptions.directionDescription.toString() ?? '', + isCopyable: false, + isExpanded: false, + valueSize: 13, + labelSize: 13, + ), + CustomRow( + label: TranslationBase.of(context).route + ' :', + value: " " + prescriptions.routeDescription ?? '', + isCopyable: false, + isExpanded: false, + valueSize: 13, + labelSize: 13, + ), + CustomRow( + label: TranslationBase.of(context).refill + ' :', + value: " " + prescriptions.refillDescription ?? '', + isCopyable: false, + isExpanded: false, + valueSize: 13, + labelSize: 13, + ), + CustomRow( + label: TranslationBase.of(context).startDate + ' :', + value: " " + AppDateUtils.getDayMonthYearDateFormatted(startOn, isArabic: projectViewModel.isArabic) ?? '', + isCopyable: false, + isExpanded: false, + valueSize: 13, + labelSize: 13, + ), + CustomRow( + label: TranslationBase.of(context).stopDate + ' :', + value: " " + AppDateUtils.getDayMonthYearDateFormatted(stopOn, isArabic: projectViewModel.isArabic) ?? '', + isCopyable: false, + isExpanded: false, + valueSize: 13, + labelSize: 13, + ), + CustomRow( + label: 'UOM' + ' :', + value: " " + prescriptions.uomDescription.toString() ?? '', + isCopyable: false, + isExpanded: false, + valueSize: 13, + labelSize: 13, + ), + CustomRow( + label: TranslationBase.of(context).dailyDoses, + value: " " + prescriptions.dose.toString() ?? '', + isCopyable: false, + isExpanded: false, + valueSize: 13, + labelSize: 13, + ), + CustomRow( + label: TranslationBase.of(context).status, + value: " " + prescriptions.statusDescription.toString() ?? '', + isCopyable: false, + isExpanded: false, + valueSize: 13, + labelSize: 13, + ), + CustomRow( + label: TranslationBase.of(context).processed, + value: " " + prescriptions.doctorName.toString() ?? '', + isCopyable: false, + isExpanded: false, + valueSize: 13, + labelSize: 13, + ), + SizedBox( + height: 12, + ), + CustomRow( + label: '', + value: prescriptions.comments ?? '', + isCopyable: false, + isExpanded: false, + valueSize: 13, + labelSize: 13, + ), + ], + ), + ) + ], + ) + ], + ), + ), + ), + ], + ), + ), + ), + ), + ); + } +} diff --git a/lib/screens/prescription/prescriptions_items/prescription_items_out_patient.dart b/lib/screens/prescription/prescriptions_items/prescription_items_out_patient.dart new file mode 100644 index 00000000..e49fb5e2 --- /dev/null +++ b/lib/screens/prescription/prescriptions_items/prescription_items_out_patient.dart @@ -0,0 +1,74 @@ +import 'package:doctor_app_flutter/core/model/Prescriptions/Prescriptions.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/prescription/prescription_view_model.dart'; +import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/screens/prescription/prescriptions_items/preacription_items_widget.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/dialogs/ShowImageDialog.dart'; +import 'package:eva_icons_flutter/eva_icons_flutter.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class PrescriptionItemsPage extends StatelessWidget { + final Prescriptions prescriptions; + final PatiantInformtion patient; + final String arrivalType; + + PrescriptionItemsPage( + {Key key, + this.prescriptions, + this.patient, + this.arrivalType}); + + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) => model.getPrescriptionReport( + prescriptions: prescriptions, patient: patient), + builder: (_, model, widget) => AppScaffold( + isShowAppBar: true, + backgroundColor: Colors.grey[100], + baseViewModel: model, + appBar: PatientProfileAppBar( + patient, + clinic: prescriptions.clinicDescription, + branch: prescriptions.name, + isPrescriptions: true, + appointmentDate: AppDateUtils.getDateTimeFromServerFormat( + prescriptions.appointmentDate), + doctorName: prescriptions.doctorName, + profileUrl: prescriptions.doctorImageURL, + isAppointmentHeader: true, + ), + body: SingleChildScrollView( + child: Container( + child: Column( + children: [ + ListView.builder( + scrollDirection: Axis.vertical, + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemCount: model.prescriptionReportEnhList.length, + itemBuilder: (context, index) => PrescriptionItemsWidget( + frequency: model.prescriptionReportEnhList[index].frequency, + itemDescription: model.prescriptionReportEnhList[index].itemDescription, + days: model.prescriptionReportEnhList[index].days, + route: model.prescriptionReportEnhList[index].route, + dailyDoses: model.prescriptionReportEnhList[index].doseDailyQuantity, + imageSRCUrl: model.prescriptionReportEnhList[index].imageSRCUrl, + remarks: model.prescriptionReportEnhList[index].remarks, + prescriptionViewModel: model, + ), + ), + ], + ), + ), + ), + ), + ); + } +} diff --git a/lib/screens/prescription/prescriptions_page.dart b/lib/screens/prescription/prescriptions_page.dart deleted file mode 100644 index ef66b82b..00000000 --- a/lib/screens/prescription/prescriptions_page.dart +++ /dev/null @@ -1,218 +0,0 @@ -import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; -import 'package:doctor_app_flutter/screens/base/base_view.dart'; -import 'package:doctor_app_flutter/screens/prescription/prescription_item_in_patient_page.dart'; -import 'package:doctor_app_flutter/screens/prescription/prescription_items_page.dart'; -import 'package:doctor_app_flutter/screens/procedures/ProcedureType.dart'; -import 'package:doctor_app_flutter/screens/procedures/base_add_procedure_tab_page.dart'; -import 'package:doctor_app_flutter/util/date-utils.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/doctor_card.dart'; -import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; -import 'package:doctor_app_flutter/widgets/shared/user-guid/in_patient_doctor_card.dart'; -import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; -import 'package:doctor_app_flutter/widgets/transitions/slide_up_page.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; - -import '../../widgets/shared/errors/error_message.dart'; - -class PrescriptionsPage extends StatelessWidget { - @override - Widget build(BuildContext context) { - final routeArgs = ModalRoute.of(context).settings.arguments as Map; - PatiantInformtion patient = routeArgs['patient']; - String patientType = routeArgs['patientType']; - String arrivalType = routeArgs['arrivalType']; - bool isInpatient = routeArgs['isInpatient']; - bool isFromLiveCare = routeArgs['isFromLiveCare']; - bool isSelectInpatient = routeArgs['isSelectInpatient']; - return BaseView( - onModelReady: (model) => patient.admissionNo == null - ? model.getPrescriptions(patient, patientType: patientType) - : model.getMedicationForInPatient(patient), - builder: (_, model, w) => AppScaffold( - baseViewModel: model, - isShowAppBar: true, - backgroundColor: Colors.grey[100], - appBar: PatientProfileAppBar( - patient, - isInpatient: isInpatient, - ), - body: patient.admissionNo == null - ? FractionallySizedBox( - widthFactor: 1.0, - child: ListView( - physics: BouncingScrollPhysics(), - children: [ - SizedBox( - height: 12, - ), - if (model.prescriptionsList.isNotEmpty && - patient.patientStatusType != 43) - Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - ServiceTitle( - title: TranslationBase.of(context).orders, - subTitle: - TranslationBase.of(context).prescriptions, - ), - ], - ), - ), - if (patient.patientStatusType != null && - patient.patientStatusType == 43) - Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - ServiceTitle( - title: TranslationBase.of(context).orders, - subTitle: - TranslationBase.of(context).prescriptions, - ), - ], - ), - ), - if ((patient.patientStatusType != null && - patient.patientStatusType == 43) || - (isFromLiveCare && patient.appointmentNo != null)) - AddNewOrder( - onTap: () { - Navigator.push( - context, - SlideUpPageRoute( - widget: BaseAddProcedureTabPage( - patient: patient, - prescriptionModel: model, - procedureType: ProcedureType.PRESCRIPTION, - ), - settingRoute: 'AddProcedureTabPage'), - ); - }, - label: TranslationBase.of(context) - .applyForNewPrescriptionsOrder, - ), - ...List.generate( - model.prescriptionsList.length, - (index) => InkWell( - onTap: () => Navigator.push( - context, - FadePage( - page: PrescriptionItemsPage( - prescriptions: - model.prescriptionsList[index], - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - ), - ), - ), - child: DoctorCard( - doctorName: - model.prescriptionsList[index].doctorName, - profileUrl: model - .prescriptionsList[index].doctorImageURL, - branch: model.prescriptionsList[index].name, - clinic: model.prescriptionsList[index] - .clinicDescription, - isPrescriptions: true, - appointmentDate: - AppDateUtils.getDateTimeFromServerFormat( - model.prescriptionsList[index] - .appointmentDate, - ), - ))), - if (model.prescriptionsList.isEmpty && - patient.patientStatusType != 43) - Center( - child: ErrorMessage( - error: TranslationBase.of(context) - .noPrescriptionsFound, - )) - ], - ), - ) - : NetworkBaseView( - baseViewModel: model, - child: FractionallySizedBox( - widthFactor: 1.0, - child: ListView( - physics: BouncingScrollPhysics(), - children: [ - ListView.builder( - scrollDirection: Axis.vertical, - physics: NeverScrollableScrollPhysics(), - shrinkWrap: true, - itemCount: model.medicationForInPatient.length, - itemBuilder: (context, index) { - //model.medicationForInPatient.length, - return InkWell( - onTap: () => Navigator.push( - context, - FadePage( - page: - PrescriptionItemsInPatientPage( - prescriptionIndex: index, - prescriptions: - model.medicationForInPatient[ - index], - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - startOn: AppDateUtils - .getDateTimeFromServerFormat( - model - .medicationForInPatient[ - index] - .startDatetime, - ), - stopOn: AppDateUtils - .getDateTimeFromServerFormat( - model - .medicationForInPatient[ - index] - .stopDatetime, - ), - ), - ), - ), - child: InPatientDoctorCard( - doctorName: model - .medicationForInPatient[index] - .pHRItemDescription, - profileUrl: 'sss', - branch: 'hamza', - clinic: 'basheer', - isPrescriptions: true, - appointmentDate: AppDateUtils - .getDateTimeFromServerFormat( - model.medicationForInPatient[index] - .prescriptionDatetime, - ), - createdBy: model - .medicationForInPatient[index] - .doctorName - .toString(), - )); - }), - if (model.medicationForInPatient.length == 0) - Center( - child: ErrorMessage( - error: TranslationBase.of(context) - .noPrescriptionsFound, - )) - ], - ), - ), - ))); - } -} diff --git a/lib/screens/prescription/update_prescription_form.dart b/lib/screens/prescription/update_prescription_form.dart deleted file mode 100644 index 1a39f7e6..00000000 --- a/lib/screens/prescription/update_prescription_form.dart +++ /dev/null @@ -1,1060 +0,0 @@ -import 'package:autocomplete_textfield/autocomplete_textfield.dart'; -import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:doctor_app_flutter/core/enum/viewstate.dart'; -import 'package:doctor_app_flutter/core/model/Prescriptions/post_prescrition_req_model.dart'; -import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/medicine_view_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; -import 'package:doctor_app_flutter/screens/base/base_view.dart'; -import 'package:doctor_app_flutter/util/date-utils.dart'; -import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; -import 'package:doctor_app_flutter/util/helpers.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart'; -import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:hexcolor/hexcolor.dart'; - -class UpdatePrescriptionForm extends StatefulWidget { - final String drugName; - final String doseStreangth; - final int drugId; - final String remarks; - final PatiantInformtion patient; - final String duration; - final String route; - final String dose; - final String doseUnit; - final String enteredRemarks; - final String startDate; - final String frequency; - final String drugNameGeneric; - final String uom; - final int box; - - final PrescriptionViewModel model; - - UpdatePrescriptionForm( - {this.drugName, - this.doseStreangth, - this.drugId, - this.remarks, - this.patient, - this.duration, - this.route, - this.dose, - this.startDate, - this.doseUnit, - this.enteredRemarks, - this.frequency, - this.model, - this.drugNameGeneric, - this.uom, - this.box}); - - @override - _UpdatePrescriptionFormState createState() => _UpdatePrescriptionFormState(); -} - -class _UpdatePrescriptionFormState extends State { - TextEditingController strengthController = TextEditingController(); - TextEditingController remarksController = TextEditingController(); - int testNum = 0; - int strengthChar; - PatiantInformtion patient; - dynamic route; - dynamic doseTime; - dynamic frequencyUpdate; - dynamic updatedDuration; - dynamic units; - GetMedicationResponseModel newSelectedMedication; - GlobalKey key = - new GlobalKey>(); - List indicationList; - dynamic indication; - DateTime selectedDate; - - @override - void initState() { - super.initState(); - strengthController.text = widget.doseStreangth; - remarksController.text = widget.remarks; - indicationList = List(); - - dynamic indication1 = {"id": 545, "name": "Gingival Hyperplasia"}; - dynamic indication2 = {"id": 546, "name": "Mild Drowsiness"}; - dynamic indication3 = {"id": 547, "name": "Hypertrichosis"}; - dynamic indication4 = {"id": 548, "name": "Mild Dizziness"}; - dynamic indication5 = {"id": 549, "name": "Enlargement of Facial Features"}; - dynamic indication6 = { - "id": 550, - "name": "Phenytoin Hypersensitivity Syndrome" - }; - dynamic indication7 = {"id": 551, "name": "Asterixis"}; - dynamic indication8 = {"id": 552, "name": "Bullous Dermatitis"}; - dynamic indication9 = {"id": 554, "name": "Purpuric Dermatitis"}; - dynamic indication10 = {"id": 555, "name": "Systemic Lupus Erythematosus"}; - - indicationList.add(indication1); - indicationList.add(indication2); - indicationList.add(indication3); - indicationList.add(indication4); - indicationList.add(indication5); - indicationList.add(indication6); - indicationList.add(indication7); - indicationList.add(indication8); - indicationList.add(indication9); - indicationList.add(indication10); - } - - @override - Widget build(BuildContext context) { - final screenSize = MediaQuery.of(context).size; - return StatefulBuilder(builder: - (BuildContext context, StateSetter setState /*You can rename this!*/) { - return BaseView( - onModelReady: (model) async { - await model.getMedicationList(); - await model.getMedicationStrength(); - await model.getMedicationDuration(); - await model.getMedicationRoute(); - await model.getMedicationFrequency(); - await model.getMedicationDoseTime(); - await model.getItem(itemID: widget.drugId); - //await model.getMedicationIndications(); - route = model.getLookupByIdFilter( - model.itemMedicineListRoute, widget.route); - doseTime = - model.getLookupById(model.medicationDoseTimeList, widget.dose); - updatedDuration = model.getLookupById( - model.medicationDurationList, widget.duration); - units = model.getLookupByIdFilter( - model.itemMedicineListUnit, widget.doseUnit); - frequencyUpdate = model.getLookupById( - model.medicationFrequencyList, widget.frequency); - }, - builder: - (BuildContext context, MedicineViewModel model, Widget child) => - NetworkBaseView( - baseViewModel: model, - child: GestureDetector( - onTap: () { - FocusScope.of(context).requestFocus(new FocusNode()); - }, - child: DraggableScrollableSheet( - initialChildSize: 0.98, - maxChildSize: 0.99, - minChildSize: 0.6, - builder: - (BuildContext context, ScrollController scrollController) { - return SingleChildScrollView( - child: Container( - height: MediaQuery.of(context).size.height * 1.5, - child: Form( - child: Padding( - padding: EdgeInsets.symmetric( - horizontal: 20.0, vertical: 12.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - widget.drugName.toUpperCase(), - fontWeight: FontWeight.w900, - ), - SizedBox( - height: 10.0, - ), - Column( - children: [ - // Container( - // height: MediaQuery.of(context).size.height * - // 0.070, - // child: InkWell( - // onTap: model.allMedicationList != null - // ? () { - // setState(() { - // newSelectedMedication = null; - // }); - // } - // : null, - // child: newSelectedMedication == null - // ? AutoCompleteTextField< - // GetMedicationResponseModel>( - // decoration: - // textFieldSelectorDecoration( - // widget.drugNameGeneric, - // newSelectedMedication != null - // ? newSelectedMedication - // .genericName - // : null, - // true, - // ), - // itemSubmitted: (item) => setState( - // () => newSelectedMedication = - // item), - // key: key, - // suggestions: - // model.allMedicationList, - // itemBuilder: (context, - // suggestion) => - // new Padding( - // child: AppText(suggestion - // .description + - // '/' + - // suggestion.genericName), - // padding: - // EdgeInsets.all(8.0)), - // itemSorter: (a, b) => 1, - // itemFilter: (suggestion, input) => - // suggestion.genericName - // .toLowerCase() - // .startsWith( - // input.toLowerCase()) || - // suggestion.description - // .toLowerCase() - // .startsWith( - // input.toLowerCase()) || - // suggestion.keywords - // .toLowerCase() - // .startsWith( - // input.toLowerCase()), - // ) - // : TextField( - // decoration: - // textFieldSelectorDecoration( - // TranslationBase.of(context) - // .searchMedicineNameHere, - // newSelectedMedication != null - // ? newSelectedMedication - // .description + - // ('${newSelectedMedication.genericName}') - // : null, - // true, - // ), - // enabled: false, - // ), - // ), - // ), - // SizedBox( - // height: 12, - // ), - Container( - height: - MediaQuery.of(context).size.height * - 0.060, - width: double.infinity, - child: Row( - children: [ - Container( - width: MediaQuery.of(context) - .size - .width * - 0.4900, - height: MediaQuery.of(context) - .size - .height * - 0.55, - child: TextFields( - inputFormatters: [ - LengthLimitingTextInputFormatter( - 5), - // WhitelistingTextInputFormatter - // .digitsOnly - ], - - hintText: widget.doseStreangth, - fontSize: 15.0, - controller: strengthController, - keyboardType: TextInputType - .numberWithOptions( - decimal: true, - ), - onChanged: (String value) { - setState(() { - strengthChar = value.length; - }); - if (strengthChar >= 5) { - DrAppToastMsg.showErrorToast( - "Only 5 Digits allowed for strength"); - } - }, - // validator: (value) { - // if (value.isEmpty && - // strengthController.text.length > - // 4) - // return TranslationBase.of(context) - // .emptyMessage; - // else - // return null; - // }, - ), - ), - SizedBox( - width: 10.0, - ), - Container( - width: MediaQuery.of(context) - .size - .width * - 0.3700, - child: InkWell( - onTap: - model.itemMedicineListUnit != - null - ? () { - Helpers.hideKeyboard( - context); - ListSelectDialog - dialog = - ListSelectDialog( - list: model - .itemMedicineListUnit, - attributeName: - 'description', - attributeValueId: - 'parameterCode', - okText: - TranslationBase.of( - context) - .ok, - okFunction: - (selectedValue) { - setState(() { - units = - selectedValue; - }); - }, - ); - showDialog( - barrierDismissible: - false, - context: context, - builder: - (BuildContext - context) { - return dialog; - }, - ); - } - : null, - child: TextField( - decoration: - textFieldSelectorDecoration( - 'UNIT Type', - units != null - ? units[ - 'description'] - : null, - true), - enabled: false, - ), - ), - ), - ], - ), - ), - SizedBox( - height: 12, - ), - Container( - height: - MediaQuery.of(context).size.height * - 0.070, - child: InkWell( - onTap: model.itemMedicineListRoute != - null - ? () { - Helpers.hideKeyboard(context); - ListSelectDialog dialog = - ListSelectDialog( - list: model - .itemMedicineListRoute, - attributeName: 'description', - attributeValueId: - 'parameterCode', - okText: TranslationBase.of( - context) - .ok, - okFunction: (selectedValue) { - setState(() { - route = selectedValue; - }); - if (route == null) { - route = route['id']; - } - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: - (BuildContext context) { - return dialog; - }, - ); - } - : null, - child: TextField( - decoration: - textFieldSelectorDecoration( - 'Route', - route != null - ? route['description'] - : null, - true), - enabled: false, - ), - ), - ), - SizedBox( - height: 12.0, - ), - Container( - height: - MediaQuery.of(context).size.height * - 0.070, - child: InkWell( - onTap: model.medicationDoseTimeList != - null - ? () { - Helpers.hideKeyboard(context); - ListSelectDialog dialog = - ListSelectDialog( - list: model - .medicationDoseTimeList, - attributeName: 'nameEn', - attributeValueId: 'id', - okText: TranslationBase.of( - context) - .ok, - okFunction: (selectedValue) { - setState(() { - doseTime = selectedValue; - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: - (BuildContext context) { - return dialog; - }, - ); - } - : null, - child: TextField( - decoration: - textFieldSelectorDecoration( - TranslationBase.of(context) - .doseTime, - doseTime != null - ? doseTime['nameEn'] - : null, - true), - enabled: false, - ), - ), - ), - SizedBox( - height: 12.0, - ), - Container( - height: - MediaQuery.of(context).size.height * - 0.070, - child: InkWell( - onTap: model.medicationFrequencyList != - null - ? () { - Helpers.hideKeyboard(context); - ListSelectDialog dialog = - ListSelectDialog( - list: model - .medicationFrequencyList, - attributeName: 'nameEn', - attributeValueId: 'id', - okText: TranslationBase.of( - context) - .ok, - okFunction: (selectedValue) { - setState(() { - frequencyUpdate = - selectedValue; - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: - (BuildContext context) { - return dialog; - }, - ); - } - : null, - child: TextField( - decoration: - textFieldSelectorDecoration( - TranslationBase.of(context) - .frequency, - frequencyUpdate != null - ? frequencyUpdate[ - 'nameEn'] - : null, - true), - enabled: false, - ), - ), - ), - SizedBox( - height: 12.0, - ), - Container( - height: - MediaQuery.of(context).size.height * - 0.070, - child: InkWell( - onTap: model.medicationDurationList != - null - ? () { - Helpers.hideKeyboard(context); - ListSelectDialog dialog = - ListSelectDialog( - list: model - .medicationDurationList, - attributeName: 'nameEn', - attributeValueId: 'id', - okText: TranslationBase.of( - context) - .ok, - okFunction: (selectedValue) { - setState(() { - updatedDuration = - selectedValue; - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: - (BuildContext context) { - return dialog; - }, - ); - } - : null, - child: TextField( - decoration: - textFieldSelectorDecoration( - TranslationBase.of(context) - .duration, - updatedDuration != null - ? updatedDuration[ - 'nameEn'] - .toString() - : null, - true), - enabled: false, - ), - ), - ), - SizedBox( - height: 12.0, - ), - Container( - height: model.patientAssessmentList - .isNotEmpty - ? screenSize.height * 0.070 - : 0.0, - width: model.patientAssessmentList - .isNotEmpty - ? double.infinity - : 0.0, - child: model.patientAssessmentList - .isNotEmpty - ? Row( - children: [ - Container( - width: - MediaQuery.of(context) - .size - .width * - 0.29, - child: InkWell( - onTap: - indicationList != null - ? () { - Helpers.hideKeyboard( - context); - } - : null, - child: TextField( - decoration: textFieldSelectorDecoration( - model.patientAssessmentList - .isNotEmpty - ? model - .patientAssessmentList[ - 0] - .icdCode10ID - .toString() - : '', - indication != null - ? indication[ - 'name'] - : null, - true), - enabled: true, - readOnly: true, - ), - ), - ), - Container( - width: - MediaQuery.of(context) - .size - .width * - 0.61, - child: InkWell( - onTap: - indicationList != null - ? () { - Helpers.hideKeyboard( - context); - } - : null, - child: TextField( - maxLines: 3, - decoration: textFieldSelectorDecoration( - model.patientAssessmentList - .isNotEmpty - ? model - .patientAssessmentList[ - 0] - .asciiDesc - .toString() - : '', - indication != null - ? indication[ - 'name'] - : null, - true), - enabled: true, - readOnly: true, - ), - ), - ), - ], - ) - : null), - SizedBox( - height: 12.0, - ), - Container( - height: screenSize.height * 0.070, - child: InkWell( - onTap: () => - selectDate(context, widget.model), - child: TextField( - decoration: Helpers - .textFieldSelectorDecoration( - AppDateUtils.getDateFormatted( - DateTime.parse( - widget.startDate)), - selectedDate != null - ? "${AppDateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}" - : null, - true, - suffixIcon: Icon( - Icons.calendar_today, - color: Colors.black, - )), - enabled: false, - ), - ), - ), - SizedBox( - height: 12.0, - ), - Container( - height: screenSize.height * 0.070, - child: InkWell( - onTap: model.allMedicationList != null - ? () { - Helpers.hideKeyboard(context); - ListSelectDialog dialog = - ListSelectDialog( - list: model.allMedicationList, - attributeName: 'nameEn', - attributeValueId: 'id', - okText: TranslationBase.of( - context) - .ok, - okFunction: (selectedValue) { - setState(() { - // duration = selectedValue; - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: - (BuildContext context) { - return dialog; - }, - ); - } - : null, - child: TextField( - decoration: - textFieldSelectorDecoration( - "UOM", - widget.uom != null - ? widget.uom - : null, - true), - // enabled: false, - readOnly: true, - ), - ), - ), - Container( - height: screenSize.height * 0.070, - child: InkWell( - onTap: model.allMedicationList != null - ? () { - Helpers.hideKeyboard(context); - ListSelectDialog dialog = - ListSelectDialog( - list: model.allMedicationList, - attributeName: 'nameEn', - attributeValueId: 'id', - okText: TranslationBase.of( - context) - .ok, - okFunction: (selectedValue) { - setState(() { - // duration = selectedValue; - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: - (BuildContext context) { - return dialog; - }, - ); - } - : null, - child: TextField( - decoration: - textFieldSelectorDecoration( - 'Box Quantity', - widget.box != null - ? "Box Quantity: " + - widget.box.toString() - : null, - true), - // enabled: false, - readOnly: true, - ), - ), - ), - SizedBox( - height: 12.0, - ), - Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.all( - Radius.circular(6.0)), - border: Border.all( - width: 1.0, - color: HexColor("#CCCCCC"))), - child: TextFields( - controller: remarksController, - maxLines: 7, - minLines: 4, - ), - ), - SizedBox( - height: 10.0, - ), - SizedBox( - height: - MediaQuery.of(context).size.height * - 0.08, - ), - Container( - margin: EdgeInsets.all( - SizeConfig.widthMultiplier * 2), - child: Wrap( - alignment: WrapAlignment.center, - children: [ - AppButton( - title: 'update prescription' - .toUpperCase(), - onPressed: () { - if (double.parse( - strengthController.text) > - 1000.0) { - DrAppToastMsg.showErrorToast( - "1000 is the MAX for the strength"); - return; - } - if (double.parse( - strengthController - .text) == - 0.0) { - DrAppToastMsg.showErrorToast( - "strength can't be zero"); - return; - } - if (strengthController - .text.length > - 4) { - DrAppToastMsg.showErrorToast( - "strength can't be more then 4 digits "); - return; - } - // if(units==null&& updatedDuration==null&&frequencyUpdate==null&&) - updatePrescription( - newStartDate: selectedDate, - newDoseStreangth: - strengthController - .text.isNotEmpty - ? strengthController - .text - : widget - .doseStreangth, - newUnit: units != null - ? units['parameterCode'] - .toString() - : widget.doseUnit, - doseUnit: widget.doseUnit, - doseStreangth: - widget.doseStreangth, - duration: widget.duration, - startDate: widget.startDate, - doseId: widget.dose, - frequencyId: widget.frequency, - routeId: widget.route, - patient: widget.patient, - model: widget.model, - newDuration: - updatedDuration != null - ? updatedDuration['id'] - .toString() - : widget.duration, - drugId: widget.drugId, - remarks: remarksController - .text, - route: route != null - ? route['parameterCode'] - .toString() - : widget.route, - frequency: - frequencyUpdate != null - ? frequencyUpdate[ - 'id'] - .toString() - : widget.frequency, - dose: doseTime != null - ? doseTime['id'] - .toString() - : widget.dose, - enteredRemarks: - widget.enteredRemarks); - Navigator.pop(context); - }, - ), - ], - ), - ), - ], - ), - ], - ), - ), - )), - ); - }), - ), - ), - ); - }); - } - - selectDate(BuildContext context, PrescriptionViewModel model) async { - Helpers.hideKeyboard(context); - DateTime selectedDate; - selectedDate = DateTime.now(); - final DateTime picked = await showDatePicker( - context: context, - initialDate: selectedDate, - firstDate: DateTime.now(), - lastDate: DateTime(2040), - initialEntryMode: DatePickerEntryMode.calendar, - ); - if (picked != null && picked != selectedDate) { - setState(() { - this.selectedDate = picked; - }); - } - } - - InputDecoration textFieldSelectorDecoration( - String hintText, String selectedText, bool isDropDown, - {Icon suffixIcon}) { - return InputDecoration( - focusedBorder: OutlineInputBorder( - borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), - borderRadius: BorderRadius.circular(8), - ), - enabledBorder: OutlineInputBorder( - borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), - borderRadius: BorderRadius.circular(8), - ), - disabledBorder: OutlineInputBorder( - borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), - borderRadius: BorderRadius.circular(8), - ), - hintText: selectedText != null ? selectedText : hintText, - suffixIcon: isDropDown - ? suffixIcon != null - ? suffixIcon - : Icon( - Icons.arrow_drop_down, - color: Colors.black, - ) - : null, - hintStyle: TextStyle( - fontSize: 14, - color: Colors.grey.shade600, - ), - ); - } - - updatePrescription( - {PrescriptionViewModel model, - int drugId, - String newDrugId, - String frequencyId, - String remarks, - String dose, - String doseId, - String frequency, - String route, - String routeId, - String startDate, - DateTime newStartDate, - String doseUnit, - String doseStreangth, - String newDoseStreangth, - String duration, - String newDuration, - String newUnit, - String enteredRemarks, - PatiantInformtion patient}) async { - //PrescriptionViewModel model = PrescriptionViewModel(); - PostPrescriptionReqModel updatePrescriptionReqModel = - new PostPrescriptionReqModel(); - List sss = List(); - - updatePrescriptionReqModel.appointmentNo = patient.appointmentNo; - updatePrescriptionReqModel.clinicID = patient.clinicId; - updatePrescriptionReqModel.episodeID = patient.episodeNo; - updatePrescriptionReqModel.patientMRN = patient.patientMRN; - - sss.add(PrescriptionRequestModel( - covered: true, - dose: newDoseStreangth.isNotEmpty - ? double.parse(newDoseStreangth) - : double.parse(doseStreangth), - //frequency.isNotEmpty ? int.parse(dose) : 1, - itemId: drugId, - doseUnitId: - newUnit.isNotEmpty ? int.parse(newUnit) : int.parse(doseUnit), - route: route.isNotEmpty ? int.parse(route) : int.parse(routeId), - frequency: frequency.isNotEmpty - ? int.parse(frequency) - : int.parse(frequencyId), - remarks: remarks.isEmpty ? enteredRemarks : remarks, - approvalRequired: true, - icdcode10Id: "test2", - doseTime: dose.isNotEmpty ? int.parse(dose) : int.parse(doseId), - duration: newDuration.isNotEmpty - ? int.parse(newDuration) - : int.parse(duration), - doseStartDate: - newStartDate != null ? newStartDate.toIso8601String() : startDate)); - updatePrescriptionReqModel.prescriptionRequestModel = sss; - //postProcedureReqModel.procedures = controlsProcedure; - - await model.updatePrescription( - updatePrescriptionReqModel, patient.patientMRN); - - if (model.state == ViewState.ErrorLocal) { - Helpers.showErrorToast(model.error); - } else if (model.state == ViewState.Idle) { - DrAppToastMsg.showSuccesToast('Medication has been updated'); - } - } -} - -void updatePrescriptionForm( - {context, - String drugName, - String drugNameGeneric, - int drugId, - String remarks, - PrescriptionViewModel model, - PatiantInformtion patient, - String rouat, - String frequency, - String dose, - String duration, - String doseStreangth, - String doseUnit, - String enteredRemarks, - String uom, - int box, - String startDate}) { - TextEditingController remarksController = TextEditingController(); - TextEditingController doseController = TextEditingController(); - TextEditingController frequencyController = TextEditingController(); - TextEditingController routeController = TextEditingController(); - showModalBottomSheet( - context: context, - isScrollControlled: true, - builder: (BuildContext context) { - return UpdatePrescriptionForm( - box: box, - uom: uom, - drugName: drugName, - patient: patient, - doseStreangth: doseStreangth, - remarks: remarks, - drugId: drugId, - enteredRemarks: enteredRemarks, - duration: duration, - dose: dose, - doseUnit: doseUnit, - frequency: frequency, - route: rouat, - startDate: startDate, - model: model, - drugNameGeneric: drugNameGeneric, - ); - }); -} diff --git a/lib/screens/procedures/ExpansionProcedure.dart b/lib/screens/procedures/ExpansionProcedure.dart index 228ca33e..b0593b06 100644 --- a/lib/screens/procedures/ExpansionProcedure.dart +++ b/lib/screens/procedures/ExpansionProcedure.dart @@ -1,4 +1,5 @@ import 'package:doctor_app_flutter/client/base_app_client.dart'; +import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/model/procedure/procedure_templateModel.dart'; import 'package:doctor_app_flutter/core/model/procedure/procedure_template_details_model.dart'; import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart'; @@ -59,14 +60,16 @@ class _ExpansionProcedureState extends State { Radius.circular(5.0), )), child: Row( + crossAxisAlignment: CrossAxisAlignment.start, children: [ Expanded( child: Row( - children: [ + crossAxisAlignment: CrossAxisAlignment.start, + children: [ Icon( Icons.folder, size: 20, - color: Color(0xff575757), + color: AppGlobal.appTextColor, ), Expanded( child: Padding( @@ -78,10 +81,12 @@ class _ExpansionProcedureState extends State { widget.procedureTempleteModel.templateName : "Prescription for " + widget.procedureTempleteModel.templateName, + letterSpacing: -0.72, fontSize: 16.0, - variant: "bodyText", - bold: true, - color: Color(0xff575757)), + color: AppGlobal.appTextColor, + fontWeight: FontWeight.w600, + ), + ), ), ], @@ -93,8 +98,8 @@ class _ExpansionProcedureState extends State { _isShowMore ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down, - color: Colors.grey[800], - size: 22, + color: AppGlobal.appTextColor, + size: 28, ), ) ], diff --git a/lib/screens/procedures/ProcedureCard.dart b/lib/screens/procedures/ProcedureCard.dart index 26216c94..f0f8b9ed 100644 --- a/lib/screens/procedures/ProcedureCard.dart +++ b/lib/screens/procedures/ProcedureCard.dart @@ -4,7 +4,7 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/model/procedure/get_ordered_procedure_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; @@ -13,6 +13,8 @@ import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; +import 'package:flutter_svg/flutter_svg.dart'; + class ProcedureCard extends StatelessWidget { final Function onTap; diff --git a/lib/screens/procedures/add-favourite-procedure.dart b/lib/screens/procedures/add-favourite-procedure.dart index 0a2a943e..85261de2 100644 --- a/lib/screens/procedures/add-favourite-procedure.dart +++ b/lib/screens/procedures/add-favourite-procedure.dart @@ -1,8 +1,8 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/model/procedure/procedure_template_details_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/prescription/prescription_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/prescription/prescription_checkout_screen.dart'; import 'package:doctor_app_flutter/screens/procedures/entity_list_fav_procedure.dart'; @@ -11,22 +11,21 @@ import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; +import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - +import '../patients/profile/soap_update/shared_soap_widgets/bottom_sheet_dialog_button.dart'; import 'ProcedureType.dart'; class AddFavouriteProcedure extends StatefulWidget { - final ProcedureViewModel model; + final ProcedureViewModel previousProcedureViewModel; final PrescriptionViewModel prescriptionModel; final PatiantInformtion patient; final ProcedureType procedureType; AddFavouriteProcedure({ Key key, - this.model, + this.previousProcedureViewModel, this.prescriptionModel, this.patient, @required this.procedureType, @@ -47,112 +46,91 @@ class _AddFavouriteProcedureState extends State { @override Widget build(BuildContext context) { return BaseView( - onModelReady: (model) => model.getProcedureTemplate( - categoryID: widget.procedureType.getCategoryId()), - builder: (BuildContext context, ProcedureViewModel model, Widget child) => + builder: (BuildContext context, ProcedureViewModel model_, + Widget child) => AppScaffold( - isShowAppBar: false, - baseViewModel: model, - body: Column( - children: [ - Container( - height: MediaQuery.of(context).size.height * 0.070, - ), - (model.templateList.length != 0) - ? Expanded( - child: EntityListCheckboxSearchFavProceduresWidget( - isProcedure: - !(widget.procedureType == ProcedureType.PRESCRIPTION), - model: model, - removeFavProcedure: (item) { - setState(() { - entityList.remove(item); - }); - }, - addFavProcedure: (history) { - setState(() { - entityList.add(history); - }); - }, - isEntityFavListSelected: (master) => - isEntityListSelected(master), - groupProcedures: groupProcedures, - selectProcedures: (selectedProcedure) { - setState(() { - groupProcedures = selectedProcedure; - }); - }, - ), - ) - : Container( - child: Padding( - padding: EdgeInsets.symmetric(vertical: 50.0), - child: AppText('You Don\'t have favorite prescription'), - ), - ), - ], - ), - bottomSheet: Container( - margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5), - child: Wrap( - alignment: WrapAlignment.center, - children: [ - AppButton( - title: widget.procedureType.getAddButtonTitle(context) ?? - TranslationBase.of(context).addSelectedProcedures, - color: Color(0xff359846), - disabled: model.templateList.length == 0 ? true : false, - fontWeight: FontWeight.w700, - onPressed: () { - if (widget.procedureType == ProcedureType.PRESCRIPTION) { - if (groupProcedures == null) { - DrAppToastMsg.showErrorToast( - 'Please Select item ', - ); - return; - } + isShowAppBar: false, + baseViewModel: model, + body: Column(children: [ + (widget.previousProcedureViewModel.templateList.length != 0) + ? Expanded( + child: EntityListCheckboxSearchFavProceduresWidget( + isProcedure: !(widget.procedureType == + ProcedureType.PRESCRIPTION), + model: widget.previousProcedureViewModel, + removeFavProcedure: (item) { + setState(() { + entityList.remove(item); + }); + }, + addFavProcedure: (history) { + setState(() { + entityList.add(history); + }); + }, + isEntityFavListSelected: (master) => + isEntityListSelected(master), + groupProcedures: groupProcedures, + selectProcedures: (selectedProcedure) { + setState(() { + groupProcedures = selectedProcedure; + }); + }, + ), + ) + : ErrorMessage( + error: TranslationBase.of(context) + .youDoNotHaveFavoritePrescription, + ), + ]), + bottomSheet: BottomSheetDialogButton( + label: widget.procedureType.getAddButtonTitle(context) ?? + TranslationBase.of(context).addSelectedProcedures, + onTap: () async { + if (widget.procedureType == ProcedureType.PRESCRIPTION) { + if (groupProcedures == null) { + DrAppToastMsg.showErrorToast( + TranslationBase.of(context).pleaseSelectItem, + ); + return; + } - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => PrescriptionCheckOutScreen( - patient: widget.patient, - model: widget.prescriptionModel, - groupProcedures: groupProcedures, - ), - settings: RouteSettings( - name: 'PrescriptionCheckOutScreen')), - ); - } else { - if (entityList.isEmpty == true) { - DrAppToastMsg.showErrorToast( - TranslationBase.of(context) - .fillTheMandatoryProcedureDetails, + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => PrescriptionCheckOutScreen( + patient: widget.patient, + model: widget.prescriptionModel, + groupProcedures: groupProcedures, + ), + settings: RouteSettings( + name: 'PrescriptionCheckOutScreen')), + ); + } else { + if (entityList.isEmpty == true) { + DrAppToastMsg.showErrorToast( + TranslationBase.of(context) + .fillTheMandatoryProcedureDetails, + ); + return; + } + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => ProcedureCheckOutScreen( + items: entityList, + model: model, + patient: widget.patient, + addButtonTitle: widget.procedureType + .getAddButtonTitle(context), + toolbarTitle: widget.procedureType + .getToolbarLabel(context), + ), + settings: + RouteSettings(name: 'ProcedureCheckOutScreen')), ); - return; } - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => ProcedureCheckOutScreen( - items: entityList, - model: model, - patient: widget.patient, - addButtonTitle: widget.procedureType - .getAddButtonTitle(context), - toolbarTitle: widget.procedureType - .getToolbarLabel(context), - ), - settings: - RouteSettings(name: 'ProcedureCheckOutScreen')), - ); - } - }, - ), - ], - ), - ), - ), + })), ); } diff --git a/lib/screens/procedures/add-procedure-page.dart b/lib/screens/procedures/add-procedure-page.dart index e0b7374f..609c6808 100644 --- a/lib/screens/procedures/add-procedure-page.dart +++ b/lib/screens/procedures/add-procedure-page.dart @@ -1,7 +1,7 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/model/procedure/categories_procedure.dart'; import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; @@ -12,6 +12,7 @@ import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; import 'package:flutter/material.dart'; +import '../../config/config.dart'; import 'ProcedureType.dart'; import 'entity_list_checkbox_search_widget.dart'; @@ -183,7 +184,7 @@ class _AddProcedurePageState extends State { AppButton( title: procedureType.getAddButtonTitle(context), fontWeight: FontWeight.w700, - color: Color(0xff359846), + color: AppGlobal.appGreenColor, onPressed: () async { if (entityList.isEmpty == true) { DrAppToastMsg.showErrorToast( diff --git a/lib/screens/procedures/base_add_procedure_tab_page.dart b/lib/screens/procedures/base_add_procedure_tab_page.dart index e9ab695b..921b90b4 100644 --- a/lib/screens/procedures/base_add_procedure_tab_page.dart +++ b/lib/screens/procedures/base_add_procedure_tab_page.dart @@ -1,15 +1,15 @@ -import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/prescription/prescription_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; -import 'package:doctor_app_flutter/screens/prescription/add_prescription_form.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart'; +import 'package:doctor_app_flutter/screens/prescription/add_prescription/add_prescription.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/network_base_view.dart'; -import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.dart'; import 'package:flutter/material.dart'; - +import 'package:provider/provider.dart'; +import '../../core/viewModel/project_view_model.dart'; +import '../../util/tab_helper.dart'; import 'ProcedureType.dart'; import 'add-favourite-procedure.dart'; import 'add-procedure-page.dart'; @@ -68,172 +68,115 @@ class _BaseAddProcedureTabPageState extends State final screenSize = MediaQuery.of(context).size; return BaseView( + onModelReady: (model) async { + await model.getProcedureTemplate(categoryID: widget.procedureType.getCategoryId()); + }, builder: (BuildContext context, ProcedureViewModel model, Widget child) => AppScaffold( - isShowAppBar: false, - body: NetworkBaseView( - baseViewModel: model, - child: DraggableScrollableSheet( - minChildSize: 0.90, - initialChildSize: 0.95, - maxChildSize: 1.0, - builder: - (BuildContext context, ScrollController scrollController) { - return Container( - height: MediaQuery.of(context).size.height * 1.25, - child: Padding( - padding: EdgeInsets.all(12.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + baseViewModel: model, + isShowAppBar: true, + appBar: BottomSheetTitle(title: procedureType.getToolbarLabel(context),), + body: NetworkBaseView( + baseViewModel: model, + child: Scaffold( + extendBodyBehindAppBar: true, + appBar: PreferredSize( + preferredSize: Size.fromHeight( + MediaQuery.of(context).size.height * 0.070), + child: TabBar( + isScrollable: false, + controller: _tabController, + indicatorColor: Colors.transparent, + indicatorWeight: 1.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Theme.of(context).primaryColor, + labelPadding: EdgeInsets.only( + top: 0, left: 0, right: 0, bottom: 0), + unselectedLabelColor: Colors.grey[800], + tabs: [ + tabWidget( + screenSize, + _activeTab == 0, + + procedureType + .getFavouriteTabName(context), + isFirst: true,context: context + ), + tabWidget( + screenSize, + _activeTab == 1, + procedureType.getAllLabelName(context), + isLast: true,context: context + ), + ], + ), + ), + body: Column( + children: [ + Expanded( + child: TabBarView( + physics: BouncingScrollPhysics(), + controller: _tabController, children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - AppText( - procedureType.getToolbarLabel(context), - fontWeight: FontWeight.w700, - fontSize: 20, - ), - InkWell( - child: Icon( - Icons.close, - size: 24.0, - ), - onTap: () { - Navigator.pop(context); - }, - ) - ]), - SizedBox( - height: MediaQuery.of(context).size.height * 0.04, + AddFavouriteProcedure( + previousProcedureViewModel: model, + prescriptionModel: + widget.prescriptionModel, + patient: patient, + procedureType: procedureType, ), - Expanded( - child: Scaffold( - extendBodyBehindAppBar: true, - appBar: PreferredSize( - preferredSize: Size.fromHeight( - MediaQuery.of(context).size.height * 0.070), - child: Container( - height: - MediaQuery.of(context).size.height * 0.070, - decoration: BoxDecoration( - border: Border( - bottom: BorderSide( - color: Theme.of(context).dividerColor, - width: 0.5), //width: 0.7 - ), - color: Colors.white), - child: Center( - child: TabBar( - isScrollable: false, - controller: _tabController, - indicatorColor: Colors.transparent, - indicatorWeight: 1.0, - indicatorSize: TabBarIndicatorSize.tab, - labelColor: Theme.of(context).primaryColor, - labelPadding: EdgeInsets.only( - top: 0, left: 0, right: 0, bottom: 0), - unselectedLabelColor: Colors.grey[800], - tabs: [ - tabWidget( - screenSize, - _activeTab == 0, - procedureType - .getFavouriteTabName(context), - ), - tabWidget( - screenSize, - _activeTab == 1, - procedureType.getAllLabelName(context), - ), - ], - ), - ), - ), - ), - body: Column( - children: [ - Expanded( - child: TabBarView( - physics: BouncingScrollPhysics(), - controller: _tabController, - children: [ - AddFavouriteProcedure( - model: this.model, - prescriptionModel: - widget.prescriptionModel, - patient: patient, - procedureType: procedureType, - ), - if (widget.procedureType == - ProcedureType.PRESCRIPTION) - PrescriptionFormWidget( - widget.prescriptionModel, - widget.patient, - widget.prescriptionModel - .prescriptionList) - else - AddProcedurePage( - model: this.model, - patient: patient, - procedureType: procedureType, - ), - ], - ), - ), - ], - ), + if (widget.procedureType == + ProcedureType.PRESCRIPTION) + AddPrescription( + widget.prescriptionModel, + widget.patient, + widget.prescriptionModel.prescriptionList, + ) + else + AddProcedurePage( + model: this.model, + patient: patient, + procedureType: procedureType, ), - ), ], ), ), - ); - }), + ], + ), + ) ), ), ); } - Widget tabWidget(Size screenSize, bool isActive, String title, - {int counter = -1}) { + Widget tabWidget( + Size screenSize, + bool isActive, + String title, { + int counter = -1, + bool isFirst = false, + bool isMiddle = false, + bool isLast = false, + context, + }) { + ProjectViewModel projectViewModel = Provider.of(context); + return Center( child: Container( - height: screenSize.height * 0.070, - decoration: TextFieldsUtils.containerBorderDecoration( - isActive ? Color(0xFFD02127) : Color(0xFFEAEAEA), - isActive ? Color(0xFFD02127) : Color(0xFFEAEAEA), - borderRadius: 4, - borderWidth: 0), + height: TabHelper.getTabHeight(context), + decoration: TabHelper.getBoxTabsBoxDecoration( + isActive: isActive, + isFirst: isFirst, + isMiddle: isMiddle, + isLast: isLast, + projectViewModel: projectViewModel), child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - AppText( - title, - fontSize: SizeConfig.textMultiplier * 1.5, - color: isActive ? Colors.white : Color(0xFF2B353E), - fontWeight: FontWeight.w700, - ), + + TabHelper.getTabText(title: title, isActive: isActive), if (counter != -1) - Container( - margin: EdgeInsets.all(4), - width: 15, - height: 15, - decoration: BoxDecoration( - color: isActive ? Colors.white : Color(0xFFD02127), - shape: BoxShape.circle, - ), - child: Center( - child: FittedBox( - child: AppText( - "$counter", - fontSize: SizeConfig.textMultiplier * 1.5, - color: !isActive ? Colors.white : Color(0xFFD02127), - fontWeight: FontWeight.w700, - ), - ), - ), - ), + TabHelper.getTabCounter(isActive: isActive, counter: counter) ], ), ), diff --git a/lib/screens/procedures/entity_list_checkbox_search_widget.dart b/lib/screens/procedures/entity_list_checkbox_search_widget.dart index 361ec695..7038fbc9 100644 --- a/lib/screens/procedures/entity_list_checkbox_search_widget.dart +++ b/lib/screens/procedures/entity_list_checkbox_search_widget.dart @@ -9,6 +9,8 @@ import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import '../../config/config.dart'; + class EntityListCheckboxSearchWidget extends StatefulWidget { final ProcedureViewModel model; final Function addSelectedHistories; @@ -229,7 +231,7 @@ class _EntityListCheckboxSearchWidgetState : Center( child: Container( child: AppText("Sorry , No Match", - color: Color(0xFFB9382C)), + color: AppGlobal.appRedColor), ), ) ], diff --git a/lib/screens/procedures/entity_list_fav_procedure.dart b/lib/screens/procedures/entity_list_fav_procedure.dart index 494540b1..1aa73c25 100644 --- a/lib/screens/procedures/entity_list_fav_procedure.dart +++ b/lib/screens/procedures/entity_list_fav_procedure.dart @@ -1,13 +1,14 @@ import 'package:doctor_app_flutter/core/model/procedure/procedure_templateModel.dart'; import 'package:doctor_app_flutter/core/model/procedure/procedure_template_details_model.dart'; import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart'; -import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_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/cupertino.dart'; import 'package:flutter/material.dart'; - +import 'package:flutter/services.dart'; +import '../../config/config.dart'; +import '../../widgets/shared/text_fields/app_text_field_custom_serach.dart'; import 'ExpansionProcedure.dart'; class EntityListCheckboxSearchFavProceduresWidget extends StatefulWidget { @@ -74,66 +75,71 @@ class _EntityListCheckboxSearchFavProceduresWidgetState } TextEditingController remarksController = TextEditingController(); + TextEditingController patientFileInfoController = TextEditingController(); + @override Widget build(BuildContext context) { - return Container( - child: Column( - children: [ - NetworkBaseView( - baseViewModel: widget.model, - child: Container( - height: MediaQuery.of(context).size.height * 0.60, - child: Center( - child: Container( - margin: EdgeInsets.only(top: 15), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(8), - color: Colors.white), - child: ListView( - children: [ - TextFields( - hintText: 'Search Favourite templates', - suffixIcon: EvaIcons.search, - suffixIconColor: Color(0xff2B353E), - onChanged: (value) { - filterSearchResults(value); - }, - hasBorder: false, - ), - SizedBox( - height: 15, - ), - widget.model.templateList.length != 0 - ? Column( - children: - widget.model.templateList.map((historyInfo) { - return ExpansionProcedure( - procedureTempleteModel: historyInfo, - model: widget.model, - removeFavProcedure: widget.removeFavProcedure, - addFavProcedure: widget.addFavProcedure, - selectProcedures: widget.selectProcedures, - isEntityListSelected: - widget.isEntityListSelected, - isEntityFavListSelected: - widget.isEntityFavListSelected, - isProcedure: widget.isProcedure, - groupProcedures: widget.groupProcedures); - }).toList(), - ) - : Center( - child: Container( - child: AppText("Sorry , No Match", - color: Color(0xFFB9382C)), - ), - ) + return SingleChildScrollView( + child: NetworkBaseView( + baseViewModel: widget.model, + child: Container( + height: MediaQuery.of(context).size.height * 0.90, + child: Center( + child: Container( + margin: EdgeInsets.only(top: 15), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8), + color: Colors.white), + child: ListView( + children: [ + AppTextFieldCustomSearch( + searchController: patientFileInfoController, + onChangeFun: (value) { + filterSearchResults(value); + }, + marginTop: 5, + inputFormatters: [ + FilteringTextInputFormatter.allow( + RegExp(ONLY_LETTERS)) ], + inputType: TextInputType.text, + hintText: TranslationBase.of(context).searchFavoriteTemplate, + // validationError: TranslationBase.of(context).emptyMessage + // : null, + ), + SizedBox( + height: 15, ), - )), + widget.model.templateList.length != 0 + ? Column( + children: + widget.model.templateList.map((historyInfo) { + return ExpansionProcedure( + procedureTempleteModel: historyInfo, + model: widget.model, + removeFavProcedure: widget.removeFavProcedure, + addFavProcedure: widget.addFavProcedure, + selectProcedures: widget.selectProcedures, + isEntityListSelected: + widget.isEntityListSelected, + isEntityFavListSelected: + widget.isEntityFavListSelected, + isProcedure: widget.isProcedure, + groupProcedures: widget.groupProcedures); + }).toList(), + ) + : Center( + child: Container( + child: AppText( + TranslationBase.of(context).sorryNoMatch, + color: AppGlobal.appRedColor), + ), + ) + ], ), - ), - ], + )), + ), ), ); } diff --git a/lib/screens/procedures/procedure_checkout_screen.dart b/lib/screens/procedures/procedure_checkout_screen.dart index 7c8b1074..daed9c2d 100644 --- a/lib/screens/procedures/procedure_checkout_screen.dart +++ b/lib/screens/procedures/procedure_checkout_screen.dart @@ -4,7 +4,7 @@ import 'package:doctor_app_flutter/core/model/procedure/procedure_template_detai import 'package:doctor_app_flutter/core/service/AnalyticsService.dart'; import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart'; import 'package:doctor_app_flutter/locator.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/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/shared/TextFields.dart'; @@ -14,6 +14,8 @@ import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dar import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import '../../config/config.dart'; + class ProcedureCheckOutScreen extends StatefulWidget { final List items; final ProcedureViewModel model; @@ -214,7 +216,7 @@ class _ProcedureCheckOutScreenState extends State { AppButton( title: widget.addButtonTitle ?? TranslationBase.of(context).addSelectedProcedures, - color: Color(0xff359846), + color: AppGlobal.appGreenColor, fontWeight: FontWeight.w700, onPressed: () async { List entityList = List(); diff --git a/lib/screens/procedures/procedure_screen.dart b/lib/screens/procedures/procedure_screen.dart index 289170d2..4fdc9602 100644 --- a/lib/screens/procedures/procedure_screen.dart +++ b/lib/screens/procedures/procedure_screen.dart @@ -2,14 +2,14 @@ import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart'; -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/core/model/doctor/doctor_profile_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/procedures/update-procedure.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/transitions/slide_up_page.dart'; diff --git a/lib/screens/procedures/update-procedure.dart b/lib/screens/procedures/update-procedure.dart index a1f3615e..a7e0d22f 100644 --- a/lib/screens/procedures/update-procedure.dart +++ b/lib/screens/procedures/update-procedure.dart @@ -5,7 +5,7 @@ import 'package:doctor_app_flutter/core/model/procedure/ControlsModel.dart'; import 'package:doctor_app_flutter/core/model/procedure/categories_procedure.dart'; import 'package:doctor_app_flutter/core/model/procedure/update_procedure_request_model.dart'; import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; @@ -247,7 +247,7 @@ class _UpdateProcedureWidgetState extends State { children: [ AppText(TranslationBase.of(context).orderType), Radio( - activeColor: Color(0xFFB9382C), + activeColor: AppGlobal.appRedColor, value: 0, groupValue: selectedType, onChanged: (value) { @@ -256,7 +256,7 @@ class _UpdateProcedureWidgetState extends State { ), Text('routine'), Radio( - activeColor: Color(0xFFB9382C), + activeColor: AppGlobal.appRedColor, groupValue: selectedType, value: 1, onChanged: (value) { @@ -297,7 +297,7 @@ class _UpdateProcedureWidgetState extends State { //alignment: WrapAlignment.center, children: [ AppButton( - color: Color(0xff359846), + color: AppGlobal.appGreenColor, title: TranslationBase.of(context) .updateProcedure .toUpperCase(), diff --git a/lib/util/VideoChannel.dart b/lib/util/VideoChannel.dart index 5ce83044..b9f99bee 100644 --- a/lib/util/VideoChannel.dart +++ b/lib/util/VideoChannel.dart @@ -2,7 +2,7 @@ import 'dart:convert'; import 'dart:io' show Platform; import 'package:doctor_app_flutter/config/config.dart'; -import 'package:doctor_app_flutter/models/livecare/session_status_model.dart'; +import 'package:doctor_app_flutter/core/model/livecare/session_status_model.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; diff --git a/lib/util/date-utils.dart b/lib/util/date-utils.dart index 7c68d649..b9d9e060 100644 --- a/lib/util/date-utils.dart +++ b/lib/util/date-utils.dart @@ -28,6 +28,10 @@ class AppDateUtils { return '/Date(${DateFormat(dateFormat).parse(date).millisecondsSinceEpoch})/'; } + static String convertDateToServerFormat(DateTime date) { + return '/Date(${date.millisecondsSinceEpoch})/'; + } + static convertDateFromServerFormat(String str, dateFormat) { var date = getDateTimeFromServerFormat(str); @@ -301,7 +305,7 @@ class AppDateUtils { /// get data formatted like 26 Apr 2020 /// [dateTime] convert DateTime to data formatted static String getDayMonthYearDateFormatted(DateTime dateTime, - {bool isArabic = false, bool isMonthShort = false}) { + {bool isArabic = false, bool isMonthShort = true}) { if (dateTime != null) return dateTime.day.toString() + " " + diff --git a/lib/util/helpers.dart b/lib/util/helpers.dart index 3d9a0b1d..a69ff3e0 100644 --- a/lib/util/helpers.dart +++ b/lib/util/helpers.dart @@ -4,7 +4,7 @@ import 'package:doctor_app_flutter/core/model/hospitals/get_hospitals_response_m import 'package:doctor_app_flutter/core/service/NavigationService.dart'; import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/doctor/list_doctor_working_hours_table_model.dart'; +import 'package:doctor_app_flutter/core/model/doctor/list_doctor_working_hours_table_model.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; @@ -327,107 +327,7 @@ class Helpers { return kpi; } - static getBoxTabsBoxDecoration( - {bool isFirst = false, - bool isMiddle = false, - bool isLast = false, - bool isActive = false, - double radius = 6.0, - ProjectViewModel projectViewModel}) { - return BoxDecoration( - color: isActive ? AppGlobal.appRedColor : Color(0xFFEAEAEA), - shape: BoxShape.rectangle, - borderRadius: BorderRadius.only( - topRight: projectViewModel.isArabic - ? Radius.circular(isActive - ? isLast || isMiddle - ? radius - : 0 - : 0) - : Radius.circular(isActive - ? isFirst || isMiddle - ? radius - : 0 - : 0), - topLeft: projectViewModel.isArabic - ? Radius.circular(isActive - ? isFirst || isMiddle - ? radius - : 0 - : 0) - : Radius.circular(isActive - ? isLast || isMiddle - ? radius - : 0 - : 0), - bottomRight: projectViewModel.isArabic - ? Radius.circular(isActive - ? isLast || isMiddle - ? radius - : 0 - : 0) - : Radius.circular(isActive - ? isFirst || isMiddle - ? radius - : 0 - : 0), - bottomLeft: projectViewModel.isArabic - ? Radius.circular(isActive - ? isFirst || isMiddle - ? radius - : 0 - : 0) - : Radius.circular(isActive - ? isLast || isMiddle - ? radius - : 0 - : 0)), - ); - } - - static getBgTabColor() { - return Color(0xFFEAEAEA); - } - - static getTabText({ - String title, - bool isActive = false, - }) { - return AppText( - title, - fontSize: SizeConfig.textMultiplier * 1.8, - color: isActive ? Colors.white : AppGlobal.appTextColor, - letterSpacing: -0.48, - fontWeight: FontWeight.w600, - ); - } - - static getTabHeight(BuildContext context) { - final screenSize = MediaQuery.of(context).size; - return screenSize.height * 0.07; - } - static getTabCounter({bool isActive: false, int counter}) { - return Container( - margin: EdgeInsets.all(4), - width: 15, - height: 15, - decoration: BoxDecoration( - color: isActive ? Colors.white : AppGlobal.appRedColor, - shape: BoxShape.circle, - ), - child: Center( - child: FittedBox( - child: AppText( - "$counter", - fontSize: SizeConfig.textMultiplier * 1.5, - color: !isActive ? Colors.white : AppGlobal.appRedColor, - fontWeight: FontWeight.w700, - ), - ), - ), - ); - } static String convertToTitleCase(String text) { if (text == null) { diff --git a/lib/util/tab_helper.dart b/lib/util/tab_helper.dart new file mode 100644 index 00000000..c4a023d4 --- /dev/null +++ b/lib/util/tab_helper.dart @@ -0,0 +1,113 @@ + +import 'package:flutter/material.dart'; +import 'package:flutter/widgets.dart'; + +import '../config/config.dart'; +import '../config/size_config.dart'; +import '../core/viewModel/project_view_model.dart'; +import '../widgets/shared/app_texts_widget.dart'; + +class TabHelper { + + static getBoxTabsBoxDecoration( + {bool isFirst = false, + bool isMiddle = false, + bool isLast = false, + bool isActive = false, + double radius = 6.0, + ProjectViewModel projectViewModel}) { + return BoxDecoration( + color: isActive ? AppGlobal.appRedColor : Color(0xFFEAEAEA), + shape: BoxShape.rectangle, + borderRadius: BorderRadius.only( + topRight: projectViewModel.isArabic + ? Radius.circular(isActive + ? isLast || isMiddle + ? radius + : 0 + : 0) + : Radius.circular(isActive + ? isFirst || isMiddle + ? radius + : 0 + : 0), + topLeft: projectViewModel.isArabic + ? Radius.circular(isActive + ? isFirst || isMiddle + ? radius + : 0 + : 0) + : Radius.circular(isActive + ? isLast || isMiddle + ? radius + : 0 + : 0), + bottomRight: projectViewModel.isArabic + ? Radius.circular(isActive + ? isLast || isMiddle + ? radius + : 0 + : 0) + : Radius.circular(isActive + ? isFirst || isMiddle + ? radius + : 0 + : 0), + bottomLeft: projectViewModel.isArabic + ? Radius.circular(isActive + ? isFirst || isMiddle + ? radius + : 0 + : 0) + : Radius.circular(isActive + ? isLast || isMiddle + ? radius + : 0 + : 0)), + ); + } + + static getBgTabColor() { + return Color(0xFFEAEAEA); + } + + static getTabText({ + String title, + bool isActive = false, + }) { + return AppText( + title, + fontSize: SizeConfig.textMultiplier * 1.8, + color: isActive ? Colors.white : AppGlobal.appTextColor, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ); + } + + static getTabHeight(BuildContext context) { + final screenSize = MediaQuery.of(context).size; + return screenSize.height * 0.07; + } + + static getTabCounter({bool isActive: false, int counter}) { + return Container( + margin: EdgeInsets.all(4), + width: 15, + height: 15, + decoration: BoxDecoration( + color: isActive ? Colors.white : AppGlobal.appRedColor, + shape: BoxShape.circle, + ), + child: Center( + child: FittedBox( + child: AppText( + "$counter", + fontSize: SizeConfig.textMultiplier * 1.5, + color: !isActive ? Colors.white : AppGlobal.appRedColor, + fontWeight: FontWeight.w700, + ), + ), + ), + ); + } +} \ No newline at end of file diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index 6aa9c6c7..e433df63 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -13,13 +13,11 @@ class TranslationBase { return Localizations.of(context, TranslationBase); } - String get dashboardScreenToolbarTitle => - localizedValues['dashboardScreenToolbarTitle'][locale.languageCode]; + String get dashboardScreenToolbarTitle => localizedValues['dashboardScreenToolbarTitle'][locale.languageCode]; String get settings => localizedValues['settings'][locale.languageCode]; - String get areYouSureYouWantTo => - localizedValues['areYouSureYouWantTo'][locale.languageCode]; + String get areYouSureYouWantTo => localizedValues['areYouSureYouWantTo'][locale.languageCode]; String get language => localizedValues['language'][locale.languageCode]; @@ -37,48 +35,37 @@ class TranslationBase { String get mobileNo => localizedValues['mobileNo'][locale.languageCode]; - String get replySuccessfully => - localizedValues['replySuccessfully'][locale.languageCode]; + String get replySuccessfully => localizedValues['replySuccessfully'][locale.languageCode]; - String get messagesScreenToolbarTitle => - localizedValues['messagesScreenToolbarTitle'][locale.languageCode]; + String get messagesScreenToolbarTitle => localizedValues['messagesScreenToolbarTitle'][locale.languageCode]; String get mySchedule => localizedValues['mySchedule'][locale.languageCode]; - String get errorNoSchedule => - localizedValues['errorNoSchedule'][locale.languageCode]; + String get errorNoSchedule => localizedValues['errorNoSchedule'][locale.languageCode]; String get verify => localizedValues['verify'][locale.languageCode]; - String get referralDoctor => - localizedValues['referralDoctor'][locale.languageCode]; + String get referralDoctor => localizedValues['referralDoctor'][locale.languageCode]; - String get referringClinic => - localizedValues['referringClinic'][locale.languageCode]; + String get referringClinic => localizedValues['referringClinic'][locale.languageCode]; String get frequency => localizedValues['frequency'][locale.languageCode]; String get priority => localizedValues['priority'][locale.languageCode]; - String get maxResponseTime => - localizedValues['maxResponseTime'][locale.languageCode]; + String get maxResponseTime => localizedValues['maxResponseTime'][locale.languageCode]; - String get clinicDetailsandRemarks => - localizedValues['clinicDetailsandRemarks'][locale.languageCode]; + String get clinicDetailsandRemarks => localizedValues['clinicDetailsandRemarks'][locale.languageCode]; - String get answerSuggestions => - localizedValues['answerSuggestions'][locale.languageCode]; + String get answerSuggestions => localizedValues['answerSuggestions'][locale.languageCode]; String get outPatients => localizedValues['outPatients'][locale.languageCode]; - String get searchPatient => - localizedValues['searchPatient'][locale.languageCode]; + String get searchPatient => localizedValues['searchPatient'][locale.languageCode]; - String get searchPatientDashBoard => - localizedValues['searchPatientDashBoard'][locale.languageCode]; + String get searchPatientDashBoard => localizedValues['searchPatientDashBoard'][locale.languageCode]; - String get searchPatientName => - localizedValues['searchPatient-name'][locale.languageCode]; + String get searchPatientName => localizedValues['searchPatient-name'][locale.languageCode]; String get searchAbout => localizedValues['searchAbout'][locale.languageCode]; @@ -88,11 +75,9 @@ class TranslationBase { String get labResult => localizedValues['labResult'][locale.languageCode]; - String get todayStatistics => - localizedValues['todayStatistics'][locale.languageCode]; + String get todayStatistics => localizedValues['todayStatistics'][locale.languageCode]; - String get familyMedicine => - localizedValues['familyMedicine'][locale.languageCode]; + String get familyMedicine => localizedValues['familyMedicine'][locale.languageCode]; String get arrived => localizedValues['arrived'][locale.languageCode]; @@ -112,36 +97,27 @@ class TranslationBase { String get myInPatient => localizedValues['myInPatient'][locale.languageCode]; - String get myInPatientTitle => - localizedValues['myInPatientTitle'][locale.languageCode]; + String get myInPatientTitle => localizedValues['myInPatientTitle'][locale.languageCode]; - String get inPatientLabel => - localizedValues['inPatientLabel'][locale.languageCode]; + String get inPatientLabel => localizedValues['inPatientLabel'][locale.languageCode]; - String get inPatientAll => - localizedValues['inPatientAll'][locale.languageCode]; + String get inPatientAll => localizedValues['inPatientAll'][locale.languageCode]; String get operations => localizedValues['operations'][locale.languageCode]; - String get patientServices => - localizedValues['patientServices'][locale.languageCode]; + String get patientServices => localizedValues['patientServices'][locale.languageCode]; - String get searchMedicine => - localizedValues['searchMedicine'][locale.languageCode]; + String get searchMedicine => localizedValues['searchMedicine'][locale.languageCode]; - String get searchMedicineDashboard => - localizedValues['searchMedicineDashboard'][locale.languageCode]; + String get searchMedicineDashboard => localizedValues['searchMedicineDashboard'][locale.languageCode]; - String get myReferralPatient => - localizedValues['myReferralPatient'][locale.languageCode]; + String get myReferralPatient => localizedValues['myReferralPatient'][locale.languageCode]; - String get referPatient => - localizedValues['referPatient'][locale.languageCode]; + String get referPatient => localizedValues['referPatient'][locale.languageCode]; String get myReferral => localizedValues['myReferral'][locale.languageCode]; - String get myReferredPatient => - localizedValues['myReferredPatient'][locale.languageCode]; + String get myReferredPatient => localizedValues['myReferredPatient'][locale.languageCode]; String get referredPatient => localizedValues['referredPatient'][locale.languageCode]; @@ -150,18 +126,15 @@ class TranslationBase { String get firstName => localizedValues['firstName'][locale.languageCode]; - String get firstNameInAr => - localizedValues['firstNameInAr'][locale.languageCode]; + String get firstNameInAr => localizedValues['firstNameInAr'][locale.languageCode]; String get middleName => localizedValues['middleName'][locale.languageCode]; - String get middleNameInAr => - localizedValues['middleNameInAr'][locale.languageCode]; + String get middleNameInAr => localizedValues['middleNameInAr'][locale.languageCode]; String get lastName => localizedValues['lastName'][locale.languageCode]; - String get lastNameInAr => - localizedValues['lastNameInAr'][locale.languageCode]; + String get lastNameInAr => localizedValues['lastNameInAr'][locale.languageCode]; String get phoneNumber => localizedValues['phoneNumber'][locale.languageCode]; @@ -171,23 +144,19 @@ class TranslationBase { String get search => localizedValues['search'][locale.languageCode]; - String get onlyArrivedPatient => - localizedValues['onlyArrivedPatient'][locale.languageCode]; + String get onlyArrivedPatient => localizedValues['onlyArrivedPatient'][locale.languageCode]; - String get searchMedicineNameHere => - localizedValues['searchMedicineNameHere'][locale.languageCode]; + String get searchMedicineNameHere => localizedValues['searchMedicineNameHere'][locale.languageCode]; String get youCanFind => localizedValues['youCanFind'][locale.languageCode]; - String get itemsInSearch => - localizedValues['itemsInSearch'][locale.languageCode]; + String get medicineSearchResult => localizedValues['medicineSearchResult'][locale.languageCode]; String get qr => localizedValues['qr'][locale.languageCode]; String get reader => localizedValues['reader'][locale.languageCode]; - String get startScanning => - localizedValues['startScanning'][locale.languageCode]; + String get startScanning => localizedValues['startScanning'][locale.languageCode]; String get scanQrCode => localizedValues['scanQrCode'][locale.languageCode]; @@ -199,21 +168,17 @@ class TranslationBase { String get clinic => localizedValues['clinic'][locale.languageCode]; - String get clinicSelect => - localizedValues['clinicSelect'][locale.languageCode]; + String get clinicSelect => localizedValues['clinicSelect'][locale.languageCode]; - String get doctorSelect => - localizedValues['doctorSelect'][locale.languageCode]; + String get doctorSelect => localizedValues['doctorSelect'][locale.languageCode]; String get hospital => localizedValues['hospital'][locale.languageCode]; String get speciality => localizedValues['speciality'][locale.languageCode]; - String get errorMessage => - localizedValues['errorMessage'][locale.languageCode]; + String get errorMessage => localizedValues['errorMessage'][locale.languageCode]; - String get patientProfile => - localizedValues['patientProfile'][locale.languageCode]; + String get patientProfile => localizedValues['patientProfile'][locale.languageCode]; String get vitalSign => localizedValues['vitalSign'][locale.languageCode]; @@ -229,18 +194,15 @@ class TranslationBase { String get medicines => localizedValues['medicines'][locale.languageCode]; - String get prescription => - localizedValues['prescription'][locale.languageCode]; + String get prescription => localizedValues['prescription'][locale.languageCode]; - String get insuranceApprovals => - localizedValues['insuranceApprovals'][locale.languageCode]; + String get insuranceApprovals => localizedValues['insuranceApprovals'][locale.languageCode]; String get insurance => localizedValues['insurance'][locale.languageCode]; String get approvals => localizedValues['approvals'][locale.languageCode]; - String get bodyMeasurements => - localizedValues['bodyMeasurements'][locale.languageCode]; + String get bodyMeasurements => localizedValues['bodyMeasurements'][locale.languageCode]; String get temperature => localizedValues['temperature'][locale.languageCode]; @@ -248,34 +210,27 @@ class TranslationBase { String get respiration => localizedValues['respiration'][locale.languageCode]; - String get bloodPressure => - localizedValues['bloodPressure'][locale.languageCode]; + String get bloodPressure => localizedValues['bloodPressure'][locale.languageCode]; String get oxygenation => localizedValues['oxygenation'][locale.languageCode]; String get painScale => localizedValues['painScale'][locale.languageCode]; - String get errorNoVitalSign => - localizedValues['errorNoVitalSign'][locale.languageCode]; + String get errorNoVitalSign => localizedValues['errorNoVitalSign'][locale.languageCode]; String get labOrders => localizedValues['labOrders'][locale.languageCode]; - String get errorNoLabOrders => - localizedValues['errorNoLabOrders'][locale.languageCode]; + String get errorNoLabOrders => localizedValues['errorNoLabOrders'][locale.languageCode]; - String get answerThePatient => - localizedValues['answerThePatient'][locale.languageCode]; + String get answerThePatient => localizedValues['answerThePatient'][locale.languageCode]; - String get pleaseEnterAnswer => - localizedValues['pleaseEnterAnswer'][locale.languageCode]; + String get pleaseEnterAnswer => localizedValues['pleaseEnterAnswer'][locale.languageCode]; String get replay => localizedValues['replay'][locale.languageCode]; - String get progressNote => - localizedValues['progressNote'][locale.languageCode]; + String get progressNote => localizedValues['progressNote'][locale.languageCode]; - String get operationReports => - localizedValues['operationReports'][locale.languageCode]; + String get operationReports => localizedValues['operationReports'][locale.languageCode]; String get reports => localizedValues['reports'][locale.languageCode]; @@ -287,15 +242,13 @@ class TranslationBase { String get searchNote => localizedValues['searchNote'][locale.languageCode]; - String get errorNoProgressNote => - localizedValues['errorNoProgressNote'][locale.languageCode]; + String get errorNoProgressNote => localizedValues['errorNoProgressNote'][locale.languageCode]; String get invoiceNo => localizedValues['invoiceNo:'][locale.languageCode]; String get orderNo => localizedValues['orderNo'][locale.languageCode]; - String get generalResult => - localizedValues['generalResult'][locale.languageCode]; + String get generalResult => localizedValues['generalResult'][locale.languageCode]; String get description => localizedValues['description'][locale.languageCode]; @@ -305,30 +258,23 @@ class TranslationBase { String get enterId => localizedValues['enterId'][locale.languageCode]; - String get pleaseEnterYourID => - localizedValues['pleaseEnterYourID'][locale.languageCode]; + String get pleaseEnterYourID => localizedValues['pleaseEnterYourID'][locale.languageCode]; - String get enterPassword => - localizedValues['enterPassword'][locale.languageCode]; + String get enterPassword => localizedValues['enterPassword'][locale.languageCode]; - String get pleaseEnterPassword => - localizedValues['pleaseEnterPassword'][locale.languageCode]; + String get pleaseEnterPassword => localizedValues['pleaseEnterPassword'][locale.languageCode]; - String get selectYourProject => - localizedValues['selectYourProject'][locale.languageCode]; + String get selectYourProject => localizedValues['selectYourProject'][locale.languageCode]; - String get pleaseEnterYourProject => - localizedValues['pleaseEnterYourProject'][locale.languageCode]; + String get pleaseEnterYourProject => localizedValues['pleaseEnterYourProject'][locale.languageCode]; String get login => localizedValues['login'][locale.languageCode]; - String get drSulaimanAlHabib => - localizedValues['drSulaimanAlHabib'][locale.languageCode]; + String get drSulaimanAlHabib => localizedValues['drSulaimanAlHabib'][locale.languageCode]; String get welcomeTo => localizedValues['welcomeTo'][locale.languageCode]; - String get welcomeBackTo => - localizedValues['welcomeBackTo'][locale.languageCode]; + String get welcomeBackTo => localizedValues['welcomeBackTo'][locale.languageCode]; String get home => localizedValues['home'][locale.languageCode]; @@ -344,23 +290,19 @@ class TranslationBase { String get whatsAppBy => localizedValues['whatsAppBy'][locale.languageCode]; - String get pleaseChoose => - localizedValues['pleaseChoose'][locale.languageCode]; + String get pleaseChoose => localizedValues['pleaseChoose'][locale.languageCode]; String get choose => localizedValues['choose'][locale.languageCode]; - String get verification => - localizedValues['verification'][locale.languageCode]; + String get verification => localizedValues['verification'][locale.languageCode]; String get firstStep => localizedValues['firstStep'][locale.languageCode]; - String get yourAccount => - localizedValues['yourAccount!'][locale.languageCode]; + String get yourAccount => localizedValues['yourAccount!'][locale.languageCode]; String get verify1 => localizedValues['verify1'][locale.languageCode]; - String get youWillReceiveA => - localizedValues['youWillReceiveA'][locale.languageCode]; + String get youWillReceiveA => localizedValues['youWillReceiveA'][locale.languageCode]; String get loginCode => localizedValues['loginCode'][locale.languageCode]; @@ -580,6 +522,9 @@ class TranslationBase { String get addSickLeave => localizedValues['add-sickleave'][locale.languageCode]; + String get pharmacyIntervention => + localizedValues['pharmacy-intervention'][locale.languageCode]; + String get add => localizedValues['add'][locale.languageCode]; String get addSickLeaverequest => @@ -906,6 +851,14 @@ class TranslationBase { String get medications => localizedValues['medications'][locale.languageCode]; + String get medication => localizedValues['medication'][locale.languageCode]; + + String get doctorComments => localizedValues['doctorComments'][locale.languageCode]; + + String get statusDescription => localizedValues['statusDescription'][locale.languageCode]; + + String get createdByName => localizedValues['createdByName'][locale.languageCode]; + String get procedures => localizedValues['procedures'][locale.languageCode]; String get chiefComplaints => @@ -1123,6 +1076,8 @@ class TranslationBase { String get createdBy => localizedValues['createdBy'][locale.languageCode]; + String get riskScore => localizedValues['riskScore'][locale.languageCode]; + String get editedBy => localizedValues['editedBy'][locale.languageCode]; String get currentMedications => @@ -1723,18 +1678,53 @@ class TranslationBase { String get diabetic => localizedValues['diabetic'][locale.languageCode]; + String get pharmacy => localizedValues['pharmacy'][locale.languageCode]; + + String get intervention => localizedValues['intervention'][locale.languageCode]; + String get chart => localizedValues['chart'][locale.languageCode]; - String get investigation => - localizedValues['investigation'][locale.languageCode]; + String get investigation => localizedValues['investigation'][locale.languageCode]; - String get conditionOnDischarge => - localizedValues['conditionOnDischarge'][locale.languageCode]; + String get conditionOnDischarge => localizedValues['conditionOnDischarge'][locale.languageCode]; - String get planedProcedure => - localizedValues['planedProcedure'][locale.languageCode]; + String get planedProcedure => localizedValues['planedProcedure'][locale.languageCode]; String get moreDetails => localizedValues['moreDetails'][locale.languageCode]; + + String get VTE_Type => localizedValues['VTE_Type'][locale.languageCode]; + + String get pharmacology => localizedValues['pharmacology'][locale.languageCode]; + + String get reasonsThrombo => localizedValues['reasonsThrombo'][locale.languageCode]; + + String get youDoNotHaveFavoritePrescription => localizedValues['youDoNotHaveFavoritePrescription'][locale.languageCode]; + + String get pleaseSelectItem => localizedValues['pleaseSelectItem'][locale.languageCode]; + + String get searchFavoriteTemplate => localizedValues['searchFavoriteTemplate'][locale.languageCode]; + + String get sorryNoMatch => localizedValues['sorryNoMatch'][locale.languageCode]; + + String get thousandIsTheMAXForTheStrength => localizedValues['thousandIsTheMAXForTheStrength'][locale.languageCode]; + + String get strengthCanNotBeZero => localizedValues['strengthCanNotBeZero'][locale.languageCode]; + + String get old => localizedValues['old'][locale.languageCode]; + + String get orderTypeDescription => localizedValues['orderTypeDescription'][locale.languageCode]; + + String get doseDetails => localizedValues['doseDetails'][locale.languageCode]; + + String get selectCondition => localizedValues['selectCondition'][locale.languageCode]; + + String get yourOrderAddedSuccessfully => localizedValues['yourOrderAddedSuccessfully'][locale.languageCode]; + + String get youCannotAddOnlySpaces => localizedValues['youCannotAddOnlySpaces'][locale.languageCode]; + + String get conditionDescription => localizedValues['conditionDescription'][locale.languageCode]; + + } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/dashboard/out_patient_stack.dart b/lib/widgets/dashboard/out_patient_stack.dart index afce5f30..3c433917 100644 --- a/lib/widgets/dashboard/out_patient_stack.dart +++ b/lib/widgets/dashboard/out_patient_stack.dart @@ -1,5 +1,5 @@ import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart'; +import 'package:doctor_app_flutter/core/model/dashboard/dashboard_model.dart'; import 'package:doctor_app_flutter/screens/home/label.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; diff --git a/lib/widgets/doctor/lab_result_widget.dart b/lib/widgets/doctor/lab_result_widget.dart index 9de818a5..3862826d 100644 --- a/lib/widgets/doctor/lab_result_widget.dart +++ b/lib/widgets/doctor/lab_result_widget.dart @@ -1,5 +1,5 @@ import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:doctor_app_flutter/models/patient/lab_result/lab_result.dart'; +import 'package:doctor_app_flutter/core/model/patient/lab_result/lab_result.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/cupertino.dart'; diff --git a/lib/widgets/doctor/my_referral_patient_widget.dart b/lib/widgets/doctor/my_referral_patient_widget.dart index d73c5d3f..9544967b 100644 --- a/lib/widgets/doctor/my_referral_patient_widget.dart +++ b/lib/widgets/doctor/my_referral_patient_widget.dart @@ -1,7 +1,7 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/referral_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/my_referral/my_referral_patient_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/my_referral/my_referral_patient_model.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; diff --git a/lib/widgets/doctor/my_schedule_widget.dart b/lib/widgets/doctor/my_schedule_widget.dart index 7b9100a6..afc79d2a 100644 --- a/lib/widgets/doctor/my_schedule_widget.dart +++ b/lib/widgets/doctor/my_schedule_widget.dart @@ -1,7 +1,7 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/doctor/list_doctor_working_hours_table_model.dart'; +import 'package:doctor_app_flutter/core/model/doctor/list_doctor_working_hours_table_model.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; @@ -25,7 +25,6 @@ class MyScheduleWidget extends StatelessWidget { return Container( color: HexColor("#EFEFEF"), child: Row( - //mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.start, children: [ Expanded( @@ -36,36 +35,45 @@ class MyScheduleWidget extends StatelessWidget { SizedBox( height: 10, ), - AppText( - projectViewModel.isArabic - ? AppDateUtils.getWeekDayArabic( - workingHoursTable.date.weekday) - : AppDateUtils.getWeekDay(workingHoursTable.date.weekday), - fontSize: MediaQuery.of(context).size.width*0.032, - fontFamily: 'Poppins', - // fontSize: 18 + Padding( + padding: const EdgeInsets.only(left: 21), + child: AppText( + projectViewModel.isArabic + ? AppDateUtils.getWeekDayArabic( + workingHoursTable.date.weekday) + : AppDateUtils.getWeekDay(workingHoursTable.date.weekday), + fontSize: MediaQuery.of(context).size.width*0.032, + fontFamily: 'Poppins', + fontWeight: FontWeight.w700, + letterSpacing: -0.52, + color: AppGlobal.scheduleTextColor, + ), ), - AppText( - ' ${workingHoursTable.date.day} ${(AppDateUtils.getMonth(workingHoursTable.date.month).toString().substring(0, 3))}', - fontSize: MediaQuery.of(context).size.width*0.05, - fontWeight: FontWeight.w700, - fontFamily: 'Poppins', - // fontSize: 18 + Padding( + padding: const EdgeInsets.only(left: 19), + child: AppText( + ' ${workingHoursTable.date.day} ${(AppDateUtils.getMonth(workingHoursTable.date.month).toString().substring(0, 3))}', + fontSize: MediaQuery.of(context).size.width*0.051, + fontWeight: FontWeight.w700, + fontFamily: 'Poppins', + letterSpacing: -0.72, + color: AppGlobal.scheduleTextColor, + ), ), ], ), ), Container( - width: MediaQuery.of(context).size.width * 0.65, - // width: SizeConfig.getWidthMultiplier()*64, - // height: SizeConfig.getHeightMultiplier()*18, + width: MediaQuery.of(context).size.width * 0.70, + // height: MediaQuery.of(context).size.height * 0.16, child: CardWithBgWidget( + padding: 12, + marginLeft: 8, marginSymmetric: 7, hasBorder: false, bgColor: AppDateUtils.isToday(workingHoursTable.date) ? AppGlobal.appGreenColor : Colors.transparent, - // hasBorder: false, widget: Container( child: Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -73,14 +81,10 @@ class MyScheduleWidget extends StatelessWidget { if (AppDateUtils.isToday(workingHoursTable.date)) AppText( "Today", - fontSize: 1.8 * SizeConfig.textMultiplier, + fontSize: 1.5 * SizeConfig.textMultiplier, fontFamily: 'Poppins', color: AppGlobal.appGreenColor, - // fontSize: 18 ), - SizedBox( - height: 4, - ), Column( crossAxisAlignment: CrossAxisAlignment.start, children: workingHours.map((work) { @@ -101,25 +105,30 @@ class MyScheduleWidget extends StatelessWidget { .convertToTitleCase( workingHoursTable.clinicName ?? ""), fontSize: MediaQuery.of(context).size.width*0.04, - fontWeight: FontWeight.w700,), + fontWeight: FontWeight.w700, + letterSpacing: -0.64, + color: AppGlobal.scheduleTextColor, + ), ), // AppText( - // workingHoursTable.clinicName ?? "", - // fontSize: 15, - // fontWeight: FontWeight.w700, - // ), Container( child: AppText( '${work.from} - ${work.to}', fontSize: MediaQuery.of(context).size.width*0.03, fontWeight: FontWeight.w300, + letterSpacing: -0.4, ), ), + SizedBox( + height: 12, + ), if (workingHoursTable.projectName != null) AppText( workingHoursTable.projectName ?? "", fontSize: MediaQuery.of(context).size.width*0.04, fontWeight: FontWeight.w700, + letterSpacing: -0.64, + color: AppGlobal.scheduleTextColor, ), ], ), diff --git a/lib/widgets/medicine/medicine_item_widget.dart b/lib/widgets/medicine/medicine_item_widget.dart index 9768d4d1..8db9b036 100644 --- a/lib/widgets/medicine/medicine_item_widget.dart +++ b/lib/widgets/medicine/medicine_item_widget.dart @@ -1,34 +1,33 @@ import 'dart:convert'; import 'dart:typed_data'; +import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/util/helpers.dart'; +import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/material.dart'; import '../shared/app_texts_widget.dart'; import '../shared/rounded_container_widget.dart'; -/* - *@author: ibrahim albitar - *@Date:28/4/2020 - *@param: - *@return: - *@desc: - */ - class MedicineItemWidget extends StatefulWidget { final String label; final Color backgroundColor; final bool showBorder; + final bool showArrow; + final bool showPrice; final Color borderColor; final String url; + final String price; MedicineItemWidget( {@required this.label, this.backgroundColor = Colors.white, - this.showBorder = false, + this.showBorder = true, this.borderColor = Colors.white, - this.url}); + this.url, + this.showArrow = true, this.showPrice = false, this.price}); @override _MedicineItemWidgetState createState() => _MedicineItemWidgetState(); @@ -37,43 +36,72 @@ class MedicineItemWidget extends StatefulWidget { class _MedicineItemWidgetState extends State { @override Widget build(BuildContext context) { - return new RoundedContainer( - height: SizeConfig.heightMultiplier * 8, - child: Padding( - padding: const EdgeInsets.all(5.0), + return CardWithBgWidget( + // height: SizeConfig.heightMultiplier * 12.9, + bgColor: Colors.transparent, + hasBorder: false, + widget: Padding( + padding: const EdgeInsets.symmetric( + vertical: 4, + ), child: Row( - crossAxisAlignment: CrossAxisAlignment.stretch, mainAxisAlignment: MainAxisAlignment.start, children: [ if (widget.url != null) - Container( - height: 39, - width: 39, - child: ClipRRect( - borderRadius: BorderRadius.all(Radius.circular(7)), + ClipRRect( + borderRadius: BorderRadius.circular(20.0), child: Image.network( widget.url, - height: SizeConfig.imageSizeMultiplier * 15, - width: SizeConfig.imageSizeMultiplier * 15, - fit: BoxFit.cover, + height: 25, + width: 30, + errorBuilder: (BuildContext context, Object exception, + StackTrace stackTrace) { + return Text(''); + }, + )), + Expanded( + child: Center( + child: Padding( + padding: EdgeInsets.all(2.5), + child: Align( + alignment: Alignment.centerLeft, + child: Column( + crossAxisAlignment:CrossAxisAlignment.start, + children: [ + AppText( + Helpers.convertToTitleCase(widget.label ?? ''), + fontHeight: 1.4, + color: AppGlobal.appTextColor, + textAlign: TextAlign.start, + fontWeight: FontWeight.w600, + letterSpacing: -0.33, + ), + if(widget.showPrice) + AppText( + Helpers.convertToTitleCase(widget.price ?? ''), + fontHeight: 1.4, + color: AppGlobal.appTextColor, + textAlign: TextAlign.start, + fontWeight: FontWeight.w600, + letterSpacing: -0.33, + ), + ], + ), ), ), ), - Expanded( - child: Padding( - padding: EdgeInsets.all(5), - child: Align( - alignment: Alignment.centerLeft, - child: AppText(widget.label)))), - Icon(EvaIcons.eye) + ), + if(widget.showArrow) + Icon(EvaIcons.arrowForward) ], ), ), - backgroundColor: widget.backgroundColor, - showBorder: widget.showBorder, - borderColor: widget.borderColor, - margin: EdgeInsets.all(4), - raduis: 10, + // backgroundColor: widget.backgroundColor, + // showBorder: widget.showBorder, + // borderColor: widget.borderColor, + // // margin: 4.0, + // // margin: EdgeInsets.all(4), + // raduis: 10, ); } diff --git a/lib/widgets/patients/dynamic_elements.dart b/lib/widgets/patients/dynamic_elements.dart deleted file mode 100644 index bca60f5b..00000000 --- a/lib/widgets/patients/dynamic_elements.dart +++ /dev/null @@ -1,166 +0,0 @@ -import 'package:doctor_app_flutter/config/config.dart'; -import 'package:doctor_app_flutter/models/patient/patient_model.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart'; -import 'package:doctor_app_flutter/widgets/shared/user-guid/custom_validation_error.dart'; -import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; -import 'package:intl/intl.dart'; - -class DynamicElements extends StatefulWidget { - final PatientModel _patientSearchFormValues; - final bool isFormSubmitted; - - DynamicElements(this._patientSearchFormValues, this.isFormSubmitted); - - @override - _DynamicElementsState createState() => _DynamicElementsState(); -} - -class _DynamicElementsState extends State { - TextEditingController _toDateController = new TextEditingController(); - TextEditingController _fromDateController = new TextEditingController(); - - void _presentDatePicker(id) { - showDatePicker( - context: context, - initialDate: DateTime.now(), - firstDate: DateTime(2019), - lastDate: DateTime.now(), - ).then((pickedDate) { - if (pickedDate == null) { - return; - } - setState(() { - print(id); - var selectedDate = DateFormat.yMd().format(pickedDate); - - if (id == '_selectedFromDate') { - // _fromDateController.text = selectedDate; - selectedDate = pickedDate.year.toString() + - "-" + - pickedDate.month.toString().padLeft(2, '0') + - "-" + - pickedDate.day.toString().padLeft(2, '0'); - - _fromDateController.text = selectedDate; - } else { - selectedDate = pickedDate.year.toString() + - "-" + - pickedDate.month.toString().padLeft(2, '0') + - "-" + - pickedDate.day.toString().padLeft(2, '0'); - - _toDateController.text = selectedDate; - // _toDateController.text = selectedDate; - } - }); - }); - } - - @override - Widget build(BuildContext context) { - final screenSize = MediaQuery.of(context).size; - InputDecoration textFieldSelectorDecoration( - {String hintText, - String selectedText, - bool isDropDown, - IconData icon}) { - return InputDecoration( - focusedBorder: OutlineInputBorder( - borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), - borderRadius: BorderRadius.circular(8), - ), - enabledBorder: OutlineInputBorder( - borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), - borderRadius: BorderRadius.circular(8), - ), - disabledBorder: OutlineInputBorder( - borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), - borderRadius: BorderRadius.circular(8), - ), - hintText: selectedText != null ? selectedText : hintText, - suffixIcon: isDropDown ? Icon(icon ?? Icons.arrow_drop_down) : null, - hintStyle: TextStyle( - fontSize: 14, - color: Colors.grey.shade600, - ), - ); - } - - return LayoutBuilder( - builder: (ctx, constraints) { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - height: 10, - ), - SizedBox( - height: 10, - ), - Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(6.0)), - border: Border.all(width: 1.0, color: HexColor("#CCCCCC"))), - padding: EdgeInsets.all(10), - child: AppTextFormField( - borderColor: Colors.white, - onTap: () => _presentDatePicker('_selectedFromDate'), - hintText: TranslationBase.of(context).fromDate, - controller: _fromDateController, - inputFormatter: ONLY_DATE, - onSaved: (value) { - if (_fromDateController.text.toString().trim().isEmpty) { - widget._patientSearchFormValues.From = "0"; - } else { - widget._patientSearchFormValues.From = - _fromDateController.text.replaceAll("/", "-"); - } - }, - readOnly: true, - )), - SizedBox( - height: 5, - ), - if (widget._patientSearchFormValues.From == "0" && - widget.isFormSubmitted) - CustomValidationError(), - SizedBox( - height: 10, - ), - Container( - decoration: BoxDecoration( - border: Border.all(width: 1.0, color: HexColor("#CCCCCC")), - borderRadius: BorderRadius.all(Radius.circular(6.0))), - padding: EdgeInsets.all(10), - child: AppTextFormField( - readOnly: true, - borderColor: Colors.white, - hintText: TranslationBase.of(context).toDate, - controller: _toDateController, - onTap: () { - _presentDatePicker('_selectedToDate'); - }, - inputFormatter: ONLY_DATE, - onSaved: (value) { - if (_toDateController.text.toString().trim().isEmpty) { - widget._patientSearchFormValues.To = "0"; - } else { - widget._patientSearchFormValues.To = - _toDateController.text.replaceAll("/", "-"); - } - }, - )), - if (widget._patientSearchFormValues.To == "0" && - widget.isFormSubmitted) - CustomValidationError(), - SizedBox( - height: 10, - ), - ], - ); - }, - ); - } -} diff --git a/lib/widgets/patients/patient-referral-item-widget.dart b/lib/widgets/patients/patient-referral-item-widget.dart index 3935bb6b..3487c4fa 100644 --- a/lib/widgets/patients/patient-referral-item-widget.dart +++ b/lib/widgets/patients/patient-referral-item-widget.dart @@ -1,13 +1,11 @@ import 'package:doctor_app_flutter/config/config.dart'; -import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; +import '../../util/helpers.dart'; class PatientReferralItemWidget extends StatelessWidget { final String referralStatus; @@ -51,7 +49,6 @@ class PatientReferralItemWidget extends StatelessWidget { @override Widget build(BuildContext context) { - ProjectViewModel projectViewModel = Provider.of(context); return Container( margin: EdgeInsets.only(left: 16.0, right: 16.0, top: 0.0), @@ -60,7 +57,8 @@ class PatientReferralItemWidget extends StatelessWidget { Container( child: CardWithBgWidget( bgColor: referralStatusCode == 1 - ? Color(0xffc4aa54) + ? AppGlobal.inProgressColor + //Color(0xffc4aa54) : referralStatusCode == 2 ? AppGlobal.appGreenColor : referralStatusCode == 46 @@ -81,11 +79,11 @@ class PatientReferralItemWidget extends StatelessWidget { AppText( referralStatus != null ? referralStatus : "", fontFamily: 'Poppins', - fontSize: 10.0, - letterSpacing: -0.4, + fontSize: 12.0, + letterSpacing: -0.48, fontWeight: FontWeight.w600, color: referralStatusCode == 1 - ? Color(0xffc4aa54) + ? AppGlobal.inProgressColor : referralStatusCode == 2 ? AppGlobal.appGreenColor : referralStatusCode == 46 @@ -94,21 +92,37 @@ class PatientReferralItemWidget extends StatelessWidget { ? Colors.red[700] : Colors.red[900], ), - AppText( - referredDate ?? "", - fontFamily: 'Poppins', - fontWeight: FontWeight.w600, - letterSpacing: -0.48, - fontSize: 12.0, - color: Color(0XFF28353E), + Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + AppText( + referredDate ?? "", + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + fontSize: 12.0, + color: Color(0XFF28353E), + ), + AppText( + referredTime ?? "", + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 12.0, + color: Color(0XFF575757), + letterSpacing: -0.48, + ), + ], ) ], ), + SizedBox( + height: 7, + ), Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( - patientName ?? "", + Helpers.convertToTitleCase(patientName ?? ""), fontSize: 16.0, fontWeight: FontWeight.w600, color: Color(0xff2E303A), @@ -125,22 +139,10 @@ class PatientReferralItemWidget extends StatelessWidget { ) : Icon(DoctorApp.female_1, color: Color(0xffF0448D)), - SizedBox( - width: 4, - ), - AppText( - referredTime ?? "", - fontFamily: 'Poppins', - fontWeight: FontWeight.w600, - fontSize: 12.0, - color: Color(0XFF575757), - letterSpacing: 0.48, - ) ], ), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.center, children: [ Expanded( child: Column( @@ -158,35 +160,39 @@ class PatientReferralItemWidget extends StatelessWidget { ? TranslationBase.of(context).sameBranch : TranslationBase.of(context) .otherBranch - : " " + referralClinic, + : " " + Helpers.convertToTitleCase(referralClinic ?? ""), ), ], ), ), - Row( - children: [ - AppText( - nationality != null ? nationality : "", - fontWeight: FontWeight.w600, - color: Color(0xFF2E303A), - fontSize: 10.0, - letterSpacing: -0.4, - ), - nationalityFlag != null - ? ClipRRect( - borderRadius: BorderRadius.circular(20.0), - child: Image.network( - nationalityFlag, - height: 25, - width: 30, - errorBuilder: (BuildContext context, - Object exception, - StackTrace stackTrace) { - return Text(''); - }, - )) - : SizedBox() - ], + Padding( + padding: const EdgeInsets.only(right: 0.1), + child: Row( + children: [ + AppText( + nationality != null ? nationality : "", + fontWeight: FontWeight.w600, + color: Color(0xFF2E303A), + fontSize: 10.0, + letterSpacing: -0.4, + ), + nationalityFlag != null + ? ClipRRect( + borderRadius: BorderRadius.circular(20.0), + child: Image.network( + nationalityFlag, + height: 25, + width: 30, + errorBuilder: (BuildContext context, + Object exception, + StackTrace stackTrace) { + return Text(''); + }, + ) + ) + : SizedBox() + ], + ), ) ], ), @@ -198,7 +204,7 @@ class PatientReferralItemWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( - margin: EdgeInsets.only(left: 10, right: 0), + margin: EdgeInsets.only(left: 3, right: 0, top: 0.1), child: Image.asset( isReferral ? 'assets/images/patient/ic_ref_arrow_up.png' @@ -209,8 +215,8 @@ class PatientReferralItemWidget extends StatelessWidget { ), Container( margin: EdgeInsets.only( - left: 0, top: 25, right: 0, bottom: 0), - padding: EdgeInsets.only(left: 4.0, right: 4.0), + left: 0, top: 18, right: 0, bottom: 0), + padding: EdgeInsets.only(left: 4.0, right: 1.0), child: Container( width: 40, height: 40, @@ -219,8 +225,8 @@ class PatientReferralItemWidget extends StatelessWidget { borderRadius: BorderRadius.circular(20.0), child: Image.network( doctorAvatar, - height: 25, - width: 30, + height: 28, + width: 28, errorBuilder: (BuildContext context, Object exception, StackTrace stackTrace) { @@ -241,12 +247,12 @@ class PatientReferralItemWidget extends StatelessWidget { flex: 4, child: Container( margin: EdgeInsets.only( - left: 10, top: 25, right: 10, bottom: 0), + left: 10, top: 17, bottom: 0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( - referralDoctorName ?? "", + Helpers.convertToTitleCase(referralDoctorName ?? ""), fontFamily: 'Poppins', fontWeight: FontWeight.w600, fontSize: 14.0, @@ -255,7 +261,8 @@ class PatientReferralItemWidget extends StatelessWidget { ), if (clinicDescription != null) AppText( - clinicDescription, + Helpers.convertToTitleCase(clinicDescription ?? "") + , fontFamily: 'Poppins', fontWeight: FontWeight.w600, fontSize: 10.0, diff --git a/lib/widgets/patients/patient_card/PatientCard.dart b/lib/widgets/patients/patient_card/PatientCard.dart index 1ec30afb..4ea7f789 100644 --- a/lib/widgets/patients/patient_card/PatientCard.dart +++ b/lib/widgets/patients/patient_card/PatientCard.dart @@ -2,7 +2,7 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; diff --git a/lib/widgets/patients/patient_card/ShowTimer.dart b/lib/widgets/patients/patient_card/ShowTimer.dart index 5b255f84..36064110 100644 --- a/lib/widgets/patients/patient_card/ShowTimer.dart +++ b/lib/widgets/patients/patient_card/ShowTimer.dart @@ -1,4 +1,4 @@ -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; diff --git a/lib/widgets/patients/profile/PatientProfileButton.dart b/lib/widgets/patients/profile/PatientProfileButton.dart index 8588afb0..13b7f20d 100644 --- a/lib/widgets/patients/profile/PatientProfileButton.dart +++ b/lib/widgets/patients/profile/PatientProfileButton.dart @@ -1,7 +1,7 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart'; diff --git a/lib/widgets/patients/profile/Profile_general_info_Widget.dart b/lib/widgets/patients/profile/Profile_general_info_Widget.dart index e0eb5b12..4068c7e5 100644 --- a/lib/widgets/patients/profile/Profile_general_info_Widget.dart +++ b/lib/widgets/patients/profile/Profile_general_info_Widget.dart @@ -1,4 +1,4 @@ -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:flutter/material.dart'; import './profile_general_info_content_widget.dart'; diff --git a/lib/widgets/patients/profile/app_bar/header_row.dart b/lib/widgets/patients/profile/app_bar/header_row.dart new file mode 100644 index 00000000..c5a0cd42 --- /dev/null +++ b/lib/widgets/patients/profile/app_bar/header_row.dart @@ -0,0 +1,44 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:flutter/material.dart'; + +class HeaderRow extends StatelessWidget { + final String label; + final String value; + final bool isExpanded; + + const HeaderRow({Key key, this.label, this.value, this.isExpanded = false}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + label, + isCopyable: true, + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3, + color: Color(0xFF575757), + fontWeight: FontWeight.w600, + ), + SizedBox( + width: 1, + ), + isExpanded?Expanded(child: AppText( + value, + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5, + color: Color(0xFF2E303A), + fontWeight: FontWeight.w700, + isCopyable: true, + ), ): + AppText( + value, + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5, + color: Color(0xFF2E303A), + fontWeight: FontWeight.w700, + isCopyable: true, + ), + ], + ); + } +} diff --git a/lib/widgets/patients/profile/patient-profile-app-bar.dart b/lib/widgets/patients/profile/app_bar/patient-profile-app-bar.dart similarity index 94% rename from lib/widgets/patients/profile/patient-profile-app-bar.dart rename to lib/widgets/patients/profile/app_bar/patient-profile-app-bar.dart index 974d3590..60a48403 100644 --- a/lib/widgets/patients/profile/patient-profile-app-bar.dart +++ b/lib/widgets/patients/profile/app_bar/patient-profile-app-bar.dart @@ -2,7 +2,7 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; @@ -11,7 +11,8 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:url_launcher/url_launcher.dart'; -import 'large_avatar.dart'; +import '../large_avatar.dart'; +import 'header_row.dart'; class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { final PatiantInformtion patient; @@ -342,7 +343,8 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( - '${TranslationBase.of(context).dr}$doctorName', + Helpers.convertToTitleCase( + '${TranslationBase.of(context).dr}$doctorName'), color: Color(0xFF2E303A), fontWeight: FontWeight.w700, fontSize: SizeConfig @@ -366,9 +368,16 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { value: branch ?? '', ), if (clinic != null) - HeaderRow( - label: 'Clinic: ', - value: clinic ?? '', + Container( + width: + MediaQuery.of(context).size.width * + 0.51, + child: HeaderRow( + label: 'Clinic: ', + value: Helpers.convertToTitleCase( + clinic) ?? + '', + isExpanded: true), ), if (isMedicalFile && episode != null) HeaderRow( @@ -410,7 +419,7 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { ? isInpatient ? (isFromLabResult ? 210 : 200) : isAppointmentHeader - ? 290 + ? 340 : SizeConfig.isHeightVeryShort ? 137 : SizeConfig.isHeightShort @@ -419,35 +428,3 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { (SizeConfig.isWidthLarge ? 25 : 20) : height); } - -class HeaderRow extends StatelessWidget { - final String label; - final String value; - - const HeaderRow({Key key, this.label, this.value}) : super(key: key); - - @override - Widget build(BuildContext context) { - return Row( - children: [ - AppText( - label, - isCopyable: true, - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3, - color: Color(0xFF575757), - fontWeight: FontWeight.w600, - ), - SizedBox( - width: 1, - ), - AppText( - value, - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5, - color: Color(0xFF2E303A), - fontWeight: FontWeight.w700, - isCopyable: true, - ), - ], - ); - } -} diff --git a/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart b/lib/widgets/patients/profile/app_bar/patient-profile-header-new-design-app-bar.dart similarity index 98% rename from lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart rename to lib/widgets/patients/profile/app_bar/patient-profile-header-new-design-app-bar.dart index 72e0bc59..bd90d1e4 100644 --- a/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart +++ b/lib/widgets/patients/profile/app_bar/patient-profile-header-new-design-app-bar.dart @@ -3,17 +3,18 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/service/AnalyticsService.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/locator.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:intl/intl.dart'; import 'package:url_launcher/url_launcher.dart'; +import 'header_row.dart'; + class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with PreferredSizeWidget { final PatiantInformtion patient; diff --git a/lib/widgets/patients/profile/prescription_in_patinets_widget.dart b/lib/widgets/patients/profile/prescription_in_patinets_widget.dart index 52af839c..84ea642d 100644 --- a/lib/widgets/patients/profile/prescription_in_patinets_widget.dart +++ b/lib/widgets/patients/profile/prescription_in_patinets_widget.dart @@ -1,6 +1,6 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:doctor_app_flutter/models/patient/prescription/prescription_report_for_in_patient.dart'; +import 'package:doctor_app_flutter/core/model/patient/prescription/prescription_report_for_in_patient.dart'; import 'package:doctor_app_flutter/routes.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/widgets/patients/profile/prescription_out_patinets_widget.dart b/lib/widgets/patients/profile/prescription_out_patinets_widget.dart index 0d2c668b..b0e79268 100644 --- a/lib/widgets/patients/profile/prescription_out_patinets_widget.dart +++ b/lib/widgets/patients/profile/prescription_out_patinets_widget.dart @@ -1,5 +1,5 @@ import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:doctor_app_flutter/models/patient/prescription/prescription_res_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/prescription/prescription_res_model.dart'; import 'package:doctor_app_flutter/screens/patients/out_patient_prescription_details_screen.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/medication.dart'; diff --git a/lib/widgets/patients/profile/profile_medical_info_widget.dart b/lib/widgets/patients/profile/profile_medical_info_widget.dart index 95e47ed3..abf548ed 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget.dart @@ -1,5 +1,5 @@ import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/routes.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; @@ -102,7 +102,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { patient: patient, patientType: patientType, arrivalType: arrivalType, - route: ORDER_PRESCRIPTION_NEW, + route: ORDER_PRESCRIPTION_OLD, nameLine1: TranslationBase.of(context).orders, nameLine2: TranslationBase.of(context).prescription, icon: 'assets/images/svgs/profile_screen/order prescription.svg'), diff --git a/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart b/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart index b07982ea..9de84de2 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart @@ -1,5 +1,5 @@ import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/routes.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; @@ -70,6 +70,15 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget { nameLine1: TranslationBase.of(context).radiology, nameLine2: TranslationBase.of(context).result, icon: 'assets/images/svgs/profile_screen/health summary.svg'), + PatientProfileButton( + key: key, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: ORDER_PRESCRIPTION_OLD, + nameLine1: TranslationBase.of(context).patient, + nameLine2:TranslationBase.of(context).prescription + ' (${TranslationBase.of(context).old})', + icon: 'assets/images/svgs/profile_screen/order prescription.svg'), PatientProfileButton( key: key, patient: patient, diff --git a/lib/widgets/patients/profile/profile_medical_info_widget_search.dart b/lib/widgets/patients/profile/profile_medical_info_widget_search.dart index d340555d..297b9d75 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget_search.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget_search.dart @@ -1,5 +1,5 @@ import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/routes.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; @@ -114,7 +114,7 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { patient: patient, patientType: patientType, arrivalType: arrivalType, - route: ORDER_PRESCRIPTION_NEW, + route: ORDER_PRESCRIPTION_OLD, nameLine1: TranslationBase.of(context).orders, nameLine2: TranslationBase.of(context).prescription, icon: diff --git a/lib/widgets/patients/vital_sign_details_wideget.dart b/lib/widgets/patients/vital_sign_details_wideget.dart index a4c9d1a7..718c3081 100644 --- a/lib/widgets/patients/vital_sign_details_wideget.dart +++ b/lib/widgets/patients/vital_sign_details_wideget.dart @@ -1,4 +1,4 @@ -import 'package:doctor_app_flutter/models/patient/vital_sign/vital_sign_res_model.dart'; +import 'package:doctor_app_flutter/core/model/patient/vital_sign/vital_sign_res_model.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/cupertino.dart'; diff --git a/lib/widgets/shared/app_scaffold_widget.dart b/lib/widgets/shared/app_scaffold_widget.dart index 880109cc..c214a040 100644 --- a/lib/widgets/shared/app_scaffold_widget.dart +++ b/lib/widgets/shared/app_scaffold_widget.dart @@ -49,7 +49,8 @@ class AppScaffold extends StatelessWidget { FocusScope.of(context).requestFocus(new FocusNode()); }, child: Scaffold( - backgroundColor: backgroundColor ?? Colors.white, + backgroundColor: backgroundColor ?? Theme.of(context).scaffoldBackgroundColor + , drawer: drawer, extendBody: extendBody, bottomNavigationBar: bottomNavigationBar, diff --git a/lib/widgets/shared/charts/app_time_series_chart.dart b/lib/widgets/shared/charts/app_time_series_chart.dart index f4bd354e..cb89d635 100644 --- a/lib/widgets/shared/charts/app_time_series_chart.dart +++ b/lib/widgets/shared/charts/app_time_series_chart.dart @@ -1,8 +1,8 @@ import 'package:charts_flutter/flutter.dart' as charts; +import 'package:doctor_app_flutter/core/model/patient/vital_sign/vital_sign_res_model.dart'; import 'package:flutter/material.dart'; import '../../../config/size_config.dart'; -import '../../../models/patient/vital_sign/vital_sign_res_model.dart'; import '../../../widgets/shared/rounded_container_widget.dart'; /* diff --git a/lib/widgets/shared/dialogs/dailog-list-select.dart b/lib/widgets/shared/dialogs/dailog-list-select.dart index bebd644d..aa03320d 100644 --- a/lib/widgets/shared/dialogs/dailog-list-select.dart +++ b/lib/widgets/shared/dialogs/dailog-list-select.dart @@ -2,6 +2,8 @@ import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:flutter/material.dart'; +import '../../../config/config.dart'; + class ListSelectDialog extends StatefulWidget { final List list; final String attributeName; @@ -44,7 +46,6 @@ class _ListSelectDialogState extends State { } showAlertDialog(BuildContext context) { - // set up the buttons Widget cancelButton = FlatButton( child: Text(TranslationBase.of(context).cancel), onPressed: () { @@ -56,9 +57,7 @@ class _ListSelectDialogState extends State { Navigator.of(context).pop(); this.widget.okFunction(widget.selectedValue); }); -// set up the AlertDialog AlertDialog alert = AlertDialog( - // title: Text(widget.title), content: createDialogList(), actions: [ cancelButton, @@ -104,7 +103,7 @@ class _ListSelectDialogState extends State { .selectedValue[widget.attributeValueId] .toString(), value: item[widget.attributeValueId].toString(), - activeColor: Colors.blue.shade700, + activeColor: AppGlobal.appRedColor, selected: item[widget.attributeValueId] .toString() == widget.selectedValue[widget.attributeValueId] diff --git a/lib/widgets/shared/dialogs/master_key_dailog.dart b/lib/widgets/shared/dialogs/master_key_dailog.dart index 80f0b3b1..9c407367 100644 --- a/lib/widgets/shared/dialogs/master_key_dailog.dart +++ b/lib/widgets/shared/dialogs/master_key_dailog.dart @@ -1,6 +1,6 @@ import 'package:doctor_app_flutter/config/size_config.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/core/model/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; diff --git a/lib/widgets/shared/doctor_card.dart b/lib/widgets/shared/doctor_card.dart index 23feacc5..28a0278d 100644 --- a/lib/widgets/shared/doctor_card.dart +++ b/lib/widgets/shared/doctor_card.dart @@ -139,6 +139,14 @@ class DoctorCard extends StatelessWidget { valueSize: 13, labelSize: 13, ), + CustomRow( + label: TranslationBase.of(context).branch + + ": ", + value: branch, + valueSize: 13, + labelSize: 13, + ), + ]), ), ), diff --git a/lib/widgets/shared/doctor_card_insurance.dart b/lib/widgets/shared/doctor_card_insurance.dart index abb8efcc..dbcd8556 100644 --- a/lib/widgets/shared/doctor_card_insurance.dart +++ b/lib/widgets/shared/doctor_card_insurance.dart @@ -9,6 +9,8 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; +import '../../config/config.dart'; + class DoctorCardInsurance extends StatelessWidget { final String doctorName; final String approvalNo; @@ -63,7 +65,7 @@ class DoctorCardInsurance extends StatelessWidget { ), color: approvalStatus == "Approved" || approvalStatus == "تمت الموافقة" - ? Color(0xff359846) + ? AppGlobal.appGreenColor : Color(0xffD02127), ), ), @@ -84,7 +86,7 @@ class DoctorCardInsurance extends StatelessWidget { "$approvalStatus", color: approvalStatus == "Approved" || approvalStatus == "تمت الموافقة" - ? Color(0xff359846) + ? AppGlobal.appGreenColor : Color(0xffD02127), letterSpacing: -0.4, fontSize: diff --git a/lib/widgets/shared/master_key_checkbox_search_widget.dart b/lib/widgets/shared/master_key_checkbox_search_widget.dart index 5da2c10a..6370be77 100644 --- a/lib/widgets/shared/master_key_checkbox_search_widget.dart +++ b/lib/widgets/shared/master_key_checkbox_search_widget.dart @@ -1,7 +1,7 @@ import 'package:doctor_app_flutter/config/size_config.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/core/model/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart'; diff --git a/lib/widgets/shared/text_fields/app_text_field_custom_serach.dart b/lib/widgets/shared/text_fields/app_text_field_custom_serach.dart index 355a0dc8..823b79aa 100644 --- a/lib/widgets/shared/text_fields/app_text_field_custom_serach.dart +++ b/lib/widgets/shared/text_fields/app_text_field_custom_serach.dart @@ -18,7 +18,7 @@ class AppTextFieldCustomSearch extends StatelessWidget { this.inputFormatters, this.searchController, this.onFieldSubmitted, - this.hintText, + this.hintText, this.height, }); final TextEditingController searchController; @@ -34,6 +34,8 @@ class AppTextFieldCustomSearch extends StatelessWidget { final TextInputType inputType; final List inputFormatters; + final double height; + @override Widget build(BuildContext context) { @@ -43,6 +45,7 @@ class AppTextFieldCustomSearch extends StatelessWidget { child: Stack( children: [ AppTextFieldCustom( + height: height??0, hintText: hintText ?? TranslationBase.of(context).searchPatientName, isTextFieldHasSuffix: true, diff --git a/lib/widgets/shared/text_fields/html_rich_editor.dart b/lib/widgets/shared/text_fields/html_rich_editor.dart index 79e9829f..d249ead0 100644 --- a/lib/widgets/shared/text_fields/html_rich_editor.dart +++ b/lib/widgets/shared/text_fields/html_rich_editor.dart @@ -134,7 +134,7 @@ class _HtmlRichEditorState extends State { } void statusListener(String status) { - recognizedWord = status == 'listening' ? 'Lisening...' : 'Sorry....'; + recognizedWord = status == 'listening' ? 'Listening...' : 'Sorry....'; } void requestPermissions() async { diff --git a/lib/widgets/shared/text_fields/new_text_Field.dart b/lib/widgets/shared/text_fields/new_text_Field.dart deleted file mode 100644 index 77cd0262..00000000 --- a/lib/widgets/shared/text_fields/new_text_Field.dart +++ /dev/null @@ -1,237 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:hexcolor/hexcolor.dart'; - -class NumberTextInputFormatter extends TextInputFormatter { - @override - TextEditingValue formatEditUpdate( - TextEditingValue oldValue, TextEditingValue newValue) { - final int newTextLength = newValue.text.length; - int selectionIndex = newValue.selection.end; - int usedSubstringIndex = 0; - final StringBuffer newText = StringBuffer(); - if (newTextLength >= 1) { - newText.write('('); - if (newValue.selection.end >= 1) selectionIndex++; - } - if (newTextLength >= 4) { - newText.write(newValue.text.substring(0, usedSubstringIndex = 3) + ') '); - if (newValue.selection.end >= 3) selectionIndex += 2; - } - if (newTextLength >= 7) { - newText.write(newValue.text.substring(3, usedSubstringIndex = 6) + '-'); - if (newValue.selection.end >= 6) selectionIndex++; - } - if (newTextLength >= 11) { - newText.write(newValue.text.substring(6, usedSubstringIndex = 10) + ' '); - if (newValue.selection.end >= 10) selectionIndex++; - } - // Dump the rest. - if (newTextLength >= usedSubstringIndex) - newText.write(newValue.text.substring(usedSubstringIndex)); - return TextEditingValue( - text: newText.toString(), - selection: TextSelection.collapsed(offset: selectionIndex), - ); - } -} - -final _mobileFormatter = NumberTextInputFormatter(); - -class NewTextFields extends StatefulWidget { - NewTextFields( - {Key key, - this.type, - this.hintText, - this.suffixIcon, - this.autoFocus, - this.onChanged, - this.initialValue, - this.minLines, - this.maxLines, - this.inputFormatters, - this.padding, - this.focus = false, - this.maxLengthEnforced = true, - this.suffixIconColor, - this.inputAction, - this.onSubmit, - this.keepPadding = true, - this.textCapitalization = TextCapitalization.none, - this.controller, - this.keyboardType, - this.validator, - this.borderOnlyError = false, - this.onSaved, - this.onSuffixTap, - this.readOnly: false, - this.maxLength, - this.prefixIcon, - this.bare = false, - this.onTap, - this.fontSize = 15.0, - this.fontWeight = FontWeight.w500, - this.autoValidate = false, - this.hintColor, - this.isEnabled = true}) - : super(key: key); - - final String hintText; - - // final String initialValue; - final String type; - final bool autoFocus; - final IconData suffixIcon; - final Color suffixIconColor; - final Icon prefixIcon; - final VoidCallback onTap; - final TextEditingController controller; - final TextInputType keyboardType; - final FormFieldValidator validator; - final Function onSaved; - final Function onSuffixTap; - final Function onChanged; - final Function onSubmit; - final bool readOnly; - final int maxLength; - final int minLines; - final int maxLines; - final bool maxLengthEnforced; - final bool bare; - final bool isEnabled; - final TextInputAction inputAction; - final double fontSize; - final FontWeight fontWeight; - final bool keepPadding; - final TextCapitalization textCapitalization; - final List inputFormatters; - final bool autoValidate; - final EdgeInsets padding; - final bool focus; - final bool borderOnlyError; - final Color hintColor; - final String initialValue; - - @override - _NewTextFieldsState createState() => _NewTextFieldsState(); -} - -class _NewTextFieldsState extends State { - final FocusNode _focusNode = FocusNode(); - bool focus = false; - bool view = false; - - @override - void initState() { - super.initState(); - _focusNode.addListener(() { - setState(() { - focus = _focusNode.hasFocus; - }); - }); - } - - @override - void didUpdateWidget(NewTextFields oldWidget) { - if (widget.focus) _focusNode.requestFocus(); - super.didUpdateWidget(oldWidget); - } - - @override - void dispose() { - _focusNode.dispose(); - super.dispose(); - } - - bool _determineReadOnly() { - if (widget.readOnly != null && widget.readOnly) { - _focusNode.unfocus(); - return true; - } else { - return false; - } - } - - @override - Widget build(BuildContext context) { - return AnimatedContainer( - duration: Duration(milliseconds: 300), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(12), - border: Border.all(color: HexColor('#707070'), width: 0.30), - color: Colors.white), - child: Container( - margin: EdgeInsets.only(top: 8), - padding: EdgeInsets.only(top: 8), - child: TextFormField( - enabled: widget.isEnabled, - initialValue: widget.initialValue, - keyboardAppearance: Theme.of(context).brightness, - scrollPhysics: BouncingScrollPhysics(), - // autovalidate: widget.autoValidate, - textCapitalization: widget.textCapitalization, - onFieldSubmitted: widget.inputAction == TextInputAction.next - ? (widget.onSubmit != null - ? widget.onSubmit - : (val) { - _focusNode.nextFocus(); - }) - : widget.onSubmit, - textInputAction: widget.inputAction, - minLines: widget.minLines ?? 1, - maxLines: widget.maxLines ?? 1, - maxLengthEnforced: widget.maxLengthEnforced, - onChanged: widget.onChanged, - focusNode: _focusNode, - maxLength: widget.maxLength ?? null, - controller: widget.controller, - keyboardType: widget.keyboardType, - readOnly: _determineReadOnly(), - obscureText: widget.type == "password" && !view ? true : false, - autofocus: widget.autoFocus ?? false, - validator: widget.validator, - onSaved: widget.onSaved, - style: Theme.of(context).textTheme.bodyText1.copyWith( - fontSize: widget.fontSize, - fontWeight: widget.fontWeight, - color: Color(0xFF575757), - fontFamily: 'Poppins'), - inputFormatters: widget.keyboardType == TextInputType.phone - ? [ - // WhitelistingTextInputFormatter.digitsOnly, - _mobileFormatter, - ] - : widget.inputFormatters, - decoration: InputDecoration( - labelText: widget.hintText, - labelStyle: TextStyle( - color: Color(0xFF2E303A), - fontSize: 15, - fontWeight: FontWeight.w700), - errorBorder: OutlineInputBorder( - borderSide: BorderSide( - color: Theme.of(context).errorColor.withOpacity(0.5), - width: 1.0), - borderRadius: BorderRadius.circular(12.0)), - focusedErrorBorder: OutlineInputBorder( - borderSide: BorderSide( - color: Theme.of(context).errorColor.withOpacity(0.5), - width: 1.0), - borderRadius: BorderRadius.circular(8.0)), - focusedBorder: OutlineInputBorder( - borderSide: BorderSide(color: Colors.white, width: 1.0), - borderRadius: BorderRadius.circular(12)), - disabledBorder: OutlineInputBorder( - borderSide: BorderSide(color: Colors.white, width: 1.0), - borderRadius: BorderRadius.circular(12)), - enabledBorder: OutlineInputBorder( - borderSide: BorderSide(color: Colors.white, width: 1.0), - borderRadius: BorderRadius.circular(12), - ), - ), - ), - ), - ); - } -} diff --git a/lib/widgets/shared/user-guid/CusomRow.dart b/lib/widgets/shared/user-guid/CusomRow.dart index 21875e4d..006e0fa4 100644 --- a/lib/widgets/shared/user-guid/CusomRow.dart +++ b/lib/widgets/shared/user-guid/CusomRow.dart @@ -12,6 +12,7 @@ class CustomRow extends StatelessWidget { this.valueSize, this.width, this.isCopyable = true, + this.isExpanded = true, }) : super(key: key); final String label; @@ -20,6 +21,7 @@ class CustomRow extends StatelessWidget { final double valueSize; final double width; final bool isCopyable; + final bool isExpanded; @override Widget build(BuildContext context) { @@ -38,6 +40,7 @@ class CustomRow extends StatelessWidget { width: 1, ), Expanded( + flex: isExpanded ? 1 : 0, child: AppText( value, fontSize: diff --git a/pubspec.lock b/pubspec.lock index 85e7f11e..59acfac9 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -21,7 +21,7 @@ packages: name: archive url: "https://pub.dartlang.org" source: hosted - version: "3.1.6" + version: "3.2.0" args: dependency: transitive description: @@ -140,7 +140,7 @@ packages: name: built_value url: "https://pub.dartlang.org" source: hosted - version: "8.1.3" + version: "8.1.4" cached_network_image: dependency: "direct main" description: @@ -210,7 +210,7 @@ packages: name: chewie_audio url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.0" cli_util: dependency: transitive description: @@ -413,21 +413,21 @@ packages: name: firebase_core url: "https://pub.dartlang.org" source: hosted - version: "1.10.6" + version: "1.12.0" firebase_core_platform_interface: dependency: transitive description: name: firebase_core_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "4.2.3" + version: "4.2.4" firebase_core_web: dependency: transitive description: name: firebase_core_web url: "https://pub.dartlang.org" source: hosted - version: "1.5.3" + version: "1.5.4" firebase_messaging: dependency: "direct main" description: @@ -441,14 +441,14 @@ packages: name: firebase_messaging_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "3.1.4" + version: "3.1.6" firebase_messaging_web: dependency: transitive description: name: firebase_messaging_web url: "https://pub.dartlang.org" source: hosted - version: "2.2.5" + version: "2.2.7" fixnum: dependency: transitive description: @@ -489,6 +489,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.5.0" + flutter_datetime_picker: + dependency: "direct main" + description: + name: flutter_datetime_picker + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.1" flutter_device_type: dependency: "direct main" description: @@ -523,7 +530,7 @@ packages: name: flutter_keyboard_visibility url: "https://pub.dartlang.org" source: hosted - version: "5.1.0" + version: "5.1.1" flutter_keyboard_visibility_platform_interface: dependency: transitive description: @@ -643,7 +650,7 @@ packages: name: hexcolor url: "https://pub.dartlang.org" source: hosted - version: "2.0.5" + version: "2.0.6" hijri: dependency: transitive description: @@ -741,7 +748,7 @@ packages: name: local_auth url: "https://pub.dartlang.org" source: hosted - version: "1.1.9" + version: "1.1.10" logging: dependency: transitive description: @@ -846,7 +853,7 @@ packages: name: path_provider url: "https://pub.dartlang.org" source: hosted - version: "2.0.8" + version: "2.0.9" path_provider_android: dependency: transitive description: @@ -867,28 +874,28 @@ packages: name: path_provider_linux url: "https://pub.dartlang.org" source: hosted - version: "2.1.4" + version: "2.1.5" path_provider_macos: dependency: transitive description: name: path_provider_macos url: "https://pub.dartlang.org" source: hosted - version: "2.0.4" + version: "2.0.5" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.0.3" path_provider_windows: dependency: transitive description: name: path_provider_windows url: "https://pub.dartlang.org" source: hosted - version: "2.0.4" + version: "2.0.5" pedantic: dependency: transitive description: @@ -937,14 +944,14 @@ packages: name: plugin_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "2.1.2" pointer_interceptor: dependency: transitive description: name: pointer_interceptor url: "https://pub.dartlang.org" source: hosted - version: "0.9.0+1" + version: "0.9.1" pool: dependency: transitive description: @@ -972,7 +979,7 @@ packages: name: provider url: "https://pub.dartlang.org" source: hosted - version: "6.0.1" + version: "6.0.2" pub_semver: dependency: transitive description: @@ -1014,35 +1021,35 @@ packages: name: shared_preferences url: "https://pub.dartlang.org" source: hosted - version: "2.0.11" + version: "2.0.13" shared_preferences_android: dependency: transitive description: name: shared_preferences_android url: "https://pub.dartlang.org" source: hosted - version: "2.0.9" + version: "2.0.11" shared_preferences_ios: dependency: transitive description: name: shared_preferences_ios url: "https://pub.dartlang.org" source: hosted - version: "2.0.8" + version: "2.0.10" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.1.0" shared_preferences_macos: dependency: transitive description: name: shared_preferences_macos url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "2.0.3" shared_preferences_platform_interface: dependency: transitive description: @@ -1056,14 +1063,14 @@ packages: name: shared_preferences_web url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "2.0.3" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.1.0" shelf: dependency: transitive description: @@ -1110,14 +1117,14 @@ packages: name: sqflite url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.0.2" sqflite_common: dependency: transitive description: name: sqflite_common url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.2.0" stack_trace: dependency: transitive description: @@ -1208,56 +1215,56 @@ packages: name: url_launcher url: "https://pub.dartlang.org" source: hosted - version: "6.0.17" + version: "6.0.20" url_launcher_android: dependency: transitive description: name: url_launcher_android url: "https://pub.dartlang.org" source: hosted - version: "6.0.13" + version: "6.0.15" url_launcher_ios: dependency: transitive description: name: url_launcher_ios url: "https://pub.dartlang.org" source: hosted - version: "6.0.13" + version: "6.0.15" url_launcher_linux: dependency: transitive description: name: url_launcher_linux url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "3.0.0" url_launcher_macos: dependency: transitive description: name: url_launcher_macos url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "3.0.0" url_launcher_platform_interface: dependency: transitive description: name: url_launcher_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.4" + version: "2.0.5" url_launcher_web: dependency: transitive description: name: url_launcher_web url: "https://pub.dartlang.org" source: hosted - version: "2.0.5" + version: "2.0.6" url_launcher_windows: dependency: transitive description: name: url_launcher_windows url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "3.0.0" uuid: dependency: transitive description: @@ -1278,21 +1285,35 @@ packages: name: video_player url: "https://pub.dartlang.org" source: hosted - version: "2.2.10" + version: "2.2.18" + video_player_android: + dependency: transitive + description: + name: video_player_android + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.17" + video_player_avfoundation: + dependency: transitive + description: + name: video_player_avfoundation + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.18" video_player_platform_interface: dependency: transitive description: name: video_player_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "5.0.0" + version: "5.0.2" video_player_web: dependency: transitive description: name: video_player_web url: "https://pub.dartlang.org" source: hosted - version: "2.0.5" + version: "2.0.7" visibility_detector: dependency: transitive description: @@ -1369,7 +1390,7 @@ packages: name: webview_flutter_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.1" webview_flutter_wkwebview: dependency: transitive description: @@ -1383,14 +1404,14 @@ packages: name: win32 url: "https://pub.dartlang.org" source: hosted - version: "2.3.3" + version: "2.3.11" xdg_directories: dependency: transitive description: name: xdg_directories url: "https://pub.dartlang.org" source: hosted - version: "0.2.0" + version: "0.2.0+1" xml: dependency: transitive description: @@ -1407,4 +1428,4 @@ packages: version: "3.1.0" sdks: dart: ">=2.15.0 <3.0.0" - flutter: ">=2.5.0" + flutter: ">=2.8.0" diff --git a/pubspec.yaml b/pubspec.yaml index 766f55cb..dfc76868 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -112,6 +112,7 @@ dependencies: # Hijri # hijri: ^2.0.3 hijri_picker: ^3.0.0 + flutter_datetime_picker: ^1.5.1 # flutter_math_fork: ^0.6.0 # flutter_math_fork: ^0.6.0