From fb610d21b0118a6dec4f39303f44be3c3653c8db Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Tue, 4 Jan 2022 11:04:16 +0200 Subject: [PATCH] reformat code --- lib/UpdatePage.dart | 19 +- lib/client/base_app_client.dart | 9 +- lib/config/size_config.dart | 1 + lib/core/enum/CalenderType.dart | 4 +- lib/core/enum/PatientType.dart | 4 +- lib/core/enum/auth_method_types.dart | 9 +- lib/core/enum/filter_type.dart | 3 - lib/core/enum/master_lookup_key.dart | 1 - lib/core/enum/patient_type.dart | 1 - .../CheckActivationCodeModel.dart | 48 +- .../CheckPatientForRegistrationModel.dart | 32 +- .../GetPatientInfoRequestModel.dart | 22 +- .../GetPatientInfoResponseModel.dart | 184 +++--- .../PatientRegistrationModel.dart | 74 +-- ...PNotificationTypeForRegistrationModel.dart | 46 +- .../model/Prescriptions/Prescriptions.dart | 5 +- .../Prescriptions/perscription_pharmacy.dart | 46 +- .../Prescriptions/prescription_model.dart | 1 + .../prescription_report_enh.dart | 64 +- .../Prescriptions/prescriptions_order.dart | 58 +- ...t_get_list_pharmacy_for_prescriptions.dart | 22 +- .../request_prescription_report.dart | 36 +- .../request_prescription_report_enh.dart | 35 +- .../model/admissionRequest/clinic-model.dart | 11 +- .../model/admissionRequest/ward-model.dart | 8 +- .../model/auth/activation_Code_req_model.dart | 3 +- ...on_code_for_verification_screen_model.dart | 4 +- .../check_activation_code_request_model.dart | 9 +- lib/core/model/auth/imei_details.dart | 1 + lib/core/model/auth/insert_imei_model.dart | 1 + .../new_login_information_response_model.dart | 36 +- ...on_code_for_doctor_app_response_model.dart | 6 +- .../GetDiabeticChartValuesRequestModel.dart | 14 +- .../GetDiabeticChartValuesResponseModel.dart | 10 +- .../GetDiagnosisForInPatientRequestModel.dart | 8 +- ...GetDiagnosisForInPatientResponseModel.dart | 17 +- .../get_hospitals_request_model.dart | 16 +- lib/core/model/hospitals_model.dart | 33 +- .../model/insurance/insurance_approval.dart | 1 + lib/core/model/labs/LabOrderResult.dart | 36 +- lib/core/model/labs/LabResultHistory.dart | 48 +- .../labs/all_special_lab_result_model.dart | 1 + lib/core/model/labs/lab_result.dart | 3 +- lib/core/model/labs/patient_lab_orders.dart | 8 +- .../labs/patient_lab_special_result.dart | 8 +- .../labs/request_patient_lab_orders.dart | 24 +- .../request_patient_lab_special_result.dart | 34 +- .../labs/request_send_lab_report_email.dart | 48 +- .../live_care/AlternativeServicesList.dart | 6 +- ..._patient_to_doctor_list_request_model.dart | 3 +- .../live_care_login_reguest_model.dart | 7 +- .../medical_file_request_model.dart | 3 +- lib/core/model/note/CreateNoteModel.dart | 36 +- .../GetNursingProgressNoteRequestModel.dart | 8 +- lib/core/model/note/note_model.dart | 38 +- lib/core/model/note/update_note_model.dart | 32 +- .../patient_muse/PatientMuseResultsModel.dart | 3 +- .../get_ordered_procedure_request_model.dart | 3 +- .../procedure_template_details_model.dart | 5 +- lib/core/model/radiology/final_radiology.dart | 9 +- .../request_patient_rad_orders_details.dart | 38 +- .../request_send_rad_report_email.dart | 50 +- .../referral/DischargeReferralPatient.dart | 100 +-- .../referral/MyReferralPatientModel.dart | 52 +- .../MyReferralPatientRequestModel.dart | 44 +- lib/core/model/referral/ReferralRequest.dart | 46 +- .../get_medication_response_model.dart | 1 + .../search_drug_request_model.dart | 1 + .../sick_leave_doctor_request_model.dart | 6 +- .../sick_leave/sick_leave_patient_model.dart | 3 +- lib/core/provider/robot_provider.dart | 1 + lib/core/service/AnalyticsService.dart | 6 +- lib/core/service/NavigationService.dart | 23 +- .../service/PatientRegistrationService.dart | 7 +- lib/core/service/VideoCallService.dart | 17 +- lib/core/service/authentication_service.dart | 123 ++-- lib/core/service/base/base_service.dart | 10 +- lib/core/service/base/lookup-service.dart | 3 +- lib/core/service/home/dasboard_service.dart | 10 +- .../service/home/doctor_reply_service.dart | 18 +- lib/core/service/home/scan_qr_service.dart | 3 +- lib/core/service/home/schedule_service.dart | 10 +- .../service/hospitals/hospitals_service.dart | 3 +- .../patient/LiveCarePatientServices.dart | 53 +- .../patient/MyReferralPatientService.dart | 86 +-- .../service/patient/out_patient_service.dart | 1 + .../patient-doctor-referral-service.dart | 2 +- .../patient/patientInPatientService.dart | 2 +- lib/core/service/patient/patient_service.dart | 56 +- .../profile/discharge_summary_servive.dart | 2 + .../profile/operation_report_servive.dart | 15 +- .../patient/referral_patient_service.dart | 62 +- .../patient-admission-request-service.dart | 8 +- .../insurance/InsuranceCardService.dart | 2 + .../lab_order/labs_service.dart | 54 +- .../PatientMedicalReportService.dart | 24 +- .../medical_report/medical_file_service.dart | 1 + .../prescription/medicine_service.dart | 6 +- .../prescription/prescription_service.dart | 3 + .../prescription/prescriptions_service.dart | 82 ++- .../procedure/procedure_service.dart | 70 +- .../radiology/radiology_service.dart | 15 +- .../sick_leave/sickleave_service.dart | 30 +- .../soap/SOAP_service.dart | 18 +- .../patient-vital-signs-service.dart | 44 +- lib/core/service/pending_order_service.dart | 2 + .../special_clinic_service.dart | 37 +- lib/core/viewModel/InsuranceViewModel.dart | 1 + .../viewModel/LiveCarePatientViewModel.dart | 45 +- .../PatientMedicalReportViewModel.dart | 28 +- .../PatientRegistrationViewModel.dart | 2 +- lib/core/viewModel/SOAP_view_model.dart | 13 +- .../viewModel/authentication_view_model.dart | 234 +++---- lib/core/viewModel/base_view_model.dart | 6 +- lib/core/viewModel/dashboard_view_model.dart | 8 +- .../viewModel/doctor_replay_view_model.dart | 1 + lib/core/viewModel/hospitals_view_model.dart | 5 +- lib/core/viewModel/labs_view_model.dart | 97 ++- .../viewModel/leave_rechdule_response.dart | 1 + lib/core/viewModel/livecare_view_model.dart | 1 - lib/core/viewModel/medicine_view_model.dart | 65 +- .../viewModel/patient-referral-viewmodel.dart | 76 ++- .../viewModel/patient-ucaf-viewmodel.dart | 2 +- .../viewModel/prescription_view_model.dart | 105 ++- .../viewModel/prescriptions_view_model.dart | 72 ++- lib/core/viewModel/procedure_View_model.dart | 166 +++-- .../profile/discharge_summary_view_model.dart | 29 +- .../profile/operation_report_view_model.dart | 19 +- lib/core/viewModel/project_view_model.dart | 7 +- lib/core/viewModel/scan_qr_view_model.dart | 4 +- lib/core/viewModel/sick_leave_view_model.dart | 13 +- lib/icons_app/doctor_app_icons.dart | 571 +++++++++++------ lib/landing_page.dart | 5 +- lib/locator.dart | 1 - lib/main.dart | 2 - lib/models/SOAP/Allergy_model.dart | 22 +- .../GetChiefComplaintReqModel.dart | 7 +- .../GetChiefComplaintResModel.dart | 22 +- lib/models/SOAP/GetAllergiesResModel.dart | 23 +- lib/models/SOAP/GetAssessmentReqModel.dart | 14 +- lib/models/SOAP/GetAssessmentResModel.dart | 28 +- .../SOAP/GetGetProgressNoteReqModel.dart | 15 +- .../SOAP/GetGetProgressNoteResModel.dart | 22 +- lib/models/SOAP/GetHistoryReqModel.dart | 1 - lib/models/SOAP/GetHistoryResModel.dart | 12 +- .../SOAP/GetPhysicalExamListResModel.dart | 36 +- lib/models/SOAP/PatchAssessmentReqModel.dart | 16 +- lib/models/SOAP/PostEpisodeReqModel.dart | 6 +- .../SOAP/get_Allergies_request_model.dart | 8 +- lib/models/SOAP/master_key_model.dart | 30 +- lib/models/SOAP/order-procedure.dart | 50 +- .../SOAP/post_allergy_request_model.dart | 28 +- .../SOAP/post_assessment_request_model.dart | 14 +- .../SOAP/post_histories_request_model.dart | 12 +- .../selected_items/my_selected_allergy.dart | 1 - .../selected_items/my_selected_assement.dart | 12 +- ...cial_clinical_care_List_Respose_Model.dart | 8 +- ...nical_care_mapping_List_Respose_Model.dart | 10 +- .../GetDischargeSummaryReqModel.dart | 5 +- ...list_doctor_working_hours_table_model.dart | 2 +- .../list_gt_my_patients_question_model.dart | 64 +- .../request_create_doctor_response.dart | 16 +- .../doctor/replay/request_doctor_reply.dart | 3 +- .../request_add_referred_doctor_remarks.dart | 31 +- lib/models/doctor/request_schedule.dart | 2 - .../verify_referral_doctor_remarks.dart | 61 +- lib/models/livecare/session_status_model.dart | 6 +- lib/models/livecare/start_call_req.dart | 22 +- lib/models/livecare/start_call_res.dart | 18 +- ...update_operation_report_request_model.dart | 46 +- .../get_operation_details_request_modle.dart | 26 +- .../get_operation_details_response_modle.dart | 66 +- .../MedicalReport/MedicalReportTemplate.dart | 22 +- .../MedicalReport/MeidcalReportModel.dart | 50 +- lib/models/patient/PatientArrivalEntity.dart | 36 +- .../get_clinic_by_project_id_request.dart | 10 +- .../get_doctor_by_clinic_id_request.dart | 33 +- ...t_list_stp_referral_frequency_request.dart | 12 +- .../patient/get_pending_patient_er_model.dart | 170 ++--- .../patient/insurance_aprovals_request.dart | 5 +- .../lab_orders/lab_orders_req_model.dart | 15 +- .../lab_orders/lab_orders_res_model.dart | 2 - lib/models/patient/lab_result/lab_result.dart | 54 +- .../lab_result/lab_result_req_model.dart | 26 +- .../patient/my_referral/clinic-doctor.dart | 79 ++- .../my_referral_patient_model.dart | 96 +-- .../my_referred_patient_model.dart | 140 ++-- lib/models/patient/orders_request.dart | 9 +- lib/models/patient/patiant_info_model.dart | 41 +- ...et_patient_arrival_list_request_model.dart | 1 - lib/models/patient/patient_model.dart | 3 + .../prescription/prescription_report.dart | 62 +- .../prescription_report_for_in_patient.dart | 97 +-- .../request_prescription_report.dart | 26 +- lib/models/patient/progress_note_request.dart | 10 +- ...st_prescription_report_for_in_patient.dart | 24 +- .../patient/refer_to_doctor_request.dart | 18 +- .../request_my_referral_patient_model.dart | 18 +- .../patient/topten_users_res_model.dart | 16 +- .../vital_sign/patient-vital-sign-data.dart | 61 +- .../vital_sign/vital_sign_req_model.dart | 17 +- .../vital_sign/vital_sign_res_model.dart | 12 +- .../pharmacies_List_request_model.dart | 5 +- .../sickleave/get_all_sickleave_response.dart | 1 + .../sick_leave_statisitics_model.dart | 4 +- lib/root_page.dart | 4 +- lib/routes.dart | 2 +- lib/screens/auth/login_screen.dart | 1 + .../doctor_replay/all_doctor_questions.dart | 114 ++-- .../doctor_replay/doctor_repaly_chat.dart | 600 +++++++++++------- .../doctor_replay/doctor_reply_screen.dart | 55 +- .../doctor_replay/doctor_reply_widget.dart | 164 ++--- .../not_replaied_doctor_questions.dart | 3 +- lib/screens/doctor/my_schedule_screen.dart | 41 +- .../doctor/patient_arrival_screen.dart | 4 +- .../home/dashboard_referral_patient.dart | 261 ++++---- .../home/dashboard_slider-item-widget.dart | 18 +- lib/screens/home/dashboard_swipe_widget.dart | 23 +- lib/screens/home/home_page_card.dart | 25 +- lib/screens/home/home_patient_card.dart | 76 ++- lib/screens/home/home_screen.dart | 62 +- lib/screens/home/label.dart | 23 +- lib/screens/live_care/end_call_screen.dart | 97 +-- .../live-care_transfer_to_admin.dart | 33 +- .../live_care/live_care_patient_screen.dart | 1 + lib/screens/live_care/panding_list.dart | 3 + lib/screens/live_care/video_call.dart | 13 +- .../medical-file/health_summary_page.dart | 121 +++- .../medical-file/medical_file_details.dart | 15 +- .../medicine/pharmacies_list_screen.dart | 174 +++-- .../add_patient_sick_leave_screen.dart | 1 + .../patient_sick_leave_screen.dart | 47 +- .../patients/DischargedPatientPage.dart | 9 +- lib/screens/patients/ECGPage.dart | 184 +++--- lib/screens/patients/In_patient/NoData.dart | 2 +- .../In_patient/in_patient_screen.dart | 51 +- .../In_patient/list_of_all_in_patient.dart | 9 +- .../In_patient/list_of_my_inpatient.dart | 82 +-- .../ReferralDischargedPatientDetails.dart | 21 +- .../ReferralDischargedPatientPage.dart | 145 +++-- .../insurance_approval_screen_patient.dart | 11 +- .../patients/insurance_approvals_details.dart | 1 + ...t_patient_prescription_details_screen.dart | 30 +- .../patients/patient_search/time_bar.dart | 1 + .../profile/UCAF/UCAF-detail-screen.dart | 14 +- .../profile/UCAF/UCAF-input-screen.dart | 10 +- .../profile/UCAF/page-stepper-widget.dart | 76 ++- .../profile/UCAF/ucaf_pager_screen.dart | 2 - .../admission-request-first-screen.dart | 188 ++++-- .../admission-request-third-screen.dart | 135 ++-- .../admission-request_second-screen.dart | 330 ++++++---- .../diabetic_chart/diabetic_chart.dart | 157 +++-- ...iabetic_details_blood_pressurewideget.dart | 12 +- .../line_chart_for_diabetic.dart | 33 +- .../all_discharge_summary.dart | 1 + .../discharge_Summary_widget.dart | 1 + .../profile/lab_result/FlowChartPage.dart | 5 +- .../lab_result/LabResultHistoryPage.dart | 48 +- .../profile/lab_result/LabResultWidget.dart | 44 +- .../Lab_Result_details_wideget.dart | 6 +- .../Lab_Result_history_details_wideget.dart | 5 +- .../profile/lab_result/LineChartCurved.dart | 66 +- .../lab_result/LineChartCurvedLabHistory.dart | 20 +- .../all_lab_special_result_page.dart | 5 +- .../lab_result_chart_and_detials.dart | 19 +- .../lab_result/lab_result_secreen.dart | 1 - .../lab_result/laboratory_result_page.dart | 7 +- .../lab_result/laboratory_result_widget.dart | 27 +- .../profile/lab_result/labs_home_page.dart | 5 +- .../special_lab_result_details_page.dart | 9 +- .../AddVerifyMedicalReport.dart | 58 +- .../MedicalReportDetailPage.dart | 44 +- .../medical_report/MedicalReportPage.dart | 66 +- .../notes/note/progress_note_screen.dart | 23 +- .../profile/notes/note/update_note.dart | 26 +- .../operation_report/operation_report.dart | 557 ++++++++-------- .../update_operation_report.dart | 235 ++++--- .../pending_orders/pending_orders_screen.dart | 12 +- ...out_patient_prescription_details_item.dart | 78 +-- .../patient_profile_screen.dart | 22 +- .../profile_gird_for_other.dart | 90 ++- .../profile_gird_for_search.dart | 98 ++- .../radiology/radiology_details_page.dart | 10 +- .../radiology/radiology_home_page.dart | 78 ++- .../radiology/radiology_report_screen.dart | 4 +- .../referral/AddReplayOnReferralPatient.dart | 54 +- .../ReplySummeryOnReferralPatient.dart | 9 +- .../referral/my-referral-detail-screen.dart | 1 - .../my-referral-inpatient-screen.dart | 16 +- .../referral/my-referral-patient-screen.dart | 6 +- .../referral/patient_referral_screen.dart | 35 +- .../refer-patient-screen-in-patient.dart | 66 +- .../referral/refer-patient-screen.dart | 109 ++-- .../referral_patient_detail_in-paint.dart | 210 ++++-- .../referral/referred-patient-screen.dart | 5 +- .../assessment/add_assessment_details.dart | 128 ++-- .../assessment/assessment_call_back.dart | 6 +- .../assessment/update_assessment_page.dart | 2 +- .../objective/add_examination_page.dart | 13 +- .../objective/add_examination_widget.dart | 50 +- .../examinations_list_search_widget.dart | 6 +- .../objective/objective_call_back.dart | 6 +- .../objective/update_objective_page.dart | 44 +- .../soap_update/plan/plan_call_back.dart | 6 +- .../shared_soap_widgets/SOAP_open_items.dart | 52 +- .../shared_soap_widgets/SOAP_step_header.dart | 30 +- .../bottom_sheet_title.dart | 1 + .../expandable_SOAP_widget.dart | 50 +- .../shared_soap_widgets/remark_text.dart | 9 +- .../shared_soap_widgets/remove_button.dart | 9 +- .../steper/Step_details_widget.dart | 13 +- .../steper/status_Label.dart | 14 +- .../steper/steps_widget.dart | 24 +- .../profile/soap_update/soap_utils.dart | 2 +- .../subjective/allergies/add_allergies.dart | 1 - .../subjective/allergies/allergies_item.dart | 3 +- ..._key_checkbox_search_allergies_widget.dart | 15 +- .../allergies/update_allergies_widget.dart | 14 +- .../update_Chief_complaints.dart | 50 +- .../subjective/history/priority_bar.dart | 12 +- .../history/update_history_widget.dart | 3 +- .../medication/update_medication_widget.dart | 15 +- .../subjective/subjective_call_back.dart | 4 +- .../soap_update/update_soap_index.dart | 76 +-- .../profile/vital_sign/LineChartCurved.dart | 20 +- .../LineChartCurvedBloodPressure.dart | 53 +- .../vital_sign_detail_pain_scale.dart | 50 +- ...al_sign_details_blood_pressurewideget.dart | 6 +- .../vital_sign/vital_sign_details_screen.dart | 317 ++++++--- .../vital_sign_details_wideget.dart | 5 +- .../vital_sign_item_details_screen.dart | 16 +- .../vital_sing_chart_and_detials.dart | 91 ++- .../vital_sing_chart_blood_pressure.dart | 10 +- .../register_patient/CustomEditableText.dart | 20 +- .../RegisterConfirmationPatientPage.dart | 2 - .../register_patient/RegisterPatientPage.dart | 4 - .../RegisterSearchPatientPage.dart | 8 +- .../register_patient/VerifyMethodPage.dart | 2 - lib/screens/prescription/drugtodrug.dart | 11 +- .../prescription_authorazation_form.dart | 1 + .../prescription_checkout_screen.dart | 333 +++++++--- .../prescription_item_in_patient_page.dart | 37 +- .../prescription/prescription_items_page.dart | 393 ++++++++---- .../prescription/prescription_text_filed.dart | 11 +- .../prescription/prescriptions_page.dart | 12 +- .../update_prescription_form.dart | 2 + .../procedures/ExpansionProcedure.dart | 40 +- lib/screens/procedures/ProcedureCard.dart | 28 +- .../procedures/add-favourite-procedure.dart | 31 +- .../entity_list_checkbox_search_widget.dart | 1 + .../procedures/entity_list_fav_procedure.dart | 19 +- .../procedures/procedure_checkout_screen.dart | 56 +- lib/screens/procedures/procedure_screen.dart | 55 +- lib/screens/procedures/update-procedure.dart | 3 + lib/screens/qr_reader/QR_reader_screen.dart | 19 +- .../add-rescheduleleave.dart | 149 +++-- .../reschedule-leaves/reschedule_leave.dart | 444 +++++++++---- lib/util/NotificationPermissionUtils.dart | 45 +- lib/util/VideoChannel.dart | 53 +- lib/util/date-utils.dart | 2 +- lib/util/dr_app_shared_pref.dart | 8 +- lib/util/extenstions.dart | 3 +- lib/util/helpers.dart | 85 +-- lib/util/translations_delegate_base.dart | 250 ++++++++ lib/widgets/auth/method_type_card.dart | 38 +- lib/widgets/auth/sms-popup.dart | 4 +- .../auth/verification_methods_list.dart | 21 +- lib/widgets/charts/app_bar_chart.dart | 25 +- lib/widgets/charts/app_time_series_chart.dart | 2 +- lib/widgets/dashboard/activity_button.dart | 33 +- .../dashboard/dashboard_item_icons_texts.dart | 3 +- .../dashboard_item_texts_widget.dart | 1 + lib/widgets/dashboard/guage_chart.dart | 3 +- lib/widgets/dashboard/out_patient_stack.dart | 137 ++-- lib/widgets/dashboard/row_count.dart | 18 +- .../dashboard/swiper_rounded_pagination.dart | 2 + .../data_display/list/flexible_container.dart | 1 + lib/widgets/doctor/lab_result_widget.dart | 3 +- .../doctor/my_referral_patient_widget.dart | 2 +- lib/widgets/doctor/my_schedule_widget.dart | 36 +- lib/widgets/home/home_item.dart | 1 + .../medicine/medicine_item_widget.dart | 1 + .../patients/clinic_list_dropdwon.dart | 124 ++-- lib/widgets/patients/dynamic_elements.dart | 3 + .../patient-referral-item-widget.dart | 15 +- .../patients/patient_card/PatientCard.dart | 46 +- .../patients/patient_card/ShowTimer.dart | 9 +- .../profile/PatientProfileButton.dart | 96 +-- .../patients/profile/avatar_gradients.dart | 7 +- .../patients/profile/large_avatar.dart | 8 +- ...ent-profile-header-new-design-app-bar.dart | 5 +- .../prescription_out_patinets_widget.dart | 14 +- .../profile/profile-welcome-widget.dart | 6 +- .../profile/profile_medical_info_widget.dart | 17 +- ...rofile_medical_info_widget_in_patient.dart | 12 +- .../profile_medical_info_widget_search.dart | 61 +- .../patients/vital_sign_details_wideget.dart | 9 +- lib/widgets/shared/TextFields.dart | 111 ++-- lib/widgets/shared/app_loader_widget.dart | 11 +- lib/widgets/shared/app_scaffold_widget.dart | 17 +- lib/widgets/shared/bottom_nav_bar.dart | 6 +- .../shared/bottom_navigation_item.dart | 3 +- .../shared/buttons/app_buttons_widget.dart | 2 +- .../shared/buttons/button_bottom_sheet.dart | 7 +- .../shared/buttons/secondary_button.dart | 2 +- .../shared/card_with_bgNew_widget.dart | 18 +- lib/widgets/shared/card_with_bg_widget.dart | 5 +- .../shared/dialogs/ShowImageDialog.dart | 9 +- .../shared/dialogs/dailog-list-select.dart | 22 +- .../shared/dialogs/master_key_dailog.dart | 15 +- .../shared/divider_with_spaces_around.dart | 6 +- lib/widgets/shared/doctor_card.dart | 14 +- .../dr_app_circular_progress_Indeicator.dart | 3 +- .../shared/errors/dr_app_embedded_error.dart | 16 +- lib/widgets/shared/errors/error_message.dart | 14 +- .../shared/expandable-widget-header-body.dart | 6 +- .../shared/expandable_item_widget.dart | 116 ++-- .../shared/loader/gif_loader_container.dart | 19 +- .../loader/gif_loader_dialog_utils.dart | 4 +- .../master_key_checkbox_search_widget.dart | 9 +- lib/widgets/shared/network_base_view.dart | 4 +- lib/widgets/shared/profile_image_widget.dart | 32 +- .../shared/rounded_container_widget.dart | 2 +- lib/widgets/shared/speech-text-popup.dart | 2 + .../text_fields/app-textfield-custom.dart | 2 +- .../app_text_field_custom_serach.dart | 5 +- .../text_fields/app_text_form_field.dart | 2 +- .../text_fields/auto_complete_text_field.dart | 2 - .../shared/text_fields/html_rich_editor.dart | 18 +- .../shared/text_fields/new_text_Field.dart | 98 +-- .../user-guid/custom_validation_error.dart | 22 +- lib/widgets/transitions/fade_page.dart | 49 +- lib/widgets/transitions/slide_up_page.dart | 21 +- 433 files changed, 9721 insertions(+), 6788 deletions(-) diff --git a/lib/UpdatePage.dart b/lib/UpdatePage.dart index b81e2e4c..749b4298 100644 --- a/lib/UpdatePage.dart +++ b/lib/UpdatePage.dart @@ -32,18 +32,27 @@ class UpdatePage extends StatelessWidget { children: [ Image.asset( 'assets/images/update_rocket_image.png', - width: double.maxFinite,fit: BoxFit.fill, + width: double.maxFinite, + fit: BoxFit.fill, ), Image.asset('assets/images/HMG_logo.png'), - SizedBox(height: 8,), + SizedBox( + height: 8, + ), AppText( - TranslationBase.of(context).updateTheApp.toUpperCase(),fontSize: 17, + TranslationBase.of(context).updateTheApp.toUpperCase(), + fontSize: 17, fontWeight: FontWeight.w600, ), - SizedBox(height: 12,), + SizedBox( + height: 12, + ), Padding( padding: const EdgeInsets.all(8.0), - child: AppText(message??"Update the app",fontSize: 12,), + child: AppText( + message ?? "Update the app", + fontSize: 12, + ), ) ], ), diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index 0a7792b2..033bc44c 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -110,7 +110,11 @@ class BaseAppClient { var asd2; if (await Helpers.checkConnection()) { final response = await http.post(Uri.parse(url), - body: json.encode(body), headers: {'Content-Type': 'application/json', 'Accept': 'application/json'}); + body: json.encode(body), + headers: { + 'Content-Type': 'application/json', + 'Accept': 'application/json' + }); final int statusCode = response.statusCode; if (statusCode < 200 || statusCode >= 400) { onFailure(Helpers.generateContactAdminMsg(), statusCode); @@ -234,7 +238,8 @@ class BaseAppClient { var asd = json.encode(body); var asd2; if (await Helpers.checkConnection()) { - final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers); + final response = await http.post(Uri.parse(url.trim()), + body: json.encode(body), headers: headers); final int statusCode = response.statusCode; print("statusCode :$statusCode"); if (statusCode < 200 || statusCode >= 400 || json == null) { diff --git a/lib/config/size_config.dart b/lib/config/size_config.dart index 21859d3b..f131d30a 100644 --- a/lib/config/size_config.dart +++ b/lib/config/size_config.dart @@ -21,6 +21,7 @@ class SizeConfig { static bool isHeightMiddle = false; static bool isHeightLarge = false; static bool isWidthLarge = false; + void init(BoxConstraints constraints, Orientation orientation) { realScreenHeight = constraints.maxHeight; realScreenWidth = constraints.maxWidth; diff --git a/lib/core/enum/CalenderType.dart b/lib/core/enum/CalenderType.dart index 51f98512..fbfbbc64 100644 --- a/lib/core/enum/CalenderType.dart +++ b/lib/core/enum/CalenderType.dart @@ -1,4 +1,4 @@ -enum CalenderType{ +enum CalenderType { Gregorian, Hijri, -} \ No newline at end of file +} diff --git a/lib/core/enum/PatientType.dart b/lib/core/enum/PatientType.dart index 96fd9ae5..145aacf2 100644 --- a/lib/core/enum/PatientType.dart +++ b/lib/core/enum/PatientType.dart @@ -1,4 +1,4 @@ -enum PatientType{ +enum PatientType { IN_PATIENT, OUT_PATIENT, -} \ No newline at end of file +} diff --git a/lib/core/enum/auth_method_types.dart b/lib/core/enum/auth_method_types.dart index 82577eeb..cf7befad 100644 --- a/lib/core/enum/auth_method_types.dart +++ b/lib/core/enum/auth_method_types.dart @@ -1,4 +1,5 @@ -enum AuthMethodTypes { SMS, WhatsApp, Fingerprint,FaceID,MoreOptions } +enum AuthMethodTypes { SMS, WhatsApp, Fingerprint, FaceID, MoreOptions } + extension SelectedAuthMethodTypesService on AuthMethodTypes { // ignore: missing_return int getTypeIdService() { @@ -18,12 +19,11 @@ extension SelectedAuthMethodTypesService on AuthMethodTypes { case AuthMethodTypes.MoreOptions: return 5; break; - } } // ignore: missing_return - static getMethodsTypeService( int typeId) { + static getMethodsTypeService(int typeId) { switch (typeId) { case 1: return AuthMethodTypes.SMS; @@ -40,7 +40,6 @@ extension SelectedAuthMethodTypesService on AuthMethodTypes { case 5: return AuthMethodTypes.MoreOptions; break; - } } -} \ No newline at end of file +} diff --git a/lib/core/enum/filter_type.dart b/lib/core/enum/filter_type.dart index bfa781f9..a80b8898 100644 --- a/lib/core/enum/filter_type.dart +++ b/lib/core/enum/filter_type.dart @@ -1,6 +1,3 @@ enum FilterType { Clinic, Hospital } enum OutPatientFilterType { Previous, Today, NextWeek } - - - diff --git a/lib/core/enum/master_lookup_key.dart b/lib/core/enum/master_lookup_key.dart index 25e40d3b..04608719 100644 --- a/lib/core/enum/master_lookup_key.dart +++ b/lib/core/enum/master_lookup_key.dart @@ -19,7 +19,6 @@ enum MasterKeysService { MedicationFrequency, MedicationDoseTime, MedicationIndications, - AdmissionRequestType, DiagnosisSelectionType, } diff --git a/lib/core/enum/patient_type.dart b/lib/core/enum/patient_type.dart index efea543c..7591f6f5 100644 --- a/lib/core/enum/patient_type.dart +++ b/lib/core/enum/patient_type.dart @@ -1,2 +1 @@ enum PatientType { inPatient, OutPatient } - diff --git a/lib/core/model/PatientRegistration/CheckActivationCodeModel.dart b/lib/core/model/PatientRegistration/CheckActivationCodeModel.dart index 4b95c1b0..ce65a600 100644 --- a/lib/core/model/PatientRegistration/CheckActivationCodeModel.dart +++ b/lib/core/model/PatientRegistration/CheckActivationCodeModel.dart @@ -27,30 +27,30 @@ class CheckActivationCodeModel { CheckActivationCodeModel( {this.patientMobileNumber, - this.mobileNo, - this.projectOutSA, - this.loginType, - this.zipCode, - this.isRegister, - this.logInTokenID, - this.searchType, - this.patientID, - this.nationalID, - this.patientIdentificationID, - this.forRegisteration, - this.activationCode, - this.versionID, - this.channel, - this.languageID, - this.iPAdress, - this.generalid, - this.patientOutSA, - this.sessionID, - this.isDentalAllowedBackend, - this.deviceTypeID, - this.dOB, - this.isHijri, - this.healthId}); + this.mobileNo, + this.projectOutSA, + this.loginType, + this.zipCode, + this.isRegister, + this.logInTokenID, + this.searchType, + this.patientID, + this.nationalID, + this.patientIdentificationID, + this.forRegisteration, + this.activationCode, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.dOB, + this.isHijri, + this.healthId}); CheckActivationCodeModel.fromJson(Map json) { patientMobileNumber = json['PatientMobileNumber']; diff --git a/lib/core/model/PatientRegistration/CheckPatientForRegistrationModel.dart b/lib/core/model/PatientRegistration/CheckPatientForRegistrationModel.dart index 3465cf8d..cba0e11d 100644 --- a/lib/core/model/PatientRegistration/CheckPatientForRegistrationModel.dart +++ b/lib/core/model/PatientRegistration/CheckPatientForRegistrationModel.dart @@ -19,22 +19,22 @@ class CheckPatientForRegistrationModel { CheckPatientForRegistrationModel( {this.patientIdentificationID, - this.patientMobileNumber, - this.zipCode, - this.versionID, - this.channel, - this.languageID, - this.iPAdress, - this.generalid, - this.patientOutSA, - this.sessionID, - this.isDentalAllowedBackend, - this.deviceTypeID, - this.tokenID, - this.patientID, - this.isRegister, - this.dOB, - this.isHijri}); + this.patientMobileNumber, + this.zipCode, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.tokenID, + this.patientID, + this.isRegister, + this.dOB, + this.isHijri}); CheckPatientForRegistrationModel.fromJson(Map json) { patientIdentificationID = json['PatientIdentificationID']; diff --git a/lib/core/model/PatientRegistration/GetPatientInfoRequestModel.dart b/lib/core/model/PatientRegistration/GetPatientInfoRequestModel.dart index f05131ef..254ddab5 100644 --- a/lib/core/model/PatientRegistration/GetPatientInfoRequestModel.dart +++ b/lib/core/model/PatientRegistration/GetPatientInfoRequestModel.dart @@ -14,17 +14,17 @@ class GetPatientInfoRequestModel { GetPatientInfoRequestModel( {this.patientIdentificationID, - this.dOB, - this.isHijri, - this.versionID, - this.channel, - this.languageID, - this.iPAdress, - this.generalid, - this.patientOutSA, - this.sessionID, - this.isDentalAllowedBackend, - this.deviceTypeID}); + this.dOB, + this.isHijri, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID}); GetPatientInfoRequestModel.fromJson(Map json) { patientIdentificationID = json['PatientIdentificationID']; diff --git a/lib/core/model/PatientRegistration/GetPatientInfoResponseModel.dart b/lib/core/model/PatientRegistration/GetPatientInfoResponseModel.dart index 158bd1e2..1de1ded4 100644 --- a/lib/core/model/PatientRegistration/GetPatientInfoResponseModel.dart +++ b/lib/core/model/PatientRegistration/GetPatientInfoResponseModel.dart @@ -90,93 +90,93 @@ class GetPatientInfoResponseModel { GetPatientInfoResponseModel( {this.date, - this.languageID, - this.serviceName, - this.time, - this.androidLink, - this.authenticationTokenID, - this.data, - this.dataw, - this.dietType, - this.errorCode, - this.errorEndUserMessage, - this.errorEndUserMessageN, - this.errorMessage, - this.errorType, - this.foodCategory, - this.iOSLink, - this.isAuthenticated, - this.mealOrderStatus, - this.mealType, - this.messageStatus, - this.numberOfResultRecords, - this.patientBlodType, - this.successMsg, - this.successMsgN, - this.vidaUpdatedResponse, - this.accessTokenObject, - this.age, - this.clientIdentifierId, - this.createdBy, - this.dateOfBirth, - this.firstNameAr, - this.firstNameEn, - this.gender, - this.genderAr, - this.genderEn, - this.healthId, - this.idNumber, - this.idType, - this.isHijri, - this.isInstertedOrUpdated, - this.isNull, - this.isPatientExistNHIC, - this.isRecordLockedByCurrentUser, - this.lastNameAr, - this.lastNameEn, - this.listActiveAccessToken, - this.maritalStatus, - this.maritalStatusCode, - this.nationalDateOfBirth, - this.nationality, - this.nationalityCode, - this.occupation, - this.pCDTransactionDataResultList, - this.pCDGetVidaPatientForManualVerificationList, - this.pCDNHICHMGPatientDetailsMatchCalulationList, - this.pCDReturnValue, - this.patientStatus, - this.placeofBirth, - this.practitionerStatusCode, - this.practitionerStatusDescAr, - this.practitionerStatusDescEn, - this.rowCount, - this.secondNameAr, - this.secondNameEn, - this.thirdNameAr, - this.thirdNameEn, - this.yakeenVidaPatientDataStatisticsByPatientIdList, - this.yakeenVidaPatientDataStatisticsList, - this.yakeenVidaPatientDataStatisticsPrefferedList, - this.accessToken, - this.categoryCode, - this.categoryNameAr, - this.categoryNameEn, - this.constraintCode, - this.constraintNameAr, - this.constraintNameEn, - this.content, - this.errorList, - this.licenseExpiryDate, - this.licenseIssuedDate, - this.licenseStatusCode, - this.licenseStatusDescAr, - this.licenseStatusDescEn, - this.organizations, - this.registrationNumber, - this.specialtyCode, - this.specialtyNameAr, - this.specialtyNameEn}); + this.languageID, + this.serviceName, + this.time, + this.androidLink, + this.authenticationTokenID, + this.data, + this.dataw, + this.dietType, + this.errorCode, + this.errorEndUserMessage, + this.errorEndUserMessageN, + this.errorMessage, + this.errorType, + this.foodCategory, + this.iOSLink, + this.isAuthenticated, + this.mealOrderStatus, + this.mealType, + this.messageStatus, + this.numberOfResultRecords, + this.patientBlodType, + this.successMsg, + this.successMsgN, + this.vidaUpdatedResponse, + this.accessTokenObject, + this.age, + this.clientIdentifierId, + this.createdBy, + this.dateOfBirth, + this.firstNameAr, + this.firstNameEn, + this.gender, + this.genderAr, + this.genderEn, + this.healthId, + this.idNumber, + this.idType, + this.isHijri, + this.isInstertedOrUpdated, + this.isNull, + this.isPatientExistNHIC, + this.isRecordLockedByCurrentUser, + this.lastNameAr, + this.lastNameEn, + this.listActiveAccessToken, + this.maritalStatus, + this.maritalStatusCode, + this.nationalDateOfBirth, + this.nationality, + this.nationalityCode, + this.occupation, + this.pCDTransactionDataResultList, + this.pCDGetVidaPatientForManualVerificationList, + this.pCDNHICHMGPatientDetailsMatchCalulationList, + this.pCDReturnValue, + this.patientStatus, + this.placeofBirth, + this.practitionerStatusCode, + this.practitionerStatusDescAr, + this.practitionerStatusDescEn, + this.rowCount, + this.secondNameAr, + this.secondNameEn, + this.thirdNameAr, + this.thirdNameEn, + this.yakeenVidaPatientDataStatisticsByPatientIdList, + this.yakeenVidaPatientDataStatisticsList, + this.yakeenVidaPatientDataStatisticsPrefferedList, + this.accessToken, + this.categoryCode, + this.categoryNameAr, + this.categoryNameEn, + this.constraintCode, + this.constraintNameAr, + this.constraintNameEn, + this.content, + this.errorList, + this.licenseExpiryDate, + this.licenseIssuedDate, + this.licenseStatusCode, + this.licenseStatusDescAr, + this.licenseStatusDescEn, + this.organizations, + this.registrationNumber, + this.specialtyCode, + this.specialtyNameAr, + this.specialtyNameEn}); GetPatientInfoResponseModel.fromJson(Map json) { date = json['Date']; @@ -233,9 +233,9 @@ class GetPatientInfoResponseModel { occupation = json['Occupation']; pCDTransactionDataResultList = json['PCDTransactionDataResultList']; pCDGetVidaPatientForManualVerificationList = - json['PCD_GetVidaPatientForManualVerificationList']; + json['PCD_GetVidaPatientForManualVerificationList']; pCDNHICHMGPatientDetailsMatchCalulationList = - json['PCD_NHIC_HMG_PatientDetailsMatchCalulationList']; + json['PCD_NHIC_HMG_PatientDetailsMatchCalulationList']; pCDReturnValue = json['PCD_ReturnValue']; patientStatus = json['PatientStatus']; placeofBirth = json['PlaceofBirth']; @@ -248,11 +248,11 @@ class GetPatientInfoResponseModel { thirdNameAr = json['ThirdNameAr']; thirdNameEn = json['ThirdNameEn']; yakeenVidaPatientDataStatisticsByPatientIdList = - json['YakeenVidaPatientDataStatisticsByPatientIdList']; + json['YakeenVidaPatientDataStatisticsByPatientIdList']; yakeenVidaPatientDataStatisticsList = - json['YakeenVidaPatientDataStatisticsList']; + json['YakeenVidaPatientDataStatisticsList']; yakeenVidaPatientDataStatisticsPrefferedList = - json['YakeenVidaPatientDataStatisticsPrefferedList']; + json['YakeenVidaPatientDataStatisticsPrefferedList']; accessToken = json['accessToken']; categoryCode = json['categoryCode']; categoryNameAr = json['categoryNameAr']; diff --git a/lib/core/model/PatientRegistration/PatientRegistrationModel.dart b/lib/core/model/PatientRegistration/PatientRegistrationModel.dart index 83ff53d7..f7139725 100644 --- a/lib/core/model/PatientRegistration/PatientRegistrationModel.dart +++ b/lib/core/model/PatientRegistration/PatientRegistrationModel.dart @@ -20,23 +20,23 @@ class PatientRegistrationModel { PatientRegistrationModel( {this.patientobject, - this.patientIdentificationID, - this.patientMobileNumber, - this.logInTokenID, - this.versionID, - this.channel, - this.languageID, - this.iPAdress, - this.generalid, - this.patientOutSA, - this.sessionID, - this.isDentalAllowedBackend, - this.deviceTypeID, - this.tokenID, - this.dOB, - this.isHijri, - this.healthId, - this.zipCode}); + this.patientIdentificationID, + this.patientMobileNumber, + this.logInTokenID, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.tokenID, + this.dOB, + this.isHijri, + this.healthId, + this.zipCode}); PatientRegistrationModel.fromJson(Map json) { patientobject = json['Patientobject'] != null @@ -112,26 +112,26 @@ class Patientobject { Patientobject( {this.tempValue, - this.patientIdentificationType, - this.patientIdentificationNo, - this.mobileNumber, - this.patientOutSA, - this.firstNameN, - this.middleNameN, - this.lastNameN, - this.firstName, - this.middleName, - this.lastName, - this.strDateofBirth, - this.dateofBirth, - this.gender, - this.nationalityID, - this.dateofBirthN, - this.emailAddress, - this.sourceType, - this.preferredLanguage, - this.marital, - this.eHealthIDField}); + this.patientIdentificationType, + this.patientIdentificationNo, + this.mobileNumber, + this.patientOutSA, + this.firstNameN, + this.middleNameN, + this.lastNameN, + this.firstName, + this.middleName, + this.lastName, + this.strDateofBirth, + this.dateofBirth, + this.gender, + this.nationalityID, + this.dateofBirthN, + this.emailAddress, + this.sourceType, + this.preferredLanguage, + this.marital, + this.eHealthIDField}); Patientobject.fromJson(Map json) { tempValue = json['TempValue']; diff --git a/lib/core/model/PatientRegistration/SendActivationCodebyOTPNotificationTypeForRegistrationModel.dart b/lib/core/model/PatientRegistration/SendActivationCodebyOTPNotificationTypeForRegistrationModel.dart index 8244a95f..5709e137 100644 --- a/lib/core/model/PatientRegistration/SendActivationCodebyOTPNotificationTypeForRegistrationModel.dart +++ b/lib/core/model/PatientRegistration/SendActivationCodebyOTPNotificationTypeForRegistrationModel.dart @@ -26,29 +26,29 @@ class SendActivationCodeByOTPNotificationTypeForRegistrationModel { SendActivationCodeByOTPNotificationTypeForRegistrationModel( {this.patientMobileNumber, - this.mobileNo, - this.projectOutSA, - this.loginType, - this.zipCode, - this.isRegister, - this.logInTokenID, - this.searchType, - this.patientID, - this.nationalID, - this.patientIdentificationID, - this.oTPSendType, - this.languageID, - this.versionID, - this.channel, - this.iPAdress, - this.generalid, - this.patientOutSA, - this.sessionID, - this.isDentalAllowedBackend, - this.deviceTypeID, - this.dOB, - this.isHijri, - this.healthId}); + this.mobileNo, + this.projectOutSA, + this.loginType, + this.zipCode, + this.isRegister, + this.logInTokenID, + this.searchType, + this.patientID, + this.nationalID, + this.patientIdentificationID, + this.oTPSendType, + this.languageID, + this.versionID, + this.channel, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.dOB, + this.isHijri, + this.healthId}); SendActivationCodeByOTPNotificationTypeForRegistrationModel.fromJson( Map json) { diff --git a/lib/core/model/Prescriptions/Prescriptions.dart b/lib/core/model/Prescriptions/Prescriptions.dart index c47a813a..1ba6007e 100644 --- a/lib/core/model/Prescriptions/Prescriptions.dart +++ b/lib/core/model/Prescriptions/Prescriptions.dart @@ -69,7 +69,8 @@ class Prescriptions { this.nationalityFlagURL, this.noOfPatientsRate, this.qR, - this.speciality,this.isLiveCareAppointment}); + this.speciality, + this.isLiveCareAppointment}); Prescriptions.fromJson(Map json) { setupID = json['SetupID']; @@ -105,7 +106,7 @@ class Prescriptions { noOfPatientsRate = json['NoOfPatientsRate']; qR = json['QR']; isLiveCareAppointment = json['IsLiveCareAppointment']; - // speciality = json['Speciality'].cast(); + // speciality = json['Speciality'].cast(); } Map toJson() { diff --git a/lib/core/model/Prescriptions/perscription_pharmacy.dart b/lib/core/model/Prescriptions/perscription_pharmacy.dart index 3adaef7e..4634d30e 100644 --- a/lib/core/model/Prescriptions/perscription_pharmacy.dart +++ b/lib/core/model/Prescriptions/perscription_pharmacy.dart @@ -26,29 +26,29 @@ class PharmacyPrescriptions { PharmacyPrescriptions( {this.expiryDate, - this.sellingPrice, - this.quantity, - this.itemID, - this.locationID, - this.projectID, - this.setupID, - this.locationDescription, - this.locationDescriptionN, - this.itemDescription, - this.itemDescriptionN, - this.alias, - this.locationTypeID, - this.barcode, - this.companybarcode, - this.cityID, - this.cityName, - this.distanceInKilometers, - this.latitude, - this.locationType, - this.longitude, - this.phoneNumber, - this.projectImageURL, - this.sortOrder}); + this.sellingPrice, + this.quantity, + this.itemID, + this.locationID, + this.projectID, + this.setupID, + this.locationDescription, + this.locationDescriptionN, + this.itemDescription, + this.itemDescriptionN, + this.alias, + this.locationTypeID, + this.barcode, + this.companybarcode, + this.cityID, + this.cityName, + this.distanceInKilometers, + this.latitude, + this.locationType, + this.longitude, + this.phoneNumber, + this.projectImageURL, + this.sortOrder}); PharmacyPrescriptions.fromJson(Map json) { expiryDate = json['ExpiryDate']; diff --git a/lib/core/model/Prescriptions/prescription_model.dart b/lib/core/model/Prescriptions/prescription_model.dart index 92574c66..52c3edec 100644 --- a/lib/core/model/Prescriptions/prescription_model.dart +++ b/lib/core/model/Prescriptions/prescription_model.dart @@ -61,6 +61,7 @@ class EntityList { dynamic pharmacyInervention; dynamic refill; dynamic mediSpanGPICode; + EntityList( {this.appointmentNo, this.clinicName, diff --git a/lib/core/model/Prescriptions/prescription_report_enh.dart b/lib/core/model/Prescriptions/prescription_report_enh.dart index 01b9a5c9..e73034bd 100644 --- a/lib/core/model/Prescriptions/prescription_report_enh.dart +++ b/lib/core/model/Prescriptions/prescription_report_enh.dart @@ -35,38 +35,38 @@ class PrescriptionReportEnh { PrescriptionReportEnh( {this.address, - this.appodynamicmentNo, - this.clinic, - this.companyName, - this.days, - this.doctorName, - this.doseDailyQuantity, - this.frequency, - this.frequencyNumber, - this.image, - this.imageExtension, - this.imageSRCUrl, - this.imageString, - this.imageThumbUrl, - this.isCovered, - this.itemDescription, - this.itemID, - this.orderDate, - this.patientID, - this.patientName, - this.phoneOffice1, - this.prescriptionQR, - this.prescriptionTimes, - this.productImage, - this.productImageBase64, - this.productImageString, - this.projectID, - this.projectName, - this.remarks, - this.route, - this.sKU, - this.scaleOffset, - this.startDate}); + this.appodynamicmentNo, + this.clinic, + this.companyName, + this.days, + this.doctorName, + this.doseDailyQuantity, + this.frequency, + this.frequencyNumber, + this.image, + this.imageExtension, + this.imageSRCUrl, + this.imageString, + this.imageThumbUrl, + this.isCovered, + this.itemDescription, + this.itemID, + this.orderDate, + this.patientID, + this.patientName, + this.phoneOffice1, + this.prescriptionQR, + this.prescriptionTimes, + this.productImage, + this.productImageBase64, + this.productImageString, + this.projectID, + this.projectName, + this.remarks, + this.route, + this.sKU, + this.scaleOffset, + this.startDate}); PrescriptionReportEnh.fromJson(Map json) { address = json['Address']; diff --git a/lib/core/model/Prescriptions/prescriptions_order.dart b/lib/core/model/Prescriptions/prescriptions_order.dart index f51420ec..33e23fe8 100644 --- a/lib/core/model/Prescriptions/prescriptions_order.dart +++ b/lib/core/model/Prescriptions/prescriptions_order.dart @@ -34,35 +34,35 @@ class PrescriptionsOrder { PrescriptionsOrder( {this.iD, - this.patientID, - this.patientOutSA, - this.isOutPatient, - this.projectID, - this.nearestProjectID, - this.longitude, - this.latitude, - this.appointmentNo, - this.dischargeID, - this.lineItemNo, - this.status, - this.description, - this.descriptionN, - this.createdOn, - this.serviceID, - this.createdBy, - this.editedOn, - this.editedBy, - this.channel, - this.clientRequestID, - this.returnedToQueue, - this.pickupDateTime, - this.pickupLocationName, - this.dropoffLocationName, - this.realRRTHaveTransactions, - this.nearestProjectDescription, - this.nearestProjectDescriptionN, - this.projectDescription, - this.projectDescriptionN}); + this.patientID, + this.patientOutSA, + this.isOutPatient, + this.projectID, + this.nearestProjectID, + this.longitude, + this.latitude, + this.appointmentNo, + this.dischargeID, + this.lineItemNo, + this.status, + this.description, + this.descriptionN, + this.createdOn, + this.serviceID, + this.createdBy, + this.editedOn, + this.editedBy, + this.channel, + this.clientRequestID, + this.returnedToQueue, + this.pickupDateTime, + this.pickupLocationName, + this.dropoffLocationName, + this.realRRTHaveTransactions, + this.nearestProjectDescription, + this.nearestProjectDescriptionN, + this.projectDescription, + this.projectDescriptionN}); PrescriptionsOrder.fromJson(Map json) { iD = json['ID']; diff --git a/lib/core/model/Prescriptions/request_get_list_pharmacy_for_prescriptions.dart b/lib/core/model/Prescriptions/request_get_list_pharmacy_for_prescriptions.dart index 739bb838..e7d968c5 100644 --- a/lib/core/model/Prescriptions/request_get_list_pharmacy_for_prescriptions.dart +++ b/lib/core/model/Prescriptions/request_get_list_pharmacy_for_prescriptions.dart @@ -14,17 +14,17 @@ class RequestGetListPharmacyForPrescriptions { RequestGetListPharmacyForPrescriptions( {this.latitude, - this.longitude, - this.versionID, - this.channel, - this.languageID, - this.iPAdress, - this.generalid, - this.patientOutSA, - this.sessionID, - this.isDentalAllowedBackend, - this.deviceTypeID, - this.itemID}); + this.longitude, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.itemID}); RequestGetListPharmacyForPrescriptions.fromJson(Map json) { latitude = json['Latitude']; diff --git a/lib/core/model/Prescriptions/request_prescription_report.dart b/lib/core/model/Prescriptions/request_prescription_report.dart index c8323740..edd249ee 100644 --- a/lib/core/model/Prescriptions/request_prescription_report.dart +++ b/lib/core/model/Prescriptions/request_prescription_report.dart @@ -21,24 +21,24 @@ class RequestPrescriptionReport { RequestPrescriptionReport( {this.versionID, - this.channel, - this.languageID, - this.iPAdress, - this.generalid, - this.patientOutSA, - this.sessionID, - this.isDentalAllowedBackend, - this.deviceTypeID, - this.patientID, - this.tokenID, - this.patientTypeID, - this.patientType, - this.appointmentNo, - this.setupID, - this.episodeID, - this.clinicID, - this.projectID, - this.dischargeNo}); + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.patientID, + this.tokenID, + this.patientTypeID, + this.patientType, + this.appointmentNo, + this.setupID, + this.episodeID, + this.clinicID, + this.projectID, + this.dischargeNo}); RequestPrescriptionReport.fromJson(Map json) { versionID = json['VersionID']; diff --git a/lib/core/model/Prescriptions/request_prescription_report_enh.dart b/lib/core/model/Prescriptions/request_prescription_report_enh.dart index 4905fc2a..48b4f435 100644 --- a/lib/core/model/Prescriptions/request_prescription_report_enh.dart +++ b/lib/core/model/Prescriptions/request_prescription_report_enh.dart @@ -21,23 +21,24 @@ class RequestPrescriptionReportEnh { RequestPrescriptionReportEnh( {this.versionID, - this.channel, - this.languageID, - this.iPAdress, - this.generalid, - this.patientOutSA, - this.sessionID, - this.isDentalAllowedBackend, - this.deviceTypeID, - this.patientID, - this.tokenID, - this.patientTypeID, - this.patientType, - this.appointmentNo, - this.setupID, - this.episodeID, - this.clinicID, - this.projectID,this.dischargeNo}); + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.patientID, + this.tokenID, + this.patientTypeID, + this.patientType, + this.appointmentNo, + this.setupID, + this.episodeID, + this.clinicID, + this.projectID, + this.dischargeNo}); RequestPrescriptionReportEnh.fromJson(Map json) { versionID = json['VersionID']; diff --git a/lib/core/model/admissionRequest/clinic-model.dart b/lib/core/model/admissionRequest/clinic-model.dart index 05d34645..3905e67b 100644 --- a/lib/core/model/admissionRequest/clinic-model.dart +++ b/lib/core/model/admissionRequest/clinic-model.dart @@ -7,10 +7,10 @@ class Clinic { Clinic( {this.clinicGroupID, - this.clinicGroupName, - this.clinicID, - this.clinicNameArabic, - this.clinicNameEnglish}); + this.clinicGroupName, + this.clinicID, + this.clinicNameArabic, + this.clinicNameEnglish}); Clinic.fromJson(Map json) { clinicGroupID = json['clinicGroupID']; @@ -29,5 +29,4 @@ class Clinic { data['clinicNameEnglish'] = this.clinicNameEnglish; return data; } - -} \ No newline at end of file +} diff --git a/lib/core/model/admissionRequest/ward-model.dart b/lib/core/model/admissionRequest/ward-model.dart index 606758d3..98479fca 100644 --- a/lib/core/model/admissionRequest/ward-model.dart +++ b/lib/core/model/admissionRequest/ward-model.dart @@ -1,12 +1,10 @@ -class WardModel{ - +class WardModel { String description; String descriptionN; int floorID; bool isActive; - WardModel( - {this.description, this.descriptionN, this.floorID, this.isActive}); + WardModel({this.description, this.descriptionN, this.floorID, this.isActive}); WardModel.fromJson(Map json) { description = json['description']; @@ -23,4 +21,4 @@ class WardModel{ data['isActive'] = this.isActive; return data; } -} \ No newline at end of file +} diff --git a/lib/core/model/auth/activation_Code_req_model.dart b/lib/core/model/auth/activation_Code_req_model.dart index 85d7f1d3..f6094b9d 100644 --- a/lib/core/model/auth/activation_Code_req_model.dart +++ b/lib/core/model/auth/activation_Code_req_model.dart @@ -15,7 +15,8 @@ class ActivationCodeModel { this.memberID, this.facilityId, this.otpSendType, - this.generalid,this.loginDoctorID}); + this.generalid, + this.loginDoctorID}); ActivationCodeModel.fromJson(Map json) { channel = json['Channel']; diff --git a/lib/core/model/auth/activation_code_for_verification_screen_model.dart b/lib/core/model/auth/activation_code_for_verification_screen_model.dart index dae31f8c..631ac0ca 100644 --- a/lib/core/model/auth/activation_code_for_verification_screen_model.dart +++ b/lib/core/model/auth/activation_code_for_verification_screen_model.dart @@ -13,6 +13,7 @@ class ActivationCodeForVerificationScreenModel { String vidaAuthTokenID; String vidaRefreshTokenID; String iMEI; + ActivationCodeForVerificationScreenModel( {this.oTPSendType, this.mobileNumber, @@ -26,7 +27,8 @@ class ActivationCodeForVerificationScreenModel { this.isMobileFingerPrint, this.vidaAuthTokenID, this.vidaRefreshTokenID, - this.iMEI,this.loginDoctorID}); + this.iMEI, + this.loginDoctorID}); ActivationCodeForVerificationScreenModel.fromJson(Map json) { oTPSendType = json['OTP_SendType']; diff --git a/lib/core/model/auth/check_activation_code_request_model.dart b/lib/core/model/auth/check_activation_code_request_model.dart index 94502a71..c8040671 100644 --- a/lib/core/model/auth/check_activation_code_request_model.dart +++ b/lib/core/model/auth/check_activation_code_request_model.dart @@ -19,6 +19,7 @@ class CheckActivationCodeRequestModel { String iMEI; bool isForSilentLogin; int oTPSendType; + CheckActivationCodeRequestModel( {this.mobileNumber, this.zipCode, @@ -33,7 +34,13 @@ class CheckActivationCodeRequestModel { this.activationCode, this.vidaAuthTokenID, this.vidaRefreshTokenID, - this.oTPSendType,this.password,this.facilityId,this.memberID,this.isForSilentLogin=false,this.iMEI,this.loginDoctorID}); + this.oTPSendType, + this.password, + this.facilityId, + this.memberID, + this.isForSilentLogin = false, + this.iMEI, + this.loginDoctorID}); CheckActivationCodeRequestModel.fromJson(Map json) { mobileNumber = json['MobileNumber']; diff --git a/lib/core/model/auth/imei_details.dart b/lib/core/model/auth/imei_details.dart index eb37e736..21416074 100644 --- a/lib/core/model/auth/imei_details.dart +++ b/lib/core/model/auth/imei_details.dart @@ -28,6 +28,7 @@ class GetIMEIDetailsModel { String vidaAuthTokenID; String vidaRefreshTokenID; String password; + GetIMEIDetailsModel( {this.iD, this.iMEI, diff --git a/lib/core/model/auth/insert_imei_model.dart b/lib/core/model/auth/insert_imei_model.dart index 25e22b7a..e779da77 100644 --- a/lib/core/model/auth/insert_imei_model.dart +++ b/lib/core/model/auth/insert_imei_model.dart @@ -32,6 +32,7 @@ class InsertIMEIDetailsModel { String vidaAuthTokenID; String vidaRefreshTokenID; dynamic password; + InsertIMEIDetailsModel( {this.iMEI, this.logInTypeID, diff --git a/lib/core/model/auth/new_login_information_response_model.dart b/lib/core/model/auth/new_login_information_response_model.dart index 117060e4..36aa33eb 100644 --- a/lib/core/model/auth/new_login_information_response_model.dart +++ b/lib/core/model/auth/new_login_information_response_model.dart @@ -11,14 +11,14 @@ class NewLoginInformationModel { NewLoginInformationModel( {this.doctorID, - this.listMemberInformation, - this.logInTokenID, - this.mobileNumber, - this.sELECTDeviceIMEIbyIMEIList, - this.userID, - this.zipCode, - this.isActiveCode, - this.isSMSSent}); + this.listMemberInformation, + this.logInTokenID, + this.mobileNumber, + this.sELECTDeviceIMEIbyIMEIList, + this.userID, + this.zipCode, + this.isActiveCode, + this.isSMSSent}); NewLoginInformationModel.fromJson(Map json) { doctorID = json['DoctorID']; @@ -70,16 +70,16 @@ class ListMemberInformation { ListMemberInformation( {this.setupID, - this.memberID, - this.memberName, - this.memberNameN, - this.preferredLang, - this.pIN, - this.saltHash, - this.referenceID, - this.employeeID, - this.roleID, - this.projectid}); + this.memberID, + this.memberName, + this.memberNameN, + this.preferredLang, + this.pIN, + this.saltHash, + this.referenceID, + this.employeeID, + this.roleID, + this.projectid}); ListMemberInformation.fromJson(Map json) { setupID = json['SetupID']; diff --git a/lib/core/model/auth/send_activation_code_for_doctor_app_response_model.dart b/lib/core/model/auth/send_activation_code_for_doctor_app_response_model.dart index ceaf4c65..099ac738 100644 --- a/lib/core/model/auth/send_activation_code_for_doctor_app_response_model.dart +++ b/lib/core/model/auth/send_activation_code_for_doctor_app_response_model.dart @@ -6,9 +6,9 @@ class SendActivationCodeForDoctorAppResponseModel { SendActivationCodeForDoctorAppResponseModel( {this.logInTokenID, - this.verificationCode, - this.vidaAuthTokenID, - this.vidaRefreshTokenID}); + this.verificationCode, + this.vidaAuthTokenID, + this.vidaRefreshTokenID}); SendActivationCodeForDoctorAppResponseModel.fromJson( Map json) { diff --git a/lib/core/model/diabetic_chart/GetDiabeticChartValuesRequestModel.dart b/lib/core/model/diabetic_chart/GetDiabeticChartValuesRequestModel.dart index 7fad3106..7d42014a 100644 --- a/lib/core/model/diabetic_chart/GetDiabeticChartValuesRequestModel.dart +++ b/lib/core/model/diabetic_chart/GetDiabeticChartValuesRequestModel.dart @@ -10,13 +10,13 @@ class GetDiabeticChartValuesRequestModel { GetDiabeticChartValuesRequestModel( {this.deviceTypeID, - this.patientID, - this.resultType, - this.admissionNo, - this.setupID, - this.patientOutSA, - this.patientType, - this.patientTypeID}); + this.patientID, + this.resultType, + this.admissionNo, + this.setupID, + this.patientOutSA, + this.patientType, + this.patientTypeID}); GetDiabeticChartValuesRequestModel.fromJson(Map json) { deviceTypeID = json['DeviceTypeID']; diff --git a/lib/core/model/diabetic_chart/GetDiabeticChartValuesResponseModel.dart b/lib/core/model/diabetic_chart/GetDiabeticChartValuesResponseModel.dart index fa2c1ca2..4696f6be 100644 --- a/lib/core/model/diabetic_chart/GetDiabeticChartValuesResponseModel.dart +++ b/lib/core/model/diabetic_chart/GetDiabeticChartValuesResponseModel.dart @@ -8,11 +8,11 @@ class GetDiabeticChartValuesResponseModel { GetDiabeticChartValuesResponseModel( {this.resultType, - this.admissionNo, - this.dateChart, - this.resultValue, - this.createdBy, - this.createdOn}); + this.admissionNo, + this.dateChart, + this.resultValue, + this.createdBy, + this.createdOn}); GetDiabeticChartValuesResponseModel.fromJson(Map json) { resultType = json['ResultType']; diff --git a/lib/core/model/diagnosis/GetDiagnosisForInPatientRequestModel.dart b/lib/core/model/diagnosis/GetDiagnosisForInPatientRequestModel.dart index 310cfb50..cb588e1a 100644 --- a/lib/core/model/diagnosis/GetDiagnosisForInPatientRequestModel.dart +++ b/lib/core/model/diagnosis/GetDiagnosisForInPatientRequestModel.dart @@ -7,10 +7,10 @@ class GetDiagnosisForInPatientRequestModel { GetDiagnosisForInPatientRequestModel( {this.patientID, - this.admissionNo, - this.setupID, - this.patientType, - this.patientTypeID}); + this.admissionNo, + this.setupID, + this.patientType, + this.patientTypeID}); GetDiagnosisForInPatientRequestModel.fromJson(Map json) { patientID = json['PatientID']; diff --git a/lib/core/model/diagnosis/GetDiagnosisForInPatientResponseModel.dart b/lib/core/model/diagnosis/GetDiagnosisForInPatientResponseModel.dart index 1ec48964..d35d1022 100644 --- a/lib/core/model/diagnosis/GetDiagnosisForInPatientResponseModel.dart +++ b/lib/core/model/diagnosis/GetDiagnosisForInPatientResponseModel.dart @@ -13,14 +13,15 @@ class GetDiagnosisForInPatientResponseModel { GetDiagnosisForInPatientResponseModel( {this.iCDCode10ID, - this.diagnosisTypeID, - this.conditionID, - this.complexDiagnosis, - this.asciiDesc, - this.createdBy, - this.createdOn, - this.editedBy, - this.editedOn, this.createdByName}); + this.diagnosisTypeID, + this.conditionID, + this.complexDiagnosis, + this.asciiDesc, + this.createdBy, + this.createdOn, + this.editedBy, + this.editedOn, + this.createdByName}); GetDiagnosisForInPatientResponseModel.fromJson(Map json) { iCDCode10ID = json['ICDCode10ID']; diff --git a/lib/core/model/hospitals/get_hospitals_request_model.dart b/lib/core/model/hospitals/get_hospitals_request_model.dart index 8a5f1bc1..b858bba4 100644 --- a/lib/core/model/hospitals/get_hospitals_request_model.dart +++ b/lib/core/model/hospitals/get_hospitals_request_model.dart @@ -11,14 +11,14 @@ class GetHospitalsRequestModel { GetHospitalsRequestModel( {this.languageID, - this.stamp, - this.iPAdress, - this.versionID, - this.channel, - this.tokenID, - this.sessionID, - this.isLoginForDoctorApp, - this.memberID}); + this.stamp, + this.iPAdress, + this.versionID, + this.channel, + this.tokenID, + this.sessionID, + this.isLoginForDoctorApp, + this.memberID}); GetHospitalsRequestModel.fromJson(Map json) { languageID = json['LanguageID']; diff --git a/lib/core/model/hospitals_model.dart b/lib/core/model/hospitals_model.dart index b09807d6..3e9690ba 100644 --- a/lib/core/model/hospitals_model.dart +++ b/lib/core/model/hospitals_model.dart @@ -16,22 +16,23 @@ class HospitalsModel { dynamic projectOutSA; bool usingInDoctorApp; - HospitalsModel({this.desciption, - this.desciptionN, - this.iD, - this.legalName, - this.legalNameN, - this.name, - this.nameN, - this.phoneNumber, - this.setupID, - this.distanceInKilometers, - this.isActive, - this.latitude, - this.longitude, - this.mainProjectID, - this.projectOutSA, - this.usingInDoctorApp}); + HospitalsModel( + {this.desciption, + this.desciptionN, + this.iD, + this.legalName, + this.legalNameN, + this.name, + this.nameN, + this.phoneNumber, + this.setupID, + this.distanceInKilometers, + this.isActive, + this.latitude, + this.longitude, + this.mainProjectID, + this.projectOutSA, + this.usingInDoctorApp}); HospitalsModel.fromJson(Map json) { desciption = json['Desciption']; diff --git a/lib/core/model/insurance/insurance_approval.dart b/lib/core/model/insurance/insurance_approval.dart index a3717c42..3320e69b 100644 --- a/lib/core/model/insurance/insurance_approval.dart +++ b/lib/core/model/insurance/insurance_approval.dart @@ -2,6 +2,7 @@ class ApporvalDetails { int approvalNo; String procedureName; + //String procedureNameN; String status; diff --git a/lib/core/model/labs/LabOrderResult.dart b/lib/core/model/labs/LabOrderResult.dart index ecb4ae65..22bcb801 100644 --- a/lib/core/model/labs/LabOrderResult.dart +++ b/lib/core/model/labs/LabOrderResult.dart @@ -21,24 +21,24 @@ class LabOrderResult { LabOrderResult( {this.description, - this.femaleInterpretativeData, - this.gender, - this.lineItemNo, - this.maleInterpretativeData, - this.notes, - this.packageID, - this.patientID, - this.projectID, - this.referanceRange, - this.resultValue, - this.sampleCollectedOn, - this.sampleReceivedOn, - this.setupID, - this.superVerifiedOn, - this.testCode, - this.uOM, - this.verifiedOn, - this.verifiedOnDateTime}); + this.femaleInterpretativeData, + this.gender, + this.lineItemNo, + this.maleInterpretativeData, + this.notes, + this.packageID, + this.patientID, + this.projectID, + this.referanceRange, + this.resultValue, + this.sampleCollectedOn, + this.sampleReceivedOn, + this.setupID, + this.superVerifiedOn, + this.testCode, + this.uOM, + this.verifiedOn, + this.verifiedOnDateTime}); LabOrderResult.fromJson(Map json) { description = json['Description']; diff --git a/lib/core/model/labs/LabResultHistory.dart b/lib/core/model/labs/LabResultHistory.dart index 7c4221ca..fed140f8 100644 --- a/lib/core/model/labs/LabResultHistory.dart +++ b/lib/core/model/labs/LabResultHistory.dart @@ -26,29 +26,29 @@ class LabResultHistory { LabResultHistory( {this.description, - this.femaleInterpretativeData, - this.gender, - this.isCertificateAllowed, - this.lineItemNo, - this.maleInterpretativeData, - this.notes, - this.orderLineItemNo, - this.orderNo, - this.packageID, - this.patientID, - this.projectID, - this.referanceRange, - this.resultValue, - this.resultValueBasedLineItemNo, - this.resultValueFlag, - this.sampleCollectedOn, - this.sampleReceivedOn, - this.setupID, - this.superVerifiedOn, - this.testCode, - this.uOM, - this.verifiedOn, - this.verifiedOnDateTime}); + this.femaleInterpretativeData, + this.gender, + this.isCertificateAllowed, + this.lineItemNo, + this.maleInterpretativeData, + this.notes, + this.orderLineItemNo, + this.orderNo, + this.packageID, + this.patientID, + this.projectID, + this.referanceRange, + this.resultValue, + this.resultValueBasedLineItemNo, + this.resultValueFlag, + this.sampleCollectedOn, + this.sampleReceivedOn, + this.setupID, + this.superVerifiedOn, + this.testCode, + this.uOM, + this.verifiedOn, + this.verifiedOnDateTime}); LabResultHistory.fromJson(Map json) { description = json['Description']; @@ -105,4 +105,4 @@ class LabResultHistory { data['VerifiedOnDateTime'] = this.verifiedOnDateTime; return data; } -} \ No newline at end of file +} diff --git a/lib/core/model/labs/all_special_lab_result_model.dart b/lib/core/model/labs/all_special_lab_result_model.dart index ffdc5ee5..b1a9cd4b 100644 --- a/lib/core/model/labs/all_special_lab_result_model.dart +++ b/lib/core/model/labs/all_special_lab_result_model.dart @@ -46,6 +46,7 @@ class AllSpecialLabResultModel { String resultDataHTML; dynamic resultDataTxt; String setupID; + //List speciality; dynamic status; dynamic statusDesc; diff --git a/lib/core/model/labs/lab_result.dart b/lib/core/model/labs/lab_result.dart index ee9f981d..046ab169 100644 --- a/lib/core/model/labs/lab_result.dart +++ b/lib/core/model/labs/lab_result.dart @@ -110,10 +110,9 @@ class LabResult { } else { return 0; } - }catch (e){ + } catch (e) { return 0; } - } } diff --git a/lib/core/model/labs/patient_lab_orders.dart b/lib/core/model/labs/patient_lab_orders.dart index af60f86f..a3a8d1ac 100644 --- a/lib/core/model/labs/patient_lab_orders.dart +++ b/lib/core/model/labs/patient_lab_orders.dart @@ -35,6 +35,7 @@ class PatientLabOrders { String setupID; List speciality; bool isLiveCareAppointment; + PatientLabOrders( {this.actualDoctorRate, this.clinicDescription, @@ -68,11 +69,12 @@ class PatientLabOrders { this.projectNameN, this.qR, this.setupID, - this.speciality,this.isLiveCareAppointment}); + this.speciality, + this.isLiveCareAppointment}); PatientLabOrders.fromJson(Map json) { actualDoctorRate = json['ActualDoctorRate']; - clinicDescription = json['ClinicDescription']?? json['ClinicName']; + clinicDescription = json['ClinicDescription'] ?? json['ClinicName']; clinicDescriptionEnglish = json['ClinicDescriptionEnglish']; clinicDescriptionN = json['ClinicDescriptionN']; clinicID = json['ClinicID']; @@ -104,7 +106,7 @@ class PatientLabOrders { qR = json['QR']; setupID = json['SetupID']; isLiveCareAppointment = json['IsLiveCareAppointment']; - // speciality = json['Speciality'].cast(); + // speciality = json['Speciality'].cast(); } Map toJson() { diff --git a/lib/core/model/labs/patient_lab_special_result.dart b/lib/core/model/labs/patient_lab_special_result.dart index 2fbcb832..dc53010b 100644 --- a/lib/core/model/labs/patient_lab_special_result.dart +++ b/lib/core/model/labs/patient_lab_special_result.dart @@ -7,10 +7,10 @@ class PatientLabSpecialResult { PatientLabSpecialResult( {this.invoiceNo, - this.moduleID, - this.resultData, - this.resultDataHTML, - this.resultDataTxt}); + this.moduleID, + this.resultData, + this.resultDataHTML, + this.resultDataTxt}); PatientLabSpecialResult.fromJson(Map json) { invoiceNo = json['InvoiceNo']; diff --git a/lib/core/model/labs/request_patient_lab_orders.dart b/lib/core/model/labs/request_patient_lab_orders.dart index ce9263ef..3ee099a5 100644 --- a/lib/core/model/labs/request_patient_lab_orders.dart +++ b/lib/core/model/labs/request_patient_lab_orders.dart @@ -15,18 +15,18 @@ class RequestPatientLabOrders { RequestPatientLabOrders( {this.versionID, - this.channel, - this.languageID, - this.iPAdress, - this.generalid, - this.patientOutSA, - this.sessionID, - this.isDentalAllowedBackend, - this.deviceTypeID, - this.patientID, - this.tokenID, - this.patientTypeID, - this.patientType}); + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.patientID, + this.tokenID, + this.patientTypeID, + this.patientType}); RequestPatientLabOrders.fromJson(Map json) { versionID = json['VersionID']; diff --git a/lib/core/model/labs/request_patient_lab_special_result.dart b/lib/core/model/labs/request_patient_lab_special_result.dart index b48cf0e1..1a149bcd 100644 --- a/lib/core/model/labs/request_patient_lab_special_result.dart +++ b/lib/core/model/labs/request_patient_lab_special_result.dart @@ -20,23 +20,23 @@ class RequestPatientLabSpecialResult { RequestPatientLabSpecialResult( {this.invoiceNo, - this.orderNo, - this.setupID, - this.projectID, - this.clinicID, - this.versionID, - this.channel, - this.languageID, - this.iPAdress, - this.generalid, - this.patientOutSA, - this.sessionID, - this.isDentalAllowedBackend, - this.deviceTypeID, - this.patientID, - this.tokenID, - this.patientTypeID, - this.patientType}); + this.orderNo, + this.setupID, + this.projectID, + this.clinicID, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.patientID, + this.tokenID, + this.patientTypeID, + this.patientType}); RequestPatientLabSpecialResult.fromJson(Map json) { invoiceNo = json['InvoiceNo']; diff --git a/lib/core/model/labs/request_send_lab_report_email.dart b/lib/core/model/labs/request_send_lab_report_email.dart index 118da906..dd8769bb 100644 --- a/lib/core/model/labs/request_send_lab_report_email.dart +++ b/lib/core/model/labs/request_send_lab_report_email.dart @@ -27,30 +27,30 @@ class RequestSendLabReportEmail { RequestSendLabReportEmail( {this.versionID, - this.channel, - this.languageID, - this.iPAdress, - this.generalid, - this.patientOutSA, - this.sessionID, - this.isDentalAllowedBackend, - this.deviceTypeID, - this.patientID, - this.tokenID, - this.patientTypeID, - this.patientType, - this.to, - this.dateofBirth, - this.patientIditificationNum, - this.patientMobileNumber, - this.patientName, - this.setupID, - this.projectName, - this.clinicName, - this.doctorName, - this.projectID, - this.invoiceNo, - this.orderDate}); + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.patientID, + this.tokenID, + this.patientTypeID, + this.patientType, + this.to, + this.dateofBirth, + this.patientIditificationNum, + this.patientMobileNumber, + this.patientName, + this.setupID, + this.projectName, + this.clinicName, + this.doctorName, + this.projectID, + this.invoiceNo, + this.orderDate}); RequestSendLabReportEmail.fromJson(Map json) { versionID = json['VersionID']; diff --git a/lib/core/model/live_care/AlternativeServicesList.dart b/lib/core/model/live_care/AlternativeServicesList.dart index 11f27b95..fc511da3 100644 --- a/lib/core/model/live_care/AlternativeServicesList.dart +++ b/lib/core/model/live_care/AlternativeServicesList.dart @@ -25,7 +25,7 @@ class AlternativeService { class AlternativeServicesList with ChangeNotifier { List _alternativeServicesList; - getServicesList(){ + getServicesList() { return _alternativeServicesList; } @@ -35,7 +35,9 @@ class AlternativeServicesList with ChangeNotifier { } setSelected(AlternativeService service, bool isSelected) { - List alternativeService = _alternativeServicesList.where((element) => service.serviceID == element.serviceID).toList(); + List alternativeService = _alternativeServicesList + .where((element) => service.serviceID == element.serviceID) + .toList(); alternativeService[0].isSelected = isSelected; notifyListeners(); diff --git a/lib/core/model/live_care/add_patient_to_doctor_list_request_model.dart b/lib/core/model/live_care/add_patient_to_doctor_list_request_model.dart index 1d63e885..809af1b4 100644 --- a/lib/core/model/live_care/add_patient_to_doctor_list_request_model.dart +++ b/lib/core/model/live_care/add_patient_to_doctor_list_request_model.dart @@ -5,7 +5,8 @@ class AddPatientToDoctorListRequestModel { int doctorId; bool isOutKsa; - AddPatientToDoctorListRequestModel({this.vCID, this.tokenID, this.generalid, this.doctorId, this.isOutKsa}); + AddPatientToDoctorListRequestModel( + {this.vCID, this.tokenID, this.generalid, this.doctorId, this.isOutKsa}); AddPatientToDoctorListRequestModel.fromJson(Map json) { vCID = json['VC_ID']; diff --git a/lib/core/model/live_care/live_care_login_reguest_model.dart b/lib/core/model/live_care/live_care_login_reguest_model.dart index e14d4223..b1218420 100644 --- a/lib/core/model/live_care/live_care_login_reguest_model.dart +++ b/lib/core/model/live_care/live_care_login_reguest_model.dart @@ -5,7 +5,12 @@ class LiveCareUserLoginRequestModel { int isOutKsa; int isLogin; - LiveCareUserLoginRequestModel({this.tokenID, this.generalid, this.doctorId, this.isOutKsa, this.isLogin}); + LiveCareUserLoginRequestModel( + {this.tokenID, + this.generalid, + this.doctorId, + this.isOutKsa, + this.isLogin}); LiveCareUserLoginRequestModel.fromJson(Map json) { tokenID = json['TokenID']; diff --git a/lib/core/model/medical_report/medical_file_request_model.dart b/lib/core/model/medical_report/medical_file_request_model.dart index 8703141a..b7fcb095 100644 --- a/lib/core/model/medical_report/medical_file_request_model.dart +++ b/lib/core/model/medical_report/medical_file_request_model.dart @@ -3,7 +3,8 @@ class MedicalFileRequestModel { String vidaAuthTokenID; String iPAdress; - MedicalFileRequestModel({this.patientMRN, this.vidaAuthTokenID,this.iPAdress}); + MedicalFileRequestModel( + {this.patientMRN, this.vidaAuthTokenID, this.iPAdress}); MedicalFileRequestModel.fromJson(Map json) { patientMRN = json['PatientMRN']; diff --git a/lib/core/model/note/CreateNoteModel.dart b/lib/core/model/note/CreateNoteModel.dart index ce076705..db672fcf 100644 --- a/lib/core/model/note/CreateNoteModel.dart +++ b/lib/core/model/note/CreateNoteModel.dart @@ -21,24 +21,24 @@ class CreateNoteModel { CreateNoteModel( {this.visitType, - this.admissionNo, - this.projectID, - this.patientTypeID, - this.patientID, - this.clinicID, - this.notes, - this.createdBy, - this.editedBy, - this.nursingRemarks, - this.languageID, - this.stamp, - this.iPAdress, - this.versionID, - this.channel, - this.tokenID, - this.sessionID, - this.isLoginForDoctorApp, - this.patientOutSA}); + this.admissionNo, + this.projectID, + this.patientTypeID, + this.patientID, + this.clinicID, + this.notes, + this.createdBy, + this.editedBy, + this.nursingRemarks, + this.languageID, + this.stamp, + this.iPAdress, + this.versionID, + this.channel, + this.tokenID, + this.sessionID, + this.isLoginForDoctorApp, + this.patientOutSA}); CreateNoteModel.fromJson(Map json) { visitType = json['VisitType']; diff --git a/lib/core/model/note/GetNursingProgressNoteRequestModel.dart b/lib/core/model/note/GetNursingProgressNoteRequestModel.dart index cf06dfad..8cad6ea8 100644 --- a/lib/core/model/note/GetNursingProgressNoteRequestModel.dart +++ b/lib/core/model/note/GetNursingProgressNoteRequestModel.dart @@ -1,5 +1,3 @@ - - class GetNursingProgressNoteRequestModel { int patientID; int admissionNo; @@ -8,7 +6,11 @@ class GetNursingProgressNoteRequestModel { String setupID; GetNursingProgressNoteRequestModel( - {this.patientID, this.admissionNo, this.patientTypeID = 1, this.patientType = 1, this.setupID }); + {this.patientID, + this.admissionNo, + this.patientTypeID = 1, + this.patientType = 1, + this.setupID}); GetNursingProgressNoteRequestModel.fromJson(Map json) { patientID = json['PatientID']; diff --git a/lib/core/model/note/note_model.dart b/lib/core/model/note/note_model.dart index 797f9b6d..29a891fa 100644 --- a/lib/core/model/note/note_model.dart +++ b/lib/core/model/note/note_model.dart @@ -22,25 +22,25 @@ class NoteModel { NoteModel( {this.setupID, - this.projectID, - this.patientID, - this.patientType, - this.admissionNo, - this.lineItemNo, - this.visitType, - this.notes, - this.assessmentDate, - this.visitTime, - this.status, - this.nursingRemarks, - this.createdOn, - this.editedOn, - this.createdBy, - this.admissionClinicID, - this.admissionClinicName, - this.doctorClinicName, - this.doctorName, - this.visitTypeDesc}); + this.projectID, + this.patientID, + this.patientType, + this.admissionNo, + this.lineItemNo, + this.visitType, + this.notes, + this.assessmentDate, + this.visitTime, + this.status, + this.nursingRemarks, + this.createdOn, + this.editedOn, + this.createdBy, + this.admissionClinicID, + this.admissionClinicName, + this.doctorClinicName, + this.doctorName, + this.visitTypeDesc}); NoteModel.fromJson(Map json) { setupID = json['SetupID']; diff --git a/lib/core/model/note/update_note_model.dart b/lib/core/model/note/update_note_model.dart index 20fd4b86..f2d845ff 100644 --- a/lib/core/model/note/update_note_model.dart +++ b/lib/core/model/note/update_note_model.dart @@ -19,22 +19,22 @@ class UpdateNoteReqModel { UpdateNoteReqModel( {this.projectID, - this.createdBy, - this.admissionNo, - this.lineItemNo, - this.notes, - this.verifiedNote, - this.cancelledNote, - this.languageID, - this.stamp, - this.iPAdress, - this.versionID, - this.channel, - this.tokenID, - this.sessionID, - this.isLoginForDoctorApp, - this.patientOutSA, - this.patientTypeID}); + this.createdBy, + this.admissionNo, + this.lineItemNo, + this.notes, + this.verifiedNote, + this.cancelledNote, + this.languageID, + this.stamp, + this.iPAdress, + this.versionID, + this.channel, + this.tokenID, + this.sessionID, + this.isLoginForDoctorApp, + this.patientOutSA, + this.patientTypeID}); UpdateNoteReqModel.fromJson(Map json) { projectID = json['ProjectID']; diff --git a/lib/core/model/patient_muse/PatientMuseResultsModel.dart b/lib/core/model/patient_muse/PatientMuseResultsModel.dart index 401fd1a7..33f2cac2 100644 --- a/lib/core/model/patient_muse/PatientMuseResultsModel.dart +++ b/lib/core/model/patient_muse/PatientMuseResultsModel.dart @@ -42,7 +42,8 @@ class PatientMuseResultsModel { imageURL = json['ImageURL']; createdBy = json['CreatedBy']; createdOn = json['CreatedOn']; - createdOnDateTime = AppDateUtils.getDateTimeFromServerFormat(json['CreatedOn']); + createdOnDateTime = + AppDateUtils.getDateTimeFromServerFormat(json['CreatedOn']); } Map toJson() { diff --git a/lib/core/model/procedure/get_ordered_procedure_request_model.dart b/lib/core/model/procedure/get_ordered_procedure_request_model.dart index 5178ab14..454559f9 100644 --- a/lib/core/model/procedure/get_ordered_procedure_request_model.dart +++ b/lib/core/model/procedure/get_ordered_procedure_request_model.dart @@ -3,7 +3,8 @@ class GetOrderedProcedureRequestModel { int patientMRN; int appointmentNo; - GetOrderedProcedureRequestModel({this.vidaAuthTokenID, this.patientMRN, this.appointmentNo}); + GetOrderedProcedureRequestModel( + {this.vidaAuthTokenID, this.patientMRN, this.appointmentNo}); GetOrderedProcedureRequestModel.fromJson(Map json) { vidaAuthTokenID = json['VidaAuthTokenID']; diff --git a/lib/core/model/procedure/procedure_template_details_model.dart b/lib/core/model/procedure/procedure_template_details_model.dart index 1fc797ae..96e13765 100644 --- a/lib/core/model/procedure/procedure_template_details_model.dart +++ b/lib/core/model/procedure/procedure_template_details_model.dart @@ -104,13 +104,16 @@ class ProcedureTempleteDetailsModel { return data; } } + class ProcedureTempleteDetailsModelList { List procedureTemplate = List(); String templateName; int templateId; ProcedureTempleteDetailsModelList( - {this.templateName, this.templateId, ProcedureTempleteDetailsModel template}) { + {this.templateName, + this.templateId, + ProcedureTempleteDetailsModel template}) { procedureTemplate.add(template); } } diff --git a/lib/core/model/radiology/final_radiology.dart b/lib/core/model/radiology/final_radiology.dart index e09f269a..bb50e6bc 100644 --- a/lib/core/model/radiology/final_radiology.dart +++ b/lib/core/model/radiology/final_radiology.dart @@ -85,7 +85,8 @@ class FinalRadiology { this.reportDataTextdynamic, this.speciality, this.isCVI, - this.isRadMedicalReport,this.isLiveCareAppodynamicment}); + this.isRadMedicalReport, + this.isLiveCareAppodynamicment}); FinalRadiology.fromJson(Map json) { try { @@ -108,7 +109,7 @@ class FinalRadiology { admissionNo = json['AdmissionNo']; isInOutPatient = json['IsInOutPatient']; actualDoctorRate = json['ActualDoctorRate']; - clinicDescription = json['ClinicDescription']?? json['ClinicName']; + clinicDescription = json['ClinicDescription'] ?? json['ClinicName']; dIAPACSURL = json['DIA_PACS_URL']; doctorImageURL = json['DoctorImageURL']; doctorName = json['DoctorName']; @@ -128,13 +129,11 @@ class FinalRadiology { isLiveCareAppodynamicment = json['IsLiveCareAppointment']; reportDataHTML = json['ReportDataHTML']; reportDataTextdynamic = json['ReportDataTextdynamic']; - // speciality = json['Speciality'].cast(); + // speciality = json['Speciality'].cast(); isCVI = json['isCVI']; isRadMedicalReport = json['isRadMedicalReport']; - } catch (e) { print(e); - } } diff --git a/lib/core/model/radiology/request_patient_rad_orders_details.dart b/lib/core/model/radiology/request_patient_rad_orders_details.dart index 9e3458d5..c511a1fc 100644 --- a/lib/core/model/radiology/request_patient_rad_orders_details.dart +++ b/lib/core/model/radiology/request_patient_rad_orders_details.dart @@ -22,25 +22,25 @@ class RequestPatientRadOrdersDetails { RequestPatientRadOrdersDetails( {this.projectID, - this.orderNo, - this.invoiceNo, - this.setupID, - this.procedureID, - this.isMedicalReport, - this.isCVI, - this.versionID, - this.channel, - this.languageID, - this.iPAdress, - this.generalid, - this.patientOutSA, - this.sessionID, - this.isDentalAllowedBackend, - this.deviceTypeID, - this.patientID, - this.tokenID, - this.patientTypeID, - this.patientType}); + this.orderNo, + this.invoiceNo, + this.setupID, + this.procedureID, + this.isMedicalReport, + this.isCVI, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.patientID, + this.tokenID, + this.patientTypeID, + this.patientType}); RequestPatientRadOrdersDetails.fromJson(Map json) { projectID = json['ProjectID']; diff --git a/lib/core/model/radiology/request_send_rad_report_email.dart b/lib/core/model/radiology/request_send_rad_report_email.dart index 6d68653d..fc778571 100644 --- a/lib/core/model/radiology/request_send_rad_report_email.dart +++ b/lib/core/model/radiology/request_send_rad_report_email.dart @@ -28,31 +28,31 @@ class RequestSendRadReportEmail { RequestSendRadReportEmail( {this.channel, - this.clinicName, - this.dateofBirth, - this.deviceTypeID, - this.doctorName, - this.generalid, - this.invoiceNo, - this.iPAdress, - this.isDentalAllowedBackend, - this.languageID, - this.orderDate, - this.patientID, - this.patientIditificationNum, - this.patientMobileNumber, - this.patientName, - this.patientOutSA, - this.patientType, - this.patientTypeID, - this.projectID, - this.projectName, - this.radResult, - this.sessionID, - this.setupID, - this.to, - this.tokenID, - this.versionID}); + this.clinicName, + this.dateofBirth, + this.deviceTypeID, + this.doctorName, + this.generalid, + this.invoiceNo, + this.iPAdress, + this.isDentalAllowedBackend, + this.languageID, + this.orderDate, + this.patientID, + this.patientIditificationNum, + this.patientMobileNumber, + this.patientName, + this.patientOutSA, + this.patientType, + this.patientTypeID, + this.projectID, + this.projectName, + this.radResult, + this.sessionID, + this.setupID, + this.to, + this.tokenID, + this.versionID}); RequestSendRadReportEmail.fromJson(Map json) { channel = json['Channel']; diff --git a/lib/core/model/referral/DischargeReferralPatient.dart b/lib/core/model/referral/DischargeReferralPatient.dart index dff63bfc..84e7dae4 100644 --- a/lib/core/model/referral/DischargeReferralPatient.dart +++ b/lib/core/model/referral/DischargeReferralPatient.dart @@ -55,56 +55,56 @@ class DischargeReferralPatient { DischargeReferralPatient( {this.rowID, - this.projectID, - this.lineItemNo, - this.doctorID, - this.patientID, - this.doctorName, - this.doctorNameN, - this.firstName, - this.middleName, - this.lastName, - this.firstNameN, - this.middleNameN, - this.lastNameN, - this.gender, - this.dateofBirth, - this.mobileNumber, - this.emailAddress, - this.patientIdentificationNo, - this.patientType, - this.admissionNo, - this.admissionDate, - this.roomID, - this.bedID, - this.nursingStationID, - this.description, - this.nationalityName, - this.nationalityNameN, - this.referralDoctor, - this.referringDoctor, - this.referralClinic, - this.referringClinic, - this.referralStatus, - this.referralDate, - this.referringDoctorRemarks, - this.referredDoctorRemarks, - this.referralResponseOn, - this.priority, - this.frequency, - this.mAXResponseTime, - this.dischargeDate, - this.clinicID, - this.age, - this.clinicDescription, - this.frequencyDescription, - this.genderDescription, - this.isDoctorLate, - this.isDoctorResponse, - this.nursingStationName, - this.priorityDescription, - this.referringClinicDescription, - this.referringDoctorName}); + this.projectID, + this.lineItemNo, + this.doctorID, + this.patientID, + this.doctorName, + this.doctorNameN, + this.firstName, + this.middleName, + this.lastName, + this.firstNameN, + this.middleNameN, + this.lastNameN, + this.gender, + this.dateofBirth, + this.mobileNumber, + this.emailAddress, + this.patientIdentificationNo, + this.patientType, + this.admissionNo, + this.admissionDate, + this.roomID, + this.bedID, + this.nursingStationID, + this.description, + this.nationalityName, + this.nationalityNameN, + this.referralDoctor, + this.referringDoctor, + this.referralClinic, + this.referringClinic, + this.referralStatus, + this.referralDate, + this.referringDoctorRemarks, + this.referredDoctorRemarks, + this.referralResponseOn, + this.priority, + this.frequency, + this.mAXResponseTime, + this.dischargeDate, + this.clinicID, + this.age, + this.clinicDescription, + this.frequencyDescription, + this.genderDescription, + this.isDoctorLate, + this.isDoctorResponse, + this.nursingStationName, + this.priorityDescription, + this.referringClinicDescription, + this.referringDoctorName}); DischargeReferralPatient.fromJson(Map json) { rowID = json['RowID']; diff --git a/lib/core/model/referral/MyReferralPatientModel.dart b/lib/core/model/referral/MyReferralPatientModel.dart index 4f00f455..1bba70d7 100644 --- a/lib/core/model/referral/MyReferralPatientModel.dart +++ b/lib/core/model/referral/MyReferralPatientModel.dart @@ -113,27 +113,36 @@ class MyReferralPatientModel { this.referralResponseOn, this.priority, this.frequency, - this.mAXResponseTime, - this.episodeID, - this.appointmentNo, - this.appointmentDate, - this.appointmentType, - this.patientMRN, - this.createdOn, - this.clinicID, - this.nationalityID, - this.age, - this.doctorImageURL, - this.frequencyDescription, - this.genderDescription, - this.isDoctorLate, - this.isDoctorResponse, - this.nationalityFlagURL, - this.nursingStationName, - this.priorityDescription, - this.referringClinicDescription, - this.referringDoctorName, - this.referalStatus, this.sourceSetupID, this.sourceAppointmentNo, this.sourceProjectId, this.targetProjectId, this.targetAppointmentNo, this.targetClinicID, this.targetSetupID, this.targetDoctorID, this.remarksFromSource}); + this.mAXResponseTime, + this.episodeID, + this.appointmentNo, + this.appointmentDate, + this.appointmentType, + this.patientMRN, + this.createdOn, + this.clinicID, + this.nationalityID, + this.age, + this.doctorImageURL, + this.frequencyDescription, + this.genderDescription, + this.isDoctorLate, + this.isDoctorResponse, + this.nationalityFlagURL, + this.nursingStationName, + this.priorityDescription, + this.referringClinicDescription, + this.referringDoctorName, + this.referalStatus, + this.sourceSetupID, + this.sourceAppointmentNo, + this.sourceProjectId, + this.targetProjectId, + this.targetAppointmentNo, + this.targetClinicID, + this.targetSetupID, + this.targetDoctorID, + this.remarksFromSource}); MyReferralPatientModel.fromJson(Map json) { rowID = json['RowID']; @@ -219,7 +228,6 @@ class MyReferralPatientModel { sourceAppointmentNo = json['SourceAppointmentNo']; targetAppointmentNo = json['TargetAppointmentNo']; remarksFromSource = json['RemarksFromSource']; - } Map toJson() { diff --git a/lib/core/model/referral/MyReferralPatientRequestModel.dart b/lib/core/model/referral/MyReferralPatientRequestModel.dart index 08b98a99..437f5a0d 100644 --- a/lib/core/model/referral/MyReferralPatientRequestModel.dart +++ b/lib/core/model/referral/MyReferralPatientRequestModel.dart @@ -25,28 +25,28 @@ class MyReferralPatientRequestModel { MyReferralPatientRequestModel( {this.channel, - this.clinicID, - this.doctorID, - this.editedBy, - this.firstName, - this.from, - this.iPAdress, - this.isLoginForDoctorApp, - this.languageID, - this.lastName, - this.middleName, - this.patientID, - this.patientIdentificationID, - this.patientMobileNumber, - this.patientOutSA, - this.patientTypeID, - this.projectID, - this.sessionID, - this.stamp, - this.to, - this.tokenID, - this.versionID, - this.vidaAuthTokenID}); + this.clinicID, + this.doctorID, + this.editedBy, + this.firstName, + this.from, + this.iPAdress, + this.isLoginForDoctorApp, + this.languageID, + this.lastName, + this.middleName, + this.patientID, + this.patientIdentificationID, + this.patientMobileNumber, + this.patientOutSA, + this.patientTypeID, + this.projectID, + this.sessionID, + this.stamp, + this.to, + this.tokenID, + this.versionID, + this.vidaAuthTokenID}); MyReferralPatientRequestModel.fromJson(Map json) { channel = json['Channel']; diff --git a/lib/core/model/referral/ReferralRequest.dart b/lib/core/model/referral/ReferralRequest.dart index b3ad1f03..cf3c20fb 100644 --- a/lib/core/model/referral/ReferralRequest.dart +++ b/lib/core/model/referral/ReferralRequest.dart @@ -26,29 +26,29 @@ class ReferralRequest { ReferralRequest( {this.roomID, - this.referralClinic, - this.referralDoctor, - this.createdBy, - this.editedBy, - this.patientID, - this.patientTypeID, - this.referringClinic, - this.referringDoctor, - this.projectID, - this.admissionNo, - this.referringDoctorRemarks, - this.priority, - this.frequency, - this.extension, - this.languageID, - this.stamp, - this.iPAdress, - this.versionID, - this.channel, - this.tokenID, - this.sessionID, - this.isLoginForDoctorApp, - this.patientOutSA}); + this.referralClinic, + this.referralDoctor, + this.createdBy, + this.editedBy, + this.patientID, + this.patientTypeID, + this.referringClinic, + this.referringDoctor, + this.projectID, + this.admissionNo, + this.referringDoctorRemarks, + this.priority, + this.frequency, + this.extension, + this.languageID, + this.stamp, + this.iPAdress, + this.versionID, + this.channel, + this.tokenID, + this.sessionID, + this.isLoginForDoctorApp, + this.patientOutSA}); ReferralRequest.fromJson(Map json) { roomID = json['RoomID']; diff --git a/lib/core/model/search_drug/get_medication_response_model.dart b/lib/core/model/search_drug/get_medication_response_model.dart index a42a8b47..e48c41fe 100644 --- a/lib/core/model/search_drug/get_medication_response_model.dart +++ b/lib/core/model/search_drug/get_medication_response_model.dart @@ -8,6 +8,7 @@ class GetMedicationResponseModel { dynamic mediSpanGPICode; bool isNarcotic; String uom; + GetMedicationResponseModel( {this.description, this.genericName, diff --git a/lib/core/model/search_drug/search_drug_request_model.dart b/lib/core/model/search_drug/search_drug_request_model.dart index b64e7d18..8548fd32 100644 --- a/lib/core/model/search_drug/search_drug_request_model.dart +++ b/lib/core/model/search_drug/search_drug_request_model.dart @@ -1,5 +1,6 @@ class SearchDrugRequestModel { List search; + // String vidaAuthTokenID; SearchDrugRequestModel({this.search}); diff --git a/lib/core/model/sick_leave/sick_leave_doctor_request_model.dart b/lib/core/model/sick_leave/sick_leave_doctor_request_model.dart index 26bb76bd..c6837c03 100644 --- a/lib/core/model/sick_leave/sick_leave_doctor_request_model.dart +++ b/lib/core/model/sick_leave/sick_leave_doctor_request_model.dart @@ -6,7 +6,11 @@ class GetSickLeaveDoctorRequestModel { String vidaRefreshTokenID; GetSickLeaveDoctorRequestModel( - {this.patientMRN, this.appointmentNo, this.status, this.vidaAuthTokenID, this.vidaRefreshTokenID}); + {this.patientMRN, + this.appointmentNo, + this.status, + this.vidaAuthTokenID, + this.vidaRefreshTokenID}); GetSickLeaveDoctorRequestModel.fromJson(Map json) { patientMRN = json['PatientMRN']; diff --git a/lib/core/model/sick_leave/sick_leave_patient_model.dart b/lib/core/model/sick_leave/sick_leave_patient_model.dart index b8212fad..d4c15368 100644 --- a/lib/core/model/sick_leave/sick_leave_patient_model.dart +++ b/lib/core/model/sick_leave/sick_leave_patient_model.dart @@ -1,5 +1,3 @@ - - class SickLeavePatientModel { dynamic setupID; dynamic projectID; @@ -32,6 +30,7 @@ class SickLeavePatientModel { dynamic patientName; dynamic projectName; dynamic qR; + // List speciality; dynamic strRequestDate; dynamic startDate; diff --git a/lib/core/provider/robot_provider.dart b/lib/core/provider/robot_provider.dart index a01b1318..4a6f2826 100644 --- a/lib/core/provider/robot_provider.dart +++ b/lib/core/provider/robot_provider.dart @@ -8,6 +8,7 @@ class RobotProvider { getData() { // return data; } + intStream() { controller.add({}); } diff --git a/lib/core/service/AnalyticsService.dart b/lib/core/service/AnalyticsService.dart index 0ad669ab..e194ed9a 100644 --- a/lib/core/service/AnalyticsService.dart +++ b/lib/core/service/AnalyticsService.dart @@ -5,9 +5,11 @@ import 'package:flutter/cupertino.dart'; class AnalyticsService { final FirebaseAnalytics _analytics = FirebaseAnalytics(); - FirebaseAnalyticsObserver getAnalyticsObserver() => FirebaseAnalyticsObserver(analytics: _analytics); + FirebaseAnalyticsObserver getAnalyticsObserver() => + FirebaseAnalyticsObserver(analytics: _analytics); - Future logEvent({@required String eventCategory, @required String eventAction}) async { + Future logEvent( + {@required String eventCategory, @required String eventAction}) async { await _analytics.logEvent(name: 'event', parameters: { "eventCategory": eventCategory, "eventAction": eventAction, diff --git a/lib/core/service/NavigationService.dart b/lib/core/service/NavigationService.dart index 5690c01e..b94306b9 100644 --- a/lib/core/service/NavigationService.dart +++ b/lib/core/service/NavigationService.dart @@ -2,25 +2,28 @@ import 'package:flutter/material.dart'; class NavigationService { final GlobalKey navigatorKey = - new GlobalKey(); - Future navigateTo(String routeName,{Object arguments}) { - return navigatorKey.currentState.pushNamed(routeName,arguments: arguments); - } + new GlobalKey(); - Future pushReplacementNamed(String routeName,{Object arguments}) { - return navigatorKey.currentState.pushReplacementNamed(routeName,arguments: arguments); + Future navigateTo(String routeName, {Object arguments}) { + return navigatorKey.currentState.pushNamed(routeName, arguments: arguments); } + Future pushReplacementNamed(String routeName, {Object arguments}) { + return navigatorKey.currentState + .pushReplacementNamed(routeName, arguments: arguments); + } Future pushNamedAndRemoveUntil(String routeName) { - return navigatorKey.currentState.pushNamedAndRemoveUntil(routeName,(asd)=>false); + return navigatorKey.currentState + .pushNamedAndRemoveUntil(routeName, (asd) => false); } Future pushAndRemoveUntil(Route newRoute) { - return navigatorKey.currentState.pushAndRemoveUntil(newRoute,(asd)=>false); + return navigatorKey.currentState + .pushAndRemoveUntil(newRoute, (asd) => false); } - pop() { + pop() { return navigatorKey.currentState.pop(); } -} \ No newline at end of file +} diff --git a/lib/core/service/PatientRegistrationService.dart b/lib/core/service/PatientRegistrationService.dart index 236bcd42..d9ad718f 100644 --- a/lib/core/service/PatientRegistrationService.dart +++ b/lib/core/service/PatientRegistrationService.dart @@ -63,7 +63,7 @@ class PatientRegistrationService extends BaseService { isDentalAllowedBackend: false, projectOutSA: 0, searchType: 1, - versionID: 7.1, + versionID: 7.1, channel: 3, nationalID: model.checkPatientForRegistrationModel.patientIdentificationID, @@ -74,8 +74,9 @@ class PatientRegistrationService extends BaseService { logInTokenID: logInTokenID); hasError = false; - await baseAppClient.post(SEND_ACTIVATION_CODE_BY_OTP_NOT_TYPE_FOR_REGISTRATION, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient + .post(SEND_ACTIVATION_CODE_BY_OTP_NOT_TYPE_FOR_REGISTRATION, + onSuccess: (dynamic response, int statusCode) { registrationModel = SendActivationCodeByOTPNotificationTypeForRegistrationModel.fromJson( response); diff --git a/lib/core/service/VideoCallService.dart b/lib/core/service/VideoCallService.dart index 31cc2cd6..288db1d5 100644 --- a/lib/core/service/VideoCallService.dart +++ b/lib/core/service/VideoCallService.dart @@ -22,17 +22,21 @@ class VideoCallService extends BaseService { LiveCarePatientServices _liveCarePatientServices = locator(); - openVideo(StartCallRes startModel, PatiantInformtion patientModel, - bool isRecording,VoidCallback onCallConnected, VoidCallback onCallDisconnected) async { + openVideo( + StartCallRes startModel, + PatiantInformtion patientModel, + bool isRecording, + VoidCallback onCallConnected, + VoidCallback onCallDisconnected) async { this.startCallRes = startModel; this.patient = patientModel; DoctorProfileModel doctorProfile = await getDoctorProfile(isGetProfile: true); await VideoChannel.openVideoCallScreen( - // TODO MOSA TEST - kToken: startCallRes.openTokenID, - kSessionId: startCallRes.openSessionID, - kApiKey:'46209962', + // TODO MOSA TEST + kToken: startCallRes.openTokenID, + kSessionId: startCallRes.openSessionID, + kApiKey: '46209962', // kToken: "T1==cGFydG5lcl9pZD00NzI0Nzk1NCZzaWc9NGUyZjgxMjFlYTFkNzU5NjcxNDY2ZTM2ZjM3YTVhNTI2NGY0NTI2NzpzZXNzaW9uX2lkPTJfTVg0ME56STBOemsxTkg1LU1UWXlOVGN5TmpnMk5qZzNOMzQ1YUhCcGRtcDFXbVpDTDFkNE1qbDRkWFY2TTA4cmIySi1mZyZjcmVhdGVfdGltZT0xNjI1NzI2ODg5Jm5vbmNlPTAuNjc2Nzc4OTQxNjA1MTMxNSZyb2xlPXB1Ymxpc2hlciZleHBpcmVfdGltZT0xNjI4MzE4ODg4JmluaXRpYWxfbGF5b3V0X2NsYXNzX2xpc3Q9", // kSessionId: "2_MX40NzI0Nzk1NH5-MTYyNTcyNjg2Njg3N345aHBpdmp1WmZCL1d4Mjl4dXV6M08rb2J-fg", // kApiKey:'47247954', @@ -57,7 +61,6 @@ class VideoCallService extends BaseService { endCall( patient.vcId, false, - ).then((value) { GifLoaderDialogUtils.hideDialog( locator().navigatorKey.currentContext); diff --git a/lib/core/service/authentication_service.dart b/lib/core/service/authentication_service.dart index 49e89881..cb2879a6 100644 --- a/lib/core/service/authentication_service.dart +++ b/lib/core/service/authentication_service.dart @@ -14,26 +14,36 @@ import 'package:doctor_app_flutter/models/doctor/user_model.dart'; class AuthenticationService extends BaseService { List _imeiDetails = []; + List get dashboardItemsList => _imeiDetails; NewLoginInformationModel _loginInfo = NewLoginInformationModel(); - NewLoginInformationModel get loginInfo => _loginInfo; - SendActivationCodeForDoctorAppResponseModel _activationCodeVerificationScreenRes = SendActivationCodeForDoctorAppResponseModel(); - - SendActivationCodeForDoctorAppResponseModel get activationCodeVerificationScreenRes => _activationCodeVerificationScreenRes; - - SendActivationCodeForDoctorAppResponseModel _activationCodeForDoctorAppRes = SendActivationCodeForDoctorAppResponseModel(); - SendActivationCodeForDoctorAppResponseModel get activationCodeForDoctorAppRes => _activationCodeForDoctorAppRes; - CheckActivationCodeForDoctorAppResponseModel _checkActivationCodeForDoctorAppRes = CheckActivationCodeForDoctorAppResponseModel(); - - CheckActivationCodeForDoctorAppResponseModel get checkActivationCodeForDoctorAppRes => _checkActivationCodeForDoctorAppRes; + NewLoginInformationModel get loginInfo => _loginInfo; + SendActivationCodeForDoctorAppResponseModel + _activationCodeVerificationScreenRes = + SendActivationCodeForDoctorAppResponseModel(); + + SendActivationCodeForDoctorAppResponseModel + get activationCodeVerificationScreenRes => + _activationCodeVerificationScreenRes; + + SendActivationCodeForDoctorAppResponseModel _activationCodeForDoctorAppRes = + SendActivationCodeForDoctorAppResponseModel(); + + SendActivationCodeForDoctorAppResponseModel + get activationCodeForDoctorAppRes => _activationCodeForDoctorAppRes; + CheckActivationCodeForDoctorAppResponseModel + _checkActivationCodeForDoctorAppRes = + CheckActivationCodeForDoctorAppResponseModel(); + + CheckActivationCodeForDoctorAppResponseModel + get checkActivationCodeForDoctorAppRes => + _checkActivationCodeForDoctorAppRes; Map _insertDeviceImeiRes = {}; List _doctorProfilesList = []; - List get doctorProfilesList => _doctorProfilesList; - - + List get doctorProfilesList => _doctorProfilesList; Future selectDeviceImei(imei) async { try { @@ -68,94 +78,99 @@ class AuthenticationService extends BaseService { hasError = true; super.error = error; } - } - Future sendActivationCodeVerificationScreen(ActivationCodeForVerificationScreenModel activationCodeModel) async { + Future sendActivationCodeVerificationScreen( + ActivationCodeForVerificationScreenModel activationCodeModel) async { hasError = false; - _activationCodeVerificationScreenRes = SendActivationCodeForDoctorAppResponseModel(); + _activationCodeVerificationScreenRes = + SendActivationCodeForDoctorAppResponseModel(); try { await baseAppClient.post(SEND_ACTIVATION_CODE_FOR_VERIFICATION_SCREEN, onSuccess: (dynamic response, int statusCode) { - _activationCodeVerificationScreenRes = SendActivationCodeForDoctorAppResponseModel.fromJson(response); - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, body: activationCodeModel.toJson()); + _activationCodeVerificationScreenRes = + SendActivationCodeForDoctorAppResponseModel.fromJson(response); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: activationCodeModel.toJson()); } catch (error) { hasError = true; super.error = error; } - } - Future sendActivationCodeForDoctorApp(ActivationCodeModel activationCodeModel)async { + Future sendActivationCodeForDoctorApp( + ActivationCodeModel activationCodeModel) async { hasError = false; - _activationCodeForDoctorAppRes = SendActivationCodeForDoctorAppResponseModel(); + _activationCodeForDoctorAppRes = + SendActivationCodeForDoctorAppResponseModel(); try { await baseAppClient.post(SEND_ACTIVATION_CODE_FOR_DOCTOR_APP, onSuccess: (dynamic response, int statusCode) { - _activationCodeForDoctorAppRes = SendActivationCodeForDoctorAppResponseModel.fromJson(response); - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, body: activationCodeModel.toJson()); + _activationCodeForDoctorAppRes = + SendActivationCodeForDoctorAppResponseModel.fromJson(response); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: activationCodeModel.toJson()); } catch (error) { hasError = true; super.error = error; } } - Future checkActivationCodeForDoctorApp(CheckActivationCodeRequestModel checkActivationCodeRequestModel)async { + Future checkActivationCodeForDoctorApp( + CheckActivationCodeRequestModel checkActivationCodeRequestModel) async { hasError = false; - _checkActivationCodeForDoctorAppRes = CheckActivationCodeForDoctorAppResponseModel(); + _checkActivationCodeForDoctorAppRes = + CheckActivationCodeForDoctorAppResponseModel(); try { await baseAppClient.post(CHECK_ACTIVATION_CODE_FOR_DOCTOR_APP, onSuccess: (dynamic response, int statusCode) { - _checkActivationCodeForDoctorAppRes = CheckActivationCodeForDoctorAppResponseModel.fromJson(response); - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, body: checkActivationCodeRequestModel.toJson()); + _checkActivationCodeForDoctorAppRes = + CheckActivationCodeForDoctorAppResponseModel.fromJson(response); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: checkActivationCodeRequestModel.toJson()); } catch (error) { hasError = true; super.error = error; } - } - - Future insertDeviceImei(InsertIMEIDetailsModel insertIMEIDetailsModel)async { + Future insertDeviceImei(InsertIMEIDetailsModel insertIMEIDetailsModel) async { hasError = false; - // insertIMEIDetailsModel.tokenID = "@dm!n"; + // insertIMEIDetailsModel.tokenID = "@dm!n"; _insertDeviceImeiRes = {}; try { await baseAppClient.post(INSERT_DEVICE_IMEI, onSuccess: (dynamic response, int statusCode) { - _insertDeviceImeiRes = response; - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, body: insertIMEIDetailsModel.toJson()); + _insertDeviceImeiRes = response; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: insertIMEIDetailsModel.toJson()); } catch (error) { hasError = true; super.error = error; } } - Future getDoctorProfileBasedOnClinic(ProfileReqModel profileReqModel)async { + Future getDoctorProfileBasedOnClinic(ProfileReqModel profileReqModel) async { hasError = false; try { await baseAppClient.post(GET_DOC_PROFILES, onSuccess: (dynamic response, int statusCode) { - _doctorProfilesList.clear(); - response['DoctorProfileList'].forEach((v) { - _doctorProfilesList.add(DoctorProfileModel.fromJson(v)); - }); - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, body: profileReqModel.toJson()); + _doctorProfilesList.clear(); + response['DoctorProfileList'].forEach((v) { + _doctorProfilesList.add(DoctorProfileModel.fromJson(v)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: profileReqModel.toJson()); } catch (error) { hasError = true; super.error = error; diff --git a/lib/core/service/base/base_service.dart b/lib/core/service/base/base_service.dart index 58526da7..ce588b88 100644 --- a/lib/core/service/base/base_service.dart +++ b/lib/core/service/base/base_service.dart @@ -13,14 +13,14 @@ class BaseService { List patientArrivalList = []; - BaseService(){ + BaseService() { doctorProfile = null; } //TODO add the user login model when we need it - Future getDoctorProfile({bool isGetProfile = false}) async { - if(isGetProfile) - { + Future getDoctorProfile( + {bool isGetProfile = false}) async { + if (isGetProfile) { Map profile = await sharedPref.getObj(DOCTOR_PROFILE); if (profile != null) { doctorProfile = DoctorProfileModel.fromJson(profile); @@ -42,6 +42,4 @@ class BaseService { return doctorProfile; } } - - } diff --git a/lib/core/service/base/lookup-service.dart b/lib/core/service/base/lookup-service.dart index 7f277fa8..6c8a32e9 100644 --- a/lib/core/service/base/lookup-service.dart +++ b/lib/core/service/base/lookup-service.dart @@ -17,6 +17,7 @@ class LookupService extends BaseService { List medicationFrequencyList = []; List medicationDoseTimeList = []; List medicationIndicationsList = []; + // TODO make the person who create the list dynamic to change it. List medicationStrengthListWithModel = []; List medicationFrequencyListWithModel = []; @@ -52,7 +53,7 @@ class LookupService extends BaseService { List listOfTemperatureMethods = []; List listOfSpeciality = []; List listOfAdmissionType = []; - List listOfDiagnosisSelectionTypes = []; + List listOfDiagnosisSelectionTypes = []; Future getMasterLookup(MasterKeysService masterKeys) async { hasError = false; diff --git a/lib/core/service/home/dasboard_service.dart b/lib/core/service/home/dasboard_service.dart index 4bb871c2..8825fb7a 100644 --- a/lib/core/service/home/dasboard_service.dart +++ b/lib/core/service/home/dasboard_service.dart @@ -4,8 +4,8 @@ import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart'; class DashboardService extends BaseService { List _dashboardItemsList = []; + List get dashboardItemsList => _dashboardItemsList; - bool hasVirtualClinic = false; String sServiceID; @@ -24,14 +24,13 @@ class DashboardService extends BaseService { hasError = true; super.error = error; }, - body: { - }, + body: {}, ); } Future checkDoctorHasLiveCare() async { hasError = false; - await getDoctorProfile(isGetProfile: true); + await getDoctorProfile(isGetProfile: true); await baseAppClient.post( DOCTOR_CHECK_HAS_LIVE_CARE, onSuccess: (dynamic response, int statusCode) { @@ -43,9 +42,8 @@ class DashboardService extends BaseService { super.error = error; }, body: { - "DoctorID": doctorProfile?.doctorID// test user 9920 + "DoctorID": doctorProfile?.doctorID // test user 9920 }, ); } - } diff --git a/lib/core/service/home/doctor_reply_service.dart b/lib/core/service/home/doctor_reply_service.dart index 9471fbb2..dd502e3e 100644 --- a/lib/core/service/home/doctor_reply_service.dart +++ b/lib/core/service/home/doctor_reply_service.dart @@ -8,6 +8,7 @@ import 'package:doctor_app_flutter/models/patient/my_referral/my_referral_patien class DoctorReplyService extends BaseService { List get listDoctorWorkingHoursTable => _listDoctorWorkingHoursTable; + List get listDoctorNotRepliedQuestions => _listDoctorNotRepliedQuestions; List _listDoctorWorkingHoursTable = []; @@ -25,20 +26,19 @@ class DoctorReplyService extends BaseService { GT_MY_PATIENT_QUESTION, onSuccess: (dynamic response, int statusCode) { if (clearData) { - if(isGettingNotReply) + if (isGettingNotReply) _listDoctorNotRepliedQuestions.clear(); - else - _listDoctorWorkingHoursTable.clear(); + else + _listDoctorWorkingHoursTable.clear(); } - response['List_GtMyPatientsQuestions'].forEach((v) { - - if(isGettingNotReply) - _listDoctorNotRepliedQuestions.add(ListGtMyPatientsQuestions.fromJson(v)); + if (isGettingNotReply) + _listDoctorNotRepliedQuestions + .add(ListGtMyPatientsQuestions.fromJson(v)); else - _listDoctorWorkingHoursTable - .add(ListGtMyPatientsQuestions.fromJson(v)); + _listDoctorWorkingHoursTable + .add(ListGtMyPatientsQuestions.fromJson(v)); }); }, onFailure: (String error, int statusCode) { diff --git a/lib/core/service/home/scan_qr_service.dart b/lib/core/service/home/scan_qr_service.dart index b21768f9..bfbee1c2 100644 --- a/lib/core/service/home/scan_qr_service.dart +++ b/lib/core/service/home/scan_qr_service.dart @@ -7,7 +7,8 @@ class ScanQrService extends BaseService { List myInPatientList = List(); List inPatientList = List(); - Future getInPatient(PatientSearchRequestModel requestModel, bool isMyInpatient) async { + Future getInPatient( + PatientSearchRequestModel requestModel, bool isMyInpatient) async { hasError = false; await getDoctorProfile(); diff --git a/lib/core/service/home/schedule_service.dart b/lib/core/service/home/schedule_service.dart index 1776b470..0aac1e88 100644 --- a/lib/core/service/home/schedule_service.dart +++ b/lib/core/service/home/schedule_service.dart @@ -4,16 +4,16 @@ import 'package:doctor_app_flutter/models/doctor/list_doctor_working_hours_table import 'package:doctor_app_flutter/models/doctor/request_schedule.dart'; class ScheduleService extends BaseService { - - List get listDoctorWorkingHoursTable => _listDoctorWorkingHoursTable; + List get listDoctorWorkingHoursTable => + _listDoctorWorkingHoursTable; List _listDoctorWorkingHoursTable = []; - RequestSchedule _requestSchedule = RequestSchedule(); + Future getDoctorSchedule() async { await baseAppClient.post(GET_DOCTOR_WORKING_HOURS_TABLE, onSuccess: (dynamic response, int statusCode) { - _listDoctorWorkingHoursTable.clear(); + _listDoctorWorkingHoursTable.clear(); response['List_DoctorWorkingHoursTable'].forEach((v) { _listDoctorWorkingHoursTable .add(ListDoctorWorkingHoursTable.fromJson(v)); @@ -21,6 +21,6 @@ class ScheduleService extends BaseService { }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; - }, body: _requestSchedule.toJson(),isFallLanguage: true); + }, body: _requestSchedule.toJson(), isFallLanguage: true); } } diff --git a/lib/core/service/hospitals/hospitals_service.dart b/lib/core/service/hospitals/hospitals_service.dart index f8a7579d..96267d01 100644 --- a/lib/core/service/hospitals/hospitals_service.dart +++ b/lib/core/service/hospitals/hospitals_service.dart @@ -4,8 +4,7 @@ import 'package:doctor_app_flutter/core/model/hospitals/get_hospitals_response_m import 'package:doctor_app_flutter/core/service/base/base_service.dart'; class HospitalsService extends BaseService { - -List hospitals =List(); + List hospitals = List(); Future getHospitals(GetHospitalsRequestModel getHospitalsRequestModel) async { hasError = false; diff --git a/lib/core/service/patient/LiveCarePatientServices.dart b/lib/core/service/patient/LiveCarePatientServices.dart index 10af0ea2..669621ae 100644 --- a/lib/core/service/patient/LiveCarePatientServices.dart +++ b/lib/core/service/patient/LiveCarePatientServices.dart @@ -35,7 +35,8 @@ class LiveCarePatientServices extends BaseService { StartCallRes get startCallRes => _startCallRes; Future getPendingPatientERForDoctorApp( - PendingPatientERForDoctorAppRequestModel pendingPatientERForDoctorAppRequestModel) async { + PendingPatientERForDoctorAppRequestModel + pendingPatientERForDoctorAppRequestModel) async { hasError = false; await baseAppClient.post( GET_PENDING_PATIENT_ER_FOR_DOCTOR_APP, @@ -48,7 +49,10 @@ class LiveCarePatientServices extends BaseService { /// add new items. localPatientList.forEach((element) { - if ((_patientList.singleWhere((it) => it.patientId == element.patientId, orElse: () => null)) == null) { + if ((_patientList.singleWhere( + (it) => it.patientId == element.patientId, + orElse: () => null)) == + null) { _patientList.add(element); } }); @@ -56,7 +60,10 @@ class LiveCarePatientServices extends BaseService { /// remove items. List removedPatientList = []; _patientList.forEach((element) { - if ((localPatientList.singleWhere((it) => it.patientId == element.patientId, orElse: () => null)) == null) { + if ((localPatientList.singleWhere( + (it) => it.patientId == element.patientId, + orElse: () => null)) == + null) { removedPatientList.add(element); } }); @@ -85,7 +92,8 @@ class LiveCarePatientServices extends BaseService { Future startCall(StartCallReq startCallReq) async { hasError = false; - await baseAppClient.post(START_LIVE_CARE_CALL, onSuccess: (response, statusCode) async { + await baseAppClient.post(START_LIVE_CARE_CALL, + onSuccess: (response, statusCode) async { _startCallRes = StartCallRes.fromJson(response); }, onFailure: (String error, int statusCode) { hasError = true; @@ -95,17 +103,23 @@ class LiveCarePatientServices extends BaseService { Future endCallWithCharge(int vcID, List altServiceList) async { hasError = false; - await baseAppClient.post(END_CALL_WITH_CHARGE, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(END_CALL_WITH_CHARGE, + onSuccess: (dynamic response, int statusCode) { endCallResponse = response; }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; - }, body: {"VC_ID": vcID, "AltServiceList": altServiceList, "generalid": GENERAL_ID}, isLiveCare: _isLive); + }, body: { + "VC_ID": vcID, + "AltServiceList": altServiceList, + "generalid": GENERAL_ID + }, isLiveCare: _isLive); } Future transferToAdmin(int vcID, String notes) async { hasError = false; - await baseAppClient.post(TRANSFERT_TO_ADMIN, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(TRANSFERT_TO_ADMIN, + onSuccess: (dynamic response, int statusCode) { transferToAdminResponse = response; }, onFailure: (String error, int statusCode) { hasError = true; @@ -119,7 +133,8 @@ class LiveCarePatientServices extends BaseService { Future sendSMSInstruction(int vcID) async { hasError = false; - await baseAppClient.post(SEND_SMS_INSTRUCTIONS, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(SEND_SMS_INSTRUCTIONS, + onSuccess: (dynamic response, int statusCode) { transferToAdminResponse = response; }, onFailure: (String error, int statusCode) { hasError = true; @@ -127,11 +142,14 @@ class LiveCarePatientServices extends BaseService { }, body: {"VC_ID": vcID, "generalid": GENERAL_ID}, isLiveCare: _isLive); } - Future isLogin({LiveCareUserLoginRequestModel isLoginRequestModel, int loginStatus}) async { + Future isLogin( + {LiveCareUserLoginRequestModel isLoginRequestModel, + int loginStatus}) async { hasError = false; await getDoctorProfile(); isLoginRequestModel.doctorId = super.doctorProfile.doctorID; - await baseAppClient.post(LIVE_CARE_IS_LOGIN, onSuccess: (response, statusCode) async { + await baseAppClient.post(LIVE_CARE_IS_LOGIN, + onSuccess: (response, statusCode) async { isLoginResponse = response; }, onFailure: (String error, int statusCode) { hasError = true; @@ -143,7 +161,8 @@ class LiveCarePatientServices extends BaseService { hasError = false; alternativeServicesList.clear(); - await baseAppClient.post(GET_ALTERNATIVE_SERVICE, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(GET_ALTERNATIVE_SERVICE, + onSuccess: (dynamic response, int statusCode) { response['AlternativeServicesList'].forEach((v) { alternativeServicesList.add(AlternativeService.fromJson(v)); }); @@ -156,14 +175,16 @@ class LiveCarePatientServices extends BaseService { Future addPatientToDoctorList({int vcID}) async { hasError = false; await getDoctorProfile(); - AddPatientToDoctorListRequestModel addPatientToDoctorListRequestModel = AddPatientToDoctorListRequestModel(); + AddPatientToDoctorListRequestModel addPatientToDoctorListRequestModel = + AddPatientToDoctorListRequestModel(); addPatientToDoctorListRequestModel.doctorId = super.doctorProfile.doctorID; addPatientToDoctorListRequestModel.vCID = vcID; addPatientToDoctorListRequestModel.isOutKsa = false; addPatientToDoctorListRequestModel.generalid = GENERAL_ID; - await baseAppClient.post(ADD_PATIENT_TO_DOCTOR, onSuccess: (response, statusCode) async { + await baseAppClient.post(ADD_PATIENT_TO_DOCTOR, + onSuccess: (response, statusCode) async { isLoginResponse = response; }, onFailure: (String error, int statusCode) { hasError = true; @@ -173,14 +194,16 @@ class LiveCarePatientServices extends BaseService { Future removePatientFromDoctorList({int vcID}) async { hasError = false; - AddPatientToDoctorListRequestModel addPatientToDoctorListRequestModel = AddPatientToDoctorListRequestModel(); + AddPatientToDoctorListRequestModel addPatientToDoctorListRequestModel = + AddPatientToDoctorListRequestModel(); await getDoctorProfile(); addPatientToDoctorListRequestModel.doctorId = super.doctorProfile.doctorID; addPatientToDoctorListRequestModel.vCID = vcID; addPatientToDoctorListRequestModel.isOutKsa = false; addPatientToDoctorListRequestModel.generalid = GENERAL_ID; - await baseAppClient.post(REMOVE_PATIENT_FROM_DOCTOR, onSuccess: (response, statusCode) async { + await baseAppClient.post(REMOVE_PATIENT_FROM_DOCTOR, + onSuccess: (response, statusCode) async { isLoginResponse = response; }, onFailure: (String error, int statusCode) { hasError = true; diff --git a/lib/core/service/patient/MyReferralPatientService.dart b/lib/core/service/patient/MyReferralPatientService.dart index 35729def..2e8d9f7c 100644 --- a/lib/core/service/patient/MyReferralPatientService.dart +++ b/lib/core/service/patient/MyReferralPatientService.dart @@ -12,19 +12,20 @@ class MyReferralInPatientService extends BaseService { hasError = false; await getDoctorProfile(); - MyReferralPatientRequestModel myReferralPatientRequestModel = MyReferralPatientRequestModel( - doctorID: doctorProfile.doctorID, - firstName: "0", - middleName: "0", - lastName: "0", - patientMobileNumber: "0", - patientIdentificationID: "0", - patientID: 0, - from: "0", - to: "0", - stamp: DateTime.now().toIso8601String(), - isLoginForDoctorApp: true, - patientTypeID: 1); + MyReferralPatientRequestModel myReferralPatientRequestModel = + MyReferralPatientRequestModel( + doctorID: doctorProfile.doctorID, + firstName: "0", + middleName: "0", + lastName: "0", + patientMobileNumber: "0", + patientIdentificationID: "0", + patientID: 0, + from: "0", + to: "0", + stamp: DateTime.now().toIso8601String(), + isLoginForDoctorApp: true, + patientTypeID: 1); myReferralPatients.clear(); await baseAppClient.post( GET_MY_REFERRAL_INPATIENT, @@ -47,19 +48,20 @@ class MyReferralInPatientService extends BaseService { hasError = false; await getDoctorProfile(); - MyReferralPatientRequestModel myReferralPatientRequestModel = MyReferralPatientRequestModel( - doctorID: doctorProfile.doctorID, - firstName: "0", - middleName: "0", - lastName: "0", - patientMobileNumber: "0", - patientIdentificationID: "0", - patientID: 0, - from: "0", - to: "0", - stamp: DateTime.now().toIso8601String(), - isLoginForDoctorApp: true, - patientTypeID: 1); + MyReferralPatientRequestModel myReferralPatientRequestModel = + MyReferralPatientRequestModel( + doctorID: doctorProfile.doctorID, + firstName: "0", + middleName: "0", + lastName: "0", + patientMobileNumber: "0", + patientIdentificationID: "0", + patientID: 0, + from: "0", + to: "0", + stamp: DateTime.now().toIso8601String(), + isLoginForDoctorApp: true, + patientTypeID: 1); myReferralPatients.clear(); await baseAppClient.post( GET_MY_REFERRAL_OUT_PATIENT, @@ -78,14 +80,18 @@ class MyReferralInPatientService extends BaseService { ); } - Future replay(String referredDoctorRemarks, MyReferralPatientModel referral) async { + Future replay( + String referredDoctorRemarks, MyReferralPatientModel referral) async { hasError = false; await getDoctorProfile(); - RequestAddReferredDoctorRemarks _requestAddReferredDoctorRemarks = RequestAddReferredDoctorRemarks(); + RequestAddReferredDoctorRemarks _requestAddReferredDoctorRemarks = + RequestAddReferredDoctorRemarks(); _requestAddReferredDoctorRemarks.projectID = referral.projectID; - _requestAddReferredDoctorRemarks.admissionNo = referral.admissionNo.toString(); + _requestAddReferredDoctorRemarks.admissionNo = + referral.admissionNo.toString(); _requestAddReferredDoctorRemarks.lineItemNo = referral.lineItemNo; - _requestAddReferredDoctorRemarks.referredDoctorRemarks = referredDoctorRemarks; + _requestAddReferredDoctorRemarks.referredDoctorRemarks = + referredDoctorRemarks; _requestAddReferredDoctorRemarks.editedBy = doctorProfile.doctorID; _requestAddReferredDoctorRemarks.patientID = referral.patientID; _requestAddReferredDoctorRemarks.referringDoctor = referral.referringDoctor; @@ -100,20 +106,24 @@ class MyReferralInPatientService extends BaseService { ); } - Future replayReferred(String referredDoctorRemarks, MyReferralPatientModel referral, int referralStatus) async { + Future replayReferred(String referredDoctorRemarks, + MyReferralPatientModel referral, int referralStatus) async { hasError = false; await getDoctorProfile(); - AddReferredRemarksRequestModel _requestAddReferredDoctorRemarks = AddReferredRemarksRequestModel( - editedBy: doctorProfile.doctorID, - projectID: doctorProfile.projectID, - referredDoctorRemarks: referredDoctorRemarks, - referalStatus: referralStatus); + AddReferredRemarksRequestModel _requestAddReferredDoctorRemarks = + AddReferredRemarksRequestModel( + editedBy: doctorProfile.doctorID, + projectID: doctorProfile.projectID, + referredDoctorRemarks: referredDoctorRemarks, + referalStatus: referralStatus); _requestAddReferredDoctorRemarks.projectID = referral.projectID; //TODO Check this in case out patient - _requestAddReferredDoctorRemarks.admissionNo = int.parse(referral.admissionNo); + _requestAddReferredDoctorRemarks.admissionNo = + int.parse(referral.admissionNo); _requestAddReferredDoctorRemarks.lineItemNo = referral.lineItemNo; - _requestAddReferredDoctorRemarks.referredDoctorRemarks = referredDoctorRemarks; + _requestAddReferredDoctorRemarks.referredDoctorRemarks = + referredDoctorRemarks; _requestAddReferredDoctorRemarks.editedBy = doctorProfile.doctorID; _requestAddReferredDoctorRemarks.referalStatus = referralStatus; diff --git a/lib/core/service/patient/out_patient_service.dart b/lib/core/service/patient/out_patient_service.dart index 004bb59f..304b5f96 100644 --- a/lib/core/service/patient/out_patient_service.dart +++ b/lib/core/service/patient/out_patient_service.dart @@ -5,6 +5,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; class OutPatientService extends BaseService { List _patientList = []; + List get patientList => _patientList; Future getOutPatient( diff --git a/lib/core/service/patient/patient-doctor-referral-service.dart b/lib/core/service/patient/patient-doctor-referral-service.dart index 5b659631..200734fd 100644 --- a/lib/core/service/patient/patient-doctor-referral-service.dart +++ b/lib/core/service/patient/patient-doctor-referral-service.dart @@ -161,7 +161,7 @@ class PatientReferralService extends LookupService { Future getMyReferredOutPatient() async { hasError = false; RequestMyReferralPatientModel _requestMyReferralPatient = - RequestMyReferralPatientModel(); + RequestMyReferralPatientModel(); DoctorProfileModel doctorProfile = await getDoctorProfile(); await baseAppClient.post( diff --git a/lib/core/service/patient/patientInPatientService.dart b/lib/core/service/patient/patientInPatientService.dart index bc7f1283..4a5774fb 100644 --- a/lib/core/service/patient/patientInPatientService.dart +++ b/lib/core/service/patient/patientInPatientService.dart @@ -27,7 +27,7 @@ class PatientInPatientService extends BaseService { response['List_MyInPatient'].forEach((v) { PatiantInformtion patient = PatiantInformtion.fromJson(v); inPatientList.add(patient); - if(patient.doctorId == doctorProfile.doctorID){ + if (patient.doctorId == doctorProfile.doctorID) { myInPatientList.add(patient); } }); diff --git a/lib/core/service/patient/patient_service.dart b/lib/core/service/patient/patient_service.dart index f79e342c..198905ed 100644 --- a/lib/core/service/patient/patient_service.dart +++ b/lib/core/service/patient/patient_service.dart @@ -37,12 +37,15 @@ class PatientService extends BaseService { List _patientLabResultOrdersList = []; - List get patientLabResultOrdersList => _patientLabResultOrdersList; + List get patientLabResultOrdersList => + _patientLabResultOrdersList; - List get patientPrescriptionsList => _patientPrescriptionsList; + List get patientPrescriptionsList => + _patientPrescriptionsList; List _patientPrescriptionsList = []; - List get prescriptionReportForInPatientList => _prescriptionReportForInPatientList; + List get prescriptionReportForInPatientList => + _prescriptionReportForInPatientList; List _prescriptionReportForInPatientList = []; List _patientRadiologyList = []; @@ -63,14 +66,17 @@ class PatientService extends BaseService { List _patientNursingProgressNoteList = []; - List get patientNursingProgressNoteList => _patientNursingProgressNoteList; + List get patientNursingProgressNoteList => + _patientNursingProgressNoteList; List _diagnosisForInPatientList = []; - List get diagnosisForInPatientList => _diagnosisForInPatientList; + List get diagnosisForInPatientList => + _diagnosisForInPatientList; List _diabeticChartValuesList = []; - List get diabeticChartValuesList => _diabeticChartValuesList; + List get diabeticChartValuesList => + _diabeticChartValuesList; // TODO: replace var with model var _insuranceApporvalsList = []; @@ -96,9 +102,12 @@ class PatientService extends BaseService { get referalFrequancyList => _referalFrequancyList; - DoctorsByClinicIdRequest _doctorsByClinicIdRequest = DoctorsByClinicIdRequest(); - STPReferralFrequencyRequest _referralFrequencyRequest = STPReferralFrequencyRequest(); - ClinicByProjectIdRequest _clinicByProjectIdRequest = ClinicByProjectIdRequest(); + DoctorsByClinicIdRequest _doctorsByClinicIdRequest = + DoctorsByClinicIdRequest(); + STPReferralFrequencyRequest _referralFrequencyRequest = + STPReferralFrequencyRequest(); + ClinicByProjectIdRequest _clinicByProjectIdRequest = + ClinicByProjectIdRequest(); ReferToDoctorRequest _referToDoctorRequest; Future getPatientList(patient, patientType, {isView}) async { @@ -152,7 +161,8 @@ class PatientService extends BaseService { return Future.value(localRes); } - Future getInPatient(PatientSearchRequestModel requestModel, bool isMyInpatient) async { + Future getInPatient( + PatientSearchRequestModel requestModel, bool isMyInpatient) async { hasError = false; await getDoctorProfile(); @@ -227,7 +237,8 @@ class PatientService extends BaseService { onSuccess: (dynamic response, int statusCode) { _prescriptionReportForInPatientList = []; response['List_PrescriptionReportForInPatient'].forEach((v) { - prescriptionReportForInPatientList.add(PrescriptionReportForInPatient.fromJson(v)); + prescriptionReportForInPatientList + .add(PrescriptionReportForInPatient.fromJson(v)); }); }, onFailure: (String error, int statusCode) { @@ -482,8 +493,9 @@ class PatientService extends BaseService { ); } - - Future getNursingProgressNote(GetNursingProgressNoteRequestModel getNursingProgressNoteRequestModel) async { + Future getNursingProgressNote( + GetNursingProgressNoteRequestModel + getNursingProgressNoteRequestModel) async { hasError = false; await baseAppClient.post( @@ -491,7 +503,8 @@ class PatientService extends BaseService { onSuccess: (dynamic response, int statusCode) { _patientNursingProgressNoteList = []; response['List_NursingProgressNote'].forEach((v) { - _patientNursingProgressNoteList.add( GetNursingProgressNoteResposeModel.fromJson(v)); + _patientNursingProgressNoteList + .add(GetNursingProgressNoteResposeModel.fromJson(v)); }); }, onFailure: (String error, int statusCode) { @@ -502,7 +515,9 @@ class PatientService extends BaseService { ); } - Future getDiagnosisForInPatient(GetDiagnosisForInPatientRequestModel getDiagnosisForInPatientRequestModel) async { + Future getDiagnosisForInPatient( + GetDiagnosisForInPatientRequestModel + getDiagnosisForInPatientRequestModel) async { hasError = false; await baseAppClient.post( @@ -510,7 +525,8 @@ class PatientService extends BaseService { onSuccess: (dynamic response, int statusCode) { _diagnosisForInPatientList = []; response['List_DiagnosisForInPatient'].forEach((v) { - _diagnosisForInPatientList.add( GetDiagnosisForInPatientResponseModel.fromJson(v)); + _diagnosisForInPatientList + .add(GetDiagnosisForInPatientResponseModel.fromJson(v)); }); }, onFailure: (String error, int statusCode) { @@ -521,8 +537,9 @@ class PatientService extends BaseService { ); } - - Future getDiabeticChartValues(GetDiabeticChartValuesRequestModel getDiabeticChartValuesRequestModel) async { + Future getDiabeticChartValues( + GetDiabeticChartValuesRequestModel + getDiabeticChartValuesRequestModel) async { hasError = false; await baseAppClient.post( @@ -530,7 +547,8 @@ class PatientService extends BaseService { onSuccess: (dynamic response, int statusCode) { _diabeticChartValuesList = []; response['List_DiabeticChartValues'].forEach((v) { - _diabeticChartValuesList.add( GetDiabeticChartValuesResponseModel.fromJson(v)); + _diabeticChartValuesList + .add(GetDiabeticChartValuesResponseModel.fromJson(v)); }); }, onFailure: (String error, int statusCode) { diff --git a/lib/core/service/patient/profile/discharge_summary_servive.dart b/lib/core/service/patient/profile/discharge_summary_servive.dart index f9ae4fe5..f43a5c2f 100644 --- a/lib/core/service/patient/profile/discharge_summary_servive.dart +++ b/lib/core/service/patient/profile/discharge_summary_servive.dart @@ -5,10 +5,12 @@ import 'package:doctor_app_flutter/models/discharge_summary/GetDischargeSummaryR class DischargeSummaryService extends BaseService { List _pendingDischargeSummaryList = []; + List get pendingDischargeSummaryList => _pendingDischargeSummaryList; List _allDischargeSummaryList = []; + List get allDischargeSummaryList => _allDischargeSummaryList; diff --git a/lib/core/service/patient/profile/operation_report_servive.dart b/lib/core/service/patient/profile/operation_report_servive.dart index 7ac4ade7..1ff58d4d 100644 --- a/lib/core/service/patient/profile/operation_report_servive.dart +++ b/lib/core/service/patient/profile/operation_report_servive.dart @@ -8,10 +8,13 @@ import 'package:doctor_app_flutter/models/operation_report/get_reservations_requ class OperationReportService extends BaseService { List _reservationList = []; + List get reservationList => _reservationList; List _operationDetailsList = []; - List get operationDetailsList => _operationDetailsList; + + List get operationDetailsList => + _operationDetailsList; Future getReservations( {GetReservationsRequestModel getReservationsRequestModel, @@ -35,10 +38,9 @@ class OperationReportService extends BaseService { }, body: getReservationsRequestModel.toJson()); } - Future getOperationReportDetails( - {GetOperationDetailsRequestModel getOperationReportRequestModel, - }) async { - + Future getOperationReportDetails({ + GetOperationDetailsRequestModel getOperationReportRequestModel, + }) async { hasError = false; await baseAppClient.post(GET_OPERATION_DETAILS, onSuccess: (dynamic response, int statusCode) { @@ -46,7 +48,8 @@ class OperationReportService extends BaseService { _operationDetailsList.clear(); response['List_OperationDetails'].forEach( (v) { - _operationDetailsList.add(GetOperationDetailsResponseModel.fromJson(v)); + _operationDetailsList + .add(GetOperationDetailsResponseModel.fromJson(v)); }, ); }, onFailure: (String error, int statusCode) { diff --git a/lib/core/service/patient/referral_patient_service.dart b/lib/core/service/patient/referral_patient_service.dart index 9fc163bd..3aa9e0e8 100644 --- a/lib/core/service/patient/referral_patient_service.dart +++ b/lib/core/service/patient/referral_patient_service.dart @@ -5,44 +5,54 @@ import 'package:doctor_app_flutter/models/patient/my_referral/my_referral_patien import 'package:doctor_app_flutter/models/patient/request_my_referral_patient_model.dart'; class ReferralPatientService extends BaseService { - List _listMyReferralPatientModel = []; - List get listMyReferralPatientModel => _listMyReferralPatientModel; + List get listMyReferralPatientModel => + _listMyReferralPatientModel; - RequestMyReferralPatientModel _requestMyReferralPatient = RequestMyReferralPatientModel(); - RequestAddReferredDoctorRemarks _requestAddReferredDoctorRemarks = RequestAddReferredDoctorRemarks(); + RequestMyReferralPatientModel _requestMyReferralPatient = + RequestMyReferralPatientModel(); + RequestAddReferredDoctorRemarks _requestAddReferredDoctorRemarks = + RequestAddReferredDoctorRemarks(); Future getMyReferralPatient() async { - await baseAppClient.post(GET_MY_REFERRAL_PATIENT, - onSuccess: (dynamic response, int statusCode) { - _listMyReferralPatientModel.clear(); - response['List_MyReferralPatient'].forEach((v) { - listMyReferralPatientModel.add(MyReferralPatientModel.fromJson(v)); - }); - print(response['List_MyReferralPatient']); - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, body: _requestMyReferralPatient .toJson(),); + await baseAppClient.post( + GET_MY_REFERRAL_PATIENT, + onSuccess: (dynamic response, int statusCode) { + _listMyReferralPatientModel.clear(); + response['List_MyReferralPatient'].forEach((v) { + listMyReferralPatientModel.add(MyReferralPatientModel.fromJson(v)); + }); + print(response['List_MyReferralPatient']); + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + body: _requestMyReferralPatient.toJson(), + ); } Future replay( String referredDoctorRemarks, MyReferralPatientModel model) async { - _requestAddReferredDoctorRemarks.admissionNo = model.admissionNo; _requestAddReferredDoctorRemarks.patientID = model.patientID; - _requestAddReferredDoctorRemarks.referredDoctorRemarks = referredDoctorRemarks; + _requestAddReferredDoctorRemarks.referredDoctorRemarks = + referredDoctorRemarks; _requestAddReferredDoctorRemarks.lineItemNo = model.lineItemNo; _requestAddReferredDoctorRemarks.referringDoctor = model.referringDoctor; - await baseAppClient.post(GET_MY_REFERRAL_PATIENT, - onSuccess: (dynamic response, int statusCode) { - model.referredDoctorRemarks = referredDoctorRemarks; - listMyReferralPatientModel[ - listMyReferralPatientModel.indexOf(model)] = model; - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, body: _requestMyReferralPatient .toJson(),); + await baseAppClient.post( + GET_MY_REFERRAL_PATIENT, + onSuccess: (dynamic response, int statusCode) { + model.referredDoctorRemarks = referredDoctorRemarks; + listMyReferralPatientModel[listMyReferralPatientModel.indexOf(model)] = + model; + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + body: _requestMyReferralPatient.toJson(), + ); } } diff --git a/lib/core/service/patient_medical_file/admission_request/patient-admission-request-service.dart b/lib/core/service/patient_medical_file/admission_request/patient-admission-request-service.dart index c97f8426..6a38b1fd 100644 --- a/lib/core/service/patient_medical_file/admission_request/patient-admission-request-service.dart +++ b/lib/core/service/patient_medical_file/admission_request/patient-admission-request-service.dart @@ -14,7 +14,6 @@ class AdmissionRequestService extends LookupService { List dietTypesList = []; List icdCodes = []; - setSpecialityList() { specialityList.clear(); listOfSpeciality.forEach((element) { @@ -199,8 +198,8 @@ class AdmissionRequestService extends LookupService { if (response['ICDCodesList'] != null) { icdCodes.addAll(response['ICDCodesList']); // response['ICDCodesList'].forEach((v) { - // diagnosisTypesList.add(MasterKeyModel.fromJson(v)); - // icdCodes.add(v); + // diagnosisTypesList.add(MasterKeyModel.fromJson(v)); + // icdCodes.add(v); // }); } }, @@ -212,7 +211,7 @@ class AdmissionRequestService extends LookupService { ); } - Future makeAdmissionRequest(AdmissionRequest admissionRequest) async{ + Future makeAdmissionRequest(AdmissionRequest admissionRequest) async { hasError = false; Map body = Map(); @@ -230,5 +229,4 @@ class AdmissionRequestService extends LookupService { body: body, ); } - } diff --git a/lib/core/service/patient_medical_file/insurance/InsuranceCardService.dart b/lib/core/service/patient_medical_file/insurance/InsuranceCardService.dart index 2bb9dac7..865e5086 100644 --- a/lib/core/service/patient_medical_file/insurance/InsuranceCardService.dart +++ b/lib/core/service/patient_medical_file/insurance/InsuranceCardService.dart @@ -17,9 +17,11 @@ class InsuranceCardService extends BaseService { InsuranceApprovalInPatientRequestModel(); List _insuranceApproval = List(); + List get insuranceApproval => _insuranceApproval; List _insuranceApprovalInPatient = List(); + List get insuranceApprovalInPatient => _insuranceApprovalInPatient; 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 0a10eb31..060de1ca 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 @@ -15,11 +15,14 @@ import '../../base/base_service.dart'; class LabsService extends BaseService { List patientLabOrdersList = List(); List _allSpecialLab = List(); + List get allSpecialLab => _allSpecialLab; - AllSpecialLabResultRequestModel _allSpecialLabResultRequestModel = AllSpecialLabResultRequestModel(); + AllSpecialLabResultRequestModel _allSpecialLabResultRequestModel = + AllSpecialLabResultRequestModel(); - Future getPatientLabOrdersList(PatiantInformtion patient, bool isInpatient) async { + Future getPatientLabOrdersList( + PatiantInformtion patient, bool isInpatient) async { hasError = false; Map body = Map(); String url = ""; @@ -33,7 +36,8 @@ class LabsService extends BaseService { } patientLabOrdersList = []; patientLabOrdersList.clear(); - await baseAppClient.postPatient(url, patient: patient, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.postPatient(url, patient: patient, + onSuccess: (dynamic response, int statusCode) { patientLabOrdersList = []; if (!isInpatient) { response['ListPLO'].forEach((hospital) { @@ -51,7 +55,8 @@ class LabsService extends BaseService { }, body: body); } - RequestPatientLabSpecialResult _requestPatientLabSpecialResult = RequestPatientLabSpecialResult(); + RequestPatientLabSpecialResult _requestPatientLabSpecialResult = + RequestPatientLabSpecialResult(); List patientLabSpecialResult = List(); List labResultList = List(); @@ -74,8 +79,8 @@ class LabsService extends BaseService { _requestPatientLabSpecialResult.orderNo = orderNo; body = _requestPatientLabSpecialResult.toJson(); - await baseAppClient.postPatient(GET_Patient_LAB_SPECIAL_RESULT, patient: patient, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.postPatient(GET_Patient_LAB_SPECIAL_RESULT, + patient: patient, onSuccess: (dynamic response, int statusCode) { patientLabSpecialResult.clear(); response['ListPLSR'].forEach((hospital) { @@ -87,7 +92,10 @@ class LabsService extends BaseService { }, body: body); } - Future getPatientLabResult({PatientLabOrders patientLabOrder, PatiantInformtion patient, bool isInpatient}) async { + Future getPatientLabResult( + {PatientLabOrders patientLabOrder, + PatiantInformtion patient, + bool isInpatient}) async { hasError = false; String url = ""; @@ -105,7 +113,8 @@ class LabsService extends BaseService { body['ProjectID'] = patientLabOrder.projectID; body['ClinicID'] = patientLabOrder.clinicID ?? 0; - await baseAppClient.postPatient(url, patient: patient, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.postPatient(url, patient: patient, + onSuccess: (dynamic response, int statusCode) { patientLabSpecialResult = []; labResultList = []; @@ -114,7 +123,8 @@ class LabsService extends BaseService { labResultList.add(LabResult.fromJson(hospital)); }); response['List_GetLabSpecial'].forEach((hospital) { - patientLabSpecialResult.add(PatientLabSpecialResult.fromJson(hospital)); + patientLabSpecialResult + .add(PatientLabSpecialResult.fromJson(hospital)); }); } else { response['ListPLR'].forEach((lab) { @@ -128,7 +138,9 @@ class LabsService extends BaseService { } Future getPatientLabOrdersResults( - {PatientLabOrders patientLabOrder, String procedure, PatiantInformtion patient}) async { + {PatientLabOrders patientLabOrder, + String procedure, + PatiantInformtion patient}) async { hasError = false; Map body = Map(); if (patientLabOrder != null) { @@ -140,8 +152,8 @@ class LabsService extends BaseService { } body['isDentalAllowedBackend'] = false; body['Procedure'] = procedure; - await baseAppClient.postPatient(GET_Patient_LAB_ORDERS_RESULT, patient: patient, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.postPatient(GET_Patient_LAB_ORDERS_RESULT, + patient: patient, onSuccess: (dynamic response, int statusCode) { labOrdersResultsList.clear(); response['ListPLR'].forEach((lab) { labOrdersResultsList.add(LabOrderResult.fromJson(lab)); @@ -152,7 +164,8 @@ class LabsService extends BaseService { }, body: body); } - RequestSendLabReportEmail _requestSendLabReportEmail = RequestSendLabReportEmail(); + RequestSendLabReportEmail _requestSendLabReportEmail = + RequestSendLabReportEmail(); Future sendLabReportEmail({PatientLabOrders patientLabOrder}) async { // _requestSendLabReportEmail.projectID = patientLabOrder.projectID; @@ -179,7 +192,9 @@ class LabsService extends BaseService { } Future getPatientLabOrdersResultHistoryByDescription( - {PatientLabOrders patientLabOrder, String procedureDescription, PatiantInformtion patient}) async { + {PatientLabOrders patientLabOrder, + String procedureDescription, + PatiantInformtion patient}) async { hasError = false; Map body = Map(); if (patientLabOrder != null) { @@ -189,8 +204,9 @@ class LabsService extends BaseService { } body['isDentalAllowedBackend'] = false; body['ProcedureDescription'] = procedureDescription; - await baseAppClient.postPatient(GET_PATIENT_LAB_ORDERS_RESULT_HISTORY_BY_DESCRIPTION, patient: patient, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.postPatient( + GET_PATIENT_LAB_ORDERS_RESULT_HISTORY_BY_DESCRIPTION, + patient: patient, onSuccess: (dynamic response, int statusCode) { labOrdersResultHistoryList.clear(); response['ListGeneralResultHistory'].forEach((lab) { labOrdersResultHistoryList.add(LabResultHistory.fromJson(lab)); @@ -209,10 +225,12 @@ class LabsService extends BaseService { ); hasError = false; _allSpecialLab.clear(); - await baseAppClient.post(ALL_SPECIAL_LAB_RESULT, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(ALL_SPECIAL_LAB_RESULT, + onSuccess: (dynamic response, int statusCode) { response['ListPLSRALL'].forEach((lab) { var labs = AllSpecialLabResultModel.fromJson(lab); - if (labs.invoiceNo != "0") _allSpecialLab.add(AllSpecialLabResultModel.fromJson(lab)); + if (labs.invoiceNo != "0") + _allSpecialLab.add(AllSpecialLabResultModel.fromJson(lab)); }); }, onFailure: (String error, int statusCode) { hasError = true; 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 dfb9c3ae..eb8a10fb 100644 --- a/lib/core/service/patient_medical_file/medical_report/PatientMedicalReportService.dart +++ b/lib/core/service/patient_medical_file/medical_report/PatientMedicalReportService.dart @@ -16,7 +16,8 @@ class PatientMedicalReportService extends BaseService { body['SetupID'] = doctorProfile.setupID; body['ProjectID'] = doctorProfile.projectID; medicalReportList = []; - await baseAppClient.postPatient(PATIENT_MEDICAL_REPORT_GET_LIST, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.postPatient(PATIENT_MEDICAL_REPORT_GET_LIST, + onSuccess: (dynamic response, int statusCode) { if (response['DAPP_ListMedicalReportList'] != null) { response['DAPP_ListMedicalReportList'].forEach((v) { medicalReportList.add(MedicalReportModel.fromJson(v)); @@ -36,7 +37,8 @@ class PatientMedicalReportService extends BaseService { body['SetupID'] = "91877"; body['TemplateID'] = 43; - await baseAppClient.post(PATIENT_MEDICAL_REPORT_GET_TEMPLATE, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(PATIENT_MEDICAL_REPORT_GET_TEMPLATE, + onSuccess: (dynamic response, int statusCode) { medicalReportTemplate.clear(); if (response['DAPP_GetTemplateByIDList'] != null) { response['DAPP_GetTemplateByIDList'].forEach((v) { @@ -57,14 +59,16 @@ class PatientMedicalReportService extends BaseService { body['AdmissionNo'] = patient.admissionNo; body['MedicalReportHTML'] = htmlText; - await baseAppClient.postPatient(PATIENT_MEDICAL_REPORT_INSERT, onSuccess: (dynamic response, int statusCode) {}, + await baseAppClient.postPatient(PATIENT_MEDICAL_REPORT_INSERT, + onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { hasError = true; super.error = error.toString(); }, body: body, patient: patient); } - Future verifyMedicalReport(PatiantInformtion patient, MedicalReportModel medicalReport) async { + Future verifyMedicalReport( + PatiantInformtion patient, MedicalReportModel medicalReport) async { hasError = false; Map body = Map(); body['TokenID'] = "@dm!n"; @@ -77,7 +81,8 @@ class PatientMedicalReportService extends BaseService { } if (body['DoctorID'] == null) body['DoctorID'] = doctorProfile?.doctorID; - await baseAppClient.postPatient(PATIENT_MEDICAL_REPORT_VERIFIED, onSuccess: (dynamic response, int statusCode) {}, + await baseAppClient.postPatient(PATIENT_MEDICAL_REPORT_VERIFIED, + onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { hasError = true; super.error = error.toString(); @@ -100,14 +105,16 @@ class PatientMedicalReportService extends BaseService { } if (body['DoctorID'] == null) body['DoctorID'] = doctorProfile?.doctorID; - await baseAppClient.postPatient(INSERT_MEDICAL_REPORT, onSuccess: (dynamic response, int statusCode) {}, + await baseAppClient.postPatient(INSERT_MEDICAL_REPORT, + onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { hasError = true; super.error = error.toString(); }, body: body, patient: patient); } - Future updateMedicalReport(PatiantInformtion patient, String htmlText, int limitNumber, String invoiceNumber) async { + Future updateMedicalReport(PatiantInformtion patient, String htmlText, + int limitNumber, String invoiceNumber) async { hasError = false; Map body = Map(); // body['TokenID'] = "@dm!n"; @@ -127,7 +134,8 @@ class PatientMedicalReportService extends BaseService { } if (body['DoctorID'] == null) body['DoctorID'] = doctorProfile?.doctorID; - await baseAppClient.postPatient(UPDATE_MEDICAL_REPORT, onSuccess: (dynamic response, int statusCode) {}, + await baseAppClient.postPatient(UPDATE_MEDICAL_REPORT, + onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { hasError = true; super.error = error.toString(); 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 42cdafc6..8a85fa4f 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 @@ -5,6 +5,7 @@ import 'package:doctor_app_flutter/core/service/base/base_service.dart'; class MedicalFileService extends BaseService { List _medicalFileList = List(); + List get medicalFileList => _medicalFileList; MedicalFileRequestModel _fileRequestModel = MedicalFileRequestModel( 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 a734354d..323bc2bd 100644 --- a/lib/core/service/patient_medical_file/prescription/medicine_service.dart +++ b/lib/core/service/patient_medical_file/prescription/medicine_service.dart @@ -7,9 +7,11 @@ import 'package:doctor_app_flutter/models/pharmacies/pharmacies_items_request_mo class MedicineService extends BaseService { var _pharmacyItemsList = []; var _pharmaciesList = []; + get pharmacyItemsList => _pharmacyItemsList; + get pharmaciesList => _pharmaciesList; - String searchText=''; + String searchText = ''; List patientAssessmentList = []; PharmaciesItemsRequestModel _itemsRequestModel = @@ -18,7 +20,7 @@ class MedicineService extends BaseService { Future getMedicineItem(String itemName) async { _itemsRequestModel.pHRItemName = itemName; - searchText =itemName; + searchText = itemName; await baseAppClient.post( PHARMACY_ITEMS_URL, onSuccess: (dynamic response, int statusCode) { 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 ffbcae9b..f0594fe0 100644 --- a/lib/core/service/patient_medical_file/prescription/prescription_service.dart +++ b/lib/core/service/patient_medical_file/prescription/prescription_service.dart @@ -17,13 +17,16 @@ import 'package:doctor_app_flutter/util/date-utils.dart'; class PrescriptionService extends LookupService { List _prescriptionList = List(); + List get prescriptionList => _prescriptionList; List _drugsList = List(); + List get drugsList => _drugsList; List doctorsList = []; List allMedicationList = []; List specialityList = []; List drugToDrug = []; + List get drugToDrugList => drugToDrug; List itemMedicineList = []; List itemMedicineListRoute = []; diff --git a/lib/core/service/patient_medical_file/prescription/prescriptions_service.dart b/lib/core/service/patient_medical_file/prescription/prescriptions_service.dart index 06de5a74..39b0c828 100644 --- a/lib/core/service/patient_medical_file/prescription/prescriptions_service.dart +++ b/lib/core/service/patient_medical_file/prescription/prescriptions_service.dart @@ -22,7 +22,8 @@ class PrescriptionsService extends BaseService { List prescriptionsOrderList = List(); List prescriptionInPatientList = List(); - InPatientPrescriptionRequestModel _inPatientPrescriptionRequestModel = InPatientPrescriptionRequestModel(); + InPatientPrescriptionRequestModel _inPatientPrescriptionRequestModel = + InPatientPrescriptionRequestModel(); GetMedicationForInPatientRequestModel _getMedicationForInPatientRequestModel = GetMedicationForInPatientRequestModel(); @@ -34,10 +35,12 @@ class PrescriptionsService extends BaseService { hasError = false; prescriptionInPatientList.clear(); - await baseAppClient.post(GET_PRESCRIPTION_IN_PATIENT, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(GET_PRESCRIPTION_IN_PATIENT, + onSuccess: (dynamic response, int statusCode) { prescriptionsList.clear(); response['List_PrescriptionReportForInPatient'].forEach((prescriptions) { - prescriptionInPatientList.add(PrescriotionInPatient.fromJson(prescriptions)); + prescriptionInPatientList + .add(PrescriotionInPatient.fromJson(prescriptions)); }); }, onFailure: (String error, int statusCode) { hasError = true; @@ -49,7 +52,8 @@ class PrescriptionsService extends BaseService { hasError = false; Map body = Map(); body['isDentalAllowedBackend'] = false; - await baseAppClient.postPatient(PRESCRIPTIONS, patient: patient, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.postPatient(PRESCRIPTIONS, patient: patient, + onSuccess: (dynamic response, int statusCode) { prescriptionsList.clear(); response['PatientPrescriptionList'].forEach((prescriptions) { prescriptionsList.add(Prescriptions.fromJson(prescriptions)); @@ -61,10 +65,13 @@ class PrescriptionsService extends BaseService { } RequestPrescriptionReport _requestPrescriptionReport = - RequestPrescriptionReport(appointmentNo: 0, isDentalAllowedBackend: false); + RequestPrescriptionReport( + appointmentNo: 0, isDentalAllowedBackend: false); List prescriptionReportList = List(); - Future getPrescriptionReport({Prescriptions prescriptions, @required PatiantInformtion patient}) async { + Future getPrescriptionReport( + {Prescriptions prescriptions, + @required PatiantInformtion patient}) async { hasError = false; _requestPrescriptionReport.dischargeNo = prescriptions.dischargeNo; _requestPrescriptionReport.projectID = prescriptions.projectID; @@ -74,18 +81,23 @@ class PrescriptionsService extends BaseService { _requestPrescriptionReport.appointmentNo = prescriptions.appointmentNo; await baseAppClient.postPatient( - prescriptions.isInOutPatient ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT_NEW, + 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)); + prescriptionReportList + .add(PrescriptionReport.fromJson(prescriptions)); + prescriptionReportEnhList + .add(PrescriptionReportEnh.fromJson(prescriptions)); }); } else { response['INP_GetPrescriptionReport_List'].forEach((prescriptions) { - prescriptionReportList.add(PrescriptionReport.fromJson(prescriptions)); + prescriptionReportList + .add(PrescriptionReport.fromJson(prescriptions)); }); } }, onFailure: (String error, int statusCode) { @@ -94,7 +106,8 @@ class PrescriptionsService extends BaseService { }, body: _requestPrescriptionReport.toJson()); } - RequestGetListPharmacyForPrescriptions requestGetListPharmacyForPrescriptions = + RequestGetListPharmacyForPrescriptions + requestGetListPharmacyForPrescriptions = RequestGetListPharmacyForPrescriptions( latitude: 0, longitude: 0, @@ -102,13 +115,16 @@ class PrescriptionsService extends BaseService { ); List pharmacyPrescriptionsList = List(); - Future getListPharmacyForPrescriptions({int itemId, @required PatiantInformtion patient}) async { + 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) { + await baseAppClient.postPatient(GET_PHARMACY_LIST, patient: patient, + onSuccess: (dynamic response, int statusCode) { pharmacyPrescriptionsList.clear(); response['PharmList'].forEach((prescriptions) { - pharmacyPrescriptionsList.add(PharmacyPrescriptions.fromJson(prescriptions)); + pharmacyPrescriptionsList + .add(PharmacyPrescriptions.fromJson(prescriptions)); }); }, onFailure: (String error, int statusCode) { hasError = true; @@ -116,13 +132,16 @@ class PrescriptionsService extends BaseService { }, body: requestGetListPharmacyForPrescriptions.toJson()); } - RequestPrescriptionReportEnh _requestPrescriptionReportEnh = RequestPrescriptionReportEnh( + RequestPrescriptionReportEnh _requestPrescriptionReportEnh = + RequestPrescriptionReportEnh( isDentalAllowedBackend: false, ); List prescriptionReportEnhList = List(); - Future getPrescriptionReportEnh({PrescriptionsOrder prescriptionsOrder, @required PatiantInformtion patient}) async { + 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) { @@ -137,7 +156,8 @@ class PrescriptionsService extends BaseService { isInPatient = element.isInOutPatient; } } else { - if (int.parse(prescriptionsOrder.appointmentNo) == element.appointmentNo) { + if (int.parse(prescriptionsOrder.appointmentNo) == + element.appointmentNo) { _requestPrescriptionReportEnh.appointmentNo = element.appointmentNo; _requestPrescriptionReportEnh.clinicID = element.clinicID; _requestPrescriptionReportEnh.projectID = element.projectID; @@ -153,17 +173,20 @@ class PrescriptionsService extends BaseService { hasError = false; - await baseAppClient.postPatient(isInPatient ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT_NEW, + 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)); + prescriptionReportEnhList + .add(PrescriptionReportEnh.fromJson(prescriptions)); }); } else { response['INP_GetPrescriptionReport_List'].forEach((prescriptions) { - PrescriptionReportEnh reportEnh = PrescriptionReportEnh.fromJson(prescriptions); + PrescriptionReportEnh reportEnh = + PrescriptionReportEnh.fromJson(prescriptions); reportEnh.itemDescription = prescriptions['ItemDescriptionN']; prescriptionReportEnhList.add(reportEnh); }); @@ -177,10 +200,13 @@ class PrescriptionsService extends BaseService { Future getPrescriptionsOrders() async { Map body = Map(); body['isDentalAllowedBackend'] = false; - await baseAppClient.post(GET_PRESCRIPTIONS_ALL_ORDERS, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(GET_PRESCRIPTIONS_ALL_ORDERS, + onSuccess: (dynamic response, int statusCode) { prescriptionsOrderList.clear(); - response['PatientER_GetPatientAllPresOrdersList'].forEach((prescriptionsOrder) { - prescriptionsOrderList.add(PrescriptionsOrder.fromJson(prescriptionsOrder)); + response['PatientER_GetPatientAllPresOrdersList'] + .forEach((prescriptionsOrder) { + prescriptionsOrderList + .add(PrescriptionsOrder.fromJson(prescriptionsOrder)); }); }, onFailure: (String error, int statusCode) { hasError = true; @@ -190,17 +216,19 @@ class PrescriptionsService extends BaseService { Future getMedicationForInPatient(PatiantInformtion patient) async { hasError = false; - _getMedicationForInPatientRequestModel = GetMedicationForInPatientRequestModel( + _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) { + 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)); + medicationForInPatient + .add(GetMedicationForInPatientModel.fromJson(prescriptions)); }); }, onFailure: (String error, int statusCode) { hasError = true; 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 ef30198a..be674540 100644 --- a/lib/core/service/patient_medical_file/procedure/procedure_service.dart +++ b/lib/core/service/patient_medical_file/procedure/procedure_service.dart @@ -14,10 +14,13 @@ import 'package:doctor_app_flutter/core/service/base/base_service.dart'; class ProcedureService extends BaseService { List _procedureList = List(); + List get procedureList => _procedureList; List _valadteProcedureList = List(); + List get valadteProcedureList => _valadteProcedureList; List _categoriesList = List(); + List get categoriesList => _categoriesList; List procedureslist = List(); List categoryList = []; @@ -27,12 +30,17 @@ class ProcedureService extends BaseService { List templateList = List(); List _templateDetailsList = List(); - List get templateDetailsList => _templateDetailsList; - GetOrderedProcedureRequestModel _getOrderedProcedureRequestModel = GetOrderedProcedureRequestModel(); + List get templateDetailsList => + _templateDetailsList; - ProcedureTempleteRequestModel _procedureTempleteRequestModel = ProcedureTempleteRequestModel(); - ProcedureTempleteDetailsRequestModel _procedureTempleteDetailsRequestModel = ProcedureTempleteDetailsRequestModel(); + GetOrderedProcedureRequestModel _getOrderedProcedureRequestModel = + GetOrderedProcedureRequestModel(); + + ProcedureTempleteRequestModel _procedureTempleteRequestModel = + ProcedureTempleteRequestModel(); + ProcedureTempleteDetailsRequestModel _procedureTempleteDetailsRequestModel = + ProcedureTempleteDetailsRequestModel(); GetProcedureReqModel _getProcedureReqModel = GetProcedureReqModel( // clinicId: 17, @@ -58,7 +66,8 @@ class ProcedureService extends BaseService { //search: ["DENTAL"], ); - Future getProcedureTemplate({int doctorId, int projectId, int clinicId, String categoryID}) async { + Future getProcedureTemplate( + {int doctorId, int projectId, int clinicId, String categoryID}) async { _procedureTempleteRequestModel = ProcedureTempleteRequestModel( // tokenID: "@dm!n", patientID: 0, @@ -70,7 +79,8 @@ class ProcedureService extends BaseService { onSuccess: (dynamic response, int statusCode) { templateList.clear(); response['DAPP_TemplateGetList'].forEach((template) { - ProcedureTempleteDetailsModel templateElement = ProcedureTempleteDetailsModel.fromJson(template); + ProcedureTempleteDetailsModel templateElement = + ProcedureTempleteDetailsModel.fromJson(template); if (categoryID != null) { if (categoryID == templateElement.categoryID) { templateList.add(templateElement); @@ -88,17 +98,21 @@ class ProcedureService extends BaseService { }, body: _procedureTempleteRequestModel.toJson()); } - Future getProcedureTemplateDetails({int doctorId, int projectId, int clinicId, int templateId}) async { + Future getProcedureTemplateDetails( + {int doctorId, int projectId, int clinicId, int templateId}) async { _procedureTempleteDetailsRequestModel = - ProcedureTempleteDetailsRequestModel(templateID: templateId, searchType: 1, patientID: 0); + ProcedureTempleteDetailsRequestModel( + templateID: templateId, searchType: 1, patientID: 0); hasError = false; //insuranceApprovalInPatient.clear(); _templateDetailsList.clear(); - await baseAppClient.post(GET_PROCEDURE_TEMPLETE_DETAILS, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(GET_PROCEDURE_TEMPLETE_DETAILS, + onSuccess: (dynamic response, int statusCode) { //prescriptionsList.clear(); response['HIS_ProcedureTemplateDetailsList'].forEach((template) { - _templateDetailsList.add(ProcedureTempleteDetailsModel.fromJson(template)); + _templateDetailsList + .add(ProcedureTempleteDetailsModel.fromJson(template)); }); }, onFailure: (String error, int statusCode) { hasError = true; @@ -112,8 +126,10 @@ class ProcedureService extends BaseService { ); hasError = false; _procedureList.clear(); - await baseAppClient.post(GET_PROCEDURE_LIST, onSuccess: (dynamic response, int statusCode) { - _procedureList.add(GetOrderedProcedureModel.fromJson(response['OrderedProcedureList'])); + await baseAppClient.post(GET_PROCEDURE_LIST, + onSuccess: (dynamic response, int statusCode) { + _procedureList.add( + GetOrderedProcedureModel.fromJson(response['OrderedProcedureList'])); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; @@ -123,7 +139,8 @@ class ProcedureService extends BaseService { Future getCategory() async { hasError = false; - await baseAppClient.post(GET_LIST_CATEGORISE, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(GET_LIST_CATEGORISE, + onSuccess: (dynamic response, int statusCode) { categoryList = []; categoryList = response['listProcedureCategories']['entityList']; }, onFailure: (String error, int statusCode) { @@ -132,7 +149,8 @@ class ProcedureService extends BaseService { }, body: Map()); } - Future getProcedureCategory({String categoryName, String categoryID, patientId}) async { + Future getProcedureCategory( + {String categoryName, String categoryID, patientId}) async { _getProcedureCategoriseReqModel = GetProcedureReqModel( search: ["$categoryName"], patientMRN: patientId, @@ -143,8 +161,10 @@ class ProcedureService extends BaseService { ); hasError = false; _categoriesList.clear(); - await baseAppClient.post(GET_CATEGORISE_PROCEDURE, onSuccess: (dynamic response, int statusCode) { - _categoriesList.add(CategoriseProcedureModel.fromJson(response['ProcedureList'])); + await baseAppClient.post(GET_CATEGORISE_PROCEDURE, + onSuccess: (dynamic response, int statusCode) { + _categoriesList + .add(CategoriseProcedureModel.fromJson(response['ProcedureList'])); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; @@ -154,7 +174,8 @@ class ProcedureService extends BaseService { Future postProcedure(PostProcedureReqModel postProcedureReqModel) async { hasError = false; _procedureList.clear(); - await baseAppClient.post(POST_PROCEDURE_LIST, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(POST_PROCEDURE_LIST, + onSuccess: (dynamic response, int statusCode) { print("Success"); }, onFailure: (String error, int statusCode) { hasError = true; @@ -162,10 +183,12 @@ class ProcedureService extends BaseService { }, body: postProcedureReqModel.toJson()); } - Future updateProcedure(UpdateProcedureRequestModel updateProcedureRequestModel) async { + Future updateProcedure( + UpdateProcedureRequestModel updateProcedureRequestModel) async { hasError = false; _procedureList.clear(); - await baseAppClient.post(UPDATE_PROCEDURE, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(UPDATE_PROCEDURE, + onSuccess: (dynamic response, int statusCode) { print("ACCEPTED"); }, onFailure: (String error, int statusCode) { hasError = true; @@ -173,11 +196,14 @@ class ProcedureService extends BaseService { }, body: updateProcedureRequestModel.toJson()); } - Future valadteProcedure(ProcedureValadteRequestModel procedureValadteRequestModel) async { + Future valadteProcedure( + ProcedureValadteRequestModel procedureValadteRequestModel) async { hasError = false; _valadteProcedureList.clear(); - await baseAppClient.post(GET_PROCEDURE_VALIDATION, onSuccess: (dynamic response, int statusCode) { - _valadteProcedureList.add(ProcedureValadteModel.fromJson(response['ValidateProcedureList'])); + await baseAppClient.post(GET_PROCEDURE_VALIDATION, + onSuccess: (dynamic response, int statusCode) { + _valadteProcedureList.add( + ProcedureValadteModel.fromJson(response['ValidateProcedureList'])); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; 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 f10f2253..4a77fc31 100644 --- a/lib/core/service/patient_medical_file/radiology/radiology_service.dart +++ b/lib/core/service/patient_medical_file/radiology/radiology_service.dart @@ -9,14 +9,19 @@ class RadiologyService extends BaseService { List finalRadiologyList = List(); String url = ''; - Future getRadImageURL({int invoiceNo, int lineItem, int projectId, @required PatiantInformtion patient}) async { + Future getRadImageURL( + {int invoiceNo, + int lineItem, + int projectId, + @required PatiantInformtion patient}) async { hasError = false; final Map body = new Map(); body['InvoiceNo'] = invoiceNo; body['LineItemNo'] = lineItem; body['ProjectID'] = projectId; - await baseAppClient.postPatient(GET_RAD_IMAGE_URL, patient: patient, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.postPatient(GET_RAD_IMAGE_URL, patient: patient, + onSuccess: (dynamic response, int statusCode) { url = response['Data']; }, onFailure: (String error, int statusCode) { hasError = true; @@ -24,7 +29,8 @@ class RadiologyService extends BaseService { }, body: body); } - Future getPatientRadOrders(PatiantInformtion patient, {isInPatient = false}) async { + Future getPatientRadOrders(PatiantInformtion patient, + {isInPatient = false}) async { String url = GET_PATIENT_ORDERS; final Map body = new Map(); if (isInPatient) { @@ -33,7 +39,8 @@ class RadiologyService extends BaseService { } finalRadiologyList.clear(); hasError = false; - await baseAppClient.postPatient(url, patient: patient, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.postPatient(url, patient: patient, + onSuccess: (dynamic response, int statusCode) { finalRadiologyList = []; String label = "ListRAD"; if (isInPatient) { 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 6e107f97..9eb0777c 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 @@ -12,27 +12,33 @@ import 'package:doctor_app_flutter/models/sickleave/sick_leave_statisitics_model class SickLeaveService extends BaseService { SickLeaveStatisticsModel get sickLeavestatisitics => _statistics; SickLeaveStatisticsModel _statistics = SickLeaveStatisticsModel(); + List get getOffTimeList => offTime; List offTime = []; + List get getReasons => reasonse; List reasonse = []; + List get getAllSickLeave => _getAllsickLeave; List _getAllsickLeave = List(); List get coveringDoctorsList => _coveringDoctors; List _coveringDoctors = []; - List get getAllRescheduleLeave => _getReScheduleLeave; + List get getAllRescheduleLeave => + _getReScheduleLeave; List _getReScheduleLeave = []; + dynamic get postReschedule => _postReschedule; dynamic _postReschedule; - List getAllSickLeavePatient = List(); List getAllSickLeaveDoctor = List(); - SickLeavePatientRequestModel _sickLeavePatientRequestModel = SickLeavePatientRequestModel(); - GetSickLeaveDoctorRequestModel _sickLeaveDoctorRequestModel = GetSickLeaveDoctorRequestModel(); + SickLeavePatientRequestModel _sickLeavePatientRequestModel = + SickLeavePatientRequestModel(); + GetSickLeaveDoctorRequestModel _sickLeaveDoctorRequestModel = + GetSickLeaveDoctorRequestModel(); Future getStatistics(appoNo, patientMRN) async { hasError = false; @@ -41,7 +47,8 @@ class SickLeaveService extends BaseService { onSuccess: (dynamic response, int statusCode) { print(response); - _statistics = SickLeaveStatisticsModel.fromJson(response['SickLeaveStatistics']); + _statistics = + SickLeaveStatisticsModel.fromJson(response['SickLeaveStatistics']); }, onFailure: (String error, int statusCode) { hasError = true; @@ -55,8 +62,7 @@ class SickLeaveService extends BaseService { hasError = false; await baseAppClient.post( ADD_SICK_LEAVE, - onSuccess: (dynamic response, int statusCode) { - }, + onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { hasError = true; super.error = error; @@ -67,7 +73,8 @@ class SickLeaveService extends BaseService { Future extendSickLeave(GetAllSickLeaveResponse request) async { var extendSickLeaveRequest = ExtendSickLeaveRequest(); - extendSickLeaveRequest.patientMRN = request.patientMRN.toString(); //'3120746'; + extendSickLeaveRequest.patientMRN = + request.patientMRN.toString(); //'3120746'; extendSickLeaveRequest.previousRequestNo = request.requestNo.toString(); extendSickLeaveRequest.noOfDays = request.noOfDays.toString(); extendSickLeaveRequest.remarks = request.remarks; @@ -106,8 +113,8 @@ class SickLeaveService extends BaseService { } Future getSickLeavePatient(patientMRN) async { - _sickLeavePatientRequestModel = - SickLeavePatientRequestModel(patientID: patientMRN, patientTypeID: 2, patientType: 1); + _sickLeavePatientRequestModel = SickLeavePatientRequestModel( + patientID: patientMRN, patientTypeID: 2, patientType: 1); hasError = false; getAllSickLeavePatient = []; getAllSickLeavePatient.clear(); @@ -129,7 +136,8 @@ class SickLeaveService extends BaseService { } Future getSickLeaveDoctor(patientMRN) async { - _sickLeaveDoctorRequestModel = GetSickLeaveDoctorRequestModel(patientMRN: patientMRN); + _sickLeaveDoctorRequestModel = + GetSickLeaveDoctorRequestModel(patientMRN: patientMRN); hasError = false; getAllSickLeaveDoctor = []; getAllSickLeaveDoctor.clear(); 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 ec127f8b..aedf5683 100644 --- a/lib/core/service/patient_medical_file/soap/SOAP_service.dart +++ b/lib/core/service/patient_medical_file/soap/SOAP_service.dart @@ -35,6 +35,7 @@ class SOAPService extends LookupService { List patientAssessmentList = []; int episodeID; + Future getAllergies(GetAllergiesRequestModel getAllergiesRequestModel) async { await baseAppClient.post( GET_ALLERGIES, @@ -65,7 +66,9 @@ class SOAPService extends LookupService { }, body: postEpisodeReqModel.toJson()); } - Future postEpisodeForInPatient(PostEpisodeForInpatientRequestModel postEpisodeForInpatientRequestModel) async { + Future postEpisodeForInPatient( + PostEpisodeForInpatientRequestModel + postEpisodeForInpatientRequestModel) async { hasError = false; await baseAppClient.post(POST_EPISODE_FOR_IN_PATIENT, @@ -85,7 +88,7 @@ class SOAPService extends LookupService { print("Success"); }, onFailure: (String error, int statusCode) { hasError = true; - super.error = super.error+ "\n"+error; + super.error = super.error + "\n" + error; }, body: postAllergyRequestModel.toJson()); } @@ -97,14 +100,14 @@ class SOAPService extends LookupService { print("Success"); }, onFailure: (String error, int statusCode) { hasError = true; - super.error =super.error + "\n"+error; + super.error = super.error + "\n" + error; }, body: postHistoriesRequestModel.toJson()); } Future postChiefComplaint( PostChiefComplaintRequestModel postChiefComplaintRequestModel) async { hasError = false; - super.error =""; + super.error = ""; await baseAppClient.post(POST_CHIEF_COMPLAINT, onSuccess: (dynamic response, int statusCode) { print("Success"); @@ -158,7 +161,7 @@ class SOAPService extends LookupService { print("Success"); }, onFailure: (String error, int statusCode) { hasError = true; - super.error = "\n"+error; + super.error = "\n" + error; }, body: patchAllergyRequestModel.toJson()); } @@ -170,14 +173,14 @@ class SOAPService extends LookupService { print("Success"); }, onFailure: (String error, int statusCode) { hasError = true; - super.error = super.error +"\n"+error; + super.error = super.error + "\n" + error; }, body: patchHistoriesRequestModel.toJson()); } Future patchChiefComplaint( PostChiefComplaintRequestModel patchChiefComplaintRequestModel) async { hasError = false; - super.error =""; + super.error = ""; await baseAppClient.post(PATCH_CHIEF_COMPLAINT, onSuccess: (dynamic response, int statusCode) { print("Success"); @@ -327,7 +330,6 @@ class SOAPService extends LookupService { print("Success"); episodeID = response["GetEpisodeNo"]; - }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; 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 1c07aa48..af6c46b4 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 @@ -54,14 +54,14 @@ class VitalSignsService extends BaseService { body['ProjectID'] = patient.projectId; } await baseAppClient.post( - GET_PATIENT_VITAL_SIGN, + GET_PATIENT_VITAL_SIGN, onSuccess: (dynamic response, int statusCode) { patientVitalSignsHistory.clear(); - if (response['List_DoctorPatientVitalSign'] != null) { - response['List_DoctorPatientVitalSign'].forEach((v) { - patientVitalSignsHistory.add(new VitalSignHistory.fromJson(v)); - }); - } + if (response['List_DoctorPatientVitalSign'] != null) { + response['List_DoctorPatientVitalSign'].forEach((v) { + patientVitalSignsHistory.add(new VitalSignHistory.fromJson(v)); + }); + } }, onFailure: (String error, int statusCode) { hasError = true; @@ -71,7 +71,8 @@ class VitalSignsService extends BaseService { ); } - Future getOutPatientVitalSignHistory(PatiantInformtion patient, String fromDate, String toDate) async { + Future getOutPatientVitalSignHistory( + PatiantInformtion patient, String fromDate, String toDate) async { hasError = false; Map body = Map(); body['PatientID'] = patient.patientId; @@ -84,22 +85,17 @@ class VitalSignsService extends BaseService { // body['InOutPatientType'] = 2; // } - - await baseAppClient.postPatient( - GET_PATIENT_VITAL_SIGN, - onSuccess: (dynamic response, int statusCode) { - patientVitalSignsHistory.clear(); - if (response['List_DoctorPatientVitalSign'] != null) { - response['List_DoctorPatientVitalSign'].forEach((v) { - patientVitalSignsHistory.add(new VitalSignHistory.fromJson(v)); - });} - }, - onFailure: (String error, int statusCode) { - hasError = true; - super.error = error.toString(); - }, - body: body, - patient: patient - ); + await baseAppClient.postPatient(GET_PATIENT_VITAL_SIGN, + onSuccess: (dynamic response, int statusCode) { + patientVitalSignsHistory.clear(); + if (response['List_DoctorPatientVitalSign'] != null) { + response['List_DoctorPatientVitalSign'].forEach((v) { + patientVitalSignsHistory.add(new VitalSignHistory.fromJson(v)); + }); + } + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error.toString(); + }, body: body, patient: patient); } } diff --git a/lib/core/service/pending_order_service.dart b/lib/core/service/pending_order_service.dart index e6f35bb8..ddc21269 100644 --- a/lib/core/service/pending_order_service.dart +++ b/lib/core/service/pending_order_service.dart @@ -7,9 +7,11 @@ import 'package:doctor_app_flutter/models/pending_orders/pending_orders_model.da class PendingOrderService extends BaseService { List _pendingOrderList = List(); + List get pendingOrderList => _pendingOrderList; List _admissionOrderList = List(); + List get admissionOrderList => _admissionOrderList; Future getPendingOrders( diff --git a/lib/core/service/special_clinics/special_clinic_service.dart b/lib/core/service/special_clinics/special_clinic_service.dart index 4b84b9f3..b6fdd1ed 100644 --- a/lib/core/service/special_clinics/special_clinic_service.dart +++ b/lib/core/service/special_clinics/special_clinic_service.dart @@ -4,53 +4,52 @@ import 'package:doctor_app_flutter/models/dashboard/get_special_clinical_care_Li import 'package:doctor_app_flutter/models/dashboard/get_special_clinical_care_mapping_List_Respose_Model.dart'; class SpecialClinicsService extends BaseService { + List _specialClinicalCareList = []; + List get specialClinicalCareList => + _specialClinicalCareList; - List _specialClinicalCareList = []; - List get specialClinicalCareList => _specialClinicalCareList; + List + _specialClinicalCareMappingList = []; + + List + get specialClinicalCareMappingList => _specialClinicalCareMappingList; - List _specialClinicalCareMappingList = []; - List get specialClinicalCareMappingList => _specialClinicalCareMappingList; Future getSpecialClinicalCareList() async { hasError = false; await baseAppClient.post( GET_SPECIAL_CLINICAL_CARE_LIST, onSuccess: (dynamic response, int statusCode) { - _specialClinicalCareList.clear(); response['List_SpecialClinicalCareList'].forEach((v) { - _specialClinicalCareList.add(GetSpecialClinicalCareListResponseModel.fromJson(v)); - });}, + _specialClinicalCareList + .add(GetSpecialClinicalCareListResponseModel.fromJson(v)); + }); + }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; }, - body: { - }, + body: {}, ); } - Future getSpecialClinicalCareMappingList(int clinicId) async { hasError = false; await baseAppClient.post( GET_SPECIAL_CLINICAL_CARE_MAPPING_LIST, onSuccess: (dynamic response, int statusCode) { - _specialClinicalCareMappingList.clear(); response['List_SpecialClinicalCareMappingList'].forEach((v) { - _specialClinicalCareMappingList.add(GetSpecialClinicalCareMappingListResponseModel.fromJson(v)); - });}, + _specialClinicalCareMappingList + .add(GetSpecialClinicalCareMappingListResponseModel.fromJson(v)); + }); + }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; }, - body: { - "ClinicID": clinicId, - "DoctorID":0, - "EditedBy":0 - }, + body: {"ClinicID": clinicId, "DoctorID": 0, "EditedBy": 0}, ); } - } diff --git a/lib/core/viewModel/InsuranceViewModel.dart b/lib/core/viewModel/InsuranceViewModel.dart index 46f48d35..f7aea34f 100644 --- a/lib/core/viewModel/InsuranceViewModel.dart +++ b/lib/core/viewModel/InsuranceViewModel.dart @@ -12,6 +12,7 @@ class InsuranceViewModel extends BaseViewModel { List get insuranceApproval => _insuranceCardService.insuranceApproval; + List get insuranceApprovalInPatient => _insuranceCardService.insuranceApprovalInPatient; diff --git a/lib/core/viewModel/LiveCarePatientViewModel.dart b/lib/core/viewModel/LiveCarePatientViewModel.dart index 53feedd1..6ffa036e 100644 --- a/lib/core/viewModel/LiveCarePatientViewModel.dart +++ b/lib/core/viewModel/LiveCarePatientViewModel.dart @@ -16,11 +16,13 @@ import '../../locator.dart'; class LiveCarePatientViewModel extends BaseViewModel { List filterData = []; - LiveCarePatientServices _liveCarePatientServices = locator(); + LiveCarePatientServices _liveCarePatientServices = + locator(); StartCallRes get startCallRes => _liveCarePatientServices.startCallRes; - List get alternativeServicesList => _liveCarePatientServices.alternativeServicesList; + List get alternativeServicesList => + _liveCarePatientServices.alternativeServicesList; DashboardService _dashboardService = locator(); @@ -31,9 +33,12 @@ class LiveCarePatientViewModel extends BaseViewModel { setState(ViewState.BusyLocal); } - PendingPatientERForDoctorAppRequestModel pendingPatientERForDoctorAppRequestModel = - PendingPatientERForDoctorAppRequestModel(sErServiceID: _dashboardService.sServiceID, outSA: false); - await _liveCarePatientServices.getPendingPatientERForDoctorApp(pendingPatientERForDoctorAppRequestModel); + PendingPatientERForDoctorAppRequestModel + pendingPatientERForDoctorAppRequestModel = + PendingPatientERForDoctorAppRequestModel( + sErServiceID: _dashboardService.sServiceID, outSA: false); + await _liveCarePatientServices.getPendingPatientERForDoctorApp( + pendingPatientERForDoctorAppRequestModel); if (_liveCarePatientServices.hasError) { error = _liveCarePatientServices.error; @@ -165,11 +170,16 @@ class LiveCarePatientViewModel extends BaseViewModel { if (strExist) { filterData = []; for (var i = 0; i < _liveCarePatientServices.patientList.length; i++) { - String fullName = _liveCarePatientServices.patientList[i].fullName.toUpperCase(); - String patientID = _liveCarePatientServices.patientList[i].patientId.toString(); - String mobile = _liveCarePatientServices.patientList[i].mobileNumber.toUpperCase(); - - if (fullName.contains(str.toUpperCase()) || patientID.contains(str) || mobile.contains(str)) { + String fullName = + _liveCarePatientServices.patientList[i].fullName.toUpperCase(); + String patientID = + _liveCarePatientServices.patientList[i].patientId.toString(); + String mobile = + _liveCarePatientServices.patientList[i].mobileNumber.toUpperCase(); + + if (fullName.contains(str.toUpperCase()) || + patientID.contains(str) || + mobile.contains(str)) { filterData.add(_liveCarePatientServices.patientList[i]); } } @@ -183,13 +193,16 @@ class LiveCarePatientViewModel extends BaseViewModel { Future isLogin(int loginStatus) async { await getDoctorProfile(isGetProfile: true); - LiveCareUserLoginRequestModel userLoginRequestModel = new LiveCareUserLoginRequestModel(); - userLoginRequestModel.isOutKsa = (doctorProfile.projectID == 2 || doctorProfile.projectID == 3) ? 1 : 0; + LiveCareUserLoginRequestModel userLoginRequestModel = + new LiveCareUserLoginRequestModel(); + userLoginRequestModel.isOutKsa = + (doctorProfile.projectID == 2 || doctorProfile.projectID == 3) ? 1 : 0; userLoginRequestModel.isLogin = loginStatus; userLoginRequestModel.generalid = "Cs2020@2016\$2958"; setState(ViewState.BusyLocal); - await _liveCarePatientServices.isLogin(loginStatus: loginStatus, isLoginRequestModel: userLoginRequestModel); + await _liveCarePatientServices.isLogin( + loginStatus: loginStatus, isLoginRequestModel: userLoginRequestModel); if (_liveCarePatientServices.hasError) { error = _liveCarePatientServices.error; setState(ViewState.ErrorLocal); @@ -207,7 +220,8 @@ class LiveCarePatientViewModel extends BaseViewModel { AlternativeService(serviceID: 2, serviceName: "LABORATORY"), ); alternativeServicesList.add( - AlternativeService(serviceID: 3, serviceName: "RADIOLOGY(ULTRASOUND) For pregnant only"), + AlternativeService( + serviceID: 3, serviceName: "RADIOLOGY(ULTRASOUND) For pregnant only"), ); alternativeServicesList.add( AlternativeService(serviceID: 4, serviceName: "VACCINATIONS"), @@ -228,7 +242,8 @@ class LiveCarePatientViewModel extends BaseViewModel { AlternativeService(serviceID: 9, serviceName: "FAMILY MEDICIN DR"), ); alternativeServicesList.add( - AlternativeService(serviceID: 10, serviceName: "FOLYS CATHETER INSERTION"), + AlternativeService( + serviceID: 10, serviceName: "FOLYS CATHETER INSERTION"), ); alternativeServicesList.add( AlternativeService(serviceID: 11, serviceName: "GASTRIC TUBE CHANGE"), diff --git a/lib/core/viewModel/PatientMedicalReportViewModel.dart b/lib/core/viewModel/PatientMedicalReportViewModel.dart index e7d343b4..7392cdd4 100644 --- a/lib/core/viewModel/PatientMedicalReportViewModel.dart +++ b/lib/core/viewModel/PatientMedicalReportViewModel.dart @@ -12,7 +12,8 @@ class PatientMedicalReportViewModel extends BaseViewModel { List get medicalReportList => _service.medicalReportList; - List get medicalReportTemplate => _service.medicalReportTemplate; + List get medicalReportTemplate => + _service.medicalReportTemplate; Future getMedicalReportList(PatiantInformtion patient) async { setState(ViewState.Busy); @@ -44,7 +45,8 @@ class PatientMedicalReportViewModel extends BaseViewModel { setState(ViewState.Idle); } - Future verifyMedicalReport(PatiantInformtion patient, MedicalReportModel medicalReport) async { + Future verifyMedicalReport( + PatiantInformtion patient, MedicalReportModel medicalReport) async { setState(ViewState.Busy); await _service.verifyMedicalReport(patient, medicalReport); if (_service.hasError) { @@ -62,22 +64,24 @@ class PatientMedicalReportViewModel extends BaseViewModel { error = _service.error; await getMedicalReportList(patient); setState(ViewState.ErrorLocal); - } else - { await getMedicalReportList(patient); - setState(ViewState.Idle); - } + } else { + await getMedicalReportList(patient); + setState(ViewState.Idle); + } } - Future updateMedicalReport(PatiantInformtion patient, String htmlText, int limitNumber, String invoiceNumber) async { + Future updateMedicalReport(PatiantInformtion patient, String htmlText, + int limitNumber, String invoiceNumber) async { setState(ViewState.Busy); - await _service.updateMedicalReport(patient, htmlText, limitNumber, invoiceNumber); + await _service.updateMedicalReport( + patient, htmlText, limitNumber, invoiceNumber); if (_service.hasError) { error = _service.error; await getMedicalReportList(patient); setState(ViewState.ErrorLocal); - } else - { - await getMedicalReportList(patient); - setState(ViewState.Idle);} + } else { + await getMedicalReportList(patient); + setState(ViewState.Idle); + } } } diff --git a/lib/core/viewModel/PatientRegistrationViewModel.dart b/lib/core/viewModel/PatientRegistrationViewModel.dart index 866f99a8..2de57dfc 100644 --- a/lib/core/viewModel/PatientRegistrationViewModel.dart +++ b/lib/core/viewModel/PatientRegistrationViewModel.dart @@ -183,7 +183,7 @@ class PatientRegistrationViewModel extends BaseViewModel { channel: 3, // TODO Elham* loginType loginType: 4, - logInTokenID:_patientRegistrationService.logInTokenID , + logInTokenID: _patientRegistrationService.logInTokenID, nationalID: checkPatientForRegistrationModel.patientIdentificationID, patientID: 0, mobileNo: checkPatientForRegistrationModel.patientMobileNumber.toString(), diff --git a/lib/core/viewModel/SOAP_view_model.dart b/lib/core/viewModel/SOAP_view_model.dart index 126426fd..b11f3d5f 100644 --- a/lib/core/viewModel/SOAP_view_model.dart +++ b/lib/core/viewModel/SOAP_view_model.dart @@ -298,7 +298,6 @@ class SOAPViewModel extends BaseViewModel { return allergiesString; } - Future getPatientPhysicalExam( PatiantInformtion patientInfo, ) async { @@ -777,13 +776,14 @@ class SOAPViewModel extends BaseViewModel { } if (myAllergiesList.length != 0) { - PostAllergyRequestModel postAllergyRequestModel =createPostAllergyRequestModel (myAllergiesList:myAllergiesList, patientInfo: patientInfo); + PostAllergyRequestModel postAllergyRequestModel = + createPostAllergyRequestModel( + myAllergiesList: myAllergiesList, patientInfo: patientInfo); if (patientAllergiesList.isEmpty) { services.add(_SOAPService.postAllergy(postAllergyRequestModel)); } else { services.add(_SOAPService.patchAllergy(postAllergyRequestModel)); } - } final results = await Future.wait(services); @@ -837,10 +837,10 @@ class SOAPViewModel extends BaseViewModel { return postHistoriesRequestModel; } - - PostAllergyRequestModel createPostAllergyRequestModel({myAllergiesList, patientInfo}){ + PostAllergyRequestModel createPostAllergyRequestModel( + {myAllergiesList, patientInfo}) { PostAllergyRequestModel postAllergyRequestModel = - new PostAllergyRequestModel(); + new PostAllergyRequestModel(); myAllergiesList.forEach((allergy) { if (postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM == null) @@ -862,7 +862,6 @@ class SOAPViewModel extends BaseViewModel { isUpdatedByNurse: false)); }); - return postAllergyRequestModel; } } diff --git a/lib/core/viewModel/authentication_view_model.dart b/lib/core/viewModel/authentication_view_model.dart index c56300d5..b0f93602 100644 --- a/lib/core/viewModel/authentication_view_model.dart +++ b/lib/core/viewModel/authentication_view_model.dart @@ -41,39 +41,40 @@ class AuthenticationViewModel extends BaseViewModel { NewLoginInformationModel get loginInfo => _authService.loginInfo; - List get doctorProfilesList => _authService.doctorProfilesList; + List get doctorProfilesList => + _authService.doctorProfilesList; SendActivationCodeForDoctorAppResponseModel - get activationCodeVerificationScreenRes => - _authService.activationCodeVerificationScreenRes; + get activationCodeVerificationScreenRes => + _authService.activationCodeVerificationScreenRes; SendActivationCodeForDoctorAppResponseModel - get activationCodeForDoctorAppRes => - _authService.activationCodeForDoctorAppRes; + get activationCodeForDoctorAppRes => + _authService.activationCodeForDoctorAppRes; CheckActivationCodeForDoctorAppResponseModel - get checkActivationCodeForDoctorAppRes => - _authService.checkActivationCodeForDoctorAppRes; + get checkActivationCodeForDoctorAppRes => + _authService.checkActivationCodeForDoctorAppRes; NewLoginInformationModel loggedUser; GetIMEIDetailsModel user; UserModel userInfo = UserModel(); final LocalAuthentication auth = LocalAuthentication(); - List _availableBiometrics; + List _availableBiometrics; final FirebaseMessaging _firebaseMessaging = FirebaseMessaging.instance; bool isLogin = false; bool unverified = false; bool isFromLogin = false; APP_STATUS appStatus = APP_STATUS.LOADING; - String localToken =""; + String localToken = ""; + AuthenticationViewModel({bool checkDeviceInfo = false}) { getDeviceInfoFromFirebase(); getDoctorProfile(); } - /// Insert Device IMEI Future insertDeviceImei(token) async { var loggedIn = await sharedPref.getObj(LOGGED_IN_USER); @@ -88,20 +89,28 @@ class AuthenticationViewModel extends BaseViewModel { profileInfo['LogInTypeID'] = await sharedPref.getInt(OTP_TYPE); profileInfo['BioMetricEnabled'] = true; profileInfo['MobileNo'] = - loggedIn != null ? loggedIn['MobileNumber'] : user.mobile; - InsertIMEIDetailsModel insertIMEIDetailsModel = InsertIMEIDetailsModel.fromJson(profileInfo); - insertIMEIDetailsModel.genderDescription = profileInfo['Gender_Description']; - insertIMEIDetailsModel.genderDescriptionN = profileInfo['Gender_DescriptionN']; - insertIMEIDetailsModel.genderDescriptionN = profileInfo['Gender_DescriptionN']; + loggedIn != null ? loggedIn['MobileNumber'] : user.mobile; + InsertIMEIDetailsModel insertIMEIDetailsModel = + InsertIMEIDetailsModel.fromJson(profileInfo); + insertIMEIDetailsModel.genderDescription = + profileInfo['Gender_Description']; + insertIMEIDetailsModel.genderDescriptionN = + profileInfo['Gender_DescriptionN']; + insertIMEIDetailsModel.genderDescriptionN = + profileInfo['Gender_DescriptionN']; insertIMEIDetailsModel.titleDescription = profileInfo['Title_Description']; - insertIMEIDetailsModel.titleDescriptionN = profileInfo['Title_DescriptionN']; + insertIMEIDetailsModel.titleDescriptionN = + profileInfo['Title_DescriptionN']; insertIMEIDetailsModel.projectID = await sharedPref.getInt(PROJECT_ID); insertIMEIDetailsModel.doctorID = loggedIn != null ? loggedIn['List_MemberInformation'][0]['MemberID'] : user.doctorID; - insertIMEIDetailsModel.outSA = loggedIn != null ? loggedIn['PatientOutSA'] : user.outSA; - insertIMEIDetailsModel.vidaAuthTokenID = await sharedPref.getString(VIDA_AUTH_TOKEN_ID); - insertIMEIDetailsModel.vidaRefreshTokenID =await sharedPref.getString(VIDA_REFRESH_TOKEN_ID); + insertIMEIDetailsModel.outSA = + loggedIn != null ? loggedIn['PatientOutSA'] : user.outSA; + insertIMEIDetailsModel.vidaAuthTokenID = + await sharedPref.getString(VIDA_AUTH_TOKEN_ID); + insertIMEIDetailsModel.vidaRefreshTokenID = + await sharedPref.getString(VIDA_REFRESH_TOKEN_ID); insertIMEIDetailsModel.password = userInfo.password; await _authService.insertDeviceImei(insertIMEIDetailsModel); @@ -112,7 +121,6 @@ class AuthenticationViewModel extends BaseViewModel { setState(ViewState.Idle); } - /// first step login Future login(UserModel userInfo) async { setState(ViewState.BusyLocal); @@ -131,21 +139,23 @@ class AuthenticationViewModel extends BaseViewModel { } /// send activation code for for msg methods - Future sendActivationCodeVerificationScreen( AuthMethodTypes authMethodType) async { + Future sendActivationCodeVerificationScreen( + AuthMethodTypes authMethodType) async { setState(ViewState.BusyLocal); ActivationCodeForVerificationScreenModel activationCodeModel = - ActivationCodeForVerificationScreenModel( - iMEI: user.iMEI, - facilityId: user.projectID, - memberID: user.doctorID, - loginDoctorID: int.parse(user.editedBy.toString()), - zipCode: user.outSA == true ? '971' : '966', - mobileNumber: user.mobile, - oTPSendType: authMethodType.getTypeIdService(), - isMobileFingerPrint: 1, - vidaAuthTokenID: user.vidaAuthTokenID, - vidaRefreshTokenID: user.vidaRefreshTokenID); - await _authService.sendActivationCodeVerificationScreen(activationCodeModel); + ActivationCodeForVerificationScreenModel( + iMEI: user.iMEI, + facilityId: user.projectID, + memberID: user.doctorID, + loginDoctorID: int.parse(user.editedBy.toString()), + zipCode: user.outSA == true ? '971' : '966', + mobileNumber: user.mobile, + oTPSendType: authMethodType.getTypeIdService(), + isMobileFingerPrint: 1, + vidaAuthTokenID: user.vidaAuthTokenID, + vidaRefreshTokenID: user.vidaRefreshTokenID); + await _authService + .sendActivationCodeVerificationScreen(activationCodeModel); if (_authService.hasError) { error = _authService.error; setState(ViewState.ErrorLocal); @@ -154,62 +164,72 @@ class AuthenticationViewModel extends BaseViewModel { } /// send activation code for silent login - Future sendActivationCodeForDoctorApp({AuthMethodTypes authMethodType, String password }) async { + Future sendActivationCodeForDoctorApp( + {AuthMethodTypes authMethodType, String password}) async { setState(ViewState.BusyLocal); int projectID = await sharedPref.getInt(PROJECT_ID); ActivationCodeModel activationCodeModel = ActivationCodeModel( - facilityId: projectID, - memberID: loggedUser.listMemberInformation[0].memberID, - loginDoctorID: loggedUser.listMemberInformation[0].employeeID, - otpSendType: authMethodType.getTypeIdService().toString(), - ); + facilityId: projectID, + memberID: loggedUser.listMemberInformation[0].memberID, + loginDoctorID: loggedUser.listMemberInformation[0].employeeID, + otpSendType: authMethodType.getTypeIdService().toString(), + ); await _authService.sendActivationCodeForDoctorApp(activationCodeModel); if (_authService.hasError) { error = _authService.error; setState(ViewState.ErrorLocal); } else { - await sharedPref.setString(TOKEN, - _authService.activationCodeForDoctorAppRes.logInTokenID); + await sharedPref.setString( + TOKEN, _authService.activationCodeForDoctorAppRes.logInTokenID); setState(ViewState.Idle); } } - /// check activation code for sms and whats app - Future checkActivationCodeForDoctorApp({String activationCode,bool isSilentLogin = false}) async { + Future checkActivationCodeForDoctorApp( + {String activationCode, bool isSilentLogin = false}) async { setState(ViewState.BusyLocal); CheckActivationCodeRequestModel checkActivationCodeForDoctorApp = - new CheckActivationCodeRequestModel( - zipCode: - loggedUser != null ? loggedUser.zipCode :user.zipCode, - mobileNumber: - loggedUser != null ? loggedUser.mobileNumber : user.mobile, - projectID: await sharedPref.getInt(PROJECT_ID) != null - ? await sharedPref.getInt(PROJECT_ID) - : user.projectID, - logInTokenID: await sharedPref.getString(TOKEN), - activationCode: activationCode ?? '0000', - memberID:userInfo.userID!=null? int.parse(userInfo.userID):user.doctorID , - password: userInfo.password, - facilityId:userInfo.projectID!=null? userInfo.projectID.toString():user.projectID.toString(), - oTPSendType: await sharedPref.getInt(OTP_TYPE), - iMEI: localToken, - loginDoctorID:userInfo.userID!=null? int.parse(userInfo.userID):user.editedBy,// loggedUser.listMemberInformation[0].employeeID, - isForSilentLogin:isSilentLogin, - generalid: "Cs2020@2016\$2958"); - await _authService.checkActivationCodeForDoctorApp(checkActivationCodeForDoctorApp); + new CheckActivationCodeRequestModel( + zipCode: loggedUser != null ? loggedUser.zipCode : user.zipCode, + mobileNumber: + loggedUser != null ? loggedUser.mobileNumber : user.mobile, + projectID: await sharedPref.getInt(PROJECT_ID) != null + ? await sharedPref.getInt(PROJECT_ID) + : user.projectID, + logInTokenID: await sharedPref.getString(TOKEN), + activationCode: activationCode ?? '0000', + memberID: userInfo.userID != null + ? int.parse(userInfo.userID) + : user.doctorID, + password: userInfo.password, + facilityId: userInfo.projectID != null + ? userInfo.projectID.toString() + : user.projectID.toString(), + oTPSendType: await sharedPref.getInt(OTP_TYPE), + iMEI: localToken, + loginDoctorID: userInfo.userID != null + ? int.parse(userInfo.userID) + : user.editedBy, + // loggedUser.listMemberInformation[0].employeeID, + isForSilentLogin: isSilentLogin, + generalid: "Cs2020@2016\$2958"); + await _authService + .checkActivationCodeForDoctorApp(checkActivationCodeForDoctorApp); if (_authService.hasError) { error = _authService.error; setState(ViewState.ErrorLocal); } else { - await setDataAfterSendActivationSuccess(checkActivationCodeForDoctorAppRes); + await setDataAfterSendActivationSuccess( + checkActivationCodeForDoctorAppRes); setState(ViewState.Idle); } } /// get list of Hospitals Future getHospitalsList(memberID) async { - GetHospitalsRequestModel getHospitalsRequestModel =GetHospitalsRequestModel(); + GetHospitalsRequestModel getHospitalsRequestModel = + GetHospitalsRequestModel(); getHospitalsRequestModel.memberID = memberID; await _hospitalsService.getHospitals(getHospitalsRequestModel); if (_hospitalsService.hasError) { @@ -219,24 +239,17 @@ class AuthenticationViewModel extends BaseViewModel { setState(ViewState.Idle); } - /// get type name based on id. getType(type, context) { switch (type) { case 1: - return TranslationBase - .of(context) - .verifySMS; + return TranslationBase.of(context).verifySMS; break; case 3: - return TranslationBase - .of(context) - .verifyFingerprint; + return TranslationBase.of(context).verifyFingerprint; break; case 4: - return TranslationBase - .of(context) - .verifyFaceID; + return TranslationBase.of(context).verifyFaceID; break; case 2: return TranslationBase.of(context).verifyWhatsApp; @@ -248,13 +261,15 @@ class AuthenticationViewModel extends BaseViewModel { } /// add  token to shared preferences in case of send activation code is success - setDataAfterSendActivationSuccess(CheckActivationCodeForDoctorAppResponseModel sendActivationCodeForDoctorAppResponseModel)async { - // print("VerificationCode : " + sendActivationCodeForDoctorAppResponseModel.verificationCode); - await sharedPref.setString(VIDA_AUTH_TOKEN_ID, + setDataAfterSendActivationSuccess( + CheckActivationCodeForDoctorAppResponseModel + sendActivationCodeForDoctorAppResponseModel) async { + // print("VerificationCode : " + sendActivationCodeForDoctorAppResponseModel.verificationCode); + await sharedPref.setString(VIDA_AUTH_TOKEN_ID, sendActivationCodeForDoctorAppResponseModel.vidaAuthTokenID); - await sharedPref.setString(VIDA_REFRESH_TOKEN_ID, + await sharedPref.setString(VIDA_REFRESH_TOKEN_ID, sendActivationCodeForDoctorAppResponseModel.vidaRefreshTokenID); - await sharedPref.setString(TOKEN, + await sharedPref.setString(TOKEN, sendActivationCodeForDoctorAppResponseModel.authenticationTokenID); } @@ -293,7 +308,9 @@ class AuthenticationViewModel extends BaseViewModel { clinicID: clinicInfo.clinicID, license: true, projectID: clinicInfo.projectID, - languageID: 2);///TODO change the lan + languageID: 2); + + ///TODO change the lan await _authService.getDoctorProfileBasedOnClinic(docInfo); if (_authService.hasError) { error = _authService.error; @@ -307,26 +324,22 @@ class AuthenticationViewModel extends BaseViewModel { /// add some logic in case of check activation code is success onCheckActivationCodeSuccess({bool isSilentLogin = false}) async { sharedPref.setString( - TOKEN, - checkActivationCodeForDoctorAppRes.authenticationTokenID); + TOKEN, checkActivationCodeForDoctorAppRes.authenticationTokenID); if (checkActivationCodeForDoctorAppRes.listDoctorProfile != null && - checkActivationCodeForDoctorAppRes.listDoctorProfile - .isNotEmpty) { + checkActivationCodeForDoctorAppRes.listDoctorProfile.isNotEmpty) { localSetDoctorProfile( checkActivationCodeForDoctorAppRes.listDoctorProfile[0]); } else { sharedPref.setObj( - CLINIC_NAME, - checkActivationCodeForDoctorAppRes.listDoctorsClinic); + CLINIC_NAME, checkActivationCodeForDoctorAppRes.listDoctorsClinic); ClinicModel clinic = ClinicModel.fromJson( - checkActivationCodeForDoctorAppRes.listDoctorsClinic[0] - .toJson()); + checkActivationCodeForDoctorAppRes.listDoctorsClinic[0].toJson()); await getDoctorProfileBasedOnClinic(clinic); } } /// check specific biometric if it available or not - Future checkIfBiometricAvailable(BiometricType biometricType) async { + Future checkIfBiometricAvailable(BiometricType biometricType) async { bool isAvailable = false; await _getAvailableBiometrics(); if (_availableBiometrics != null) { @@ -352,7 +365,7 @@ class AuthenticationViewModel extends BaseViewModel { if (Platform.isIOS) { _firebaseMessaging.requestPermission(); } - setState(ViewState.Busy); + setState(ViewState.Busy); var token = await _firebaseMessaging.getToken(); if (localToken == "") { localToken = token; @@ -363,13 +376,12 @@ class AuthenticationViewModel extends BaseViewModel { setState(ViewState.ErrorLocal); } else { if (_authService.dashboardItemsList.length > 0) { - user =_authService.dashboardItemsList[0]; + user = _authService.dashboardItemsList[0]; sharedPref.setObj( LAST_LOGIN_USER, _authService.dashboardItemsList[0]); - await sharedPref.setString(VIDA_REFRESH_TOKEN_ID, - user.vidaRefreshTokenID); - await sharedPref.setString(VIDA_AUTH_TOKEN_ID, - user.vidaAuthTokenID); + await sharedPref.setString( + VIDA_REFRESH_TOKEN_ID, user.vidaRefreshTokenID); + await sharedPref.setString(VIDA_AUTH_TOKEN_ID, user.vidaAuthTokenID); this.unverified = true; } setState(ViewState.Idle); @@ -384,9 +396,9 @@ class AuthenticationViewModel extends BaseViewModel { if (state == ViewState.Busy) { appStatus = APP_STATUS.LOADING; } else { - if(this.doctorProfile !=null) + if (this.doctorProfile != null) appStatus = APP_STATUS.AUTHENTICATED; - else if (this.unverified) { + else if (this.unverified) { appStatus = APP_STATUS.UNVERIFIED; } else if (this.isLogin) { appStatus = APP_STATUS.AUTHENTICATED; @@ -396,12 +408,13 @@ class AuthenticationViewModel extends BaseViewModel { } return appStatus; } - setAppStatus(APP_STATUS status){ + + setAppStatus(APP_STATUS status) { this.appStatus = status; notifyListeners(); } - setUnverified(bool unverified,{bool isFromLogin = false}){ + setUnverified(bool unverified, {bool isFromLogin = false}) { this.unverified = unverified; this.isFromLogin = isFromLogin; notifyListeners(); @@ -409,24 +422,21 @@ class AuthenticationViewModel extends BaseViewModel { /// logout function logout({bool isFromLogin = false}) async { - - localToken = ""; - String lang = await sharedPref.getString(APP_Language); - await Helpers.clearSharedPref(); - doctorProfile = null; - sharedPref.setString(APP_Language, lang); - deleteUser(); - await getDeviceInfoFromFirebase(); - this.isFromLogin = isFromLogin; - appStatus = APP_STATUS.UNAUTHENTICATED; - setState(ViewState.Idle); + String lang = await sharedPref.getString(APP_Language); + await Helpers.clearSharedPref(); + doctorProfile = null; + sharedPref.setString(APP_Language, lang); + deleteUser(); + await getDeviceInfoFromFirebase(); + this.isFromLogin = isFromLogin; + appStatus = APP_STATUS.UNAUTHENTICATED; + setState(ViewState.Idle); } - deleteUser(){ + deleteUser() { user = null; unverified = false; isLogin = false; } - } diff --git a/lib/core/viewModel/base_view_model.dart b/lib/core/viewModel/base_view_model.dart index 10ee6e1a..ecad0436 100644 --- a/lib/core/viewModel/base_view_model.dart +++ b/lib/core/viewModel/base_view_model.dart @@ -1,4 +1,3 @@ - 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'; @@ -21,10 +20,11 @@ class BaseViewModel extends ChangeNotifier { void setState(ViewState viewState) { _state = viewState; - notifyListeners(); + notifyListeners(); } - Future getDoctorProfile({bool isGetProfile = false}) async { + Future getDoctorProfile( + {bool isGetProfile = false}) async { if (isGetProfile) { Map profile = await sharedPref.getObj(DOCTOR_PROFILE); if (profile != null) { diff --git a/lib/core/viewModel/dashboard_view_model.dart b/lib/core/viewModel/dashboard_view_model.dart index bb716d8d..dfe3c695 100644 --- a/lib/core/viewModel/dashboard_view_model.dart +++ b/lib/core/viewModel/dashboard_view_model.dart @@ -12,7 +12,6 @@ import '../../locator.dart'; import 'authentication_view_model.dart'; import 'base_view_model.dart'; - class DashboardViewModel extends BaseViewModel { final FirebaseMessaging _firebaseMessaging = FirebaseMessaging.instance; DashboardService _dashboardService = locator(); @@ -38,10 +37,10 @@ class DashboardViewModel extends BaseViewModel { await getDoctorProfile(isGetProfile: true); final results = await Future.wait([ - projectsProvider.getDoctorClinicsList(), + projectsProvider.getDoctorClinicsList(), _dashboardService.getDashboard(), _dashboardService.checkDoctorHasLiveCare(), - _specialClinicsService.getSpecialClinicalCareList(), + _specialClinicsService.getSpecialClinicalCareList(), ]); if (_dashboardService.hasError) { @@ -54,7 +53,8 @@ class DashboardViewModel extends BaseViewModel { } Future setFirebaseNotification(AuthenticationViewModel authProvider) async { - _firebaseMessaging.requestPermission(sound: true, badge: true, alert: true, provisional: true); + _firebaseMessaging.requestPermission( + sound: true, badge: true, alert: true, provisional: true); _firebaseMessaging.getToken().then((String token) async { if (token != '') { diff --git a/lib/core/viewModel/doctor_replay_view_model.dart b/lib/core/viewModel/doctor_replay_view_model.dart index 707fb805..8a4abb11 100644 --- a/lib/core/viewModel/doctor_replay_view_model.dart +++ b/lib/core/viewModel/doctor_replay_view_model.dart @@ -12,6 +12,7 @@ class DoctorReplayViewModel extends BaseViewModel { List get listDoctorWorkingHoursTable => _doctorReplyService.listDoctorWorkingHoursTable; + List get listDoctorNotRepliedQuestions => _doctorReplyService.listDoctorNotRepliedQuestions; diff --git a/lib/core/viewModel/hospitals_view_model.dart b/lib/core/viewModel/hospitals_view_model.dart index fedad3a5..1f6bf7c3 100644 --- a/lib/core/viewModel/hospitals_view_model.dart +++ b/lib/core/viewModel/hospitals_view_model.dart @@ -5,13 +5,14 @@ import 'package:doctor_app_flutter/core/service/hospitals/hospitals_service.dart import '../../locator.dart'; import 'base_view_model.dart'; - class HospitalViewModel extends BaseViewModel { HospitalsService _hospitalsService = locator(); + // List get imeiDetails => _authService.dashboardItemsList; // get loginInfo => _authService.loginInfo; Future getHospitalsList(memberID) async { - GetHospitalsRequestModel getHospitalsRequestModel =GetHospitalsRequestModel(); + GetHospitalsRequestModel getHospitalsRequestModel = + GetHospitalsRequestModel(); getHospitalsRequestModel.memberID = memberID; setState(ViewState.Busy); await _hospitalsService.getHospitals(getHospitalsRequestModel); diff --git a/lib/core/viewModel/labs_view_model.dart b/lib/core/viewModel/labs_view_model.dart index d83aee2a..9dbb8b2f 100644 --- a/lib/core/viewModel/labs_view_model.dart +++ b/lib/core/viewModel/labs_view_model.dart @@ -17,16 +17,22 @@ class LabsViewModel extends BaseViewModel { FilterType filterType = FilterType.Clinic; LabsService _labsService = locator(); - List get labOrdersResultsList => _labsService.labOrdersResultsList; - List get allSpecialLabList => _labsService.allSpecialLab; + List get labOrdersResultsList => + _labsService.labOrdersResultsList; + + List get allSpecialLabList => + _labsService.allSpecialLab; List _patientLabOrdersListClinic = List(); List _patientLabOrdersListHospital = List(); List get patientLabOrdersList => - filterType == FilterType.Clinic ? _patientLabOrdersListClinic : _patientLabOrdersListHospital; + filterType == FilterType.Clinic + ? _patientLabOrdersListClinic + : _patientLabOrdersListHospital; - List get labOrdersResultHistoryList => _labsService.labOrdersResultHistoryList; + List get labOrdersResultHistoryList => + _labsService.labOrdersResultHistoryList; void getLabs(PatiantInformtion patient) async { setState(ViewState.Busy); @@ -36,33 +42,41 @@ class LabsViewModel extends BaseViewModel { setState(ViewState.Error); } else { _labsService.patientLabOrdersList.forEach((element) { - List patientLabOrdersClinic = _patientLabOrdersListClinic - .where((elementClinic) => elementClinic.filterName == element.clinicDescription) - .toList(); + List patientLabOrdersClinic = + _patientLabOrdersListClinic + .where((elementClinic) => + elementClinic.filterName == element.clinicDescription) + .toList(); if (patientLabOrdersClinic.length != 0) { - _patientLabOrdersListClinic[_patientLabOrdersListClinic.indexOf(patientLabOrdersClinic[0])] + _patientLabOrdersListClinic[_patientLabOrdersListClinic + .indexOf(patientLabOrdersClinic[0])] .patientLabOrdersList .add(element); } else { - _patientLabOrdersListClinic - .add(PatientLabOrdersList(filterName: element.clinicDescription, patientDoctorAppointment: element)); + _patientLabOrdersListClinic.add(PatientLabOrdersList( + filterName: element.clinicDescription, + patientDoctorAppointment: element)); } // doctor list sort via project - List patientLabOrdersHospital = _patientLabOrdersListHospital - .where( - (elementClinic) => elementClinic.filterName == element.projectName, - ) - .toList(); + List patientLabOrdersHospital = + _patientLabOrdersListHospital + .where( + (elementClinic) => + elementClinic.filterName == element.projectName, + ) + .toList(); if (patientLabOrdersHospital.length != 0) { - _patientLabOrdersListHospital[_patientLabOrdersListHospital.indexOf(patientLabOrdersHospital[0])] + _patientLabOrdersListHospital[_patientLabOrdersListHospital + .indexOf(patientLabOrdersHospital[0])] .patientLabOrdersList .add(element); } else { - _patientLabOrdersListHospital - .add(PatientLabOrdersList(filterName: element.projectName, patientDoctorAppointment: element)); + _patientLabOrdersListHospital.add(PatientLabOrdersList( + filterName: element.projectName, + patientDoctorAppointment: element)); } }); @@ -75,7 +89,8 @@ class LabsViewModel extends BaseViewModel { notifyListeners(); } - List get patientLabSpecialResult => _labsService.patientLabSpecialResult; + List get patientLabSpecialResult => + _labsService.patientLabSpecialResult; List get labResultList => _labsService.labResultList; @@ -108,10 +123,15 @@ class LabsViewModel extends BaseViewModel { } } - getPatientLabResult({PatientLabOrders patientLabOrder, PatiantInformtion patient, bool isInpatient}) async { + getPatientLabResult( + {PatientLabOrders patientLabOrder, + PatiantInformtion patient, + bool isInpatient}) async { setState(ViewState.Busy); await _labsService.getPatientLabResult( - patientLabOrder: patientLabOrder, patient: patient, isInpatient: isInpatient); + patientLabOrder: patientLabOrder, + patient: patient, + isInpatient: isInpatient); if (_labsService.hasError) { error = _labsService.error; setState(ViewState.Error); @@ -122,21 +142,31 @@ class LabsViewModel extends BaseViewModel { void setLabResultDependOnFilterName() { _labsService.labResultList.forEach((element) { - List patientLabOrdersClinic = - labResultLists.where((elementClinic) => elementClinic.filterName == element.testCode).toList(); + List patientLabOrdersClinic = labResultLists + .where( + (elementClinic) => elementClinic.filterName == element.testCode) + .toList(); if (patientLabOrdersClinic.length != 0) { - labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])].patientLabResultList.add(element); + labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])] + .patientLabResultList + .add(element); } else { - labResultLists.add(LabResultList(filterName: element.testCode, lab: element)); + labResultLists + .add(LabResultList(filterName: element.testCode, lab: element)); } }); } - getPatientLabOrdersResults({PatientLabOrders patientLabOrder, String procedure, PatiantInformtion patient}) async { + getPatientLabOrdersResults( + {PatientLabOrders patientLabOrder, + String procedure, + PatiantInformtion patient}) async { setState(ViewState.Busy); await _labsService.getPatientLabOrdersResults( - patientLabOrder: patientLabOrder, procedure: procedure, patient: patient); + patientLabOrder: patientLabOrder, + procedure: procedure, + patient: patient); if (_labsService.hasError) { error = _labsService.error; setState(ViewState.Error); @@ -144,8 +174,9 @@ class LabsViewModel extends BaseViewModel { bool isShouldClear = false; if (_labsService.labOrdersResultsList.length == 1) { labOrdersResultsList.forEach((element) { - if (element.resultValue.contains('/') || element.resultValue.contains('*') || element.resultValue.isEmpty) - isShouldClear = true; + if (element.resultValue.contains('/') || + element.resultValue.contains('*') || + element.resultValue.isEmpty) isShouldClear = true; }); } if (isShouldClear) _labsService.labOrdersResultsList.clear(); @@ -154,10 +185,14 @@ class LabsViewModel extends BaseViewModel { } getPatientLabResultHistoryByDescription( - {PatientLabOrders patientLabOrder, String procedureDescription, PatiantInformtion patient}) async { + {PatientLabOrders patientLabOrder, + String procedureDescription, + PatiantInformtion patient}) async { setState(ViewState.Busy); await _labsService.getPatientLabOrdersResultHistoryByDescription( - patientLabOrder: patientLabOrder, procedureDescription: procedureDescription, patient: patient); + patientLabOrder: patientLabOrder, + procedureDescription: procedureDescription, + patient: patient); if (_labsService.hasError) { error = _labsService.error; setState(ViewState.Error); diff --git a/lib/core/viewModel/leave_rechdule_response.dart b/lib/core/viewModel/leave_rechdule_response.dart index 555e19cf..508d6731 100644 --- a/lib/core/viewModel/leave_rechdule_response.dart +++ b/lib/core/viewModel/leave_rechdule_response.dart @@ -11,6 +11,7 @@ class GetRescheduleLeavesResponse { int status; String createdOn; String statusDescription; + GetRescheduleLeavesResponse( {this.clinicId, this.coveringDoctorId, diff --git a/lib/core/viewModel/livecare_view_model.dart b/lib/core/viewModel/livecare_view_model.dart index de586e1e..5a3ddd26 100644 --- a/lib/core/viewModel/livecare_view_model.dart +++ b/lib/core/viewModel/livecare_view_model.dart @@ -1,4 +1,3 @@ - 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'; diff --git a/lib/core/viewModel/medicine_view_model.dart b/lib/core/viewModel/medicine_view_model.dart index a6fe1d73..62e972ee 100644 --- a/lib/core/viewModel/medicine_view_model.dart +++ b/lib/core/viewModel/medicine_view_model.dart @@ -16,10 +16,15 @@ class MedicineViewModel extends BaseViewModel { MedicineService _medicineService = locator(); ProcedureService _procedureService = locator(); PrescriptionService _prescriptionService = locator(); - List get procedureTemplate => _procedureService.templateList; + + List get procedureTemplate => + _procedureService.templateList; List templateList = List(); + get pharmacyItemsList => _medicineService.pharmacyItemsList; + get searchText => _medicineService.searchText; + get pharmaciesList => _medicineService.pharmaciesList; get medicationStrengthList => _prescriptionService.medicationStrengthList; @@ -29,17 +34,27 @@ class MedicineViewModel extends BaseViewModel { get medicationRouteList => _prescriptionService.medicationRouteList; get medicationFrequencyList => _prescriptionService.medicationFrequencyList; + get boxQuintity => _prescriptionService.boxQuantity; - get medicationIndicationsList => _prescriptionService.medicationIndicationsList; + get medicationIndicationsList => + _prescriptionService.medicationIndicationsList; get medicationDoseTimeList => _prescriptionService.medicationDoseTimeList; - List get patientAssessmentList => _prescriptionService.patientAssessmentList; - List get allMedicationList => _prescriptionService.allMedicationList; + List get patientAssessmentList => + _prescriptionService.patientAssessmentList; + + List get allMedicationList => + _prescriptionService.allMedicationList; + List get itemMedicineList => _prescriptionService.itemMedicineList; - List get itemMedicineListRoute => _prescriptionService.itemMedicineListRoute; - List get itemMedicineListUnit => _prescriptionService.itemMedicineListUnit; + + List get itemMedicineListRoute => + _prescriptionService.itemMedicineListRoute; + + List get itemMedicineListUnit => + _prescriptionService.itemMedicineListUnit; Future getItem({int itemID}) async { //hasError = false; @@ -55,14 +70,20 @@ class MedicineViewModel extends BaseViewModel { setTemplateListDependOnId() { procedureTemplate.forEach((element) { - List templateListData = - templateList.where((elementTemplate) => elementTemplate.templateId == element.templateID).toList(); + List templateListData = templateList + .where((elementTemplate) => + elementTemplate.templateId == element.templateID) + .toList(); if (templateListData.length != 0) { - templateList[templateList.indexOf(templateListData[0])].procedureTemplate.add(element); + templateList[templateList.indexOf(templateListData[0])] + .procedureTemplate + .add(element); } else { var template = ProcedureTempleteDetailsModelList( - templateName: element.templateName, templateId: element.templateID, template: element); + templateName: element.templateName, + templateId: element.templateID, + template: element); if (!templateList.contains(template)) templateList.add(template); } }); @@ -114,7 +135,8 @@ class MedicineViewModel extends BaseViewModel { setState(ViewState.Idle); } - Future getPatientAssessment(GetAssessmentReqModel getAssessmentReqModel) async { + Future getPatientAssessment( + GetAssessmentReqModel getAssessmentReqModel) async { setState(ViewState.Busy); await _prescriptionService.getPatientAssessment(getAssessmentReqModel); if (_prescriptionService.hasError) { @@ -126,7 +148,8 @@ class MedicineViewModel extends BaseViewModel { Future getMedicationStrength() async { setState(ViewState.Busy); - await _prescriptionService.getMasterLookup(MasterKeysService.MedicationStrength); + await _prescriptionService + .getMasterLookup(MasterKeysService.MedicationStrength); if (_prescriptionService.hasError) { error = _prescriptionService.error; setState(ViewState.Error); @@ -136,7 +159,8 @@ class MedicineViewModel extends BaseViewModel { Future getMedicationRoute() async { setState(ViewState.Busy); - await _prescriptionService.getMasterLookup(MasterKeysService.MedicationRoute); + await _prescriptionService + .getMasterLookup(MasterKeysService.MedicationRoute); if (_prescriptionService.hasError) { error = _prescriptionService.error; setState(ViewState.Error); @@ -146,7 +170,8 @@ class MedicineViewModel extends BaseViewModel { Future getMedicationIndications() async { setState(ViewState.Busy); - await _prescriptionService.getMasterLookup(MasterKeysService.MedicationIndications); + await _prescriptionService + .getMasterLookup(MasterKeysService.MedicationIndications); if (_prescriptionService.hasError) { error = _prescriptionService.error; setState(ViewState.Error); @@ -156,7 +181,8 @@ class MedicineViewModel extends BaseViewModel { Future getMedicationDoseTime() async { setState(ViewState.Busy); - await _prescriptionService.getMasterLookup(MasterKeysService.MedicationDoseTime); + await _prescriptionService + .getMasterLookup(MasterKeysService.MedicationDoseTime); if (_prescriptionService.hasError) { error = _prescriptionService.error; setState(ViewState.Error); @@ -166,7 +192,8 @@ class MedicineViewModel extends BaseViewModel { Future getMedicationFrequency() async { setState(ViewState.Busy); - await _prescriptionService.getMasterLookup(MasterKeysService.MedicationFrequency); + await _prescriptionService + .getMasterLookup(MasterKeysService.MedicationFrequency); if (_prescriptionService.hasError) { error = _prescriptionService.error; setState(ViewState.Error); @@ -176,7 +203,8 @@ class MedicineViewModel extends BaseViewModel { Future getMedicationDuration() async { setState(ViewState.Busy); - await _prescriptionService.getMasterLookup(MasterKeysService.MedicationDuration); + await _prescriptionService + .getMasterLookup(MasterKeysService.MedicationDuration); if (_prescriptionService.hasError) { error = _prescriptionService.error; setState(ViewState.Error); @@ -184,7 +212,8 @@ class MedicineViewModel extends BaseViewModel { setState(ViewState.Idle); } - Future getBoxQuantity({int itemCode, int duration, double strength, int freq}) async { + Future getBoxQuantity( + {int itemCode, int duration, double strength, int freq}) async { setState(ViewState.Busy); await _prescriptionService.calculateBoxQuantity( strength: strength, itemCode: itemCode, duration: duration, freq: freq); diff --git a/lib/core/viewModel/patient-referral-viewmodel.dart b/lib/core/viewModel/patient-referral-viewmodel.dart index 5e24d4cc..861c110b 100644 --- a/lib/core/viewModel/patient-referral-viewmodel.dart +++ b/lib/core/viewModel/patient-referral-viewmodel.dart @@ -18,13 +18,16 @@ import 'package:flutter/cupertino.dart'; import '../../locator.dart'; class PatientReferralViewModel extends BaseViewModel { - PatientReferralService _referralPatientService = locator(); + PatientReferralService _referralPatientService = + locator(); ReferralService _referralService = locator(); - MyReferralInPatientService _myReferralService = locator(); + MyReferralInPatientService _myReferralService = + locator(); - DischargedPatientService _dischargedPatientService = locator(); + DischargedPatientService _dischargedPatientService = + locator(); List get myDischargeReferralPatient => _dischargedPatientService.myDischargeReferralPatients; @@ -33,21 +36,28 @@ class PatientReferralViewModel extends BaseViewModel { List get clinicsList => _referralPatientService.clinicsList; - List get referralFrequencyList => _referralPatientService.frequencyList; + List get referralFrequencyList => + _referralPatientService.frequencyList; List doctorsList = []; - List get clinicDoctorsList => _referralPatientService.doctorsList; + List get clinicDoctorsList => + _referralPatientService.doctorsList; - List get myReferralPatients => _myReferralService.myReferralPatients; + List get myReferralPatients => + _myReferralService.myReferralPatients; - List get listMyReferredPatientModel => _referralPatientService.listMyReferredPatientModel; + List get listMyReferredPatientModel => + _referralPatientService.listMyReferredPatientModel; - List get pendingReferral => _referralPatientService.pendingReferralList; + List get pendingReferral => + _referralPatientService.pendingReferralList; - List get patientReferral => _referralPatientService.patientReferralList; + List get patientReferral => + _referralPatientService.patientReferralList; - List get patientArrivalList => _referralPatientService.patientArrivalList; + List get patientArrivalList => + _referralPatientService.patientArrivalList; Future getPatientReferral(PatiantInformtion patient) async { setState(ViewState.Busy); @@ -96,7 +106,8 @@ class PatientReferralViewModel extends BaseViewModel { setState(ViewState.Idle); } - Future getClinicDoctors(PatiantInformtion patient, int clinicId, int branchId) async { + Future getClinicDoctors( + PatiantInformtion patient, int clinicId, int branchId) async { setState(ViewState.BusyLocal); await _referralPatientService.getDoctorsList(patient, clinicId, branchId); if (_referralPatientService.hasError) { @@ -114,7 +125,10 @@ class PatientReferralViewModel extends BaseViewModel { Future getDoctorBranch() async { DoctorProfileModel doctorProfile = await getDoctorProfile(); if (doctorProfile != null) { - dynamic _selectedBranch = {"facilityId": doctorProfile.projectID, "facilityName": doctorProfile.projectName}; + dynamic _selectedBranch = { + "facilityId": doctorProfile.projectID, + "facilityName": doctorProfile.projectName + }; return _selectedBranch; } return null; @@ -192,7 +206,8 @@ class PatientReferralViewModel extends BaseViewModel { setState(ViewState.Idle); } - Future replay(String referredDoctorRemarks, MyReferralPatientModel referral) async { + Future replay( + String referredDoctorRemarks, MyReferralPatientModel referral) async { setState(ViewState.Busy); await _myReferralService.replay(referredDoctorRemarks, referral); if (_myReferralService.hasError) { @@ -202,7 +217,8 @@ class PatientReferralViewModel extends BaseViewModel { getMyReferralPatientService(); } - Future responseReferral(MyReferralPatientModel referralPatient, bool isAccepted) async { + Future responseReferral( + MyReferralPatientModel referralPatient, bool isAccepted) async { setState(ViewState.Busy); await _referralPatientService.responseReferral(referralPatient, isAccepted); if (_referralPatientService.hasError) { @@ -212,10 +228,11 @@ class PatientReferralViewModel extends BaseViewModel { setState(ViewState.Idle); } - Future makeReferral(PatiantInformtion patient, String isoStringDate, int projectID, int clinicID, int doctorID, - String remarks) async { + Future makeReferral(PatiantInformtion patient, String isoStringDate, + int projectID, int clinicID, int doctorID, String remarks) async { setState(ViewState.Busy); - await _referralPatientService.makeReferral(patient, isoStringDate, projectID, clinicID, doctorID, remarks); + await _referralPatientService.makeReferral( + patient, isoStringDate, projectID, clinicID, doctorID, remarks); if (_referralPatientService.hasError) { error = _referralPatientService.error; setState(ViewState.Error); @@ -255,8 +272,6 @@ class PatientReferralViewModel extends BaseViewModel { } } - - Future getReferralFrequencyList() async { setState(ViewState.Busy); await _referralPatientService.getReferralFrequencyList(); @@ -267,7 +282,8 @@ class PatientReferralViewModel extends BaseViewModel { setState(ViewState.Idle); } - Future verifyReferralDoctorRemarks(MyReferredPatientModel referredPatient) async { + Future verifyReferralDoctorRemarks( + MyReferredPatientModel referredPatient) async { setState(ViewState.Busy); await _referralPatientService.verifyReferralDoctorRemarks(referredPatient); if (_referralPatientService.hasError) { @@ -298,7 +314,7 @@ class PatientReferralViewModel extends BaseViewModel { case 4: return TranslationBase.of(context).referralStatusCancelled /*rejected*/; case 46: - return TranslationBase.of(context).referralStatusCompleted /*accepted*/; + return TranslationBase.of(context).referralStatusCompleted /*accepted*/; case 63: return TranslationBase.of(context).rejected /*referralStatusNotSeen*/; default: @@ -306,7 +322,8 @@ class PatientReferralViewModel extends BaseViewModel { } } - PatiantInformtion getPatientFromReferral(MyReferredPatientModel referredPatient) { + PatiantInformtion getPatientFromReferral( + MyReferredPatientModel referredPatient) { PatiantInformtion patient = PatiantInformtion(); patient.doctorId = referredPatient.doctorID; patient.doctorName = referredPatient.doctorName; @@ -334,7 +351,8 @@ class PatientReferralViewModel extends BaseViewModel { return patient; } - PatiantInformtion getPatientFromReferralO(MyReferralPatientModel referredPatient) { + PatiantInformtion getPatientFromReferralO( + MyReferralPatientModel referredPatient) { PatiantInformtion patient = PatiantInformtion(); patient.doctorId = referredPatient.doctorID; patient.doctorName = referredPatient.doctorName; @@ -359,7 +377,8 @@ class PatientReferralViewModel extends BaseViewModel { return patient; } - PatiantInformtion getPatientFromDischargeReferralPatient(DischargeReferralPatient referredPatient) { + PatiantInformtion getPatientFromDischargeReferralPatient( + DischargeReferralPatient referredPatient) { PatiantInformtion patient = PatiantInformtion(); patient.doctorId = referredPatient.doctorID; patient.doctorName = referredPatient.doctorName; @@ -378,15 +397,18 @@ class PatientReferralViewModel extends BaseViewModel { patient.roomId = referredPatient.roomID; patient.bedId = referredPatient.bedID; patient.nationalityName = referredPatient.nationalityName; - patient.nationalityFlagURL = ''; // TODO from backend referredPatient.nationalityFlagURL; + patient.nationalityFlagURL = + ''; // TODO from backend referredPatient.nationalityFlagURL; patient.age = referredPatient.age; patient.clinicDescription = referredPatient.clinicDescription; return patient; } - Future replayReferred(String referredDoctorRemarks, MyReferralPatientModel referral, int referralStatus) async { + Future replayReferred(String referredDoctorRemarks, + MyReferralPatientModel referral, int referralStatus) async { setState(ViewState.Busy); - await _myReferralService.replayReferred(referredDoctorRemarks, referral, referralStatus); + await _myReferralService.replayReferred( + referredDoctorRemarks, referral, referralStatus); if (_myReferralService.hasError) { error = _myReferralService.error; setState(ViewState.ErrorLocal); diff --git a/lib/core/viewModel/patient-ucaf-viewmodel.dart b/lib/core/viewModel/patient-ucaf-viewmodel.dart index 809c154f..0b425ab8 100644 --- a/lib/core/viewModel/patient-ucaf-viewmodel.dart +++ b/lib/core/viewModel/patient-ucaf-viewmodel.dart @@ -48,7 +48,7 @@ class UcafViewModel extends BaseViewModel { String bloodPressure = "0/0"; resetDataInFirst({bool firstPage = true}) { - if(firstPage){ + if (firstPage) { _ucafService.patientVitalSignsHistory = null; _ucafService.patientChiefComplaintList = null; } diff --git a/lib/core/viewModel/prescription_view_model.dart b/lib/core/viewModel/prescription_view_model.dart index 6f84eec0..e329e31d 100644 --- a/lib/core/viewModel/prescription_view_model.dart +++ b/lib/core/viewModel/prescription_view_model.dart @@ -24,11 +24,18 @@ class PrescriptionViewModel extends BaseViewModel { FilterType filterType = FilterType.Clinic; bool hasError = false; PrescriptionService _prescriptionService = locator(); - List get allMedicationList => _prescriptionService.allMedicationList; - List get medicationForInPatient => _prescriptionsService.medicationForInPatient; - List get prescriptionList => _prescriptionService.prescriptionList; + List get allMedicationList => + _prescriptionService.allMedicationList; + + List get medicationForInPatient => + _prescriptionsService.medicationForInPatient; + + List get prescriptionList => + _prescriptionService.prescriptionList; + List get drugsList => _prescriptionService.doctorsList; + //List get allMedicationList => _prescriptionService.allMedicationList; List get drugToDrug => _prescriptionService.drugToDrugList; @@ -38,22 +45,31 @@ class PrescriptionViewModel extends BaseViewModel { List _prescriptionsOrderListClinic = List(); List _prescriptionsOrderListHospital = List(); - List get prescriptionReportList => _prescriptionsService.prescriptionReportList; + List get prescriptionReportList => + _prescriptionsService.prescriptionReportList; + + List get prescriptionsList => + _prescriptionsService.prescriptionsList; - List get prescriptionsList => _prescriptionsService.prescriptionsList; + List get pharmacyPrescriptionsList => + _prescriptionsService.pharmacyPrescriptionsList; - List get pharmacyPrescriptionsList => _prescriptionsService.pharmacyPrescriptionsList; - List get prescriptionReportEnhList => _prescriptionsService.prescriptionReportEnhList; + List get prescriptionReportEnhList => + _prescriptionsService.prescriptionReportEnhList; List get prescriptionsOrderList => - filterType == FilterType.Clinic ? _prescriptionsOrderListClinic : _prescriptionsOrderListHospital; + filterType == FilterType.Clinic + ? _prescriptionsOrderListClinic + : _prescriptionsOrderListHospital; - List get inPatientPrescription => _prescriptionsService.prescriptionInPatientList; + List get inPatientPrescription => + _prescriptionsService.prescriptionInPatientList; getPrescriptionsInPatient(PatiantInformtion patient) async { setState(ViewState.Busy); error = ""; - await _prescriptionsService.getPrescriptionInPatient(mrn: patient.patientId, adn: patient.admissionNo); + await _prescriptionsService.getPrescriptionInPatient( + mrn: patient.patientId, adn: patient.admissionNo); if (_prescriptionsService.hasError) { error = "No Prescription Found"; setState(ViewState.Error); @@ -89,7 +105,8 @@ class PrescriptionViewModel extends BaseViewModel { setState(ViewState.Idle); } - Future postPrescription(PostPrescriptionReqModel postProcedureReqModel, int mrn) async { + Future postPrescription( + PostPrescriptionReqModel postProcedureReqModel, int mrn) async { hasError = false; //_insuranceCardService.clearInsuranceCard(); setState(ViewState.Busy); @@ -113,7 +130,8 @@ class PrescriptionViewModel extends BaseViewModel { setState(ViewState.Idle); } - Future updatePrescription(PostPrescriptionReqModel updatePrescriptionReqModel, int mrn) async { + Future updatePrescription( + PostPrescriptionReqModel updatePrescriptionReqModel, int mrn) async { hasError = false; //_insuranceCardService.clearInsuranceCard(); setState(ViewState.Busy); @@ -139,11 +157,16 @@ class PrescriptionViewModel extends BaseViewModel { setState(ViewState.Idle); } - Future getDrugToDrug(VitalSignData vital, List lstAssessments, - List allergy, PatiantInformtion patient, List prescription) async { + Future getDrugToDrug( + VitalSignData vital, + List lstAssessments, + List allergy, + PatiantInformtion patient, + List prescription) async { hasError = false; setState(ViewState.Busy); - await _prescriptionService.getDrugToDrug(vital, lstAssessments, allergy, patient, prescription); + await _prescriptionService.getDrugToDrug( + vital, lstAssessments, allergy, patient, prescription); if (_prescriptionService.hasError) { error = _prescriptionService.error; setState(ViewState.ErrorLocal); @@ -156,9 +179,12 @@ class PrescriptionViewModel extends BaseViewModel { notifyListeners(); } - getPrescriptionReport({Prescriptions prescriptions, @required PatiantInformtion patient}) async { + getPrescriptionReport( + {Prescriptions prescriptions, + @required PatiantInformtion patient}) async { setState(ViewState.Busy); - await _prescriptionsService.getPrescriptionReport(prescriptions: prescriptions, patient: patient); + await _prescriptionsService.getPrescriptionReport( + prescriptions: prescriptions, patient: patient); if (_prescriptionsService.hasError) { error = _prescriptionsService.error; setState(ViewState.ErrorLocal); @@ -167,9 +193,11 @@ class PrescriptionViewModel extends BaseViewModel { } } - getListPharmacyForPrescriptions({int itemId, @required PatiantInformtion patient}) async { + getListPharmacyForPrescriptions( + {int itemId, @required PatiantInformtion patient}) async { setState(ViewState.Busy); - await _prescriptionsService.getListPharmacyForPrescriptions(itemId: itemId, patient: patient); + await _prescriptionsService.getListPharmacyForPrescriptions( + itemId: itemId, patient: patient); if (_prescriptionsService.hasError) { error = _prescriptionsService.error; setState(ViewState.Error); @@ -181,39 +209,48 @@ class PrescriptionViewModel extends BaseViewModel { void _filterList() { _prescriptionsService.prescriptionsList.forEach((element) { /// PrescriptionsList list sort clinic - List prescriptionsByClinic = _prescriptionsOrderListClinic - .where((elementClinic) => elementClinic.filterName == element.clinicDescription) - .toList(); + List prescriptionsByClinic = + _prescriptionsOrderListClinic + .where((elementClinic) => + elementClinic.filterName == element.clinicDescription) + .toList(); if (prescriptionsByClinic.length != 0) { - _prescriptionsOrderListClinic[_prescriptionsOrderListClinic.indexOf(prescriptionsByClinic[0])] + _prescriptionsOrderListClinic[ + _prescriptionsOrderListClinic.indexOf(prescriptionsByClinic[0])] .prescriptionsList .add(element); } else { - _prescriptionsOrderListClinic - .add(PrescriptionsList(filterName: element.clinicDescription, prescriptions: element)); + _prescriptionsOrderListClinic.add(PrescriptionsList( + filterName: element.clinicDescription, prescriptions: element)); } /// PrescriptionsList list sort via hospital - List prescriptionsByHospital = _prescriptionsOrderListHospital - .where( - (elementClinic) => elementClinic.filterName == element.name, - ) - .toList(); + List prescriptionsByHospital = + _prescriptionsOrderListHospital + .where( + (elementClinic) => elementClinic.filterName == element.name, + ) + .toList(); if (prescriptionsByHospital.length != 0) { - _prescriptionsOrderListHospital[_prescriptionsOrderListHospital.indexOf(prescriptionsByHospital[0])] + _prescriptionsOrderListHospital[_prescriptionsOrderListHospital + .indexOf(prescriptionsByHospital[0])] .prescriptionsList .add(element); } else { - _prescriptionsOrderListHospital.add(PrescriptionsList(filterName: element.name, prescriptions: element)); + _prescriptionsOrderListHospital.add(PrescriptionsList( + filterName: element.name, prescriptions: element)); } }); } - getPrescriptionReportEnh({PrescriptionsOrder prescriptionsOrder, @required PatiantInformtion patient}) async { + getPrescriptionReportEnh( + {PrescriptionsOrder prescriptionsOrder, + @required PatiantInformtion patient}) async { setState(ViewState.Busy); - await _prescriptionsService.getPrescriptionReportEnh(prescriptionsOrder: prescriptionsOrder, patient: patient); + await _prescriptionsService.getPrescriptionReportEnh( + prescriptionsOrder: prescriptionsOrder, patient: patient); if (_prescriptionsService.hasError) { error = _prescriptionsService.error; setState(ViewState.Error); diff --git a/lib/core/viewModel/prescriptions_view_model.dart b/lib/core/viewModel/prescriptions_view_model.dart index 2548a59c..b0928430 100644 --- a/lib/core/viewModel/prescriptions_view_model.dart +++ b/lib/core/viewModel/prescriptions_view_model.dart @@ -20,17 +20,25 @@ class PrescriptionsViewModel extends BaseViewModel { List _prescriptionsOrderListClinic = List(); List _prescriptionsOrderListHospital = List(); - List get prescriptionReportList => _prescriptionsService.prescriptionReportList; + List get prescriptionReportList => + _prescriptionsService.prescriptionReportList; - List get prescriptionsList => _prescriptionsService.prescriptionsList; + List get prescriptionsList => + _prescriptionsService.prescriptionsList; - List get pharmacyPrescriptionsList => _prescriptionsService.pharmacyPrescriptionsList; - List get prescriptionReportEnhList => _prescriptionsService.prescriptionReportEnhList; + List get pharmacyPrescriptionsList => + _prescriptionsService.pharmacyPrescriptionsList; + + List get prescriptionReportEnhList => + _prescriptionsService.prescriptionReportEnhList; List get prescriptionsOrderList => - filterType == FilterType.Clinic ? _prescriptionsOrderListClinic : _prescriptionsOrderListHospital; + filterType == FilterType.Clinic + ? _prescriptionsOrderListClinic + : _prescriptionsOrderListHospital; - List get medicationForInPatient => _prescriptionsService.medicationForInPatient; + List get medicationForInPatient => + _prescriptionsService.medicationForInPatient; List _medicationForInPatient = List(); @@ -61,32 +69,38 @@ class PrescriptionsViewModel extends BaseViewModel { void _filterList() { _prescriptionsService.prescriptionsList.forEach((element) { /// PrescriptionsList list sort clinic - List prescriptionsByClinic = _prescriptionsOrderListClinic - .where((elementClinic) => elementClinic.filterName == element.clinicDescription) - .toList(); + List prescriptionsByClinic = + _prescriptionsOrderListClinic + .where((elementClinic) => + elementClinic.filterName == element.clinicDescription) + .toList(); if (prescriptionsByClinic.length != 0) { - _prescriptionsOrderListClinic[_prescriptionsOrderListClinic.indexOf(prescriptionsByClinic[0])] + _prescriptionsOrderListClinic[ + _prescriptionsOrderListClinic.indexOf(prescriptionsByClinic[0])] .prescriptionsList .add(element); } else { - _prescriptionsOrderListClinic - .add(PrescriptionsList(filterName: element.clinicDescription, prescriptions: element)); + _prescriptionsOrderListClinic.add(PrescriptionsList( + filterName: element.clinicDescription, prescriptions: element)); } /// PrescriptionsList list sort via hospital - List prescriptionsByHospital = _prescriptionsOrderListHospital - .where( - (elementClinic) => elementClinic.filterName == element.name, - ) - .toList(); + List prescriptionsByHospital = + _prescriptionsOrderListHospital + .where( + (elementClinic) => elementClinic.filterName == element.name, + ) + .toList(); if (prescriptionsByHospital.length != 0) { - _prescriptionsOrderListHospital[_prescriptionsOrderListHospital.indexOf(prescriptionsByHospital[0])] + _prescriptionsOrderListHospital[_prescriptionsOrderListHospital + .indexOf(prescriptionsByHospital[0])] .prescriptionsList .add(element); } else { - _prescriptionsOrderListHospital.add(PrescriptionsList(filterName: element.name, prescriptions: element)); + _prescriptionsOrderListHospital.add(PrescriptionsList( + filterName: element.name, prescriptions: element)); } }); } @@ -96,9 +110,12 @@ class PrescriptionsViewModel extends BaseViewModel { notifyListeners(); } - getPrescriptionReport({Prescriptions prescriptions, @required PatiantInformtion patient}) async { + getPrescriptionReport( + {Prescriptions prescriptions, + @required PatiantInformtion patient}) async { setState(ViewState.Busy); - await _prescriptionsService.getPrescriptionReport(prescriptions: prescriptions, patient: patient); + await _prescriptionsService.getPrescriptionReport( + prescriptions: prescriptions, patient: patient); if (_prescriptionsService.hasError) { error = _prescriptionsService.error; setState(ViewState.ErrorLocal); @@ -107,9 +124,11 @@ class PrescriptionsViewModel extends BaseViewModel { } } - getListPharmacyForPrescriptions({int itemId, @required PatiantInformtion patient}) async { + getListPharmacyForPrescriptions( + {int itemId, @required PatiantInformtion patient}) async { setState(ViewState.Busy); - await _prescriptionsService.getListPharmacyForPrescriptions(itemId: itemId, patient: patient); + await _prescriptionsService.getListPharmacyForPrescriptions( + itemId: itemId, patient: patient); if (_prescriptionsService.hasError) { error = _prescriptionsService.error; setState(ViewState.Error); @@ -118,9 +137,12 @@ class PrescriptionsViewModel extends BaseViewModel { } } - getPrescriptionReportEnh({PrescriptionsOrder prescriptionsOrder, @required PatiantInformtion patient}) async { + getPrescriptionReportEnh( + {PrescriptionsOrder prescriptionsOrder, + @required PatiantInformtion patient}) async { setState(ViewState.Busy); - await _prescriptionsService.getPrescriptionReportEnh(prescriptionsOrder: prescriptionsOrder, patient: patient); + await _prescriptionsService.getPrescriptionReportEnh( + prescriptionsOrder: prescriptionsOrder, patient: patient); if (_prescriptionsService.hasError) { error = _prescriptionsService.error; setState(ViewState.Error); diff --git a/lib/core/viewModel/procedure_View_model.dart b/lib/core/viewModel/procedure_View_model.dart index 7eb442a2..3466c373 100644 --- a/lib/core/viewModel/procedure_View_model.dart +++ b/lib/core/viewModel/procedure_View_model.dart @@ -6,7 +6,8 @@ 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'; @@ -31,11 +32,14 @@ class ProcedureViewModel extends BaseViewModel { bool hasError = false; ProcedureService _procedureService = locator(); - List get procedureList => _procedureService.procedureList; + List get procedureList => + _procedureService.procedureList; - List get valadteProcedureList => _procedureService.valadteProcedureList; + List get valadteProcedureList => + _procedureService.valadteProcedureList; - List get categoriesList => _procedureService.categoriesList; + List get categoriesList => + _procedureService.categoriesList; List get categoryList => _procedureService.categoryList; RadiologyService _radiologyService = locator(); @@ -44,18 +48,25 @@ class ProcedureViewModel extends BaseViewModel { List _finalRadiologyListHospital = List(); List get finalRadiologyList => - filterType == FilterType.Clinic ? _finalRadiologyListClinic : _finalRadiologyListHospital; + filterType == FilterType.Clinic + ? _finalRadiologyListClinic + : _finalRadiologyListHospital; - List get radiologyList => _radiologyService.finalRadiologyList; + List get radiologyList => + _radiologyService.finalRadiologyList; - List get patientLabOrdersList => _labsService.patientLabOrdersList; + List get patientLabOrdersList => + _labsService.patientLabOrdersList; - List get labOrdersResultsList => _labsService.labOrdersResultsList; + List get labOrdersResultsList => + _labsService.labOrdersResultsList; - List get procedureTemplate => _procedureService.templateList; + List get procedureTemplate => + _procedureService.templateList; List templateList = List(); - List get procedureTemplateDetails => _procedureService.templateDetailsList; + List get procedureTemplateDetails => + _procedureService.templateDetailsList; List _patientLabOrdersListClinic = List(); List _patientLabOrdersListHospital = List(); @@ -66,7 +77,8 @@ class ProcedureViewModel extends BaseViewModel { //_insuranceCardService.clearInsuranceCard(); setState(ViewState.Busy); - await _procedureService.getProcedure(mrn: mrn, appointmentNo: appointmentNo); + await _procedureService.getProcedure( + mrn: mrn, appointmentNo: appointmentNo); if (_procedureService.hasError) { error = _procedureService.error; if (patientType == "7") @@ -77,12 +89,15 @@ class ProcedureViewModel extends BaseViewModel { setState(ViewState.Idle); } - Future getProcedureCategory({String categoryName, String categoryID, patientId}) async { + Future getProcedureCategory( + {String categoryName, String categoryID, patientId}) async { if (categoryName == null) return; hasError = false; setState(ViewState.Busy); await _procedureService.getProcedureCategory( - categoryName: categoryName, categoryID: categoryID, patientId: patientId); + categoryName: categoryName, + categoryID: categoryID, + patientId: patientId); if (_procedureService.hasError) { error = _procedureService.error; setState(ViewState.ErrorLocal); @@ -117,14 +132,20 @@ class ProcedureViewModel extends BaseViewModel { setTemplateListDependOnId() { procedureTemplate.forEach((element) { - List templateListData = - templateList.where((elementTemplate) => elementTemplate.templateId == element.templateID).toList(); + List templateListData = templateList + .where((elementTemplate) => + elementTemplate.templateId == element.templateID) + .toList(); if (templateListData.length != 0) { - templateList[templateList.indexOf(templateListData[0])].procedureTemplate.add(element); + templateList[templateList.indexOf(templateListData[0])] + .procedureTemplate + .add(element); } else { var template = ProcedureTempleteDetailsModelList( - templateName: element.templateName, templateId: element.templateID, template: element); + templateName: element.templateName, + templateId: element.templateID, + template: element); if (!templateList.contains(template)) templateList.add(template); } }); @@ -146,7 +167,8 @@ class ProcedureViewModel extends BaseViewModel { setState(ViewState.Idle); } - Future postProcedure(PostProcedureReqModel postProcedureReqModel, int mrn) async { + Future postProcedure( + PostProcedureReqModel postProcedureReqModel, int mrn) async { hasError = false; //_insuranceCardService.clearInsuranceCard(); setState(ViewState.Busy); @@ -160,7 +182,8 @@ class ProcedureViewModel extends BaseViewModel { } } - Future valadteProcedure(ProcedureValadteRequestModel procedureValadteRequestModel) async { + Future valadteProcedure( + ProcedureValadteRequestModel procedureValadteRequestModel) async { hasError = false; //_insuranceCardService.clearInsuranceCard(); setState(ViewState.Busy); @@ -173,7 +196,9 @@ class ProcedureViewModel extends BaseViewModel { } } - Future updateProcedure({UpdateProcedureRequestModel updateProcedureRequestModel, int mrn}) async { + Future updateProcedure( + {UpdateProcedureRequestModel updateProcedureRequestModel, + int mrn}) async { hasError = false; //_insuranceCardService.clearInsuranceCard(); setState(ViewState.Busy); @@ -186,9 +211,11 @@ class ProcedureViewModel extends BaseViewModel { //await getProcedure(mrn: mrn); } - void getPatientRadOrders(PatiantInformtion patient, {String patientType, bool isInPatient = false}) async { + void getPatientRadOrders(PatiantInformtion patient, + {String patientType, bool isInPatient = false}) async { setState(ViewState.Busy); - await _radiologyService.getPatientRadOrders(patient, isInPatient: isInPatient); + await _radiologyService.getPatientRadOrders(patient, + isInPatient: isInPatient); if (_radiologyService.hasError) { error = _radiologyService.error; if (patientType == "7") @@ -197,32 +224,39 @@ class ProcedureViewModel extends BaseViewModel { setState(ViewState.ErrorLocal); } else { _radiologyService.finalRadiologyList.forEach((element) { - List finalRadiologyListClinic = _finalRadiologyListClinic - .where((elementClinic) => elementClinic.filterName == element.clinicDescription) - .toList(); + List finalRadiologyListClinic = + _finalRadiologyListClinic + .where((elementClinic) => + elementClinic.filterName == element.clinicDescription) + .toList(); if (finalRadiologyListClinic.length != 0) { - _finalRadiologyListClinic[finalRadiologyListClinic.indexOf(finalRadiologyListClinic[0])] + _finalRadiologyListClinic[ + finalRadiologyListClinic.indexOf(finalRadiologyListClinic[0])] .finalRadiologyList .add(element); } else { - _finalRadiologyListClinic - .add(FinalRadiologyList(filterName: element.clinicDescription, finalRadiology: element)); + _finalRadiologyListClinic.add(FinalRadiologyList( + filterName: element.clinicDescription, finalRadiology: element)); } // FinalRadiologyList list sort via project - List finalRadiologyListHospital = _finalRadiologyListHospital - .where( - (elementClinic) => elementClinic.filterName == element.projectName, - ) - .toList(); + List finalRadiologyListHospital = + _finalRadiologyListHospital + .where( + (elementClinic) => + elementClinic.filterName == element.projectName, + ) + .toList(); if (finalRadiologyListHospital.length != 0) { - _finalRadiologyListHospital[finalRadiologyListHospital.indexOf(finalRadiologyListHospital[0])] + _finalRadiologyListHospital[finalRadiologyListHospital + .indexOf(finalRadiologyListHospital[0])] .finalRadiologyList .add(element); } else { - _finalRadiologyListHospital.add(FinalRadiologyList(filterName: element.projectName, finalRadiology: element)); + _finalRadiologyListHospital.add(FinalRadiologyList( + filterName: element.projectName, finalRadiology: element)); } }); @@ -232,10 +266,17 @@ class ProcedureViewModel extends BaseViewModel { String get radImageURL => _radiologyService.url; - getRadImageURL({int invoiceNo, int lineItem, int projectId, @required PatiantInformtion patient}) async { + getRadImageURL( + {int invoiceNo, + int lineItem, + int projectId, + @required PatiantInformtion patient}) async { setState(ViewState.Busy); await _radiologyService.getRadImageURL( - invoiceNo: invoiceNo, lineItem: lineItem, projectId: projectId, patient: patient); + invoiceNo: invoiceNo, + lineItem: lineItem, + projectId: projectId, + patient: patient); if (_radiologyService.hasError) { error = _radiologyService.error; setState(ViewState.Error); @@ -248,7 +289,8 @@ class ProcedureViewModel extends BaseViewModel { notifyListeners(); } - List get patientLabSpecialResult => _labsService.patientLabSpecialResult; + List get patientLabSpecialResult => + _labsService.patientLabSpecialResult; List get labResultList => _labsService.labResultList; @@ -270,10 +312,18 @@ class ProcedureViewModel extends BaseViewModel { } getLaboratoryResult( - {String projectID, int clinicID, String invoiceNo, String orderNo, PatiantInformtion patient}) async { + {String projectID, + int clinicID, + String invoiceNo, + String orderNo, + PatiantInformtion patient}) async { setState(ViewState.Busy); await _labsService.getLaboratoryResult( - invoiceNo: invoiceNo, orderNo: orderNo, projectID: projectID, clinicID: clinicID, patient: patient); + invoiceNo: invoiceNo, + orderNo: orderNo, + projectID: projectID, + clinicID: clinicID, + patient: patient); if (_labsService.hasError) { error = _labsService.error; setState(ViewState.Error); @@ -282,10 +332,15 @@ class ProcedureViewModel extends BaseViewModel { } } - getPatientLabOrdersResults({PatientLabOrders patientLabOrder, String procedure, PatiantInformtion patient}) async { + getPatientLabOrdersResults( + {PatientLabOrders patientLabOrder, + String procedure, + PatiantInformtion patient}) async { setState(ViewState.Busy); await _labsService.getPatientLabOrdersResults( - patientLabOrder: patientLabOrder, procedure: procedure, patient: patient); + patientLabOrder: patientLabOrder, + procedure: procedure, + patient: patient); if (_labsService.hasError) { error = _labsService.error; setState(ViewState.Error); @@ -293,8 +348,9 @@ class ProcedureViewModel extends BaseViewModel { bool isShouldClear = false; if (_labsService.labOrdersResultsList.length == 1) { labOrdersResultsList.forEach((element) { - if (element.resultValue.contains('/') || element.resultValue.contains('*') || element.resultValue.isEmpty) - isShouldClear = true; + if (element.resultValue.contains('/') || + element.resultValue.contains('*') || + element.resultValue.isEmpty) isShouldClear = true; }); } if (isShouldClear) _labsService.labOrdersResultsList.clear(); @@ -317,7 +373,8 @@ class ProcedureViewModel extends BaseViewModel { List entityList, ProcedureType procedureType}) async { PostProcedureReqModel postProcedureReqModel = new PostProcedureReqModel(); - ProcedureValadteRequestModel procedureValadteRequestModel = new ProcedureValadteRequestModel(); + ProcedureValadteRequestModel procedureValadteRequestModel = + new ProcedureValadteRequestModel(); procedureValadteRequestModel.patientMRN = patient.patientMRN; procedureValadteRequestModel.episodeID = patient.episodeNo; procedureValadteRequestModel.appointmentNo = patient.appointmentNo; @@ -332,13 +389,21 @@ class ProcedureViewModel extends BaseViewModel { procedureValadteRequestModel.procedure = [element.procedureId]; List controls = List(); controls.add( - Controls(code: "remarks", controlValue: element.remarks != null ? element.remarks : ""), + Controls( + code: "remarks", + controlValue: element.remarks != null ? element.remarks : ""), ); controls.add( - Controls(code: "ordertype", controlValue: procedureType == ProcedureType.PROCEDURE ? element.type ?? "1" : "0"), + Controls( + code: "ordertype", + controlValue: procedureType == ProcedureType.PROCEDURE + ? element.type ?? "1" + : "0"), ); - controlsProcedure - .add(Procedures(category: element.categoryID, procedure: element.procedureId, controls: controls)); + controlsProcedure.add(Procedures( + category: element.categoryID, + procedure: element.procedureId, + controls: controls)); }); postProcedureReqModel.procedures = controlsProcedure; @@ -358,7 +423,8 @@ class ProcedureViewModel extends BaseViewModel { Helpers.showErrorToast(error); getProcedure(mrn: patient.patientMRN); } else if (state == ViewState.Idle) { - Helpers.showErrorToast(valadteProcedureList[0].entityList[0].warringMessages); + Helpers.showErrorToast( + valadteProcedureList[0].entityList[0].warringMessages); } } } else { diff --git a/lib/core/viewModel/profile/discharge_summary_view_model.dart b/lib/core/viewModel/profile/discharge_summary_view_model.dart index ba1e13a4..a1c32787 100644 --- a/lib/core/viewModel/profile/discharge_summary_view_model.dart +++ b/lib/core/viewModel/profile/discharge_summary_view_model.dart @@ -13,16 +13,20 @@ class DischargeSummaryViewModel extends BaseViewModel { List get pendingDischargeSummaryList => _dischargeSummaryService.pendingDischargeSummaryList; - List get allDisChargeSummaryList => _dischargeSummaryService.allDischargeSummaryList; - - Future getPendingDischargeSummary({int patientId, int admissionNo, }) async { - GetDischargeSummaryReqModel getDischargeSummaryReqModel = GetDischargeSummaryReqModel(admissionNo:admissionNo,patientID: patientId ); + Future getPendingDischargeSummary({ + int patientId, + int admissionNo, + }) async { + GetDischargeSummaryReqModel getDischargeSummaryReqModel = + GetDischargeSummaryReqModel( + admissionNo: admissionNo, patientID: patientId); hasError = false; setState(ViewState.Busy); - await _dischargeSummaryService.getPendingDischargeSummary(getDischargeSummaryReqModel: getDischargeSummaryReqModel); + await _dischargeSummaryService.getPendingDischargeSummary( + getDischargeSummaryReqModel: getDischargeSummaryReqModel); if (_dischargeSummaryService.hasError) { error = _dischargeSummaryService.error; setState(ViewState.ErrorLocal); @@ -31,13 +35,17 @@ class DischargeSummaryViewModel extends BaseViewModel { } } - - - Future getAllDischargeSummary({int patientId, int admissionNo, }) async { - GetDischargeSummaryReqModel getDischargeSummaryReqModel = GetDischargeSummaryReqModel(admissionNo:admissionNo,patientID: patientId ); + Future getAllDischargeSummary({ + int patientId, + int admissionNo, + }) async { + GetDischargeSummaryReqModel getDischargeSummaryReqModel = + GetDischargeSummaryReqModel( + admissionNo: admissionNo, patientID: patientId); hasError = false; setState(ViewState.Busy); - await _dischargeSummaryService.getAllDischargeSummary(getDischargeSummaryReqModel: getDischargeSummaryReqModel); + await _dischargeSummaryService.getAllDischargeSummary( + getDischargeSummaryReqModel: getDischargeSummaryReqModel); if (_dischargeSummaryService.hasError) { error = _dischargeSummaryService.error; setState(ViewState.ErrorLocal); @@ -45,5 +53,4 @@ class DischargeSummaryViewModel extends BaseViewModel { 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 e3f4f430..72d3a073 100644 --- a/lib/core/viewModel/profile/operation_report_view_model.dart +++ b/lib/core/viewModel/profile/operation_report_view_model.dart @@ -30,11 +30,17 @@ class OperationReportViewModel extends BaseViewModel { } } - Future getOperationReportDetails(GetReservationsResponseModel reservation) async { + Future getOperationReportDetails( + GetReservationsResponseModel reservation) async { hasError = false; setState(ViewState.Busy); - GetOperationDetailsRequestModel getOperationReportRequestModel = GetOperationDetailsRequestModel(reservationNo:reservation.oTReservationID, patientID: reservation.patientID, setupID: "010266" ); - await _operationReportService.getOperationReportDetails(getOperationReportRequestModel:getOperationReportRequestModel); + GetOperationDetailsRequestModel getOperationReportRequestModel = + GetOperationDetailsRequestModel( + reservationNo: reservation.oTReservationID, + patientID: reservation.patientID, + setupID: "010266"); + await _operationReportService.getOperationReportDetails( + getOperationReportRequestModel: getOperationReportRequestModel); if (_operationReportService.hasError) { error = _operationReportService.error; setState(ViewState.ErrorLocal); @@ -43,13 +49,12 @@ class OperationReportViewModel extends BaseViewModel { } } - - Future updateOperationReport( CreateUpdateOperationReportRequestModel - createUpdateOperationReport) async { + createUpdateOperationReport) async { setState(ViewState.BusyLocal); - await _operationReportService.updateOperationReport(createUpdateOperationReport); + await _operationReportService + .updateOperationReport(createUpdateOperationReport); if (_operationReportService.hasError) { error = _operationReportService.error; setState(ViewState.ErrorLocal); diff --git a/lib/core/viewModel/project_view_model.dart b/lib/core/viewModel/project_view_model.dart index e7b7a80f..14d2a14b 100644 --- a/lib/core/viewModel/project_view_model.dart +++ b/lib/core/viewModel/project_view_model.dart @@ -31,6 +31,7 @@ class ProjectViewModel with ChangeNotifier { bool get isArabic => _isArabic; StreamSubscription subscription; + ProjectViewModel() { loadSharedPrefLanguage(); @@ -115,7 +116,11 @@ class ProjectViewModel with ChangeNotifier { void getProfile() async { Map profile = await sharedPref.getObj(DOCTOR_PROFILE); DoctorProfileModel doctorProfile = new DoctorProfileModel.fromJson(profile); - ClinicModel clinicModel = ClinicModel(doctorID:doctorProfile.doctorID,clinicID: doctorProfile.clinicID, projectID: doctorProfile.projectID,); + ClinicModel clinicModel = ClinicModel( + doctorID: doctorProfile.doctorID, + clinicID: doctorProfile.clinicID, + projectID: doctorProfile.projectID, + ); await Provider.of(AppGlobal.CONTEX, listen: false) .getDoctorProfileBasedOnClinic(clinicModel); diff --git a/lib/core/viewModel/scan_qr_view_model.dart b/lib/core/viewModel/scan_qr_view_model.dart index b49078c7..a5bdfa39 100644 --- a/lib/core/viewModel/scan_qr_view_model.dart +++ b/lib/core/viewModel/scan_qr_view_model.dart @@ -7,9 +7,11 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; class ScanQrViewModel extends BaseViewModel { ScanQrService _scanQrService = locator(); + List get inPatientList => _scanQrService.inPatientList; - Future getInPatientList(PatientSearchRequestModel requestModel, {bool isMyInpatient = false}) async { + Future getInPatientList(PatientSearchRequestModel requestModel, + {bool isMyInpatient = false}) async { await getDoctorProfile(); setState(ViewState.Busy); diff --git a/lib/core/viewModel/sick_leave_view_model.dart b/lib/core/viewModel/sick_leave_view_model.dart index 7a7f4575..9a7ce4f2 100644 --- a/lib/core/viewModel/sick_leave_view_model.dart +++ b/lib/core/viewModel/sick_leave_view_model.dart @@ -84,24 +84,27 @@ class SickLeaveViewModel extends BaseViewModel { if (_sickLeaveService.hasError) { error = _sickLeaveService.error; setState(ViewState.ErrorLocal); - } else setState(ViewState.Idle); } - Future getSickLeaveForPatient(PatiantInformtion patient, {bool isLocalBusy = false}) async { + Future getSickLeaveForPatient(PatiantInformtion patient, + {bool isLocalBusy = false}) async { if (isLocalBusy) setState(ViewState.BusyLocal); else setState(ViewState.Busy); var patientMRN = patient.patientMRN ?? patient.patientId; - var services = [_sickLeaveService.getSickLeavePatient(patientMRN),_sickLeaveService.getSickLeaveDoctor(patientMRN) ]; + var services = [ + _sickLeaveService.getSickLeavePatient(patientMRN), + _sickLeaveService.getSickLeaveDoctor(patientMRN) + ]; final results = await Future.wait(services); - if (_sickLeaveService.hasError) { + if (_sickLeaveService.hasError) { error = _sickLeaveService.error; // if (isLocalBusy) - setState(ViewState.ErrorLocal); + setState(ViewState.ErrorLocal); // else // setState(ViewState.Error); diff --git a/lib/icons_app/doctor_app_icons.dart b/lib/icons_app/doctor_app_icons.dart index fc82d601..c962adcd 100644 --- a/lib/icons_app/doctor_app_icons.dart +++ b/lib/icons_app/doctor_app_icons.dart @@ -11,7 +11,7 @@ /// fonts: /// - asset: fonts/DoctorApp.ttf /// -/// +/// /// * MFG Labs, Copyright (C) 2012 by Daniel Bruce /// Author: MFG Labs /// License: SIL (http://scripts.sil.org/OFL) @@ -22,197 +22,386 @@ import 'package:flutter/widgets.dart'; class DoctorApp { DoctorApp._(); - static const _kFontFam = 'DoctorApp'; - static const String _kFontPkg = null; + static const _kFontFam = 'DoctorApp'; + static const String _kFontPkg = null; + + static const IconData female_icon = + IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData male = + IconData(0xe801, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData reject_icon = + IconData(0xe802, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData home_icon_active = + IconData(0xe803, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData menu_icon = + IconData(0xe804, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData menu_icon_active = + IconData(0xe805, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData message_icon = + IconData(0xe806, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData message_icon_active = + IconData(0xe807, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData scdedule_icon_active = + IconData(0xe808, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData schedule_icon = + IconData(0xe809, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData discharge_patient = + IconData(0xe80a, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData approved_icon = + IconData(0xe80b, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData pending_icon = + IconData(0xe80c, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData in_patient_white = + IconData(0xe80d, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData lab_results = + IconData(0xe80e, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData home_icon = + IconData(0xe80f, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData referral_1 = + IconData(0xe810, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData progress_notes = + IconData(0xe811, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData home_icon_1 = + IconData(0xe812, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData operations = + IconData(0xe813, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData out_patient = + IconData(0xe814, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData patient = + IconData(0xe815, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData qr_code = + IconData(0xe816, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData radiology = + IconData(0xe817, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData referral = + IconData(0xe818, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData male_2 = + IconData(0xe819, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData search_patient = + IconData(0xe81a, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData female_1 = + IconData(0xe81b, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData home_icon_active_1 = + IconData(0xe81c, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData menu_icon_1 = + IconData(0xe81d, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData mail = + IconData(0xe81e, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData medicine_search = + IconData(0xe81f, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData qr_code_1 = + IconData(0xe820, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData search_1 = + IconData(0xe821, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData referred = + IconData(0xe822, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData send = + IconData(0xe823, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData sync_icon = + IconData(0xe824, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData drawer_icon = + IconData(0xe825, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData view = + IconData(0xe826, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData warning = + IconData(0xe827, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData add = + IconData(0xe828, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData close = + IconData(0xe829, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData back = + IconData(0xe82a, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData health_summary = + IconData(0xe82b, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData powered_by_cs = + IconData(0xe82c, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData qr_code_2 = + IconData(0xe82d, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData ecg = + IconData(0xe82e, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData create_episode = + IconData(0xe82f, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData booked = + IconData(0xe830, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData admission_req = + IconData(0xe831, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData walkin = + IconData(0xe832, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData reschedule_ = + IconData(0xe833, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData edit = + IconData(0xe834, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData leaves = + IconData(0xe836, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData logout = + IconData(0xe837, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData obese_bmi = + IconData(0xe838, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData livecare = + IconData(0xe839, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData health_bmi = + IconData(0xe83a, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData health_bmi_r = + IconData(0xe83b, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData modify_episode = + IconData(0xe83c, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData height = + IconData(0xe83d, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData obese_bmi_r = + IconData(0xe83e, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData ovrweight_bmi = + IconData(0xe83f, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData order_prescription = + IconData(0xe840, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData order_procedures = + IconData(0xe841, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData ovrweight_bmi_r = + IconData(0xe842, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData respiration_rate = + IconData(0xe843, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData patient_sick_leave = + IconData(0xe844, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData progress_notes_1 = + IconData(0xe845, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData temperature = + IconData(0xe846, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData underweight_bmi = + IconData(0xe847, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData radiology_1 = + IconData(0xe848, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData search_patient_1 = + IconData(0xe849, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData referral_bg = + IconData(0xe84a, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData search = + IconData(0xe84b, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData search_bg = + IconData(0xe84c, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData arrival_patients = + IconData(0xe84d, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData arrival_patients_bg = + IconData(0xe84e, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData refer_patient = + IconData(0xe84f, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData underweight_bmi_r = + IconData(0xe850, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData weight = + IconData(0xe851, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData blood_pressure = + IconData(0xe852, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData vital_signs = + IconData(0xe853, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData ucaf = + IconData(0xe854, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData filter = + IconData(0xe855, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData male_1 = + IconData(0xe856, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData female = + IconData(0xe857, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData external_link = + IconData(0xe858, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData verify_face_2 = + IconData(0xe859, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData verify_sms_2 = + IconData(0xe85a, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData home = + IconData(0xe85b, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData verify_finger_2 = + IconData(0xe85c, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData dr_reply_active = + IconData(0xe85d, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData dr_reply = + IconData(0xe85e, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData schedule_active = + IconData(0xe85f, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData schedule = + IconData(0xe860, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData qr_reader_active = + IconData(0xe861, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData qr_reader = + IconData(0xe862, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData home_active = + IconData(0xe863, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData arrow_forward = + IconData(0xe864, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData heart_rate = + IconData(0xe865, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData menu_icon_active_1 = + IconData(0xe866, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData message_icon_1 = + IconData(0xe867, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData message_icon_active_1 = + IconData(0xe868, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData scdedule_icon_active_1 = + IconData(0xe869, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData ovrweight_bmi_r_1 = + IconData(0xe86a, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData underweight_bmi_1 = + IconData(0xe86b, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData temperature_1 = + IconData(0xe86c, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData underweight_bmi_r_1 = + IconData(0xe86d, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData weight_1 = + IconData(0xe86e, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData blood_pressure_1 = + IconData(0xe86f, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData health_bmi_r_1 = + IconData(0xe870, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData health_bmi_1 = + IconData(0xe871, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData heart_rate_1 = + IconData(0xe872, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData height_1 = + IconData(0xe873, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData obese_bmi_1 = + IconData(0xe874, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData ovrweight_bmi_1 = + IconData(0xe875, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData respiration_rate_1 = + IconData(0xe876, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData qr_code_3 = + IconData(0xe877, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData reschedule__1 = + IconData(0xe878, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData logout_1 = + IconData(0xe879, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData livecare_1 = + IconData(0xe87a, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData modify_episode_1 = + IconData(0xe87b, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData order_prescription_1 = + IconData(0xe87c, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData order_procedures_1 = + IconData(0xe87d, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData patient_sick_leave_1 = + IconData(0xe87e, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData progress_notes_2 = + IconData(0xe87f, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData radiology_2 = + IconData(0xe880, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData refer_patient_1 = + IconData(0xe881, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData ucaf_1 = + IconData(0xe882, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData vital_signs_1 = + IconData(0xe883, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData walkin_1 = + IconData(0xe884, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData admission_req_1 = + IconData(0xe885, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData booked_1 = + IconData(0xe886, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData create_episode_1 = + IconData(0xe887, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData ecg_1 = + IconData(0xe888, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData health_summary_1 = + IconData(0xe889, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData lab_results_1 = + IconData(0xe88a, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData female_2 = + IconData(0xe88b, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData filter_1 = + IconData(0xe88c, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData male_3 = + IconData(0xe88d, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData search_2 = + IconData(0xe88e, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData send_1 = + IconData(0xe88f, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData view_1 = + IconData(0xe890, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData warning_1 = + IconData(0xe891, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData add_1 = + IconData(0xe892, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData arrow_forward_1 = + IconData(0xe893, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData back_1 = + IconData(0xe894, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData close_1 = + IconData(0xe895, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData edit_1 = + IconData(0xe896, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData external_link_1 = + IconData(0xe897, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData verify_finger_1 = + IconData(0xe898, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData verify_sms_1 = + IconData(0xe899, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData verify_face_1 = + IconData(0xe89a, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData qr_reader_1 = + IconData(0xe89b, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData qr_reader_active_1 = + IconData(0xe89c, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData schedule_1 = + IconData(0xe89d, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData schedule_active_1 = + IconData(0xe89e, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData dr_reply_1 = + IconData(0xe89f, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData dr_reply_active_1 = + IconData(0xe8a0, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData home_1 = + IconData(0xe8a1, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData home_active_1 = + IconData(0xe8a2, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData verify_face = + IconData(0xe8a3, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData verify_finger = + IconData(0xe8a4, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData verify_whtsapp = + IconData(0xe8a5, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData verify_sms = + IconData(0xe8a6, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData female_icon = IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData male = IconData(0xe801, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData reject_icon = IconData(0xe802, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData home_icon_active = IconData(0xe803, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData menu_icon = IconData(0xe804, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData menu_icon_active = IconData(0xe805, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData message_icon = IconData(0xe806, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData message_icon_active = IconData(0xe807, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData scdedule_icon_active = IconData(0xe808, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData schedule_icon = IconData(0xe809, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData discharge_patient = IconData(0xe80a, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData approved_icon = IconData(0xe80b, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData pending_icon = IconData(0xe80c, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData in_patient_white = IconData(0xe80d, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData lab_results = IconData(0xe80e, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData home_icon = IconData(0xe80f, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData referral_1 = IconData(0xe810, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData progress_notes = IconData(0xe811, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData home_icon_1 = IconData(0xe812, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData operations = IconData(0xe813, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData out_patient = IconData(0xe814, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData patient = IconData(0xe815, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData qr_code = IconData(0xe816, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData radiology = IconData(0xe817, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData referral = IconData(0xe818, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData male_2 = IconData(0xe819, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData search_patient = IconData(0xe81a, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData female_1 = IconData(0xe81b, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData home_icon_active_1 = IconData(0xe81c, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData menu_icon_1 = IconData(0xe81d, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData mail = IconData(0xe81e, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData medicine_search = IconData(0xe81f, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData qr_code_1 = IconData(0xe820, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData search_1 = IconData(0xe821, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData referred = IconData(0xe822, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData send = IconData(0xe823, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData sync_icon = IconData(0xe824, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData drawer_icon = IconData(0xe825, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData view = IconData(0xe826, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData warning = IconData(0xe827, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData add = IconData(0xe828, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData close = IconData(0xe829, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData back = IconData(0xe82a, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData health_summary = IconData(0xe82b, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData powered_by_cs = IconData(0xe82c, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData qr_code_2 = IconData(0xe82d, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData ecg = IconData(0xe82e, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData create_episode = IconData(0xe82f, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData booked = IconData(0xe830, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData admission_req = IconData(0xe831, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData walkin = IconData(0xe832, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData reschedule_ = IconData(0xe833, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData edit = IconData(0xe834, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData leaves = IconData(0xe836, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData logout = IconData(0xe837, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData obese_bmi = IconData(0xe838, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData livecare = IconData(0xe839, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData health_bmi = IconData(0xe83a, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData health_bmi_r = IconData(0xe83b, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData modify_episode = IconData(0xe83c, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData height = IconData(0xe83d, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData obese_bmi_r = IconData(0xe83e, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData ovrweight_bmi = IconData(0xe83f, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData order_prescription = IconData(0xe840, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData order_procedures = IconData(0xe841, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData ovrweight_bmi_r = IconData(0xe842, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData respiration_rate = IconData(0xe843, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData patient_sick_leave = IconData(0xe844, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData progress_notes_1 = IconData(0xe845, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData temperature = IconData(0xe846, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData underweight_bmi = IconData(0xe847, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData radiology_1 = IconData(0xe848, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData search_patient_1 = IconData(0xe849, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData referral_bg = IconData(0xe84a, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData search = IconData(0xe84b, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData search_bg = IconData(0xe84c, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData arrival_patients = IconData(0xe84d, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData arrival_patients_bg = IconData(0xe84e, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData refer_patient = IconData(0xe84f, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData underweight_bmi_r = IconData(0xe850, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData weight = IconData(0xe851, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData blood_pressure = IconData(0xe852, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData vital_signs = IconData(0xe853, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData ucaf = IconData(0xe854, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData filter = IconData(0xe855, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData male_1 = IconData(0xe856, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData female = IconData(0xe857, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData external_link = IconData(0xe858, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData verify_face_2 = IconData(0xe859, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData verify_sms_2 = IconData(0xe85a, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData home = IconData(0xe85b, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData verify_finger_2 = IconData(0xe85c, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData dr_reply_active = IconData(0xe85d, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData dr_reply = IconData(0xe85e, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData schedule_active = IconData(0xe85f, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData schedule = IconData(0xe860, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData qr_reader_active = IconData(0xe861, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData qr_reader = IconData(0xe862, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData home_active = IconData(0xe863, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData arrow_forward = IconData(0xe864, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData heart_rate = IconData(0xe865, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData menu_icon_active_1 = IconData(0xe866, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData message_icon_1 = IconData(0xe867, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData message_icon_active_1 = IconData(0xe868, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData scdedule_icon_active_1 = IconData(0xe869, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData ovrweight_bmi_r_1 = IconData(0xe86a, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData underweight_bmi_1 = IconData(0xe86b, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData temperature_1 = IconData(0xe86c, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData underweight_bmi_r_1 = IconData(0xe86d, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData weight_1 = IconData(0xe86e, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData blood_pressure_1 = IconData(0xe86f, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData health_bmi_r_1 = IconData(0xe870, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData health_bmi_1 = IconData(0xe871, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData heart_rate_1 = IconData(0xe872, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData height_1 = IconData(0xe873, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData obese_bmi_1 = IconData(0xe874, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData ovrweight_bmi_1 = IconData(0xe875, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData respiration_rate_1 = IconData(0xe876, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData qr_code_3 = IconData(0xe877, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData reschedule__1 = IconData(0xe878, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData logout_1 = IconData(0xe879, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData livecare_1 = IconData(0xe87a, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData modify_episode_1 = IconData(0xe87b, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData order_prescription_1 = IconData(0xe87c, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData order_procedures_1 = IconData(0xe87d, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData patient_sick_leave_1 = IconData(0xe87e, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData progress_notes_2 = IconData(0xe87f, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData radiology_2 = IconData(0xe880, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData refer_patient_1 = IconData(0xe881, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData ucaf_1 = IconData(0xe882, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData vital_signs_1 = IconData(0xe883, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData walkin_1 = IconData(0xe884, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData admission_req_1 = IconData(0xe885, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData booked_1 = IconData(0xe886, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData create_episode_1 = IconData(0xe887, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData ecg_1 = IconData(0xe888, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData health_summary_1 = IconData(0xe889, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData lab_results_1 = IconData(0xe88a, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData female_2 = IconData(0xe88b, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData filter_1 = IconData(0xe88c, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData male_3 = IconData(0xe88d, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData search_2 = IconData(0xe88e, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData send_1 = IconData(0xe88f, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData view_1 = IconData(0xe890, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData warning_1 = IconData(0xe891, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData add_1 = IconData(0xe892, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData arrow_forward_1 = IconData(0xe893, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData back_1 = IconData(0xe894, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData close_1 = IconData(0xe895, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData edit_1 = IconData(0xe896, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData external_link_1 = IconData(0xe897, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData verify_finger_1 = IconData(0xe898, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData verify_sms_1 = IconData(0xe899, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData verify_face_1 = IconData(0xe89a, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData qr_reader_1 = IconData(0xe89b, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData qr_reader_active_1 = IconData(0xe89c, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData schedule_1 = IconData(0xe89d, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData schedule_active_1 = IconData(0xe89e, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData dr_reply_1 = IconData(0xe89f, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData dr_reply_active_1 = IconData(0xe8a0, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData home_1 = IconData(0xe8a1, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData home_active_1 = IconData(0xe8a2, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData verify_face = IconData(0xe8a3, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData verify_finger = IconData(0xe8a4, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData verify_whtsapp = IconData(0xe8a5, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData verify_sms = IconData(0xe8a6, fontFamily: _kFontFam, fontPackage: _kFontPkg); /// static const IconData 124 = IconData(0xe8a7, fontFamily: _kFontFam, fontPackage: _kFontPkg); ///static const IconData 123 = IconData(0xe8a8, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData obese_bmi_r_1 = IconData(0xe8a9, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData end_call = IconData(0xe8d4, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData end_consultaion = IconData(0xe8d5, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData folder_open = IconData(0xe8d6, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData folder = IconData(0xe8d7, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData link_in = IconData(0xe8d8, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData link_out = IconData(0xe8d9, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData mute_microphone = IconData(0xe8da, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData no_video = IconData(0xe8db, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData send_instruction = IconData(0xe8dc, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData transfer_to_admin = IconData(0xe8dd, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData inpatient = IconData(0xe959, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData discharge = IconData(0xe95a, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData order_sheets = IconData(0xe95b, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData call = IconData(0xe95c, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData medical_report = IconData(0xe95d, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData painscale = IconData(0xe95e, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData oxygenation = IconData(0xe95f, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData speechtotext = IconData(0xe960, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData search_medicines = IconData(0xe964, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData discharge_patients = IconData(0xe965, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData referral_discharge = IconData(0xe966, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData obese_bmi_r_1 = + IconData(0xe8a9, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData end_call = + IconData(0xe8d4, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData end_consultaion = + IconData(0xe8d5, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData folder_open = + IconData(0xe8d6, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData folder = + IconData(0xe8d7, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData link_in = + IconData(0xe8d8, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData link_out = + IconData(0xe8d9, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData mute_microphone = + IconData(0xe8da, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData no_video = + IconData(0xe8db, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData send_instruction = + IconData(0xe8dc, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData transfer_to_admin = + IconData(0xe8dd, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData inpatient = + IconData(0xe959, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData discharge = + IconData(0xe95a, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData order_sheets = + IconData(0xe95b, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData call = + IconData(0xe95c, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData medical_report = + IconData(0xe95d, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData painscale = + IconData(0xe95e, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData oxygenation = + IconData(0xe95f, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData speechtotext = + IconData(0xe960, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData search_medicines = + IconData(0xe964, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData discharge_patients = + IconData(0xe965, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData referral_discharge = + IconData(0xe966, fontFamily: _kFontFam, fontPackage: _kFontPkg); } diff --git a/lib/landing_page.dart b/lib/landing_page.dart index b9ab22ef..8211cf64 100644 --- a/lib/landing_page.dart +++ b/lib/landing_page.dart @@ -59,7 +59,9 @@ class _LandingPageState extends State { builder: (BuildContext context) { return Container( width: 40, - margin: EdgeInsets.only(left: projectViewModel.isArabic? 0:20, right: projectViewModel.isArabic? 20:0), + margin: EdgeInsets.only( + left: projectViewModel.isArabic ? 0 : 20, + right: projectViewModel.isArabic ? 20 : 0), child: IconButton( icon: SvgPicture.asset('assets/images/svgs/menu.svg', height: 25, width: 10), @@ -117,6 +119,7 @@ class MyAppbar extends StatelessWidget with PreferredSizeWidget { MyAppbar({Key key}) : preferredSize = Size.fromHeight(0.0), super(key: key); + @override Widget build(BuildContext context) { return Container(); diff --git a/lib/locator.dart b/lib/locator.dart index 59d6cb86..28f4bfdf 100644 --- a/lib/locator.dart +++ b/lib/locator.dart @@ -144,5 +144,4 @@ void setupLocator() { locator.registerFactory(() => PatientRegistrationViewModel()); locator.registerFactory(() => PendingOrdersViewModel()); locator.registerFactory(() => DischargeSummaryViewModel()); - } diff --git a/lib/main.dart b/lib/main.dart index 706994ba..37f3d3d0 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,5 +1,3 @@ - - import 'package:doctor_app_flutter/core/provider/robot_provider.dart'; import 'package:doctor_app_flutter/core/viewModel/livecare_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; diff --git a/lib/models/SOAP/Allergy_model.dart b/lib/models/SOAP/Allergy_model.dart index c3493832..f1a498da 100644 --- a/lib/models/SOAP/Allergy_model.dart +++ b/lib/models/SOAP/Allergy_model.dart @@ -14,17 +14,17 @@ class AllergyModel { AllergyModel( {this.allergyDiseaseId, - this.allergyDiseaseName, - this.allergyDiseaseType, - this.appointmentNo, - this.createdBy, - this.createdByName, - this.createdOn, - this.episodeID, - this.isChecked, - this.isUpdatedByNurse, - this.severity, - this.severityName}); + this.allergyDiseaseName, + this.allergyDiseaseType, + this.appointmentNo, + this.createdBy, + this.createdByName, + this.createdOn, + this.episodeID, + this.isChecked, + this.isUpdatedByNurse, + this.severity, + this.severityName}); AllergyModel.fromJson(Map json) { allergyDiseaseId = json['allergyDiseaseId']; diff --git a/lib/models/SOAP/ChiefComplaint/GetChiefComplaintReqModel.dart b/lib/models/SOAP/ChiefComplaint/GetChiefComplaintReqModel.dart index f04fd8d4..b8b7f38c 100644 --- a/lib/models/SOAP/ChiefComplaint/GetChiefComplaintReqModel.dart +++ b/lib/models/SOAP/ChiefComplaint/GetChiefComplaintReqModel.dart @@ -7,7 +7,12 @@ class GetChiefComplaintReqModel { int admissionNo; GetChiefComplaintReqModel( - {this.patientMRN, this.appointmentNo, this.episodeId, this.episodeID, this.doctorID, this.admissionNo}); + {this.patientMRN, + this.appointmentNo, + this.episodeId, + this.episodeID, + this.doctorID, + this.admissionNo}); GetChiefComplaintReqModel.fromJson(Map json) { patientMRN = json['PatientMRN']; diff --git a/lib/models/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart b/lib/models/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart index 85ada324..16a524ef 100644 --- a/lib/models/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart +++ b/lib/models/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart @@ -14,17 +14,17 @@ class GetChiefComplaintResModel { GetChiefComplaintResModel( {this.appointmentNo, - this.ccdate, - this.chiefComplaint, - this.clinicDescription, - this.clinicID, - this.currentMedication, - this.doctorID, - this.doctorName, - this.episodeId, - this.hopi, - this.patientMRN, - this.status}); + this.ccdate, + this.chiefComplaint, + this.clinicDescription, + this.clinicID, + this.currentMedication, + this.doctorID, + this.doctorName, + this.episodeId, + this.hopi, + this.patientMRN, + this.status}); GetChiefComplaintResModel.fromJson(Map json) { appointmentNo = json['appointmentNo']; diff --git a/lib/models/SOAP/GetAllergiesResModel.dart b/lib/models/SOAP/GetAllergiesResModel.dart index 1eeca63e..d3eac57d 100644 --- a/lib/models/SOAP/GetAllergiesResModel.dart +++ b/lib/models/SOAP/GetAllergiesResModel.dart @@ -15,17 +15,18 @@ class GetAllergiesResModel { GetAllergiesResModel( {this.allergyDiseaseId, - this.allergyDiseaseName, - this.allergyDiseaseType, - this.appointmentNo, - this.createdBy, - this.createdByName, - this.createdOn, - this.episodeID, - this.isChecked, - this.isUpdatedByNurse, - this.severity, - this.severityName, this.remarks=''}); + this.allergyDiseaseName, + this.allergyDiseaseType, + this.appointmentNo, + this.createdBy, + this.createdByName, + this.createdOn, + this.episodeID, + this.isChecked, + this.isUpdatedByNurse, + this.severity, + this.severityName, + this.remarks = ''}); GetAllergiesResModel.fromJson(Map json) { allergyDiseaseId = json['allergyDiseaseId']; diff --git a/lib/models/SOAP/GetAssessmentReqModel.dart b/lib/models/SOAP/GetAssessmentReqModel.dart index 965382b5..0c71982e 100644 --- a/lib/models/SOAP/GetAssessmentReqModel.dart +++ b/lib/models/SOAP/GetAssessmentReqModel.dart @@ -10,13 +10,13 @@ class GetAssessmentReqModel { GetAssessmentReqModel( {this.patientMRN, - this.appointmentNo, - this.episodeID, - this.from, - this.to, - this.clinicID, - this.editedBy, - this.doctorID}); + this.appointmentNo, + this.episodeID, + this.from, + this.to, + this.clinicID, + this.editedBy, + this.doctorID}); GetAssessmentReqModel.fromJson(Map json) { patientMRN = json['PatientMRN']; diff --git a/lib/models/SOAP/GetAssessmentResModel.dart b/lib/models/SOAP/GetAssessmentResModel.dart index 4d1b1b68..ca460c81 100644 --- a/lib/models/SOAP/GetAssessmentResModel.dart +++ b/lib/models/SOAP/GetAssessmentResModel.dart @@ -17,20 +17,20 @@ class GetAssessmentResModel { GetAssessmentResModel( {this.appointmentNo, - this.asciiDesc, - this.clinicDescription, - this.clinicID, - this.complexDiagnosis, - this.conditionID, - this.createdBy, - this.createdOn, - this.diagnosisTypeID, - this.doctorID, - this.doctorName, - this.episodeId, - this.icdCode10ID, - this.patientMRN, - this.remarks}); + this.asciiDesc, + this.clinicDescription, + this.clinicID, + this.complexDiagnosis, + this.conditionID, + this.createdBy, + this.createdOn, + this.diagnosisTypeID, + this.doctorID, + this.doctorName, + this.episodeId, + this.icdCode10ID, + this.patientMRN, + this.remarks}); GetAssessmentResModel.fromJson(Map json) { appointmentNo = json['appointmentNo']; diff --git a/lib/models/SOAP/GetGetProgressNoteReqModel.dart b/lib/models/SOAP/GetGetProgressNoteReqModel.dart index 1da4a8bf..47f1861a 100644 --- a/lib/models/SOAP/GetGetProgressNoteReqModel.dart +++ b/lib/models/SOAP/GetGetProgressNoteReqModel.dart @@ -10,13 +10,13 @@ class GetGetProgressNoteReqModel { GetGetProgressNoteReqModel( {this.patientMRN, - this.appointmentNo, - this.episodeID, - this.from, - this.to, - this.clinicID, - this.editedBy, - this.doctorID}); + this.appointmentNo, + this.episodeID, + this.from, + this.to, + this.clinicID, + this.editedBy, + this.doctorID}); GetGetProgressNoteReqModel.fromJson(Map json) { patientMRN = json['PatientMRN']; @@ -27,7 +27,6 @@ class GetGetProgressNoteReqModel { clinicID = json['ClinicID']; doctorID = json['DoctorID']; editedBy = json['EditedBy']; - } Map toJson() { diff --git a/lib/models/SOAP/GetGetProgressNoteResModel.dart b/lib/models/SOAP/GetGetProgressNoteResModel.dart index 4ae7ed8c..1e5cae66 100644 --- a/lib/models/SOAP/GetGetProgressNoteResModel.dart +++ b/lib/models/SOAP/GetGetProgressNoteResModel.dart @@ -1,4 +1,4 @@ -class GetPatientProgressNoteResModel { +class GetPatientProgressNoteResModel { int appointmentNo; int createdBy; String createdByName; @@ -13,16 +13,16 @@ class GetPatientProgressNoteResModel { GetPatientProgressNoteResModel( {this.appointmentNo, - this.createdBy, - this.createdByName, - this.createdOn, - this.dName, - this.editedByName, - this.editedOn, - this.episodeId, - this.mName, - this.patientMRN, - this.planNote}); + this.createdBy, + this.createdByName, + this.createdOn, + this.dName, + this.editedByName, + this.editedOn, + this.episodeId, + this.mName, + this.patientMRN, + this.planNote}); GetPatientProgressNoteResModel.fromJson(Map json) { appointmentNo = json['appointmentNo']; diff --git a/lib/models/SOAP/GetHistoryReqModel.dart b/lib/models/SOAP/GetHistoryReqModel.dart index 720b6342..2211c4f4 100644 --- a/lib/models/SOAP/GetHistoryReqModel.dart +++ b/lib/models/SOAP/GetHistoryReqModel.dart @@ -30,7 +30,6 @@ class GetHistoryReqModel { doctorID = json['DoctorID']; appointmentNo = json['AppointmentNo']; editedBy = json['EditedBy']; - } Map toJson() { diff --git a/lib/models/SOAP/GetHistoryResModel.dart b/lib/models/SOAP/GetHistoryResModel.dart index c4b4f129..078a2caa 100644 --- a/lib/models/SOAP/GetHistoryResModel.dart +++ b/lib/models/SOAP/GetHistoryResModel.dart @@ -9,12 +9,12 @@ class GetHistoryResModel { GetHistoryResModel( {this.appointmentNo, - this.episodeId, - this.historyId, - this.historyType, - this.isChecked, - this.patientMRN, - this.remarks}); + this.episodeId, + this.historyId, + this.historyType, + this.isChecked, + this.patientMRN, + this.remarks}); GetHistoryResModel.fromJson(Map json) { appointmentNo = json['appointmentNo']; diff --git a/lib/models/SOAP/GetPhysicalExamListResModel.dart b/lib/models/SOAP/GetPhysicalExamListResModel.dart index c97189b1..c8f825ad 100644 --- a/lib/models/SOAP/GetPhysicalExamListResModel.dart +++ b/lib/models/SOAP/GetPhysicalExamListResModel.dart @@ -21,24 +21,24 @@ class GetPhysicalExamResModel { GetPhysicalExamResModel( {this.appointmentNo, - this.createdBy, - this.createdByName, - this.createdOn, - this.editedBy, - this.editedByName, - this.editedOn, - this.episodeId, - this.examId, - this.examName, - this.examType, - this.examinationType, - this.examinationTypeName, - this.isAbnormal, - this.isNew, - this.isNormal, - this.notExamined, - this.patientMRN, - this.remarks}); + this.createdBy, + this.createdByName, + this.createdOn, + this.editedBy, + this.editedByName, + this.editedOn, + this.episodeId, + this.examId, + this.examName, + this.examType, + this.examinationType, + this.examinationTypeName, + this.isAbnormal, + this.isNew, + this.isNormal, + this.notExamined, + this.patientMRN, + this.remarks}); GetPhysicalExamResModel.fromJson(Map json) { appointmentNo = json['appointmentNo']; diff --git a/lib/models/SOAP/PatchAssessmentReqModel.dart b/lib/models/SOAP/PatchAssessmentReqModel.dart index 8cbf5cb7..fb229127 100644 --- a/lib/models/SOAP/PatchAssessmentReqModel.dart +++ b/lib/models/SOAP/PatchAssessmentReqModel.dart @@ -11,14 +11,14 @@ class PatchAssessmentReqModel { PatchAssessmentReqModel( {this.patientMRN, - this.appointmentNo, - this.episodeID, - this.icdcode10Id, - this.prevIcdCode10ID, - this.conditionId, - this.diagnosisTypeId, - this.complexDiagnosis, - this.remarks}); + this.appointmentNo, + this.episodeID, + this.icdcode10Id, + this.prevIcdCode10ID, + this.conditionId, + this.diagnosisTypeId, + this.complexDiagnosis, + this.remarks}); PatchAssessmentReqModel.fromJson(Map json) { patientMRN = json['PatientMRN']; diff --git a/lib/models/SOAP/PostEpisodeReqModel.dart b/lib/models/SOAP/PostEpisodeReqModel.dart index 6d3ee45a..bfc4e4bc 100644 --- a/lib/models/SOAP/PostEpisodeReqModel.dart +++ b/lib/models/SOAP/PostEpisodeReqModel.dart @@ -6,9 +6,9 @@ class PostEpisodeReqModel { PostEpisodeReqModel( {this.appointmentNo, - this.patientMRN, - this.doctorID, - this.vidaAuthTokenID}); + this.patientMRN, + this.doctorID, + this.vidaAuthTokenID}); PostEpisodeReqModel.fromJson(Map json) { appointmentNo = json['AppointmentNo']; diff --git a/lib/models/SOAP/get_Allergies_request_model.dart b/lib/models/SOAP/get_Allergies_request_model.dart index 7676d530..2220f243 100644 --- a/lib/models/SOAP/get_Allergies_request_model.dart +++ b/lib/models/SOAP/get_Allergies_request_model.dart @@ -7,10 +7,10 @@ class GetAllergiesRequestModel { GetAllergiesRequestModel( {this.vidaAuthTokenID, - this.patientMRN, - this.appointmentNo, - this.episodeId, - this.doctorID}); + this.patientMRN, + this.appointmentNo, + this.episodeId, + this.doctorID}); GetAllergiesRequestModel.fromJson(Map json) { vidaAuthTokenID = json['VidaAuthTokenID']; diff --git a/lib/models/SOAP/master_key_model.dart b/lib/models/SOAP/master_key_model.dart index a1c32039..070eab08 100644 --- a/lib/models/SOAP/master_key_model.dart +++ b/lib/models/SOAP/master_key_model.dart @@ -18,21 +18,21 @@ class MasterKeyModel { MasterKeyModel( {this.alias, - this.aliasN, - this.code, - this.description, - this.detail1, - this.detail2, - this.detail3, - this.detail4, - this.detail5, - this.groupID, - this.id, - this.nameAr, - this.nameEn, - this.remarks, - this.typeId, - this.valueList}); + this.aliasN, + this.code, + this.description, + this.detail1, + this.detail2, + this.detail3, + this.detail4, + this.detail5, + this.groupID, + this.id, + this.nameAr, + this.nameEn, + this.remarks, + this.typeId, + this.valueList}); MasterKeyModel.fromJson(Map json) { alias = json['alias']; diff --git a/lib/models/SOAP/order-procedure.dart b/lib/models/SOAP/order-procedure.dart index 4e134a07..b49305ef 100644 --- a/lib/models/SOAP/order-procedure.dart +++ b/lib/models/SOAP/order-procedure.dart @@ -1,5 +1,4 @@ class OrderProcedure { - String achiCode; String appointmentDate; int appointmentNo; @@ -27,29 +26,29 @@ class OrderProcedure { OrderProcedure( {this.achiCode, - this.appointmentDate, - this.appointmentNo, - this.categoryID, - this.clinicDescription, - this.cptCode, - this.createdBy, - this.createdOn, - this.doctorName, - this.isApprovalCreated, - this.isApprovalRequired, - this.isCovered, - this.isInvoiced, - this.isReferralInvoiced, - this.isUncoveredByDoctor, - this.lineItemNo, - this.orderDate, - this.orderNo, - this.orderType, - this.procedureId, - this.procedureName, - this.remarks, - this.status, - this.template}); + this.appointmentDate, + this.appointmentNo, + this.categoryID, + this.clinicDescription, + this.cptCode, + this.createdBy, + this.createdOn, + this.doctorName, + this.isApprovalCreated, + this.isApprovalRequired, + this.isCovered, + this.isInvoiced, + this.isReferralInvoiced, + this.isUncoveredByDoctor, + this.lineItemNo, + this.orderDate, + this.orderNo, + this.orderType, + this.procedureId, + this.procedureName, + this.remarks, + this.status, + this.template}); OrderProcedure.fromJson(Map json) { achiCode = json['achiCode']; @@ -106,5 +105,4 @@ class OrderProcedure { data['template'] = this.template; return data; } - -} \ No newline at end of file +} diff --git a/lib/models/SOAP/post_allergy_request_model.dart b/lib/models/SOAP/post_allergy_request_model.dart index 6783d885..a179da06 100644 --- a/lib/models/SOAP/post_allergy_request_model.dart +++ b/lib/models/SOAP/post_allergy_request_model.dart @@ -1,13 +1,13 @@ class PostAllergyRequestModel { List - listHisProgNotePatientAllergyDiseaseVM; + listHisProgNotePatientAllergyDiseaseVM; PostAllergyRequestModel({this.listHisProgNotePatientAllergyDiseaseVM}); PostAllergyRequestModel.fromJson(Map json) { if (json['listHisProgNotePatientAllergyDiseaseVM'] != null) { listHisProgNotePatientAllergyDiseaseVM = - new List(); + new List(); json['listHisProgNotePatientAllergyDiseaseVM'].forEach((v) { listHisProgNotePatientAllergyDiseaseVM .add(new ListHisProgNotePatientAllergyDiseaseVM.fromJson(v)); @@ -44,18 +44,18 @@ class ListHisProgNotePatientAllergyDiseaseVM { ListHisProgNotePatientAllergyDiseaseVM( {this.patientMRN, - this.allergyDiseaseType, - this.allergyDiseaseId, - this.episodeId, - this.appointmentNo, - this.severity, - this.isChecked, - this.isUpdatedByNurse, - this.remarks, - this.createdBy, - this.createdOn, - this.editedBy, - this.editedOn}); + this.allergyDiseaseType, + this.allergyDiseaseId, + this.episodeId, + this.appointmentNo, + this.severity, + this.isChecked, + this.isUpdatedByNurse, + this.remarks, + this.createdBy, + this.createdOn, + this.editedBy, + this.editedOn}); ListHisProgNotePatientAllergyDiseaseVM.fromJson(Map json) { patientMRN = json['patientMRN']; diff --git a/lib/models/SOAP/post_assessment_request_model.dart b/lib/models/SOAP/post_assessment_request_model.dart index af577671..5cda0524 100644 --- a/lib/models/SOAP/post_assessment_request_model.dart +++ b/lib/models/SOAP/post_assessment_request_model.dart @@ -6,9 +6,9 @@ class PostAssessmentRequestModel { PostAssessmentRequestModel( {this.patientMRN, - this.appointmentNo, - this.episodeId, - this.icdCodeDetails}); + this.appointmentNo, + this.episodeId, + this.icdCodeDetails}); PostAssessmentRequestModel.fromJson(Map json) { patientMRN = json['PatientMRN']; @@ -44,10 +44,10 @@ class IcdCodeDetails { IcdCodeDetails( {this.icdcode10Id, - this.conditionId, - this.diagnosisTypeId, - this.complexDiagnosis, - this.remarks}); + this.conditionId, + this.diagnosisTypeId, + this.complexDiagnosis, + this.remarks}); IcdCodeDetails.fromJson(Map json) { icdcode10Id = json['icdcode10Id']; diff --git a/lib/models/SOAP/post_histories_request_model.dart b/lib/models/SOAP/post_histories_request_model.dart index d8be3fb2..7d15974c 100644 --- a/lib/models/SOAP/post_histories_request_model.dart +++ b/lib/models/SOAP/post_histories_request_model.dart @@ -36,12 +36,12 @@ class ListMedicalHistoryVM { ListMedicalHistoryVM( {this.patientMRN, - this.historyType, - this.historyId, - this.episodeId, - this.appointmentNo, - this.isChecked, - this.remarks}); + this.historyType, + this.historyId, + this.episodeId, + this.appointmentNo, + this.isChecked, + this.remarks}); ListMedicalHistoryVM.fromJson(Map json) { patientMRN = json['patientMRN']; diff --git a/lib/models/SOAP/selected_items/my_selected_allergy.dart b/lib/models/SOAP/selected_items/my_selected_allergy.dart index 512a4f64..be022adc 100644 --- a/lib/models/SOAP/selected_items/my_selected_allergy.dart +++ b/lib/models/SOAP/selected_items/my_selected_allergy.dart @@ -19,5 +19,4 @@ class MySelectedAllergy { this.isLocal = true, this.createdBy, this.hasValidationError = false}); - } diff --git a/lib/models/SOAP/selected_items/my_selected_assement.dart b/lib/models/SOAP/selected_items/my_selected_assement.dart index 01572e6d..7ac3d979 100644 --- a/lib/models/SOAP/selected_items/my_selected_assement.dart +++ b/lib/models/SOAP/selected_items/my_selected_assement.dart @@ -16,9 +16,11 @@ class MySelectedAssessment { {this.selectedICD, this.selectedDiagnosisCondition, this.selectedDiagnosisType, - this.remark, this.appointmentId, this.createdBy, - this.createdOn, - this.doctorID, - this.doctorName, - this.icdCode10ID}); + this.remark, + this.appointmentId, + this.createdBy, + this.createdOn, + this.doctorID, + this.doctorName, + this.icdCode10ID}); } diff --git a/lib/models/dashboard/get_special_clinical_care_List_Respose_Model.dart b/lib/models/dashboard/get_special_clinical_care_List_Respose_Model.dart index ec19abb0..4048a402 100644 --- a/lib/models/dashboard/get_special_clinical_care_List_Respose_Model.dart +++ b/lib/models/dashboard/get_special_clinical_care_List_Respose_Model.dart @@ -7,10 +7,10 @@ class GetSpecialClinicalCareListResponseModel { GetSpecialClinicalCareListResponseModel( {this.projectID, - this.clinicID, - this.clinicDescription, - this.clinicDescriptionN, - this.isActive}); + this.clinicID, + this.clinicDescription, + this.clinicDescriptionN, + this.isActive}); GetSpecialClinicalCareListResponseModel.fromJson(Map json) { projectID = json['ProjectID']; diff --git a/lib/models/dashboard/get_special_clinical_care_mapping_List_Respose_Model.dart b/lib/models/dashboard/get_special_clinical_care_mapping_List_Respose_Model.dart index 287f40f1..2a5e3565 100644 --- a/lib/models/dashboard/get_special_clinical_care_mapping_List_Respose_Model.dart +++ b/lib/models/dashboard/get_special_clinical_care_mapping_List_Respose_Model.dart @@ -8,11 +8,11 @@ class GetSpecialClinicalCareMappingListResponseModel { GetSpecialClinicalCareMappingListResponseModel( {this.mappingProjectID, - this.clinicID, - this.nursingStationID, - this.isActive, - this.projectID, - this.description}); + this.clinicID, + this.nursingStationID, + this.isActive, + this.projectID, + this.description}); GetSpecialClinicalCareMappingListResponseModel.fromJson( Map json) { diff --git a/lib/models/discharge_summary/GetDischargeSummaryReqModel.dart b/lib/models/discharge_summary/GetDischargeSummaryReqModel.dart index 2d2c14ad..3bc5f931 100644 --- a/lib/models/discharge_summary/GetDischargeSummaryReqModel.dart +++ b/lib/models/discharge_summary/GetDischargeSummaryReqModel.dart @@ -5,7 +5,10 @@ class GetDischargeSummaryReqModel { int patientTypeID; GetDischargeSummaryReqModel( - {this.patientID, this.admissionNo, this.patientType = 1, this.patientTypeID=1}); + {this.patientID, + this.admissionNo, + this.patientType = 1, + this.patientTypeID = 1}); GetDischargeSummaryReqModel.fromJson(Map json) { patientID = json['PatientID']; diff --git a/lib/models/doctor/list_doctor_working_hours_table_model.dart b/lib/models/doctor/list_doctor_working_hours_table_model.dart index 4712d285..ebb63574 100644 --- a/lib/models/doctor/list_doctor_working_hours_table_model.dart +++ b/lib/models/doctor/list_doctor_working_hours_table_model.dart @@ -7,7 +7,6 @@ class ListDoctorWorkingHoursTable { String projectName; String clinicName; - ListDoctorWorkingHoursTable({ this.date, this.dayName, @@ -37,5 +36,6 @@ class ListDoctorWorkingHoursTable { class WorkingHours { String from; String to; + WorkingHours({this.from, this.to}); } diff --git a/lib/models/doctor/list_gt_my_patients_question_model.dart b/lib/models/doctor/list_gt_my_patients_question_model.dart index 656a43dd..9b80518d 100644 --- a/lib/models/doctor/list_gt_my_patients_question_model.dart +++ b/lib/models/doctor/list_gt_my_patients_question_model.dart @@ -35,38 +35,38 @@ class ListGtMyPatientsQuestions { ListGtMyPatientsQuestions( {this.rowID, - this.setupID, - this.projectID, - this.transactionNo, - this.patientType, - this.patientID, - this.doctorID, - this.requestType, - this.requestDate, - this.requestTime, - this.remarks, - this.status, - this.createdBy, - this.createdOn, - this.editedBy, - this.editedOn, - this.patientName, - this.patientNameN, - this.gender, - this.dateofBirth, - this.mobileNumber, - this.emailAddress, - this.infoStatus, - this.infoDesc, - this.doctorResponse, - this.responseDate, - this.memberID, - this.memberName, - this.memberNameN, - this.age, - this.genderDescription, - this.isVidaCall, - this.requestTypeDescription}); + this.setupID, + this.projectID, + this.transactionNo, + this.patientType, + this.patientID, + this.doctorID, + this.requestType, + this.requestDate, + this.requestTime, + this.remarks, + this.status, + this.createdBy, + this.createdOn, + this.editedBy, + this.editedOn, + this.patientName, + this.patientNameN, + this.gender, + this.dateofBirth, + this.mobileNumber, + this.emailAddress, + this.infoStatus, + this.infoDesc, + this.doctorResponse, + this.responseDate, + this.memberID, + this.memberName, + this.memberNameN, + this.age, + this.genderDescription, + this.isVidaCall, + this.requestTypeDescription}); ListGtMyPatientsQuestions.fromJson(Map json) { rowID = json['RowID']; diff --git a/lib/models/doctor/replay/request_create_doctor_response.dart b/lib/models/doctor/replay/request_create_doctor_response.dart index 49e421d9..c169eeec 100644 --- a/lib/models/doctor/replay/request_create_doctor_response.dart +++ b/lib/models/doctor/replay/request_create_doctor_response.dart @@ -11,14 +11,14 @@ class CreateDoctorResponseModel { CreateDoctorResponseModel( {this.setupID, - this.projectID, - this.transactionNo, - this.infoEnteredBy, - this.infoStatus, - this.createdBy, - this.editedBy, - this.doctorResponse, - this.doctorID}); + this.projectID, + this.transactionNo, + this.infoEnteredBy, + this.infoStatus, + this.createdBy, + this.editedBy, + this.doctorResponse, + this.doctorID}); CreateDoctorResponseModel.fromJson(Map json) { setupID = json['SetupID']; diff --git a/lib/models/doctor/replay/request_doctor_reply.dart b/lib/models/doctor/replay/request_doctor_reply.dart index 82384586..15d1f37d 100644 --- a/lib/models/doctor/replay/request_doctor_reply.dart +++ b/lib/models/doctor/replay/request_doctor_reply.dart @@ -68,8 +68,7 @@ class RequestDoctorReply { data['PatientOutSA'] = this.patientOutSA; data['PageIndex'] = this.pageIndex; data['PageSize'] = this.pageSize; - if(this.infoStatus != null) - data['InfoStatus'] = this.infoStatus; + if (this.infoStatus != null) data['InfoStatus'] = this.infoStatus; return data; } } diff --git a/lib/models/doctor/request_add_referred_doctor_remarks.dart b/lib/models/doctor/request_add_referred_doctor_remarks.dart index b396c47f..f74b3dca 100644 --- a/lib/models/doctor/request_add_referred_doctor_remarks.dart +++ b/lib/models/doctor/request_add_referred_doctor_remarks.dart @@ -17,25 +17,24 @@ class RequestAddReferredDoctorRemarks { String sessionID; bool isLoginForDoctorApp; bool patientOutSA; - RequestAddReferredDoctorRemarks( {this.projectID, - this.admissionNo, - this.lineItemNo, - this.referredDoctorRemarks, - this.editedBy, - this.patientID, - this.referringDoctor, - this.languageID = LANGUAGE_ID, - this.stamp = STAMP, - this.iPAdress = IP_ADDRESS, - this.versionID = VERSION_ID, - this.channel= CHANNEL, - this.tokenID, - this.sessionID = SESSION_ID, - this.isLoginForDoctorApp = IS_LOGIN_FOR_DOCTOR_APP, - this.patientOutSA = PATIENT_OUT_SA}); + this.admissionNo, + this.lineItemNo, + this.referredDoctorRemarks, + this.editedBy, + this.patientID, + this.referringDoctor, + this.languageID = LANGUAGE_ID, + this.stamp = STAMP, + this.iPAdress = IP_ADDRESS, + this.versionID = VERSION_ID, + this.channel = CHANNEL, + this.tokenID, + this.sessionID = SESSION_ID, + this.isLoginForDoctorApp = IS_LOGIN_FOR_DOCTOR_APP, + this.patientOutSA = PATIENT_OUT_SA}); RequestAddReferredDoctorRemarks.fromJson(Map json) { projectID = json['ProjectID']; diff --git a/lib/models/doctor/request_schedule.dart b/lib/models/doctor/request_schedule.dart index ae7b80aa..9c5b0fe9 100644 --- a/lib/models/doctor/request_schedule.dart +++ b/lib/models/doctor/request_schedule.dart @@ -1,5 +1,3 @@ - - class RequestSchedule { int projectID; int clinicID; diff --git a/lib/models/doctor/verify_referral_doctor_remarks.dart b/lib/models/doctor/verify_referral_doctor_remarks.dart index b9bfce0a..57cfa743 100644 --- a/lib/models/doctor/verify_referral_doctor_remarks.dart +++ b/lib/models/doctor/verify_referral_doctor_remarks.dart @@ -17,36 +17,36 @@ class VerifyReferralDoctorRemarks { String sessionID; bool isLoginForDoctorApp; bool patientOutSA; - String firstName; + String firstName; String middleName; String lastName; String patientMobileNumber; String patientIdentificationID; - VerifyReferralDoctorRemarks( - {this.projectID, - this.admissionNo, - this.lineItemNo, - this.referredDoctorRemarks, - this.editedBy, - this.patientID, - this.referringDoctor, - this.languageID = LANGUAGE_ID, - this.stamp = STAMP, - this.iPAdress = IP_ADDRESS, - this.versionID = VERSION_ID, - this.channel= CHANNEL, - this.tokenID, - this.sessionID = SESSION_ID, - this.isLoginForDoctorApp = IS_LOGIN_FOR_DOCTOR_APP, - this.patientOutSA = PATIENT_OUT_SA, - this.firstName, - this.middleName, - this.lastName, - this.patientMobileNumber, - this.patientIdentificationID, - }); + VerifyReferralDoctorRemarks({ + this.projectID, + this.admissionNo, + this.lineItemNo, + this.referredDoctorRemarks, + this.editedBy, + this.patientID, + this.referringDoctor, + this.languageID = LANGUAGE_ID, + this.stamp = STAMP, + this.iPAdress = IP_ADDRESS, + this.versionID = VERSION_ID, + this.channel = CHANNEL, + this.tokenID, + this.sessionID = SESSION_ID, + this.isLoginForDoctorApp = IS_LOGIN_FOR_DOCTOR_APP, + this.patientOutSA = PATIENT_OUT_SA, + this.firstName, + this.middleName, + this.lastName, + this.patientMobileNumber, + this.patientIdentificationID, + }); VerifyReferralDoctorRemarks.fromJson(Map json) { projectID = json['ProjectID']; @@ -65,14 +65,11 @@ class VerifyReferralDoctorRemarks { sessionID = json['SessionID']; isLoginForDoctorApp = json['IsLoginForDoctorApp']; patientOutSA = json['PatientOutSA']; - firstName= json["FirstName"]; - middleName= json["MiddleName"]; - lastName= json["LastName"]; - patientMobileNumber= json["PatientMobileNumber"]; - patientIdentificationID = json["PatientIdentificationID"]; - - - + firstName = json["FirstName"]; + middleName = json["MiddleName"]; + lastName = json["LastName"]; + patientMobileNumber = json["PatientMobileNumber"]; + patientIdentificationID = json["PatientIdentificationID"]; } Map toJson() { diff --git a/lib/models/livecare/session_status_model.dart b/lib/models/livecare/session_status_model.dart index 7e7a3e43..29f925d7 100644 --- a/lib/models/livecare/session_status_model.dart +++ b/lib/models/livecare/session_status_model.dart @@ -6,9 +6,9 @@ class SessionStatusModel { SessionStatusModel( {this.isAuthenticated, - this.messageStatus, - this.result, - this.sessionStatus}); + this.messageStatus, + this.result, + this.sessionStatus}); SessionStatusModel.fromJson(Map json) { isAuthenticated = json['IsAuthenticated']; diff --git a/lib/models/livecare/start_call_req.dart b/lib/models/livecare/start_call_req.dart index b3ceabb5..c298298d 100644 --- a/lib/models/livecare/start_call_req.dart +++ b/lib/models/livecare/start_call_req.dart @@ -13,16 +13,16 @@ class StartCallReq { StartCallReq( {this.clincName, - this.clinicId, - this.docSpec, - this.docotrName, - this.doctorId, - this.generalid, - this.isOutKsa, - this.isrecall, - this.projectName, - this.tokenID, - this.vCID}); + this.clinicId, + this.docSpec, + this.docotrName, + this.doctorId, + this.generalid, + this.isOutKsa, + this.isrecall, + this.projectName, + this.tokenID, + this.vCID}); StartCallReq.fromJson(Map json) { clincName = json['clincName']; @@ -53,4 +53,4 @@ class StartCallReq { data['VC_ID'] = this.vCID; return data; } -} \ No newline at end of file +} diff --git a/lib/models/livecare/start_call_res.dart b/lib/models/livecare/start_call_res.dart index 44921d5f..36127da9 100644 --- a/lib/models/livecare/start_call_res.dart +++ b/lib/models/livecare/start_call_res.dart @@ -7,15 +7,15 @@ class StartCallRes { String appointmentNo; bool isRecording; - StartCallRes( - {this.result, - this.openSessionID, - this.openTokenID, - this.isAuthenticated, - this.appointmentNo, - this.messageStatus, - this.isRecording = true, - }); + StartCallRes({ + this.result, + this.openSessionID, + this.openTokenID, + this.isAuthenticated, + this.appointmentNo, + this.messageStatus, + this.isRecording = true, + }); StartCallRes.fromJson(Map json) { result = json['Result']; diff --git a/lib/models/operation_report/create_update_operation_report_request_model.dart b/lib/models/operation_report/create_update_operation_report_request_model.dart index f6d72b1b..1bc6d51e 100644 --- a/lib/models/operation_report/create_update_operation_report_request_model.dart +++ b/lib/models/operation_report/create_update_operation_report_request_model.dart @@ -26,29 +26,29 @@ class CreateUpdateOperationReportRequestModel { CreateUpdateOperationReportRequestModel( {this.setupID, - this.patientID, - this.reservationNo, - this.admissionNo, - this.preOpDiagmosis, - this.postOpDiagmosis, - this.surgeon, - this.assistant, - this.anasthetist, - this.operation, - this.inasion, - this.finding, - this.surgeryProcedure, - this.postOpInstruction, - this.createdBy, - this.editedBy, - this.complicationDetails, - this.bloodLossDetail, - this.histopathSpecimen, - this.microbiologySpecimen, - this.otherSpecimen, - this.scrubNurse, - this.circulatingNurse, - this.bloodTransfusedDetail}); + this.patientID, + this.reservationNo, + this.admissionNo, + this.preOpDiagmosis, + this.postOpDiagmosis, + this.surgeon, + this.assistant, + this.anasthetist, + this.operation, + this.inasion, + this.finding, + this.surgeryProcedure, + this.postOpInstruction, + this.createdBy, + this.editedBy, + this.complicationDetails, + this.bloodLossDetail, + this.histopathSpecimen, + this.microbiologySpecimen, + this.otherSpecimen, + this.scrubNurse, + this.circulatingNurse, + this.bloodTransfusedDetail}); CreateUpdateOperationReportRequestModel.fromJson(Map json) { setupID = json['SetupID']; diff --git a/lib/models/operation_report/get_operation_details_request_modle.dart b/lib/models/operation_report/get_operation_details_request_modle.dart index 7e23b503..6c8e27fd 100644 --- a/lib/models/operation_report/get_operation_details_request_modle.dart +++ b/lib/models/operation_report/get_operation_details_request_modle.dart @@ -16,19 +16,19 @@ class GetOperationDetailsRequestModel { GetOperationDetailsRequestModel( {this.isDentalAllowedBackend = false, - this.versionID, - this.channel, - this.languageID, - this.iPAdress, - this.generalid, - this.deviceTypeID, - this.tokenID, - this.patientID, - this.reservationNo, - this.sessionID, - this.projectID, - this.setupID, - this.patientOutSA}); + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.deviceTypeID, + this.tokenID, + this.patientID, + this.reservationNo, + this.sessionID, + this.projectID, + this.setupID, + this.patientOutSA}); GetOperationDetailsRequestModel.fromJson(Map json) { isDentalAllowedBackend = json['isDentalAllowedBackend']; diff --git a/lib/models/operation_report/get_operation_details_response_modle.dart b/lib/models/operation_report/get_operation_details_response_modle.dart index 04540ea6..f050eca3 100644 --- a/lib/models/operation_report/get_operation_details_response_modle.dart +++ b/lib/models/operation_report/get_operation_details_response_modle.dart @@ -36,39 +36,39 @@ class GetOperationDetailsResponseModel { GetOperationDetailsResponseModel( {this.setupID, - this.projectID, - this.reservationNo, - this.patientID, - this.admissionID, - this.surgeryDate, - this.preOpDiagnosis, - this.postOpDiagnosis, - this.surgeon, - this.assistant, - this.anasthetist, - this.operation, - this.inasion, - this.finding, - this.surgeryProcedure, - this.postOpInstruction, - this.isActive, - this.createdBy, - this.createdName, - this.createdNameN, - this.createdOn, - this.editedBy, - this.editedByName, - this.editedByNameN, - this.editedOn, - this.oRBookStatus, - this.complicationDetail, - this.bloodLossDetail, - this.histopathSpecimen, - this.microbiologySpecimen, - this.otherSpecimen, - this.scrubNurse, - this.circulatingNurse, - this.bloodTransfusedDetail}); + this.projectID, + this.reservationNo, + this.patientID, + this.admissionID, + this.surgeryDate, + this.preOpDiagnosis, + this.postOpDiagnosis, + this.surgeon, + this.assistant, + this.anasthetist, + this.operation, + this.inasion, + this.finding, + this.surgeryProcedure, + this.postOpInstruction, + this.isActive, + this.createdBy, + this.createdName, + this.createdNameN, + this.createdOn, + this.editedBy, + this.editedByName, + this.editedByNameN, + this.editedOn, + this.oRBookStatus, + this.complicationDetail, + this.bloodLossDetail, + this.histopathSpecimen, + this.microbiologySpecimen, + this.otherSpecimen, + this.scrubNurse, + this.circulatingNurse, + this.bloodTransfusedDetail}); GetOperationDetailsResponseModel.fromJson(Map json) { setupID = json['SetupID']; diff --git a/lib/models/patient/MedicalReport/MedicalReportTemplate.dart b/lib/models/patient/MedicalReport/MedicalReportTemplate.dart index f00e84a0..f847c9d5 100644 --- a/lib/models/patient/MedicalReport/MedicalReportTemplate.dart +++ b/lib/models/patient/MedicalReport/MedicalReportTemplate.dart @@ -14,17 +14,17 @@ class MedicalReportTemplate { MedicalReportTemplate( {this.setupID, - this.projectID, - this.templateID, - this.procedureID, - this.reportType, - this.templateName, - this.templateNameN, - this.templateText, - this.templateTextN, - this.isActive, - this.templateTextHtml, - this.templateTextNHtml}); + this.projectID, + this.templateID, + this.procedureID, + this.reportType, + this.templateName, + this.templateNameN, + this.templateText, + this.templateTextN, + this.isActive, + this.templateTextHtml, + this.templateTextNHtml}); MedicalReportTemplate.fromJson(Map json) { setupID = json['SetupID']; diff --git a/lib/models/patient/MedicalReport/MeidcalReportModel.dart b/lib/models/patient/MedicalReport/MeidcalReportModel.dart index 74ee53a5..1fe7609b 100644 --- a/lib/models/patient/MedicalReport/MeidcalReportModel.dart +++ b/lib/models/patient/MedicalReport/MeidcalReportModel.dart @@ -28,31 +28,31 @@ class MedicalReportModel { MedicalReportModel( {this.reportData, - this.setupID, - this.projectID, - this.projectName, - this.projectNameN, - this.patientID, - this.invoiceNo, - this.status, - this.verifiedOn, - this.verifiedBy, - this.editedOn, - this.editedBy, - this.lineItemNo, - this.createdOn, - this.templateID, - this.doctorID, - this.doctorGender, - this.doctorGenderDescription, - this.doctorGenderDescriptionN, - this.doctorImageURL, - this.doctorName, - this.doctorNameN, - this.clinicID, - this.clinicName, - this.clinicNameN, - this.reportDataHtml}); + this.setupID, + this.projectID, + this.projectName, + this.projectNameN, + this.patientID, + this.invoiceNo, + this.status, + this.verifiedOn, + this.verifiedBy, + this.editedOn, + this.editedBy, + this.lineItemNo, + this.createdOn, + this.templateID, + this.doctorID, + this.doctorGender, + this.doctorGenderDescription, + this.doctorGenderDescriptionN, + this.doctorImageURL, + this.doctorName, + this.doctorNameN, + this.clinicID, + this.clinicName, + this.clinicNameN, + this.reportDataHtml}); MedicalReportModel.fromJson(Map json) { reportData = json['ReportData']; diff --git a/lib/models/patient/PatientArrivalEntity.dart b/lib/models/patient/PatientArrivalEntity.dart index 54622cd7..347cc60f 100644 --- a/lib/models/patient/PatientArrivalEntity.dart +++ b/lib/models/patient/PatientArrivalEntity.dart @@ -20,23 +20,23 @@ class PatientArrivalEntity { PatientArrivalEntity( {this.age, - this.appointmentDate, - this.appointmentNo, - this.appointmentType, - this.arrivedOn, - this.companyName, - this.endTime, - this.episodeNo, - this.fallRiskScore, - this.gender, - this.medicationOrders, - this.mobileNumber, - this.nationality, - this.patientMRN, - this.patientName, - this.rowCount, - this.startTime, - this.visitType}); + this.appointmentDate, + this.appointmentNo, + this.appointmentType, + this.arrivedOn, + this.companyName, + this.endTime, + this.episodeNo, + this.fallRiskScore, + this.gender, + this.medicationOrders, + this.mobileNumber, + this.nationality, + this.patientMRN, + this.patientName, + this.rowCount, + this.startTime, + this.visitType}); PatientArrivalEntity.fromJson(Map json) { age = json['age']; @@ -81,4 +81,4 @@ class PatientArrivalEntity { data['visitType'] = this.visitType; return data; } -} \ No newline at end of file +} diff --git a/lib/models/patient/get_clinic_by_project_id_request.dart b/lib/models/patient/get_clinic_by_project_id_request.dart index 47122bf1..5dc820be 100644 --- a/lib/models/patient/get_clinic_by_project_id_request.dart +++ b/lib/models/patient/get_clinic_by_project_id_request.dart @@ -1,9 +1,8 @@ class ClinicByProjectIdRequest { - - /* - *@author: Ibrahim Albitar - *@Date:03/06/2020 - *@param: + /* + *@author: Ibrahim Albitar + *@Date:03/06/2020 + *@param: *@return: *@desc: ClinicByProjectIdRequest */ @@ -19,6 +18,7 @@ class ClinicByProjectIdRequest { bool isLoginForDoctorApp; bool patientOutSA; int patientTypeID; + /* { "ProjectID": 21, diff --git a/lib/models/patient/get_doctor_by_clinic_id_request.dart b/lib/models/patient/get_doctor_by_clinic_id_request.dart index 9504fc35..0ac6ee62 100644 --- a/lib/models/patient/get_doctor_by_clinic_id_request.dart +++ b/lib/models/patient/get_doctor_by_clinic_id_request.dart @@ -1,5 +1,4 @@ class DoctorsByClinicIdRequest { - int clinicID; int projectID; bool continueDentalPlan; @@ -13,23 +12,20 @@ class DoctorsByClinicIdRequest { bool license; bool isDentalAllowedBackend; - - DoctorsByClinicIdRequest( - { - this.clinicID, - this.projectID, - this.continueDentalPlan = false, - this.isSearchAppointmnetByClinicID = true, - this.patientID, - this.gender, - this.isGetNearAppointment = false, - this.isVoiceCommand = true, - this.latitude = 0, - this.longitude = 0, - this.license = true, - this.isDentalAllowedBackend = false, - }); - + DoctorsByClinicIdRequest({ + this.clinicID, + this.projectID, + this.continueDentalPlan = false, + this.isSearchAppointmnetByClinicID = true, + this.patientID, + this.gender, + this.isGetNearAppointment = false, + this.isVoiceCommand = true, + this.latitude = 0, + this.longitude = 0, + this.license = true, + this.isDentalAllowedBackend = false, + }); DoctorsByClinicIdRequest.fromJson(Map json) { clinicID = json['ClinicID']; @@ -61,6 +57,5 @@ class DoctorsByClinicIdRequest { data['License'] = this.license; data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; return data; - } } diff --git a/lib/models/patient/get_list_stp_referral_frequency_request.dart b/lib/models/patient/get_list_stp_referral_frequency_request.dart index edae9f18..597ed6de 100644 --- a/lib/models/patient/get_list_stp_referral_frequency_request.dart +++ b/lib/models/patient/get_list_stp_referral_frequency_request.dart @@ -1,11 +1,10 @@ class STPReferralFrequencyRequest { - -/* - *@author: Ibrahim Albitar - *@Date:03/06/2020 - *@param: +/* + *@author: Ibrahim Albitar + *@Date:03/06/2020 + *@param: *@return: - *@desc: + *@desc: */ int languageID; @@ -18,6 +17,7 @@ class STPReferralFrequencyRequest { bool isLoginForDoctorApp; bool patientOutSA; int patientTypeID; + /* { "LanguageID": 2, diff --git a/lib/models/patient/get_pending_patient_er_model.dart b/lib/models/patient/get_pending_patient_er_model.dart index e1b50a81..7791926a 100644 --- a/lib/models/patient/get_pending_patient_er_model.dart +++ b/lib/models/patient/get_pending_patient_er_model.dart @@ -7,9 +7,11 @@ */ import 'dart:convert'; -ListPendingPatientListModel listPendingPatientListModelFromJson(String str) => ListPendingPatientListModel.fromJson(json.decode(str)); +ListPendingPatientListModel listPendingPatientListModelFromJson(String str) => + ListPendingPatientListModel.fromJson(json.decode(str)); -String listPendingPatientListModelToJson(ListPendingPatientListModel data) => json.encode(data.toJson()); +String listPendingPatientListModelToJson(ListPendingPatientListModel data) => + json.encode(data.toJson()); class ListPendingPatientListModel { ListPendingPatientListModel({ @@ -94,89 +96,91 @@ class ListPendingPatientListModel { int vcId; String voipToken; - factory ListPendingPatientListModel.fromJson(Map json) => ListPendingPatientListModel( - acceptedBy: json["AcceptedBy"], - acceptedOn: json["AcceptedOn"], - age: json["Age"], - appointmentNo: json["AppointmentNo"], - arrivalTime: json["ArrivalTime"], - arrivalTimeD: json["ArrivalTimeD"], - callStatus: json["CallStatus"], - clientRequestId: json["ClientRequestID"], - clinicName: json["ClinicName"], - consoltationEnd: json["ConsoltationEnd"], - consultationNotes: json["ConsultationNotes"], - createdOn: json["CreatedOn"], - dateOfBirth: DateTime.parse(json["DateOfBirth"]), - deviceToken: json["DeviceToken"], - deviceType: json["DeviceType"], - doctorName: json["DoctorName"], - editOn: json["EditOn"], - gender: json["Gender"], - isFollowUp: json["IsFollowUP"], - isFromVida: json["IsFromVida"], - isLoginB: json["IsLoginB"], - isOutKsa: json["IsOutKSA"], - isRejected: json["IsRejected"], - language: json["Language"], - latitude: json["Latitude"].toDouble(), - longitude: json["Longitude"].toDouble(), - mobileNumber: json["MobileNumber"], - openSession: json["OpenSession"], - openTokenId: json["OpenTokenID"], - patientId: json["PatientID"], - patientName: json["PatientName"], - patientStatus: json["PatientStatus"], - preferredLanguage: json["PreferredLanguage"], - projectId: json["ProjectID"], - scoring: json["Scoring"], - serviceId: json["ServiceID"], - tokenId: json["TokenID"], - vcId: json["VC_ID"], - voipToken: json["VoipToken"], - ); + factory ListPendingPatientListModel.fromJson(Map json) => + ListPendingPatientListModel( + acceptedBy: json["AcceptedBy"], + acceptedOn: json["AcceptedOn"], + age: json["Age"], + appointmentNo: json["AppointmentNo"], + arrivalTime: json["ArrivalTime"], + arrivalTimeD: json["ArrivalTimeD"], + callStatus: json["CallStatus"], + clientRequestId: json["ClientRequestID"], + clinicName: json["ClinicName"], + consoltationEnd: json["ConsoltationEnd"], + consultationNotes: json["ConsultationNotes"], + createdOn: json["CreatedOn"], + dateOfBirth: DateTime.parse(json["DateOfBirth"]), + deviceToken: json["DeviceToken"], + deviceType: json["DeviceType"], + doctorName: json["DoctorName"], + editOn: json["EditOn"], + gender: json["Gender"], + isFollowUp: json["IsFollowUP"], + isFromVida: json["IsFromVida"], + isLoginB: json["IsLoginB"], + isOutKsa: json["IsOutKSA"], + isRejected: json["IsRejected"], + language: json["Language"], + latitude: json["Latitude"].toDouble(), + longitude: json["Longitude"].toDouble(), + mobileNumber: json["MobileNumber"], + openSession: json["OpenSession"], + openTokenId: json["OpenTokenID"], + patientId: json["PatientID"], + patientName: json["PatientName"], + patientStatus: json["PatientStatus"], + preferredLanguage: json["PreferredLanguage"], + projectId: json["ProjectID"], + scoring: json["Scoring"], + serviceId: json["ServiceID"], + tokenId: json["TokenID"], + vcId: json["VC_ID"], + voipToken: json["VoipToken"], + ); Map toJson() => { - "AcceptedBy": acceptedBy, - "AcceptedOn": acceptedOn, - "Age": age, - "AppointmentNo": appointmentNo, - "ArrivalTime": arrivalTime, - "ArrivalTimeD": arrivalTimeD, - "CallStatus": callStatus, - "ClientRequestID": clientRequestId, - "ClinicName": clinicName, - "ConsoltationEnd": consoltationEnd, - "ConsultationNotes": consultationNotes, - "CreatedOn": createdOn, - "DateOfBirth": "${dateOfBirth.year.toString().padLeft(4, '0')}-${dateOfBirth.month.toString().padLeft(2, '0')}-${dateOfBirth.day.toString().padLeft(2, '0')}", - "DeviceToken": deviceToken, - "DeviceType": deviceType, - "DoctorName": doctorName, - "EditOn": editOn, - "Gender": gender, - "IsFollowUP": isFollowUp, - "IsFromVida": isFromVida, - "IsLoginB": isLoginB, - "IsOutKSA": isOutKsa, - "IsRejected": isRejected, - "Language": language, - "Latitude": latitude, - "Longitude": longitude, - "MobileNumber": mobileNumber, - "OpenSession": openSession, - "OpenTokenID": openTokenId, - "PatientID": patientId, - "PatientName": patientName, - "PatientStatus": patientStatus, - "PreferredLanguage": preferredLanguage, - "ProjectID": projectId, - "Scoring": scoring, - "ServiceID": serviceId, - "TokenID": tokenId, - "VC_ID": vcId, - "VoipToken": voipToken, - }; + "AcceptedBy": acceptedBy, + "AcceptedOn": acceptedOn, + "Age": age, + "AppointmentNo": appointmentNo, + "ArrivalTime": arrivalTime, + "ArrivalTimeD": arrivalTimeD, + "CallStatus": callStatus, + "ClientRequestID": clientRequestId, + "ClinicName": clinicName, + "ConsoltationEnd": consoltationEnd, + "ConsultationNotes": consultationNotes, + "CreatedOn": createdOn, + "DateOfBirth": + "${dateOfBirth.year.toString().padLeft(4, '0')}-${dateOfBirth.month.toString().padLeft(2, '0')}-${dateOfBirth.day.toString().padLeft(2, '0')}", + "DeviceToken": deviceToken, + "DeviceType": deviceType, + "DoctorName": doctorName, + "EditOn": editOn, + "Gender": gender, + "IsFollowUP": isFollowUp, + "IsFromVida": isFromVida, + "IsLoginB": isLoginB, + "IsOutKSA": isOutKsa, + "IsRejected": isRejected, + "Language": language, + "Latitude": latitude, + "Longitude": longitude, + "MobileNumber": mobileNumber, + "OpenSession": openSession, + "OpenTokenID": openTokenId, + "PatientID": patientId, + "PatientName": patientName, + "PatientStatus": patientStatus, + "PreferredLanguage": preferredLanguage, + "ProjectID": projectId, + "Scoring": scoring, + "ServiceID": serviceId, + "TokenID": tokenId, + "VC_ID": vcId, + "VoipToken": voipToken, + }; } // To parse this JSON data, do // diff --git a/lib/models/patient/insurance_aprovals_request.dart b/lib/models/patient/insurance_aprovals_request.dart index 2d3ac663..f1e4e7bd 100644 --- a/lib/models/patient/insurance_aprovals_request.dart +++ b/lib/models/patient/insurance_aprovals_request.dart @@ -36,8 +36,7 @@ class InsuranceAprovalsRequest { int patientTypeID; InsuranceAprovalsRequest( - { - this.exuldAppNO, + {this.exuldAppNO, this.patientID, this.channel = 9, this.projectID = 12, @@ -46,7 +45,7 @@ class InsuranceAprovalsRequest { this.stamp = '2020-04-23T21:01:21.492Z', this.ipAdress = '11.11.11.11', this.versionID = 5.8, - this.tokenID , + this.tokenID, this.sessionID = 'e29zoooEJ4', this.isLoginForDoctorApp = true, this.patientOutSA = false}); diff --git a/lib/models/patient/lab_orders/lab_orders_req_model.dart b/lib/models/patient/lab_orders/lab_orders_req_model.dart index a97f4093..29928f4e 100644 --- a/lib/models/patient/lab_orders/lab_orders_req_model.dart +++ b/lib/models/patient/lab_orders/lab_orders_req_model.dart @@ -1,5 +1,4 @@ - -/* +/* *@author: Elham Rababah *@Date:6/5/2020 *@param: @@ -27,12 +26,12 @@ class LabOrdersReqModel { this.languageID, this.tokenID, this.stamp = '2020-04-26T09:32:18.317Z', - this.iPAdress='11.11.11.11', - this.versionID=5.5, - this.channel=9, - this.sessionID='E2bsEeYEJo', - this.isLoginForDoctorApp =true, - this.patientOutSA=false}); + this.iPAdress = '11.11.11.11', + this.versionID = 5.5, + this.channel = 9, + this.sessionID = 'E2bsEeYEJo', + this.isLoginForDoctorApp = true, + this.patientOutSA = false}); LabOrdersReqModel.fromJson(Map json) { patientID = json['PatientID']; diff --git a/lib/models/patient/lab_orders/lab_orders_res_model.dart b/lib/models/patient/lab_orders/lab_orders_res_model.dart index 7f463933..86646cee 100644 --- a/lib/models/patient/lab_orders/lab_orders_res_model.dart +++ b/lib/models/patient/lab_orders/lab_orders_res_model.dart @@ -1,5 +1,3 @@ - - import 'package:doctor_app_flutter/util/date-utils.dart'; class LabOrdersResModel { diff --git a/lib/models/patient/lab_result/lab_result.dart b/lib/models/patient/lab_result/lab_result.dart index ca753f2d..30925f12 100644 --- a/lib/models/patient/lab_result/lab_result.dart +++ b/lib/models/patient/lab_result/lab_result.dart @@ -30,33 +30,33 @@ class LabResult { LabResult( {this.setupID, - this.projectID, - this.orderNo, - this.lineItemNo, - this.packageID, - this.testID, - this.description, - this.resultValue, - this.referenceRange, - this.convertedResultValue, - this.convertedReferenceRange, - this.resultValueFlag, - this.status, - this.createdBy, - this.createdByN, - this.createdOn, - this.editedBy, - this.editedByN, - this.editedOn, - this.verifiedBy, - this.verifiedByN, - this.verifiedOn, - this.patientID, - this.gender, - this.maleInterpretativeData, - this.femaleInterpretativeData, - this.testCode, - this.statusDescription}); + this.projectID, + this.orderNo, + this.lineItemNo, + this.packageID, + this.testID, + this.description, + this.resultValue, + this.referenceRange, + this.convertedResultValue, + this.convertedReferenceRange, + this.resultValueFlag, + this.status, + this.createdBy, + this.createdByN, + this.createdOn, + this.editedBy, + this.editedByN, + this.editedOn, + this.verifiedBy, + this.verifiedByN, + this.verifiedOn, + this.patientID, + this.gender, + this.maleInterpretativeData, + this.femaleInterpretativeData, + this.testCode, + this.statusDescription}); LabResult.fromJson(Map json) { setupID = json['SetupID']; diff --git a/lib/models/patient/lab_result/lab_result_req_model.dart b/lib/models/patient/lab_result/lab_result_req_model.dart index 5e58a4a5..f070d4c2 100644 --- a/lib/models/patient/lab_result/lab_result_req_model.dart +++ b/lib/models/patient/lab_result/lab_result_req_model.dart @@ -16,19 +16,19 @@ class RequestLabResult { RequestLabResult( {this.projectID, - this.setupID, - this.orderNo, - this.invoiceNo, - this.patientTypeID, - this.languageID, - this.stamp, - this.iPAdress, - this.versionID, - this.channel, - this.tokenID, - this.sessionID, - this.isLoginForDoctorApp, - this.patientOutSA}); + this.setupID, + this.orderNo, + this.invoiceNo, + this.patientTypeID, + this.languageID, + this.stamp, + this.iPAdress, + this.versionID, + this.channel, + this.tokenID, + this.sessionID, + this.isLoginForDoctorApp, + this.patientOutSA}); RequestLabResult.fromJson(Map json) { projectID = json['ProjectID']; diff --git a/lib/models/patient/my_referral/clinic-doctor.dart b/lib/models/patient/my_referral/clinic-doctor.dart index 843f636c..0679f4c8 100644 --- a/lib/models/patient/my_referral/clinic-doctor.dart +++ b/lib/models/patient/my_referral/clinic-doctor.dart @@ -41,44 +41,44 @@ class ClinicDoctor { ClinicDoctor( {this.clinicID, - this.clinicName, - this.doctorTitle, - this.iD, - this.name, - this.projectID, - this.projectName, - this.actualDoctorRate, - this.clinicRoomNo, - this.date, - this.dayName, - this.doctorID, - this.doctorImageURL, - this.doctorProfile, - this.doctorProfileInfo, - this.doctorRate, - this.gender, - this.genderDescription, - this.isAppointmentAllowed, - this.isDoctorAllowVedioCall, - this.isDoctorDummy, - this.isLiveCare, - this.latitude, - this.longitude, - this.nationalityFlagURL, - this.nationalityID, - this.nationalityName, - this.nearestFreeSlot, - this.noOfPatientsRate, - this.originalClinicID, - this.personRate, - this.projectDistanceInKiloMeters, - this.qR, - this.qRString, - this.rateNumber, - this.serviceID, - this.setupID, - this.speciality, - this.workingHours}); + this.clinicName, + this.doctorTitle, + this.iD, + this.name, + this.projectID, + this.projectName, + this.actualDoctorRate, + this.clinicRoomNo, + this.date, + this.dayName, + this.doctorID, + this.doctorImageURL, + this.doctorProfile, + this.doctorProfileInfo, + this.doctorRate, + this.gender, + this.genderDescription, + this.isAppointmentAllowed, + this.isDoctorAllowVedioCall, + this.isDoctorDummy, + this.isLiveCare, + this.latitude, + this.longitude, + this.nationalityFlagURL, + this.nationalityID, + this.nationalityName, + this.nearestFreeSlot, + this.noOfPatientsRate, + this.originalClinicID, + this.personRate, + this.projectDistanceInKiloMeters, + this.qR, + this.qRString, + this.rateNumber, + this.serviceID, + this.setupID, + this.speciality, + this.workingHours}); ClinicDoctor.fromJson(Map json) { clinicID = json['ClinicID']; @@ -165,5 +165,4 @@ class ClinicDoctor { data['WorkingHours'] = this.workingHours; return data; } - -} \ No newline at end of file +} diff --git a/lib/models/patient/my_referral/my_referral_patient_model.dart b/lib/models/patient/my_referral/my_referral_patient_model.dart index f1506f8e..dc7bcdbe 100644 --- a/lib/models/patient/my_referral/my_referral_patient_model.dart +++ b/lib/models/patient/my_referral/my_referral_patient_model.dart @@ -53,54 +53,54 @@ class MyReferralPatientModel { MyReferralPatientModel( {this.projectID, - this.lineItemNo, - this.doctorID, - this.patientID, - this.doctorName, - this.doctorNameN, - this.firstName, - this.middleName, - this.lastName, - this.firstNameN, - this.middleNameN, - this.lastNameN, - this.gender, - this.dateofBirth, - this.mobileNumber, - this.emailAddress, - this.patientIdentificationNo, - this.patientType, - this.admissionNo, - this.admissionDate, - this.roomID, - this.bedID, - this.nursingStationID, - this.description, - this.nationalityName, - this.nationalityNameN, - this.clinicDescription, - this.clinicDescriptionN, - this.referralDoctor, - this.referringDoctor, - this.referralClinic, - this.referringClinic, - this.referralStatus, - this.referralDate, - this.referringDoctorRemarks, - this.referredDoctorRemarks, - this.referralResponseOn, - this.priority, - this.frequency, - this.mAXResponseTime, - this.age, - this.frequencyDescription, - this.genderDescription, - this.isDoctorLate, - this.isDoctorResponse, - this.nursingStationName, - this.priorityDescription, - this.referringClinicDescription, - this.referringDoctorName}); + this.lineItemNo, + this.doctorID, + this.patientID, + this.doctorName, + this.doctorNameN, + this.firstName, + this.middleName, + this.lastName, + this.firstNameN, + this.middleNameN, + this.lastNameN, + this.gender, + this.dateofBirth, + this.mobileNumber, + this.emailAddress, + this.patientIdentificationNo, + this.patientType, + this.admissionNo, + this.admissionDate, + this.roomID, + this.bedID, + this.nursingStationID, + this.description, + this.nationalityName, + this.nationalityNameN, + this.clinicDescription, + this.clinicDescriptionN, + this.referralDoctor, + this.referringDoctor, + this.referralClinic, + this.referringClinic, + this.referralStatus, + this.referralDate, + this.referringDoctorRemarks, + this.referredDoctorRemarks, + this.referralResponseOn, + this.priority, + this.frequency, + this.mAXResponseTime, + this.age, + this.frequencyDescription, + this.genderDescription, + this.isDoctorLate, + this.isDoctorResponse, + this.nursingStationName, + this.priorityDescription, + this.referringClinicDescription, + this.referringDoctorName}); MyReferralPatientModel.fromJson(Map json) { projectID = json['ProjectID']; diff --git a/lib/models/patient/my_referral/my_referred_patient_model.dart b/lib/models/patient/my_referral/my_referred_patient_model.dart index b353e587..4f9aabad 100644 --- a/lib/models/patient/my_referral/my_referred_patient_model.dart +++ b/lib/models/patient/my_referral/my_referred_patient_model.dart @@ -1,5 +1,3 @@ - - class MyReferredPatientModel { String rowID; int projectID; @@ -66,71 +64,71 @@ class MyReferredPatientModel { bool isReferralDoctorSameBranch; String referralStatusDesc; - MyReferredPatientModel({ - this.rowID, - this.projectID, - this.lineItemNo, - this.doctorID, - this.patientID, - this.doctorName, - this.doctorNameN, - this.firstName, - this.middleName, - this.lastName, - this.firstNameN, - this.middleNameN, - this.lastNameN, - this.gender, - this.dateofBirth, - this.mobileNumber, - this.emailAddress, - this.patientIdentificationNo, - this.patientType, - this.admissionNo, - this.admissionDate, - this.roomID, - this.bedID, - this.nursingStationID, - this.description, - this.nationalityName, - this.nationalityNameN, - this.clinicDescription, - this.clinicDescriptionN, - this.referralDoctor, - this.referringDoctor, - this.referralClinic, - this.referringClinic, - this.referralStatus, - this.referralDate, - this.referringDoctorRemarks, - this.referredDoctorRemarks, - this.referralResponseOn, - this.priority, - this.frequency, - this.mAXResponseTime, - this.episodeID, - this.appointmentNo, - this.appointmentDate, - this.appointmentType, - this.patientMRN, - this.createdOn, - this.clinicID, - this.nationalityID, - this.age, - this.doctorImageURL, - this.frequencyDescription, - this.genderDescription, - this.isDoctorLate, - this.isDoctorResponse, - this.nationalityFlagURL, - this.nursingStationName, - this.priorityDescription, - this.referringClinicDescription, - this.referringDoctorName, - this.isReferralDoctorSameBranch, - this.referralDoctorName, - this.referralClinicDescription,this.referralStatusDesc - }); + MyReferredPatientModel( + {this.rowID, + this.projectID, + this.lineItemNo, + this.doctorID, + this.patientID, + this.doctorName, + this.doctorNameN, + this.firstName, + this.middleName, + this.lastName, + this.firstNameN, + this.middleNameN, + this.lastNameN, + this.gender, + this.dateofBirth, + this.mobileNumber, + this.emailAddress, + this.patientIdentificationNo, + this.patientType, + this.admissionNo, + this.admissionDate, + this.roomID, + this.bedID, + this.nursingStationID, + this.description, + this.nationalityName, + this.nationalityNameN, + this.clinicDescription, + this.clinicDescriptionN, + this.referralDoctor, + this.referringDoctor, + this.referralClinic, + this.referringClinic, + this.referralStatus, + this.referralDate, + this.referringDoctorRemarks, + this.referredDoctorRemarks, + this.referralResponseOn, + this.priority, + this.frequency, + this.mAXResponseTime, + this.episodeID, + this.appointmentNo, + this.appointmentDate, + this.appointmentType, + this.patientMRN, + this.createdOn, + this.clinicID, + this.nationalityID, + this.age, + this.doctorImageURL, + this.frequencyDescription, + this.genderDescription, + this.isDoctorLate, + this.isDoctorResponse, + this.nationalityFlagURL, + this.nursingStationName, + this.priorityDescription, + this.referringClinicDescription, + this.referringDoctorName, + this.isReferralDoctorSameBranch, + this.referralDoctorName, + this.referralClinicDescription, + this.referralStatusDesc}); MyReferredPatientModel.fromJson(Map json) { rowID = json['RowID']; @@ -167,7 +165,13 @@ class MyReferredPatientModel { referralClinic = json['ReferralClinic']; referringClinic = json['ReferringClinic']; createdOn = json['CreatedOn']; - referralStatus = json["ReferralStatus"] is String?json['ReferralStatus']== "Accepted"?46:json['ReferralStatus']=="Pending"?1:0 : json['ReferralStatus']; + referralStatus = json["ReferralStatus"] is String + ? json['ReferralStatus'] == "Accepted" + ? 46 + : json['ReferralStatus'] == "Pending" + ? 1 + : 0 + : json['ReferralStatus']; referralDate = json['ReferralDate'] ?? createdOn; referringDoctorRemarks = json['ReferringDoctorRemarks']; referredDoctorRemarks = json['ReferredDoctorRemarks']; diff --git a/lib/models/patient/orders_request.dart b/lib/models/patient/orders_request.dart index 1372cfd6..4adab686 100644 --- a/lib/models/patient/orders_request.dart +++ b/lib/models/patient/orders_request.dart @@ -1,5 +1,4 @@ - -/* +/* *@author: Ibrahim Albitar *@Date:15/5/2020 @@ -38,14 +37,14 @@ class OrdersRequest { double versionID; OrdersRequest( - {this.visitType , + {this.visitType, this.admissionNo, this.projectID = 12, this.stamp = '2020-04-23T21:01:21.492Z', this.languageID = 2, this.iPAdress = '11.11.11.11', this.channel = 9, - this.tokenID , + this.tokenID, this.sessionID = "LlBk8lUEJY", this.isLoginForDoctorApp = true, this.patientTypeID = 1, @@ -85,4 +84,4 @@ class OrdersRequest { data['VersionID'] = this.versionID; return data; } -} \ No newline at end of file +} diff --git a/lib/models/patient/patiant_info_model.dart b/lib/models/patient/patiant_info_model.dart index df966f03..9e4ebeb2 100644 --- a/lib/models/patient/patiant_info_model.dart +++ b/lib/models/patient/patiant_info_model.dart @@ -158,7 +158,9 @@ class PatiantInformtion { PatiantInformtion.fromJson(Map json) { { - patientDetails = json['patientDetails'] != null ? new PatiantInformtion.fromJson(json['patientDetails']) : null; + patientDetails = json['patientDetails'] != null + ? new PatiantInformtion.fromJson(json['patientDetails']) + : null; projectId = json["ProjectID"] ?? json["projectID"]; clinicId = json["ClinicID"] ?? json["clinicID"]; doctorId = json["DoctorID"] ?? json["doctorID"]; @@ -186,7 +188,8 @@ class PatiantInformtion { nationalityId = json["NationalityID"] ?? json["nationalityID"]; mobileNumber = json["MobileNumber"] ?? json["mobileNumber"]; emailAddress = json["EmailAddress"] ?? json["emailAddress"]; - patientIdentificationNo = json["PatientIdentificationNo"] ?? json["patientIdentificationNo"]; + patientIdentificationNo = + json["PatientIdentificationNo"] ?? json["patientIdentificationNo"]; //TODO make 7 dynamic when the backend retrun it in patient arrival patientType = json["PatientType"] ?? json["patientType"] ?? 1; admissionNo = json["AdmissionNo"] ?? json["admissionNo"]; @@ -196,10 +199,16 @@ class PatiantInformtion { bedId = json["BedID"] ?? json["bedID"]; nursingStationId = json["NursingStationID"] ?? json["nursingStationID"]; description = json["Description"] ?? json["description"]; - clinicDescription = json["ClinicDescription"] ?? json["clinicDescription"]; - clinicDescriptionN = json["ClinicDescriptionN"] ?? json["clinicDescriptionN"]; - nationalityName = json["NationalityName"] ?? json["nationalityName"] ?? json['NationalityName']; - nationalityNameN = json["NationalityNameN"] ?? json["nationalityNameN"] ?? json['NationalityNameN']; + clinicDescription = + json["ClinicDescription"] ?? json["clinicDescription"]; + clinicDescriptionN = + json["ClinicDescriptionN"] ?? json["clinicDescriptionN"]; + nationalityName = json["NationalityName"] ?? + json["nationalityName"] ?? + json['NationalityName']; + nationalityNameN = json["NationalityNameN"] ?? + json["nationalityNameN"] ?? + json['NationalityNameN']; age = json["Age"] ?? json["age"]; genderDescription = json["GenderDescription"]; nursingStationName = json["NursingStationName"]; @@ -207,7 +216,8 @@ class PatiantInformtion { startTime = json["startTime"] ?? json['StartTime']; appointmentNo = json['appointmentNo'] ?? json['AppointmentNo']; appointmentType = json['appointmentType']; - appointmentTypeId = json['appointmentTypeId'] ?? json['appointmentTypeid']; + appointmentTypeId = + json['appointmentTypeId'] ?? json['appointmentTypeid']; arrivedOn = json['ArrivedOn'] ?? json['arrivedOn'] ?? json['ArrivedOn']; clinicGroupId = json['clinicGroupId']; companyName = json['companyName']; @@ -229,9 +239,12 @@ class PatiantInformtion { ? int?.parse(json["patientId"].toString()) : ''); visitType = json['visitType'] ?? json['visitType'] ?? json['visitType']; - nationalityFlagURL = json['NationalityFlagURL'] ?? json['NationalityFlagURL']; - patientStatusType = json['patientStatusType'] ?? json['PatientStatusType']; - visitTypeId = json['visitTypeId'] ?? json['visitTypeId'] ?? json['visitTypeid']; + nationalityFlagURL = + json['NationalityFlagURL'] ?? json['NationalityFlagURL']; + patientStatusType = + json['patientStatusType'] ?? json['PatientStatusType']; + visitTypeId = + json['visitTypeId'] ?? json['visitTypeId'] ?? json['visitTypeid']; startTimes = json['StartTime'] ?? json['StartTime']; dischargeDate = json['DischargeDate']; status = json['Status']; @@ -254,8 +267,9 @@ class PatiantInformtion { ? AppDateUtils.convertStringToDate(json["admissionDate"]) : null; - appointmentDateWithDateTimeForm = - json["AppointmentDate"] != null ? AppDateUtils.convertStringToDate(json["AppointmentDate"]) : null; + appointmentDateWithDateTimeForm = json["AppointmentDate"] != null + ? AppDateUtils.convertStringToDate(json["AppointmentDate"]) + : null; } } @@ -303,7 +317,8 @@ class PatiantInformtion { data["gender"] = this.gender; data['Age'] = this.age; - data['AppointmentDate'] = this.appointmentDate.isNotEmpty ? this.appointmentDate : null; + data['AppointmentDate'] = + this.appointmentDate.isNotEmpty ? this.appointmentDate : null; data['AppointmentNo'] = this.appointmentNo; data['ArrivalTime'] = this.arrivalTime; diff --git a/lib/models/patient/patient_arrival/get_patient_arrival_list_request_model.dart b/lib/models/patient/patient_arrival/get_patient_arrival_list_request_model.dart index 1d0da9c5..5ec16352 100644 --- a/lib/models/patient/patient_arrival/get_patient_arrival_list_request_model.dart +++ b/lib/models/patient/patient_arrival/get_patient_arrival_list_request_model.dart @@ -40,7 +40,6 @@ class GetPatientArrivalListRequestModel { data['VidaAuthTokenID'] = this.vidaAuthTokenID; data['PatientMRN'] = this.patientMRN; - return data; } } diff --git a/lib/models/patient/patient_model.dart b/lib/models/patient/patient_model.dart index 7368c538..3a8eb9ae 100644 --- a/lib/models/patient/patient_model.dart +++ b/lib/models/patient/patient_model.dart @@ -31,6 +31,7 @@ class PatientModel { int Searchtype; String IdentificationNo; String MobileNo; + int get getProjectID => ProjectID; set setProjectID(int ProjectID) => this.ProjectID = ProjectID; @@ -42,6 +43,7 @@ class PatientModel { int get getDoctorID => DoctorID; set setDoctorID(int DoctorID) => this.DoctorID = DoctorID; + String get getFirstName => FirstName; set setFirstName(String FirstName) => this.FirstName = FirstName; @@ -141,6 +143,7 @@ class PatientModel { FirstName: json["FirstName"], LastName: json["LasttName"], ); + Map toJson() { final Map data = new Map(); data['ProjectID'] = this.ProjectID; diff --git a/lib/models/patient/prescription/prescription_report.dart b/lib/models/patient/prescription/prescription_report.dart index 05d28bdc..d559b9d0 100644 --- a/lib/models/patient/prescription/prescription_report.dart +++ b/lib/models/patient/prescription/prescription_report.dart @@ -34,37 +34,37 @@ class PrescriptionReport { PrescriptionReport( {this.address, - this.appointmentNo, - this.clinic, - this.companyName, - this.days, - this.doctorName, - this.doseDailyQuantity, - this.frequency, - this.frequencyNumber, - this.imageExtension, - this.imageSRCUrl, - this.imageString, - this.imageThumbUrl, - this.isCovered, - this.itemDescription, - this.itemID, - this.orderDate, - this.patientID, - this.patientName, - this.phoneOffice1, - this.prescriptionQR, - this.prescriptionTimes, - this.productImage, - this.productImageBase64, - this.productImageString, - this.projectID, - this.projectName, - this.remarks, - this.route, - this.sKU, - this.scaleOffset, - this.startDate}); + this.appointmentNo, + this.clinic, + this.companyName, + this.days, + this.doctorName, + this.doseDailyQuantity, + this.frequency, + this.frequencyNumber, + this.imageExtension, + this.imageSRCUrl, + this.imageString, + this.imageThumbUrl, + this.isCovered, + this.itemDescription, + this.itemID, + this.orderDate, + this.patientID, + this.patientName, + this.phoneOffice1, + this.prescriptionQR, + this.prescriptionTimes, + this.productImage, + this.productImageBase64, + this.productImageString, + this.projectID, + this.projectName, + this.remarks, + this.route, + this.sKU, + this.scaleOffset, + this.startDate}); PrescriptionReport.fromJson(Map json) { address = json['Address']; diff --git a/lib/models/patient/prescription/prescription_report_for_in_patient.dart b/lib/models/patient/prescription/prescription_report_for_in_patient.dart index 21cb13b1..12b5e1e6 100644 --- a/lib/models/patient/prescription/prescription_report_for_in_patient.dart +++ b/lib/models/patient/prescription/prescription_report_for_in_patient.dart @@ -51,52 +51,52 @@ class PrescriptionReportForInPatient { PrescriptionReportForInPatient( {this.admissionNo, - this.authorizedBy, - this.bedNo, - this.comments, - this.createdBy, - this.createdByName, - this.createdByNameN, - this.createdOn, - this.direction, - this.directionID, - this.directionN, - this.dose, - this.editedBy, - this.iVDiluentLine, - this.iVDiluentType, - this.iVDiluentVolume, - this.iVRate, - this.iVStability, - this.itemDescription, - this.itemID, - this.lineItemNo, - this.locationId, - this.noOfDoses, - this.orderNo, - this.patientID, - this.pharmacyRemarks, - this.prescriptionDatetime, - this.prescriptionNo, - this.processedBy, - this.projectID, - this.refillID, - this.refillType, - this.refillTypeN, - this.reviewedPharmacist, - this.roomId, - this.route, - this.routeId, - this.routeN, - this.setupID, - this.startDatetime, - this.status, - this.statusDescription, - this.statusDescriptionN, - this.stopDatetime, - this.unitofMeasurement, - this.unitofMeasurementDescription, - this.unitofMeasurementDescriptionN}); + this.authorizedBy, + this.bedNo, + this.comments, + this.createdBy, + this.createdByName, + this.createdByNameN, + this.createdOn, + this.direction, + this.directionID, + this.directionN, + this.dose, + this.editedBy, + this.iVDiluentLine, + this.iVDiluentType, + this.iVDiluentVolume, + this.iVRate, + this.iVStability, + this.itemDescription, + this.itemID, + this.lineItemNo, + this.locationId, + this.noOfDoses, + this.orderNo, + this.patientID, + this.pharmacyRemarks, + this.prescriptionDatetime, + this.prescriptionNo, + this.processedBy, + this.projectID, + this.refillID, + this.refillType, + this.refillTypeN, + this.reviewedPharmacist, + this.roomId, + this.route, + this.routeId, + this.routeN, + this.setupID, + this.startDatetime, + this.status, + this.statusDescription, + this.statusDescriptionN, + this.stopDatetime, + this.unitofMeasurement, + this.unitofMeasurementDescription, + this.unitofMeasurementDescriptionN}); PrescriptionReportForInPatient.fromJson(Map json) { admissionNo = json['AdmissionNo']; @@ -125,7 +125,8 @@ class PrescriptionReportForInPatient { orderNo = json['OrderNo']; patientID = json['PatientID']; pharmacyRemarks = json['PharmacyRemarks']; - prescriptionDatetime = AppDateUtils.convertStringToDate(json['PrescriptionDatetime']); + prescriptionDatetime = + AppDateUtils.convertStringToDate(json['PrescriptionDatetime']); prescriptionNo = json['PrescriptionNo']; processedBy = json['ProcessedBy']; projectID = json['ProjectID']; @@ -138,7 +139,7 @@ class PrescriptionReportForInPatient { routeId = json['RouteId']; routeN = json['RouteN']; setupID = json['SetupID']; - startDatetime = AppDateUtils.convertStringToDate(json['StartDatetime']) ; + startDatetime = AppDateUtils.convertStringToDate(json['StartDatetime']); status = json['Status']; statusDescription = json['StatusDescription']; statusDescriptionN = json['StatusDescriptionN']; diff --git a/lib/models/patient/prescription/request_prescription_report.dart b/lib/models/patient/prescription/request_prescription_report.dart index 0581692e..99b9762a 100644 --- a/lib/models/patient/prescription/request_prescription_report.dart +++ b/lib/models/patient/prescription/request_prescription_report.dart @@ -16,19 +16,19 @@ class RequestPrescriptionReport { RequestPrescriptionReport( {this.projectID, - this.appointmentNo, - this.episodeID, - this.setupID, - this.patientTypeID, - this.languageID, - this.stamp, - this.iPAdress, - this.versionID, - this.channel, - this.tokenID, - this.sessionID, - this.isLoginForDoctorApp, - this.patientOutSA}); + this.appointmentNo, + this.episodeID, + this.setupID, + this.patientTypeID, + this.languageID, + this.stamp, + this.iPAdress, + this.versionID, + this.channel, + this.tokenID, + this.sessionID, + this.isLoginForDoctorApp, + this.patientOutSA}); RequestPrescriptionReport.fromJson(Map json) { projectID = json['ProjectID']; diff --git a/lib/models/patient/progress_note_request.dart b/lib/models/patient/progress_note_request.dart index 13e1b571..77920b25 100644 --- a/lib/models/patient/progress_note_request.dart +++ b/lib/models/patient/progress_note_request.dart @@ -1,5 +1,4 @@ - -/* +/* *@author: Ibrahim Albitar *@Date:15/5/2020 @@ -35,15 +34,16 @@ class ProgressNoteRequest { bool isLoginForDoctorApp; bool patientOutSA; int patientTypeID; + ProgressNoteRequest( - {this.visitType , + {this.visitType, this.admissionNo, this.projectID = 12, this.stamp = '2020-04-23T21:01:21.492Z', this.languageID = 2, this.iPAdress = '11.11.11.11', this.channel = 9, - this.tokenID , + this.tokenID, this.sessionID = "LlBk8lUEJY", this.isLoginForDoctorApp = true, this.patientTypeID = 1, @@ -80,4 +80,4 @@ class ProgressNoteRequest { data['PatientTypeID'] = this.patientTypeID; return data; } -} \ No newline at end of file +} diff --git a/lib/models/patient/reauest_prescription_report_for_in_patient.dart b/lib/models/patient/reauest_prescription_report_for_in_patient.dart index 857705c4..6299908d 100644 --- a/lib/models/patient/reauest_prescription_report_for_in_patient.dart +++ b/lib/models/patient/reauest_prescription_report_for_in_patient.dart @@ -15,18 +15,18 @@ class RequestPrescriptionReportForInPatient { RequestPrescriptionReportForInPatient( {this.patientID, - this.projectID, - this.admissionNo, - this.languageID, - this.stamp, - this.iPAdress, - this.versionID, - this.channel, - this.tokenID, - this.sessionID, - this.isLoginForDoctorApp, - this.patientOutSA, - this.patientTypeID}); + this.projectID, + this.admissionNo, + this.languageID, + this.stamp, + this.iPAdress, + this.versionID, + this.channel, + this.tokenID, + this.sessionID, + this.isLoginForDoctorApp, + this.patientOutSA, + this.patientTypeID}); RequestPrescriptionReportForInPatient.fromJson(Map json) { patientID = json['PatientID']; diff --git a/lib/models/patient/refer_to_doctor_request.dart b/lib/models/patient/refer_to_doctor_request.dart index 83db54f4..11e1ca01 100644 --- a/lib/models/patient/refer_to_doctor_request.dart +++ b/lib/models/patient/refer_to_doctor_request.dart @@ -1,11 +1,10 @@ import 'package:flutter/cupertino.dart'; class ReferToDoctorRequest { - -/* - *@author: Ibrahim Albitar - *@Date:03/06/2020 - *@param: +/* + *@author: Ibrahim Albitar + *@Date:03/06/2020 + *@param: *@return: *@desc: ReferToDoctor */ @@ -35,7 +34,6 @@ class ReferToDoctorRequest { bool isLoginForDoctorApp; bool patientOutSA; - /* { "ProjectID": 21, @@ -68,17 +66,17 @@ class ReferToDoctorRequest { ReferToDoctorRequest( {@required this.projectID, @required this.admissionNo, - @required this.roomID , + @required this.roomID, @required this.referralClinic, - @required this.referralDoctor , + @required this.referralDoctor, @required this.createdBy, - @required this.editedBy , + @required this.editedBy, @required this.patientID, @required this.patientTypeID, @required this.referringClinic, @required this.referringDoctor, @required this.referringDoctorRemarks, - @required this.priority , + @required this.priority, @required this.frequency, @required this.extension, this.languageID = 2, diff --git a/lib/models/patient/request_my_referral_patient_model.dart b/lib/models/patient/request_my_referral_patient_model.dart index 219b7b2a..382f6309 100644 --- a/lib/models/patient/request_my_referral_patient_model.dart +++ b/lib/models/patient/request_my_referral_patient_model.dart @@ -1,5 +1,3 @@ - - class RequestMyReferralPatientModel { int projectID; int clinicID; @@ -34,15 +32,15 @@ class RequestMyReferralPatientModel { this.patientID = 0, this.from = "0", this.to = "0", - this.languageID , - this.stamp , - this.iPAdress , - this.versionID , - this.channel , + this.languageID, + this.stamp, + this.iPAdress, + this.versionID, + this.channel, this.tokenID, - this.sessionID , - this.isLoginForDoctorApp , - this.patientOutSA }); + this.sessionID, + this.isLoginForDoctorApp, + this.patientOutSA}); RequestMyReferralPatientModel.fromJson(Map json) { projectID = json['ProjectID']; diff --git a/lib/models/patient/topten_users_res_model.dart b/lib/models/patient/topten_users_res_model.dart index 3454568f..ac603cdb 100644 --- a/lib/models/patient/topten_users_res_model.dart +++ b/lib/models/patient/topten_users_res_model.dart @@ -1,5 +1,4 @@ - -/* +/* *@author: Amjad Amireh *@Date:27/4/2020 *@param: @@ -8,25 +7,24 @@ *@desc: */ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; + //ModelResponse class ModelResponse { final List list; - String firstName; + String firstName; + ModelResponse({ this.list, this.firstName, }); factory ModelResponse.fromJson(List parsedJson) { - - - List list = new List(); - + List list = new List(); + list = parsedJson.map((i) => PatiantInformtion.fromJson(i)).toList(); return new ModelResponse(list: list); } } -class PatiantInformtionl { -} \ No newline at end of file +class PatiantInformtionl {} diff --git a/lib/models/patient/vital_sign/patient-vital-sign-data.dart b/lib/models/patient/vital_sign/patient-vital-sign-data.dart index 57133a08..7c0448b9 100644 --- a/lib/models/patient/vital_sign/patient-vital-sign-data.dart +++ b/lib/models/patient/vital_sign/patient-vital-sign-data.dart @@ -33,36 +33,36 @@ class VitalSignData { VitalSignData( {this.appointmentNo, - this.bloodPressureCuffLocation, - this.bloodPressureCuffSize, - this.bloodPressureHigher, - this.bloodPressureLower, - this.bloodPressurePatientPosition, - this.bodyMassIndex, - this.fio2, - this.headCircumCm, - this.heightCm, - this.idealBodyWeightLbs, - this.isPainManagementDone, - this.isVitalsRequired, - this.leanBodyWeightLbs, - this.painCharacter, - this.painDuration, - this.painFrequency, - this.painLocation, - this.painScore, - this.patientMRN, - this.patientType, - this.pulseBeatPerMinute, - this.pulseRhythm, - this.respirationBeatPerMinute, - this.respirationPattern, - this.sao2, - this.status, - this.temperatureCelcius, - this.temperatureCelciusMethod, - this.waistSizeInch, - this.weightKg}); + this.bloodPressureCuffLocation, + this.bloodPressureCuffSize, + this.bloodPressureHigher, + this.bloodPressureLower, + this.bloodPressurePatientPosition, + this.bodyMassIndex, + this.fio2, + this.headCircumCm, + this.heightCm, + this.idealBodyWeightLbs, + this.isPainManagementDone, + this.isVitalsRequired, + this.leanBodyWeightLbs, + this.painCharacter, + this.painDuration, + this.painFrequency, + this.painLocation, + this.painScore, + this.patientMRN, + this.patientType, + this.pulseBeatPerMinute, + this.pulseRhythm, + this.respirationBeatPerMinute, + this.respirationPattern, + this.sao2, + this.status, + this.temperatureCelcius, + this.temperatureCelciusMethod, + this.waistSizeInch, + this.weightKg}); VitalSignData.fromJson(Map json) { appointmentNo = json['appointmentNo']; @@ -133,5 +133,4 @@ class VitalSignData { data['weightKg'] = this.weightKg; return data; } - } diff --git a/lib/models/patient/vital_sign/vital_sign_req_model.dart b/lib/models/patient/vital_sign/vital_sign_req_model.dart index 8f5be6ba..4861bf8d 100644 --- a/lib/models/patient/vital_sign/vital_sign_req_model.dart +++ b/lib/models/patient/vital_sign/vital_sign_req_model.dart @@ -1,5 +1,4 @@ - -/* +/* *@author: Elham Rababah *@Date:27/4/2020 *@param: @@ -13,7 +12,8 @@ class VitalSignReqModel { int inOutpatientType; int transNo; int languageID; - String stamp ; + String stamp; + String iPAdress; double versionID; int channel; @@ -30,12 +30,12 @@ class VitalSignReqModel { this.languageID, this.tokenID, this.stamp = '2020-04-26T09:32:18.317Z', - this.iPAdress='11.11.11.11', - this.channel=9, - this.sessionID='E2bsEeYEJo', - this.isLoginForDoctorApp=true, + this.iPAdress = '11.11.11.11', + this.channel = 9, + this.sessionID = 'E2bsEeYEJo', + this.isLoginForDoctorApp = true, this.patientTypeID, - this.patientOutSA=false}); + this.patientOutSA = false}); VitalSignReqModel.fromJson(Map json) { projectID = json['ProjectID']; @@ -72,5 +72,4 @@ class VitalSignReqModel { data['PatientTypeID'] = this.patientTypeID; return data; } - } diff --git a/lib/models/patient/vital_sign/vital_sign_res_model.dart b/lib/models/patient/vital_sign/vital_sign_res_model.dart index 78af108d..0645bf1f 100644 --- a/lib/models/patient/vital_sign/vital_sign_res_model.dart +++ b/lib/models/patient/vital_sign/vital_sign_res_model.dart @@ -38,7 +38,7 @@ class VitalSignResModel { var status; bool isVitalsRequired; var patientID; - var createdOn; + var createdOn; var doctorID; var clinicID; var triageCategory; @@ -61,9 +61,9 @@ class VitalSignResModel { var bloodPressureCuffLocationDesc; var bloodPressureCuffSizeDesc; var bloodPressurePatientPositionDesc; - var clinicName; - var doctorImageURL; - var doctorName; + var clinicName; + var doctorImageURL; + var doctorName; var painScoreDesc; var pulseRhythmDesc; var respirationPatternDesc; @@ -170,7 +170,9 @@ class VitalSignResModel { triageCategory = json['TriageCategory']; gCScore = json['GCScore']; lineItemNo = json['LineItemNo']; - vitalSignDate = json['VitalSignDate'] !=null? AppDateUtils.convertStringToDate(json['VitalSignDate']): new DateTime.now(); + vitalSignDate = json['VitalSignDate'] != null + ? AppDateUtils.convertStringToDate(json['VitalSignDate']) + : new DateTime.now(); actualTimeTaken = json['ActualTimeTaken']; sugarLevel = json['SugarLevel']; fBS = json['FBS']; diff --git a/lib/models/pharmacies/pharmacies_List_request_model.dart b/lib/models/pharmacies/pharmacies_List_request_model.dart index a00e217a..69341f09 100644 --- a/lib/models/pharmacies/pharmacies_List_request_model.dart +++ b/lib/models/pharmacies/pharmacies_List_request_model.dart @@ -1,5 +1,4 @@ - -/* +/* *@author: Ibrahim Albitar *@Date:27/4/2020 *@param: @@ -61,4 +60,4 @@ class PharmaciesListRequestModel { data['Channel'] = this.channel; return data; } -} \ No newline at end of file +} diff --git a/lib/models/sickleave/get_all_sickleave_response.dart b/lib/models/sickleave/get_all_sickleave_response.dart index de831213..cc8f489c 100644 --- a/lib/models/sickleave/get_all_sickleave_response.dart +++ b/lib/models/sickleave/get_all_sickleave_response.dart @@ -8,6 +8,7 @@ class GetAllSickLeaveResponse { String startDate; int status; String statusDescription; + GetAllSickLeaveResponse( {this.appointmentNo, this.isExtendedLeave, diff --git a/lib/models/sickleave/sick_leave_statisitics_model.dart b/lib/models/sickleave/sick_leave_statisitics_model.dart index f679807c..aa715e3f 100644 --- a/lib/models/sickleave/sick_leave_statisitics_model.dart +++ b/lib/models/sickleave/sick_leave_statisitics_model.dart @@ -5,8 +5,8 @@ class SickLeaveStatisticsModel { SickLeaveStatisticsModel( {this.recommendedSickLeaveDays, - this.totalLeavesByAllClinics, - this.totalLeavesByDoctor}); + this.totalLeavesByAllClinics, + this.totalLeavesByDoctor}); SickLeaveStatisticsModel.fromJson(Map json) { recommendedSickLeaveDays = json['recommendedSickLeaveDays']; diff --git a/lib/root_page.dart b/lib/root_page.dart index 35a3fa44..005fbb1b 100644 --- a/lib/root_page.dart +++ b/lib/root_page.dart @@ -22,7 +22,9 @@ class RootPage extends StatelessWidget { ); break; case APP_STATUS.UNVERIFIED: - return VerificationMethodsScreen(password: null,); + return VerificationMethodsScreen( + password: null, + ); break; case APP_STATUS.UNAUTHENTICATED: return LoginScreen(); diff --git a/lib/routes.dart b/lib/routes.dart index 248e2853..8f636d74 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -127,7 +127,7 @@ var routes = { GET_OPERATION_REPORT: (_) => OperationReportScreen(), PENDING_ORDERS: (_) => PendingOrdersScreen(), NURSING_PROGRESS_NOTE: (_) => NursingProgressNoteScreen(), - DISCHARGE_SUMMARY : (_) => DischargeSummaryPage(), + DISCHARGE_SUMMARY: (_) => DischargeSummaryPage(), DIAGNOSIS_FOR_IN_PATIENT: (_) => DiagnosisScreen(), ADMISSION_ORDERS: (_) => AdmissionOrdersScreen(), DIABETIC_CHART_VALUES: (_) => DiabeticChart(), diff --git a/lib/screens/auth/login_screen.dart b/lib/screens/auth/login_screen.dart index a67cc965..1b0a5972 100644 --- a/lib/screens/auth/login_screen.dart +++ b/lib/screens/auth/login_screen.dart @@ -255,6 +255,7 @@ class _LoginScreenState extends State { } String memberID = ""; + getProjects(memberID) async { if (memberID != null && memberID != '') { if (this.memberID != memberID) { diff --git a/lib/screens/doctor/doctor_replay/all_doctor_questions.dart b/lib/screens/doctor/doctor_replay/all_doctor_questions.dart index 489775c2..dff9136b 100644 --- a/lib/screens/doctor/doctor_replay/all_doctor_questions.dart +++ b/lib/screens/doctor/doctor_replay/all_doctor_questions.dart @@ -20,8 +20,8 @@ class AllDoctorQuestions extends StatefulWidget { } class _AllDoctorQuestionsState extends State { - int pageIndex = 1; + @override Widget build(BuildContext context) { return BaseView( @@ -33,61 +33,69 @@ class _AllDoctorQuestionsState extends State { appBarTitle: TranslationBase.of(context).replay2, isShowAppBar: false, body: model.listDoctorWorkingHoursTable.isEmpty - ?ErrorMessage(error: TranslationBase.of(context).noItem)// DrAppEmbeddedError(error: TranslationBase.of(context).noItem) + ? ErrorMessage( + error: TranslationBase.of(context) + .noItem) // DrAppEmbeddedError(error: TranslationBase.of(context).noItem) : Column( - children: [ - Expanded( - child: Container( - padding: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0), - child: NotificationListener( - child: ListView.builder( - scrollDirection: Axis.vertical, - itemCount: model.listDoctorWorkingHoursTable.length, - shrinkWrap: true, - itemBuilder: (BuildContext ctxt, int index) { - return Column( - children: [ - InkWell( - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (BuildContext context) => - DoctorReplayChat( - reply: + children: [ + Expanded( + child: Container( + padding: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0), + child: NotificationListener( + child: ListView.builder( + scrollDirection: Axis.vertical, + itemCount: model.listDoctorWorkingHoursTable.length, + shrinkWrap: true, + itemBuilder: (BuildContext ctxt, int index) { + return Column( + children: [ + InkWell( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (BuildContext context) => + DoctorReplayChat( + reply: model + .listDoctorWorkingHoursTable[ + index], + previousModel: model, + ), + settings: RouteSettings( + name: 'DoctorReplayChat'), + )); + }, + child: DoctorReplyWidget( + reply: model.listDoctorWorkingHoursTable[ - index], - previousModel: model, - ), - settings: RouteSettings( - name: 'DoctorReplayChat'), - )); - }, - child: DoctorReplyWidget( - reply: model - .listDoctorWorkingHoursTable[index]), - ), - if(model.state == ViewState.BusyLocal && index == model.listDoctorWorkingHoursTable.length-1) - DrAppCircularProgressIndeicator() - - ], - ); - }), - onNotification: (t) { - if (t is ScrollUpdateNotification && t.metrics.pixels >= t.metrics.maxScrollExtent - 50 && - model.state != ViewState.BusyLocal) { - setState(() { - pageIndex++; - }); - model.getDoctorReply(pageIndex: pageIndex); - } - return; - }, - ), + index]), + ), + if (model.state == ViewState.BusyLocal && + index == + model.listDoctorWorkingHoursTable + .length - + 1) + DrAppCircularProgressIndeicator() + ], + ); + }), + onNotification: (t) { + if (t is ScrollUpdateNotification && + t.metrics.pixels >= + t.metrics.maxScrollExtent - 50 && + model.state != ViewState.BusyLocal) { + setState(() { + pageIndex++; + }); + model.getDoctorReply(pageIndex: pageIndex); + } + return; + }, + ), + ), + ), + ], ), - ), - ], - ), ), ); } diff --git a/lib/screens/doctor/doctor_replay/doctor_repaly_chat.dart b/lib/screens/doctor/doctor_replay/doctor_repaly_chat.dart index cda899f1..1558e18d 100644 --- a/lib/screens/doctor/doctor_replay/doctor_repaly_chat.dart +++ b/lib/screens/doctor/doctor_replay/doctor_repaly_chat.dart @@ -20,13 +20,15 @@ import 'package:hexcolor/hexcolor.dart'; import 'package:url_launcher/url_launcher.dart'; class DoctorReplayChat extends StatefulWidget { - final ListGtMyPatientsQuestions reply; - final DoctorReplayViewModel previousModel; + final DoctorReplayViewModel previousModel; bool showMsgBox = false; - DoctorReplayChat( - {Key key, this.reply, this.previousModel, - }); + + DoctorReplayChat({ + Key key, + this.reply, + this.previousModel, + }); @override _DoctorReplayChatState createState() => _DoctorReplayChatState(); @@ -35,19 +37,15 @@ class DoctorReplayChat extends StatefulWidget { class _DoctorReplayChatState extends State { TextEditingController msgController = TextEditingController(); - @override Widget build(BuildContext context) { - if(widget.reply.doctorResponse.isNotEmpty){ + if (widget.reply.doctorResponse.isNotEmpty) { msgController.text = widget.reply.doctorResponse; - } else { widget.showMsgBox = true; - } return BaseView( - onModelReady: (model) async { - }, + onModelReady: (model) async {}, builder: (_, model, w) => AppScaffold( baseViewModel: model, isShowAppBar: false, @@ -68,8 +66,7 @@ class _DoctorReplayChatState extends State { ), height: 115, child: Container( - padding: EdgeInsets.only( - left: 10, right: 10), + padding: EdgeInsets.only(left: 10, right: 10), margin: EdgeInsets.only(top: 40), child: Column( children: [ @@ -90,7 +87,8 @@ class _DoctorReplayChatState extends State { .toString(), style: TextStyle( color: Color(0xFF2B353E), - fontWeight: FontWeight.bold, + fontWeight: + FontWeight.bold, fontFamily: 'Poppins', fontSize: 20)), ], @@ -117,11 +115,13 @@ class _DoctorReplayChatState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - - SizedBox(height: 30,), + SizedBox( + height: 30, + ), Container( // color: Color(0xFF2B353E), - width: MediaQuery.of(context).size.width * 0.8, + width: MediaQuery.of(context).size.width * + 0.8, padding: EdgeInsets.all(10), decoration: BoxDecoration( color: Color(0xFF2B353E), @@ -129,23 +129,31 @@ class _DoctorReplayChatState extends State { Radius.circular(10.0), ), border: Border.all( - color: HexColor('#707070') , + color: HexColor('#707070'), width: 0.30), ), child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment.start, children: [ Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ Row( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, children: [ Container( - margin: EdgeInsets.only(top: 5), + margin: + EdgeInsets.only(top: 5), width: 50, height: 50, child: Image.asset( @@ -156,24 +164,37 @@ class _DoctorReplayChatState extends State { ), ), Divider(), - SizedBox(width: 10,), + SizedBox( + width: 10, + ), Container( - width: MediaQuery.of(context).size.width * 0.31, + width: + MediaQuery.of(context) + .size + .width * + 0.31, child: AppText( widget.reply.patientName .toString(), - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3, + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3, fontFamily: 'Poppins', color: Colors.white, - fontWeight: FontWeight.bold, + fontWeight: + FontWeight.bold, // fontSize: 18 ), ), Container( - margin: EdgeInsets.symmetric(horizontal: 0), + margin: + EdgeInsets.symmetric( + horizontal: 0), child: InkWell( onTap: () { - launch("tel://" +widget.reply.mobileNumber); + launch("tel://" + + widget.reply + .mobileNumber); }, child: Icon( Icons.phone, @@ -184,19 +205,37 @@ class _DoctorReplayChatState extends State { ], ), Column( - crossAxisAlignment: CrossAxisAlignment.end, - + crossAxisAlignment: + CrossAxisAlignment.end, children: [ AppText( - widget.reply.createdOn !=null?getFormattedDate(widget.reply.createdOn):AppDateUtils.getDayMonthYearDateFormatted(DateTime.now()), - fontWeight: FontWeight - .w500, + widget.reply.createdOn != + null + ? getFormattedDate( + widget.reply + .createdOn) + : AppDateUtils + .getDayMonthYearDateFormatted( + DateTime.now()), + fontWeight: FontWeight.w500, color: Colors.white, - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *2.8, + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 2.8, ), AppText( - widget.reply.createdOn !=null?AppDateUtils.getHour(AppDateUtils.getDateTimeFromServerFormat(widget.reply.createdOn)):AppDateUtils.getHour(DateTime.now()), - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *2.8, + widget.reply.createdOn != + null + ? AppDateUtils.getHour( + AppDateUtils + .getDateTimeFromServerFormat( + widget.reply + .createdOn)) + : AppDateUtils.getHour( + DateTime.now()), + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 2.8, fontFamily: 'Poppins', color: Colors.white, // fontSize: 18 @@ -209,15 +248,23 @@ class _DoctorReplayChatState extends State { height: 10, ), Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ Column( children: [ Padding( - padding: const EdgeInsets.all(8.0), + padding: + const EdgeInsets.all( + 8.0), child: Container( - width: MediaQuery.of(context).size.width * 0.7, + width: + MediaQuery.of(context) + .size + .width * + 0.7, child: AppText( widget.reply.remarks, fontSize: 15, @@ -234,115 +281,185 @@ class _DoctorReplayChatState extends State { ], ), ), - SizedBox(height: 30,), - - SizedBox(height: 30,), - if(widget.reply.doctorResponse != null && widget.reply.doctorResponse.isNotEmpty) - Align( - alignment: Alignment.centerRight, - child: Container( - // color: Color(0xFF2B353E), - width: MediaQuery.of(context).size.width * 0.8, - padding: EdgeInsets.all(10), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.all( - Radius.circular(10.0), + SizedBox( + height: 30, + ), + SizedBox( + height: 30, + ), + if (widget.reply.doctorResponse != null && + widget.reply.doctorResponse.isNotEmpty) + Align( + alignment: Alignment.centerRight, + child: Container( + // color: Color(0xFF2B353E), + width: MediaQuery.of(context) + .size + .width * + 0.8, + padding: EdgeInsets.all(10), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + border: Border.all( + color: HexColor('#707070'), + width: 0.30), ), - border: Border.all( - color: HexColor('#707070') , - width: 0.30), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.end, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Container( - margin: EdgeInsets.only(top: 5), - width: 50, - height: 50, - child: Image.asset( - widget.previousModel.doctorProfile.gender == 0 - ? 'assets/images/male_avatar.png' - : 'assets/images/female_avatar.png', - fit: BoxFit.cover, + child: Column( + crossAxisAlignment: + CrossAxisAlignment.end, + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Row( + crossAxisAlignment: + CrossAxisAlignment + .start, + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: [ + Container( + margin: EdgeInsets.only( + top: 5), + width: 50, + height: 50, + child: Image.asset( + widget + .previousModel + .doctorProfile + .gender == + 0 + ? 'assets/images/male_avatar.png' + : 'assets/images/female_avatar.png', + fit: BoxFit.cover, + ), ), - ), - Divider(), - SizedBox(width: 10,), - Container( - width: MediaQuery.of(context).size.width * 0.35, - child: AppText( - widget.previousModel.doctorProfile.doctorName, - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3, - fontFamily: 'Poppins', - color: Color(0xFF2B353E), - fontWeight: FontWeight.bold, - // fontSize: 18 + Divider(), + SizedBox( + width: 10, ), - ), - - ], - ), - Column( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - AppText( - widget.reply.responseDate !=null?getFormattedDate(widget.reply.responseDate):AppDateUtils.getDayMonthYearDateFormatted(DateTime.now()), - fontWeight: FontWeight - .w500, - color: Color(0xFF2B353E), - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *2.8, - ), - AppText( - widget.reply.responseDate !=null?AppDateUtils.getHour(AppDateUtils.getDateTimeFromServerFormat(widget.reply.responseDate)):AppDateUtils.getHour(DateTime.now()), - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *2.8, - fontFamily: 'Poppins', - color: Color(0xFF2B353E), - // fontSize: 18 - ), - ], - ), - ], - ), - SizedBox( - height: 10, - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Column( - children: [ - Padding( - padding: const EdgeInsets.all(8.0), - child: Container( - width: MediaQuery.of(context).size.width * 0.7, + Container( + width: MediaQuery.of( + context) + .size + .width * + 0.35, child: AppText( - widget.reply.doctorResponse, - fontSize: 15, + widget + .previousModel + .doctorProfile + .doctorName, + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3, fontFamily: 'Poppins', - color: Color(0xFF2B353E), + color: + Color(0xFF2B353E), + fontWeight: + FontWeight.bold, // fontSize: 18 ), ), - ), - ], - ), - ], - ), - ], + ], + ), + Column( + crossAxisAlignment: + CrossAxisAlignment.end, + children: [ + AppText( + widget.reply.responseDate != + null + ? getFormattedDate( + widget.reply + .responseDate) + : AppDateUtils + .getDayMonthYearDateFormatted( + DateTime + .now()), + fontWeight: + FontWeight.w500, + color: + Color(0xFF2B353E), + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 2.8, + ), + AppText( + widget.reply.responseDate != + null + ? AppDateUtils.getHour( + AppDateUtils + .getDateTimeFromServerFormat(widget + .reply + .responseDate)) + : AppDateUtils + .getHour( + DateTime + .now()), + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 2.8, + fontFamily: 'Poppins', + color: + Color(0xFF2B353E), + // fontSize: 18 + ), + ], + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Column( + children: [ + Padding( + padding: + const EdgeInsets + .all(8.0), + child: Container( + width: MediaQuery.of( + context) + .size + .width * + 0.7, + child: AppText( + widget.reply + .doctorResponse, + fontSize: 15, + fontFamily: + 'Poppins', + color: Color( + 0xFF2B353E), + // fontSize: 18 + ), + ), + ), + ], + ), + ], + ), + ], + ), ), ), - ), ], ), ), @@ -351,119 +468,122 @@ class _DoctorReplayChatState extends State { ], ), ), - - - Positioned( - bottom: !widget.showMsgBox?80:0, - left: !widget.showMsgBox?20:0, - child: !widget.showMsgBox? Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText("You already replied to this question."), - SizedBox(height: 10,), - Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - SizedBox(width: 20,), - Container( - width: MediaQuery.of(context).size.width * 0.8, - child: Center( - child: AppButton( - fontWeight: FontWeight.w700, - color: AppGlobal.appGreenColor, - title: "Update Your Answer", //TranslationBase.of(context).close, - onPressed: () { - setState(() { - widget.showMsgBox = true; - }); - }, - ), + bottom: !widget.showMsgBox ? 80 : 0, + left: !widget.showMsgBox ? 20 : 0, + child: !widget.showMsgBox + ? Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + "You already replied to this question."), + SizedBox( + height: 10, ), - ), - ], - ) - ], - ):Container( - width:MediaQuery.of(context).size.width * 1, - height: MediaQuery.of(context).size.height * 0.12, - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - FractionallySizedBox( - child: Container( - - child: TextFields( - borderRadius: 0, - hintText: TranslationBase - .of(context) - .typeHereToReply, - fontSize: 13.5, - - suffixIcon: FontAwesomeIcons.arrowRight, - suffixIconColor: AppGlobal.appGreenColor, - onSuffixTap: ()async { - - if(msgController.text.isEmpty){ - Helpers.showErrorToast("Please Add Doctor Reply"); - return; - } else { - GifLoaderDialogUtils.showMyDialog(context); - await widget.previousModel.createDoctorResponse(msgController.text, widget.reply); - if(widget.previousModel.state == ViewState.ErrorLocal) { - Helpers.showErrorToast(widget.previousModel.error); - } else { - DrAppToastMsg.showSuccesToast("Thank you for your replay "); - await widget.previousModel.getDoctorReply(isLocalBusy: false); - Navigator.pop(context); - } - GifLoaderDialogUtils.hideDialog(context); - } - }, - // hintColor: Colors.black, - fontWeight: FontWeight.w500, - maxLines: 50, - minLines: 3, - controller: msgController, - validator: (value) { - if (value == null || value == "") - return TranslationBase.of(context) - .emptyMessage; - else - return null; - }), - + Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + SizedBox( + width: 20, + ), + Container( + width: MediaQuery.of(context).size.width * + 0.8, + child: Center( + child: AppButton( + fontWeight: FontWeight.w700, + color: AppGlobal.appGreenColor, + title: "Update Your Answer", + //TranslationBase.of(context).close, + onPressed: () { + setState(() { + widget.showMsgBox = true; + }); + }, + ), + ), + ), + ], + ) + ], + ) + : Container( + width: MediaQuery.of(context).size.width * 1, + height: MediaQuery.of(context).size.height * 0.12, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + FractionallySizedBox( + child: Container( + child: TextFields( + borderRadius: 0, + hintText: TranslationBase.of(context) + .typeHereToReply, + fontSize: 13.5, + suffixIcon: + FontAwesomeIcons.arrowRight, + suffixIconColor: + AppGlobal.appGreenColor, + onSuffixTap: () async { + if (msgController.text.isEmpty) { + Helpers.showErrorToast( + "Please Add Doctor Reply"); + return; + } else { + GifLoaderDialogUtils.showMyDialog( + context); + await widget.previousModel + .createDoctorResponse( + msgController.text, + widget.reply); + if (widget.previousModel.state == + ViewState.ErrorLocal) { + Helpers.showErrorToast( + widget.previousModel.error); + } else { + DrAppToastMsg.showSuccesToast( + "Thank you for your replay "); + await widget.previousModel + .getDoctorReply( + isLocalBusy: false); + Navigator.pop(context); + } + GifLoaderDialogUtils.hideDialog( + context); + } + }, + // hintColor: Colors.black, + fontWeight: FontWeight.w500, + maxLines: 50, + minLines: 3, + controller: msgController, + validator: (value) { + if (value == null || value == "") + return TranslationBase.of(context) + .emptyMessage; + else + return null; + }), + ), + ), + ], ), ), - ], - ), - ), ) ], - - ), ), )); } - - getFormattedDate(date){ - return (AppDateUtils.getDateTimeFromServerFormat( - date) - .day - .toString() + + getFormattedDate(date) { + return (AppDateUtils.getDateTimeFromServerFormat(date).day.toString() + " " + AppDateUtils.getMonth( - AppDateUtils.getDateTimeFromServerFormat( - date) - .month) + AppDateUtils.getDateTimeFromServerFormat(date).month) .toString() .substring(0, 3) + ' ' + - AppDateUtils.getDateTimeFromServerFormat( - date) - .year - .toString()); + AppDateUtils.getDateTimeFromServerFormat(date).year.toString()); } } diff --git a/lib/screens/doctor/doctor_replay/doctor_reply_screen.dart b/lib/screens/doctor/doctor_replay/doctor_reply_screen.dart index b18cb438..1583161a 100644 --- a/lib/screens/doctor/doctor_replay/doctor_reply_screen.dart +++ b/lib/screens/doctor/doctor_replay/doctor_reply_screen.dart @@ -73,7 +73,6 @@ class _DoctorReplyScreenState extends State MediaQuery.of(context).size.height * 0.070), child: Container( color: Helpers.getBgTabColor(), - child: TabBar( isScrollable: false, controller: _tabController, @@ -81,25 +80,21 @@ class _DoctorReplyScreenState extends State indicatorWeight: 1.0, indicatorSize: TabBarIndicatorSize.tab, labelColor: Theme.of(context).primaryColor, - labelPadding: EdgeInsets.only( - top: 0, left: 0, right: 0, bottom: 0), + labelPadding: + EdgeInsets.only(top: 0, left: 0, right: 0, bottom: 0), unselectedLabelColor: Colors.grey[800], tabs: [ tabWidget( - screenSize, - _activeTab == 0, - /// TODO Elham* Add Tran - "Not Replied", - isFirst: true, context: context - ), - tabWidget( - screenSize, - _activeTab == 1, + screenSize, + _activeTab == 0, - TranslationBase.of(context).all, - isLast: true, - context: context - ), + /// TODO Elham* Add Tran + "Not Replied", + isFirst: true, + context: context), + tabWidget(screenSize, _activeTab == 1, + TranslationBase.of(context).all, + isLast: true, context: context), ], ), ), @@ -127,25 +122,33 @@ class _DoctorReplyScreenState extends State } } -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); +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: Helpers.getTabHeight(context), - decoration: Helpers.getBoxTabsBoxDecoration(isActive: isActive,isFirst: isFirst, isMiddle: isMiddle, isLast: isLast, projectViewModel: projectViewModel), + decoration: Helpers.getBoxTabsBoxDecoration( + isActive: isActive, + isFirst: isFirst, + isMiddle: isMiddle, + isLast: isLast, + projectViewModel: projectViewModel), child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ Helpers.getTabText(title: title, isActive: isActive), if (counter != -1) - Helpers.getTabCounter( - isActive: isActive, - counter:counter - ) + Helpers.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 ecd0f93d..dce1d38c 100644 --- a/lib/screens/doctor/doctor_replay/doctor_reply_widget.dart +++ b/lib/screens/doctor/doctor_replay/doctor_reply_widget.dart @@ -44,86 +44,90 @@ class _DoctorReplyWidgetState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - if(widget.reply.infoStatus != 0) - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - RichText( - text: new TextSpan( - style: new TextStyle( - fontSize: 2.0 * SizeConfig.textMultiplier, - color: Colors.black), - children: [ - new TextSpan( - text: widget.reply.infoStatus == 99 - ? TranslationBase.of(context).notReplied:widget.reply.infoStatus == 1 - ? TranslationBase.of(context).replayCallStatus - : widget.reply.infoStatus == 2 - ? TranslationBase.of(context).patientArrived - : widget.reply.infoStatus == 3 - ? TranslationBase.of(context) - .calledAndNoResponse - : widget.reply.infoStatus == 4 - ? TranslationBase.of(context) - .underProcess - : widget.reply.infoStatus == 6 - ? TranslationBase.of(context) - .textResponse - : '', - style: TextStyle( - color: widget.reply.infoStatus == 99 - ? Color(0xFF2B353E) - : widget.reply.infoStatus == 4 - ? IN_PROGRESS_COLOR - : widget.reply.infoStatus == 3 - ? Color(0xFFD02127) - : AppGlobal.appGreenColor, - fontWeight: FontWeight.w700, - fontFamily: 'Poppins', - fontSize: 1.8 * SizeConfig.textMultiplier)), + if (widget.reply.infoStatus != 0) + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + RichText( + text: new TextSpan( + style: new TextStyle( + fontSize: 2.0 * SizeConfig.textMultiplier, + color: Colors.black), + children: [ + new TextSpan( + text: widget.reply.infoStatus == 99 + ? TranslationBase.of(context).notReplied + : widget.reply.infoStatus == 1 + ? TranslationBase.of(context) + .replayCallStatus + : widget.reply.infoStatus == 2 + ? TranslationBase.of(context) + .patientArrived + : widget.reply.infoStatus == 3 + ? TranslationBase.of(context) + .calledAndNoResponse + : widget.reply.infoStatus == 4 + ? TranslationBase.of(context) + .underProcess + : widget.reply.infoStatus == 6 + ? TranslationBase.of( + context) + .textResponse + : '', + style: TextStyle( + color: widget.reply.infoStatus == 99 + ? Color(0xFF2B353E) + : widget.reply.infoStatus == 4 + ? IN_PROGRESS_COLOR + : widget.reply.infoStatus == 3 + ? Color(0xFFD02127) + : AppGlobal.appGreenColor, + fontWeight: FontWeight.w700, + fontFamily: 'Poppins', + fontSize: 1.8 * SizeConfig.textMultiplier)), + ], + ), + ), + Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + AppText( + AppDateUtils.getDateTimeFromServerFormat( + widget.reply.createdOn) + .day + .toString() + + " " + + AppDateUtils.getMonth( + AppDateUtils.getDateTimeFromServerFormat( + widget.reply.createdOn) + .month) + .toString() + .substring(0, 3) + + ' ' + + AppDateUtils.getDateTimeFromServerFormat( + widget.reply.createdOn) + .year + .toString(), + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + ), + AppText( + AppDateUtils.getDateTimeFromServerFormat( + widget.reply.createdOn) + .hour + .toString() + + ":" + + AppDateUtils.getDateTimeFromServerFormat( + widget.reply.createdOn) + .minute + .toString(), + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + ) ], ), - ), - Column( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - AppText( - AppDateUtils.getDateTimeFromServerFormat( - widget.reply.createdOn) - .day - .toString() + - " " + - AppDateUtils.getMonth( - AppDateUtils.getDateTimeFromServerFormat( - widget.reply.createdOn) - .month) - .toString() - .substring(0, 3) + - ' ' + - AppDateUtils.getDateTimeFromServerFormat( - widget.reply.createdOn) - .year - .toString(), - fontFamily: 'Poppins', - fontWeight: FontWeight.w600, - ), - AppText( - AppDateUtils.getDateTimeFromServerFormat( - widget.reply.createdOn) - .hour - .toString() + - ":" + - AppDateUtils.getDateTimeFromServerFormat( - widget.reply.createdOn) - .minute - .toString(), - fontFamily: 'Poppins', - fontWeight: FontWeight.w600, - ) - ], - ), - ], - ), + ], + ), Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -202,11 +206,11 @@ class _DoctorReplyWidgetState extends State { CustomRow( label: TranslationBase.of(context).fileNumber, value: widget.reply.patientID.toString(), - isCopyable:false, + isCopyable: false, ), CustomRow( label: TranslationBase.of(context).age + " : ", - isCopyable:false, + isCopyable: false, value: "${AppDateUtils.getAgeByBirthday(widget.reply.dateofBirth, context)}", ), diff --git a/lib/screens/doctor/doctor_replay/not_replaied_doctor_questions.dart b/lib/screens/doctor/doctor_replay/not_replaied_doctor_questions.dart index 5b21809f..f3874dea 100644 --- a/lib/screens/doctor/doctor_replay/not_replaied_doctor_questions.dart +++ b/lib/screens/doctor/doctor_replay/not_replaied_doctor_questions.dart @@ -89,7 +89,8 @@ class _NotRepliedDoctorQuestionsState extends State { setState(() { pageIndex++; }); - model.getDoctorReply(pageIndex: pageIndex, isGettingNotReply: true); + model.getDoctorReply( + pageIndex: pageIndex, isGettingNotReply: true); } return; }, diff --git a/lib/screens/doctor/my_schedule_screen.dart b/lib/screens/doctor/my_schedule_screen.dart index b94b3823..2f804358 100644 --- a/lib/screens/doctor/my_schedule_screen.dart +++ b/lib/screens/doctor/my_schedule_screen.dart @@ -6,9 +6,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; - class MyScheduleScreen extends StatelessWidget { - @override Widget build(BuildContext context) { return BaseView( @@ -28,28 +26,28 @@ class MyScheduleScreen extends StatelessWidget { child: ListView( children: [ Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - height: 20, - ), + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 20, + ), - scheduleListByDate(model), - // scheduleListByDate('Wednesday, 8 April '), - ], - ), - ], + scheduleListByDate(model), + // scheduleListByDate('Wednesday, 8 April '), + ], + ), + ], + ), + ], + ), ), - ], - ), - ), )); } - Column scheduleListByDate(ScheduleViewModel model ) { + Column scheduleListByDate(ScheduleViewModel model) { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -59,12 +57,13 @@ class MyScheduleScreen extends StatelessWidget { Container( child: Column( children: model.listDoctorWorkingHoursTable.map((item) { - return MyScheduleWidget(workingHoursTable: item,); + return MyScheduleWidget( + workingHoursTable: item, + ); }).toList(), ), ), ], ); } - } diff --git a/lib/screens/doctor/patient_arrival_screen.dart b/lib/screens/doctor/patient_arrival_screen.dart index 5ef8b617..9054fc12 100644 --- a/lib/screens/doctor/patient_arrival_screen.dart +++ b/lib/screens/doctor/patient_arrival_screen.dart @@ -37,6 +37,7 @@ class _PatientArrivalScreen extends State SessionID: "5G0yXn0Jnq", IsLoginForDoctorApp: true, PatientOutSA: false); + @override void initState() { super.initState(); @@ -63,7 +64,8 @@ class _PatientArrivalScreen extends State child: Container( height: 60.0, margin: EdgeInsets.only(top: 10.0), - width: MediaQuery.of(context).size.width * 0.92, // 0.9, + width: MediaQuery.of(context).size.width * 0.92, + // 0.9, decoration: BoxDecoration( border: Border( bottom: BorderSide( diff --git a/lib/screens/home/dashboard_referral_patient.dart b/lib/screens/home/dashboard_referral_patient.dart index 19f674e7..8b134f61 100644 --- a/lib/screens/home/dashboard_referral_patient.dart +++ b/lib/screens/home/dashboard_referral_patient.dart @@ -16,20 +16,21 @@ class DashboardReferralPatient extends StatelessWidget { final double height; final DashboardViewModel model; - const DashboardReferralPatient({Key key, this.dashboardItemList, this.height, this.model}) : super(key: key); + const DashboardReferralPatient( + {Key key, this.dashboardItemList, this.height, this.model}) + : super(key: key); + @override Widget build(BuildContext context) { return Container( margin: EdgeInsets.only(bottom: 20, top: 10, left: 5, right: 5), decoration: BoxDecoration( - color: Colors.white, borderRadius: BorderRadius.only( topLeft: Radius.circular(20), topRight: Radius.circular(20), bottomLeft: Radius.circular(20), - bottomRight: Radius.circular(20) - ), + bottomRight: Radius.circular(20)), boxShadow: [ BoxShadow( color: Colors.grey.withOpacity(0.5), @@ -39,120 +40,159 @@ class DashboardReferralPatient extends StatelessWidget { ), ], ), - child: Column(crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, children: [ - Expanded( - flex: 1, - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Expanded( - flex: 4, - child: Padding( - padding: const EdgeInsets.all(5.0), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.all(8), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - height: SizeConfig.getHeightMultiplier(height: height) * - (SizeConfig.isHeightVeryShort? - 3 - : SizeConfig.isHeightShort? - 2 - : 2)), - Label( - firstLine: TranslationBase.of(context).patients, - secondLine: TranslationBase.of(context).referral, - color: Color(0xFF2B353E), - secondLineFontSize: SizeConfig.getHeightMultiplier(height: height) * - (SizeConfig.isHeightVeryShort? - 5 - : SizeConfig.isHeightShort? - 7 - : 12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Expanded( + flex: 1, + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + flex: 4, + child: Padding( + padding: const EdgeInsets.all(5.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.all(8), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: SizeConfig.getHeightMultiplier( + height: height) * + (SizeConfig.isHeightVeryShort + ? 3 + : SizeConfig.isHeightShort + ? 2 + : 2)), + Label( + firstLine: + TranslationBase.of(context).patients, + secondLine: + TranslationBase.of(context).referral, + color: Color(0xFF2B353E), + secondLineFontSize: + SizeConfig.getHeightMultiplier( + height: height) * + (SizeConfig.isHeightVeryShort + ? 5 + : SizeConfig.isHeightShort + ? 7 + : 12), + ), + SizedBox( + height: SizeConfig.getHeightMultiplier( + height: height) * + (SizeConfig.isHeightVeryShort + ? 5 + : SizeConfig.isHeightShort + ? 10 + : 5)) + ], ), - SizedBox( - height: SizeConfig.getHeightMultiplier(height: height) * - (SizeConfig.isHeightVeryShort? - 5 - : SizeConfig.isHeightShort? - 10 - : 5)) - ], - ), - ), - Expanded( - flex: 1, + ), + Expanded( + flex: 1, + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + RowCounts( + dashboardItemList[2] + .summaryoptions[0] + .kPIParameter, + dashboardItemList[2] + .summaryoptions[0] + .value, + AppGlobal.appTextColor, + height: height, + ), + RowCounts( + dashboardItemList[2] + .summaryoptions[1] + .kPIParameter, + dashboardItemList[2] + .summaryoptions[1] + .value, + Color(0xFFC8D0DC), + height: height, + ), + RowCounts( + dashboardItemList[2] + .summaryoptions[2] + .kPIParameter, + dashboardItemList[2] + .summaryoptions[2] + .value, + Color(0xFFEC6666), + height: height, + ), + ], + ), + ) + ], + )), + ), + Expanded( + flex: 3, + child: Stack(children: [ + Container( + padding: EdgeInsets.all(0), + child: GaugeChart( + _createReferralData(dashboardItemList))), + Positioned( child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, children: [ - RowCounts( - dashboardItemList[2].summaryoptions[0].kPIParameter, - dashboardItemList[2].summaryoptions[0].value, - AppGlobal.appTextColor, - height: height, - ), - RowCounts( - dashboardItemList[2].summaryoptions[1].kPIParameter, - dashboardItemList[2].summaryoptions[1].value, - Color(0xFFC8D0DC), - height: height, - ), - RowCounts( - dashboardItemList[2].summaryoptions[2].kPIParameter, - dashboardItemList[2].summaryoptions[2].value, - Color(0xFFEC6666), - - height: height, - ), + AppText( + model + .getPatientCount(dashboardItemList[2]) + .toString(), + fontSize: SizeConfig.textMultiplier * 3.2, + color: AppGlobal.appTextColor, + fontWeight: FontWeight.bold, + ) ], ), - ) - ], - )), - ), - Expanded( - flex: 3, - child: Stack(children: [ - Container(padding: EdgeInsets.all(0), child: GaugeChart(_createReferralData(dashboardItemList))), - Positioned( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - AppText( - model.getPatientCount(dashboardItemList[2]).toString(), - fontSize: SizeConfig.textMultiplier * 3.2, - color: AppGlobal.appTextColor, - fontWeight: FontWeight.bold, - ) - ], - ), - top: height * (SizeConfig.isHeightVeryShort ? 0.35 : 0.35), - left: 0, - right: 0) - ]), - ), - ], - )), - ]), + top: height * + (SizeConfig.isHeightVeryShort ? 0.35 : 0.35), + left: 0, + right: 0) + ]), + ), + ], + )), + ]), ); } - static List> _createReferralData(List dashboardItemList) { + static List> _createReferralData( + List dashboardItemList) { final data = [ - new GaugeSegment(dashboardItemList[2].summaryoptions[0].kPIParameter, - getValue(dashboardItemList[1].summaryoptions[0].value), charts.ColorUtil.fromDartColor(AppGlobal.appTextColor)), - new GaugeSegment(dashboardItemList[2].summaryoptions[1].kPIParameter, - getValue(dashboardItemList[1].summaryoptions[1].value), charts.ColorUtil.fromDartColor(Color(0xFFC6CEDA),),), - new GaugeSegment(dashboardItemList[2].summaryoptions[2].kPIParameter, - getValue(dashboardItemList[1].summaryoptions[2].value), charts.ColorUtil.fromDartColor(Color(0xFFEC6666),),), + new GaugeSegment( + dashboardItemList[2].summaryoptions[0].kPIParameter, + getValue(dashboardItemList[1].summaryoptions[0].value), + charts.ColorUtil.fromDartColor(AppGlobal.appTextColor)), + new GaugeSegment( + dashboardItemList[2].summaryoptions[1].kPIParameter, + getValue(dashboardItemList[1].summaryoptions[1].value), + charts.ColorUtil.fromDartColor( + Color(0xFFC6CEDA), + ), + ), + new GaugeSegment( + dashboardItemList[2].summaryoptions[2].kPIParameter, + getValue(dashboardItemList[1].summaryoptions[2].value), + charts.ColorUtil.fromDartColor( + Color(0xFFEC6666), + ), + ), ]; return [ @@ -160,8 +200,7 @@ class DashboardReferralPatient extends StatelessWidget { id: 'Segments', domainFn: (GaugeSegment segment, _) => segment.segment, measureFn: (GaugeSegment segment, _) => segment.size, - strokeWidthPxFn: (GaugeSegment segment, _)=>200, - + strokeWidthPxFn: (GaugeSegment segment, _) => 200, data: data, colorFn: (GaugeSegment segment, _) => segment.color, ) diff --git a/lib/screens/home/dashboard_slider-item-widget.dart b/lib/screens/home/dashboard_slider-item-widget.dart index 9005b816..d36f0094 100644 --- a/lib/screens/home/dashboard_slider-item-widget.dart +++ b/lib/screens/home/dashboard_slider-item-widget.dart @@ -14,14 +14,14 @@ class DashboardSliderItemWidget extends StatelessWidget { @override Widget build(BuildContext context) { - return Column( + return Column( children: [ Row( mainAxisAlignment: MainAxisAlignment.start, children: [ Container( - margin: EdgeInsets.symmetric(horizontal: SizeConfig.widthMultiplier *1), - + margin: EdgeInsets.symmetric( + horizontal: SizeConfig.widthMultiplier * 1), child: Label( firstLine: Helpers.getLabelFromKPI(item.kPIName), secondLine: Helpers.getNameFromKPI(item.kPIName), @@ -34,17 +34,17 @@ class DashboardSliderItemWidget extends StatelessWidget { (SizeConfig.isHeightVeryShort ? 16 : SizeConfig.isHeightShort - ? 14 - : SizeConfig.isHeightLarge - ? 15 - : 13), + ? 14 + : SizeConfig.isHeightLarge + ? 15 + : 13), child: ListView( scrollDirection: Axis.horizontal, - children: List.generate(item.summaryoptions.length, (int index) { + children: + List.generate(item.summaryoptions.length, (int index) { return GetActivityCard(item.summaryoptions[index]); }))) ], ); - } } diff --git a/lib/screens/home/dashboard_swipe_widget.dart b/lib/screens/home/dashboard_swipe_widget.dart index bcd7864c..d89efd7d 100644 --- a/lib/screens/home/dashboard_swipe_widget.dart +++ b/lib/screens/home/dashboard_swipe_widget.dart @@ -30,8 +30,12 @@ class _DashboardSwipeWidgetState extends State { @override Widget build(BuildContext context) { - double height = SizeConfig.heightMultiplier * - (SizeConfig.isHeightVeryShort ? 40 : SizeConfig.isHeightLarge?33:31); + double height = SizeConfig.heightMultiplier * + (SizeConfig.isHeightVeryShort + ? 40 + : SizeConfig.isHeightLarge + ? 33 + : 31); return Container( height: height, @@ -89,13 +93,16 @@ class _DashboardSwipeWidgetState extends State { ); } - Widget getSwipeWidget(List dashboardItemList, int index,double height ) { - if (index == 1) - return GetOutPatientStack(dashboardItemList[1]); - if (index == 0) - return GetOutPatientStack(dashboardItemList[0]); + Widget getSwipeWidget( + List dashboardItemList, int index, double height) { + if (index == 1) return GetOutPatientStack(dashboardItemList[1]); + if (index == 0) return GetOutPatientStack(dashboardItemList[0]); if (index == 2) - return DashboardReferralPatient(dashboardItemList: widget.dashboardItemList,height: height,model: widget.model,); + return DashboardReferralPatient( + dashboardItemList: widget.dashboardItemList, + height: height, + model: widget.model, + ); return Container(); } diff --git a/lib/screens/home/home_page_card.dart b/lib/screens/home/home_page_card.dart index 74b869cb..2fa182c2 100644 --- a/lib/screens/home/home_page_card.dart +++ b/lib/screens/home/home_page_card.dart @@ -3,13 +3,15 @@ import 'package:flutter/material.dart'; class HomePageCard extends StatelessWidget { const HomePageCard( {this.hasBorder = false, - this.imageName, - this.child, - this.onTap, - Key key, - this.color, - this.opacity = 0.4, - this.margin, this.width, this.gradient}) + this.imageName, + this.child, + this.onTap, + Key key, + this.color, + this.opacity = 0.4, + this.margin, + this.width, + this.gradient}) : super(key: key); final bool hasBorder; final String imageName; @@ -36,10 +38,11 @@ class HomePageCard extends StatelessWidget { : Border.all(width: 0.0, color: Colors.transparent), image: imageName != null ? DecorationImage( - image: AssetImage('assets/images/dashboard/$imageName'), - fit: BoxFit.cover, - colorFilter: new ColorFilter.mode(Colors.black.withOpacity(0.2), BlendMode.dstIn), - ) + image: AssetImage('assets/images/dashboard/$imageName'), + fit: BoxFit.cover, + colorFilter: new ColorFilter.mode( + Colors.black.withOpacity(0.2), BlendMode.dstIn), + ) : null, ), child: child, diff --git a/lib/screens/home/home_patient_card.dart b/lib/screens/home/home_patient_card.dart index 0180fc14..f44ace60 100644 --- a/lib/screens/home/home_patient_card.dart +++ b/lib/screens/home/home_patient_card.dart @@ -15,25 +15,30 @@ class HomePatientCard extends StatelessWidget { final LinearGradient gradient; HomePatientCard({ - this.backgroundColor, - this.backgroundIconColor, - this.cardIcon, + this.backgroundColor, + this.backgroundIconColor, + this.cardIcon, this.cardIconImage, - this.text, - this.textColor, - this.onTap, - this.iconSize = 30, this.gradient, + this.text, + this.textColor, + this.onTap, + this.iconSize = 30, + this.gradient, }); @override Widget build(BuildContext context) { - double width = SizeConfig.heightMultiplier* - (SizeConfig.isHeightVeryShort ? 16 : SizeConfig.isHeightLarge?15:13); + double width = SizeConfig.heightMultiplier * + (SizeConfig.isHeightVeryShort + ? 16 + : SizeConfig.isHeightLarge + ? 15 + : 13); return HomePageCard( color: backgroundColor, width: width, gradient: gradient, - margin: EdgeInsets.all(SizeConfig.widthMultiplier *1.121), + margin: EdgeInsets.all(SizeConfig.widthMultiplier * 1.121), child: Container( padding: EdgeInsets.all(8), child: Column( @@ -48,21 +53,21 @@ class HomePatientCard extends StatelessWidget { color: Colors.transparent, child: cardIcon != null ? Icon( - cardIcon, - size: iconSize * 2, - color: backgroundIconColor, - ) + cardIcon, + size: iconSize * 2, + color: backgroundIconColor, + ) : IconButton( - icon: Image.asset( - 'assets/images/patient_register.png', - width: iconSize * 2, - height: iconSize * 2, - fit: BoxFit.fill, - ), - iconSize: iconSize * 2, - color: backgroundIconColor, - onPressed: () => null, - ), + icon: Image.asset( + 'assets/images/patient_register.png', + width: iconSize * 2, + height: iconSize * 2, + fit: BoxFit.fill, + ), + iconSize: iconSize * 2, + color: backgroundIconColor, + onPressed: () => null, + ), ), Container( child: Column( @@ -71,16 +76,17 @@ class HomePatientCard extends StatelessWidget { children: [ cardIcon != null ? Icon( - cardIcon, - size: - SizeConfig.getWidthMultiplier(width: width) * 30, - color: textColor, - ) + cardIcon, + size: SizeConfig.getWidthMultiplier( + width: width) * + 30, + color: textColor, + ) : Image.asset( - cardIconImage, - height: iconSize, - width: iconSize, - ), + cardIconImage, + height: iconSize, + width: iconSize, + ), SizedBox( height: 4, ), @@ -99,8 +105,8 @@ class HomePatientCard extends StatelessWidget { letterSpacing: -0.33, fontWeight: FontWeight.w600, fontSize: - SizeConfig.getTextMultiplierBasedOnWidth(width: width) * - (SizeConfig.isHeightVeryShort ? 11 : 10), + SizeConfig.getTextMultiplierBasedOnWidth(width: width) * + (SizeConfig.isHeightVeryShort ? 11 : 10), ), ), ), diff --git a/lib/screens/home/home_screen.dart b/lib/screens/home/home_screen.dart index 3ff7e624..df810361 100644 --- a/lib/screens/home/home_screen.dart +++ b/lib/screens/home/home_screen.dart @@ -86,7 +86,9 @@ class _HomeScreenState extends State { //TODO Elham* make it componet Container( width: 40, - margin: EdgeInsets.only(left: projectsProvider.isArabic? 0:32, right: projectsProvider.isArabic? 23:0), + margin: EdgeInsets.only( + left: projectsProvider.isArabic ? 0 : 32, + right: projectsProvider.isArabic ? 23 : 0), child: IconButton( icon: SvgPicture.asset('assets/images/svgs/menu.svg', height: 25, width: 10), @@ -109,7 +111,8 @@ class _HomeScreenState extends State { DropdownButtonHideUnderline( child: DropdownButton( dropdownColor: Colors.white, - iconEnabledColor: AppGlobal.appTextColor, + iconEnabledColor: + AppGlobal.appTextColor, icon: Icon(Icons.keyboard_arrow_down), isExpanded: true, value: clinicId == null @@ -140,8 +143,8 @@ class _HomeScreenState extends State { EdgeInsets.all(2), decoration: new BoxDecoration( - color: - AppGlobal.appRedColor, + color: AppGlobal + .appRedColor, borderRadius: BorderRadius .circular( @@ -160,8 +163,11 @@ class _HomeScreenState extends State { .toString(), color: Colors.white, - letterSpacing: -0.72, - fontWeight: FontWeight.w600, + letterSpacing: + -0.72, + fontWeight: + FontWeight + .w600, fontSize: projectsProvider .isArabic @@ -174,10 +180,14 @@ class _HomeScreenState extends State { )), ], ), - AppText(Helpers.convertToTitleCase(item.clinicName), + AppText( + Helpers + .convertToTitleCase( + item.clinicName), fontSize: 14, letterSpacing: -0.96, - color: AppGlobal.appTextColor, + color: AppGlobal + .appTextColor, fontWeight: FontWeight.bold, textAlign: TextAlign.end), @@ -204,12 +214,12 @@ class _HomeScreenState extends State { .map((item) { return DropdownMenuItem( child: AppText( - Helpers.convertToTitleCase(item.clinicName), + Helpers.convertToTitleCase( + item.clinicName), fontSize: 14, letterSpacing: -0.96, color: AppGlobal.appTextColor, - fontWeight: - FontWeight.bold, + fontWeight: FontWeight.bold, textAlign: TextAlign.left, ), value: item.clinicID, @@ -290,21 +300,19 @@ class _HomeScreenState extends State { SizedBox( height: 10, ), - Label( firstLine: TranslationBase.of(context).patients, secondLine: TranslationBase.of(context).services, ), - Container( height: SizeConfig.heightMultiplier * (SizeConfig.isHeightVeryShort ? 16 : SizeConfig.isHeightShort - ? 14 - : SizeConfig.isHeightLarge - ? 15 - : 13), + ? 14 + : SizeConfig.isHeightLarge + ? 15 + : 13), child: ListView( scrollDirection: Axis.horizontal, children: [ @@ -336,20 +344,18 @@ class _HomeScreenState extends State { begin: Alignment(-1.0, -2.0), end: Alignment(1.0, 2.0), colors: [ - AppGlobal.appRedColor,Color(0xFFAD3B3B), - ]);//AppGlobal.appRedColor; - backgroundColors[1] = LinearGradient( - begin: Alignment.center, - end: Alignment.center, - colors: [ - Color(0xFFC9C9C9),Color(0xFFC9C9C9), - ]); + AppGlobal.appRedColor, + Color(0xFFAD3B3B), + ]); //AppGlobal.appRedColor; + backgroundColors[1] = + LinearGradient(begin: Alignment.center, end: Alignment.center, colors: [ + Color(0xFFC9C9C9), + Color(0xFFC9C9C9), + ]); backgroundColors[2] = LinearGradient( begin: Alignment.center, end: Alignment.center, - colors: [ - Color(0xFF71787E),AppGlobal.appTextColor - ]); + colors: [Color(0xFF71787E), AppGlobal.appTextColor]); List backgroundIconColors = List(3); backgroundIconColors[0] = Colors.white12; backgroundIconColors[1] = Colors.white38; diff --git a/lib/screens/home/label.dart b/lib/screens/home/label.dart index 0d316652..89975660 100644 --- a/lib/screens/home/label.dart +++ b/lib/screens/home/label.dart @@ -5,24 +5,30 @@ import 'package:flutter/material.dart'; class Label extends StatelessWidget { Label({ - Key key, this.firstLine, this.secondLine, this.color= const Color(0xFF2E303A), this.secondLineFontSize, this.firstLineFontSize, + Key key, + this.firstLine, + this.secondLine, + this.color = const Color(0xFF2E303A), + this.secondLineFontSize, + this.firstLineFontSize, }) : super(key: key); final String firstLine; final String secondLine; Color color; - final double secondLineFontSize; - final double firstLineFontSize; + final double secondLineFontSize; + final double firstLineFontSize; @override Widget build(BuildContext context) { - return Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( firstLine, - fontSize: firstLineFontSize??SizeConfig.getTextMultiplierBasedOnWidth() *(SizeConfig.isWidthLarge?2:3) , + fontSize: firstLineFontSize ?? + SizeConfig.getTextMultiplierBasedOnWidth() * + (SizeConfig.isWidthLarge ? 2 : 3), // fontWeight: FontWeight.bold, color: color, fontHeight: .5, @@ -32,12 +38,13 @@ class Label extends StatelessWidget { AppText( secondLine, color: color, - fontSize: secondLineFontSize??SizeConfig.getTextMultiplierBasedOnWidth() * (SizeConfig.isWidthLarge?4:6.40), + fontSize: secondLineFontSize ?? + SizeConfig.getTextMultiplierBasedOnWidth() * + (SizeConfig.isWidthLarge ? 4 : 6.40), fontWeight: FontWeight.bold, letterSpacing: -1.44, - ), ], ); } -} \ No newline at end of file +} diff --git a/lib/screens/live_care/end_call_screen.dart b/lib/screens/live_care/end_call_screen.dart index 35c00beb..87e36943 100644 --- a/lib/screens/live_care/end_call_screen.dart +++ b/lib/screens/live_care/end_call_screen.dart @@ -25,7 +25,10 @@ import 'package:hexcolor/hexcolor.dart'; class EndCallScreen extends StatefulWidget { final PatiantInformtion patient; - const EndCallScreen({Key key, this.patient,}) : super(key: key); + const EndCallScreen({ + Key key, + this.patient, + }) : super(key: key); @override _EndCallScreenState createState() => _EndCallScreenState(); @@ -42,29 +45,30 @@ class _EndCallScreenState extends State { String to; LiveCarePatientViewModel liveCareModel; + @override void initState() { super.initState(); - if(widget.patient!=null) - patient = widget.patient; + if (widget.patient != null) patient = widget.patient; } @override void didChangeDependencies() { super.didChangeDependencies(); final routeArgs = ModalRoute.of(context).settings.arguments as Map; - if(routeArgs.containsKey('patient')) - patient = routeArgs['patient']; + if (routeArgs.containsKey('patient')) patient = routeArgs['patient']; } @override Widget build(BuildContext context) { final List cardsList = [ - PatientProfileCardModel(TranslationBase.of(context).resume, - TranslationBase.of(context).theCall, '', 'assets/images/svgs/profile_screen/vital signs.svg', + PatientProfileCardModel( + TranslationBase.of(context).resume, + TranslationBase.of(context).theCall, + '', + 'assets/images/svgs/profile_screen/vital signs.svg', isInPatient: isInpatient, - color: AppGlobal.appGreenColor, - onTap: () async { + color: AppGlobal.appGreenColor, onTap: () async { GifLoaderDialogUtils.showMyDialog(context); await liveCareModel .startCall(isReCall: false, vCID: patient.vcId) @@ -79,8 +83,13 @@ class _EndCallScreenState extends State { kSessionId: liveCareModel.startCallRes.openSessionID, kApiKey: '46209962', vcId: patient.vcId, - isRecording: liveCareModel.startCallRes != null ? liveCareModel.startCallRes.isRecording: false, - patientName: patient.fullName ?? (patient.firstName != null ? "${patient.firstName} ${patient.lastName}" : "-"), + isRecording: liveCareModel.startCallRes != null + ? liveCareModel.startCallRes.isRecording + : false, + patientName: patient.fullName ?? + (patient.firstName != null + ? "${patient.firstName} ${patient.lastName}" + : "-"), tokenID: await liveCareModel.getToken(), generalId: GENERAL_ID, doctorId: liveCareModel.doctorProfile.doctorID, @@ -124,8 +133,7 @@ class _EndCallScreenState extends State { '', 'assets/images/svgs/profile_screen/vital signs.svg', isInPatient: isInpatient, - color: Colors.red[800], - onTap: () { + color: Colors.red[800], onTap: () { Helpers.showConfirmationDialog(context, "${TranslationBase.of(context).areYouSureYouWantTo} ${TranslationBase.of(context).endLC} ${TranslationBase.of(context).consultation} ?", () async { @@ -136,14 +144,16 @@ class _EndCallScreenState extends State { if (liveCareModel.state == ViewState.ErrorLocal) { DrAppToastMsg.showErrorToast(liveCareModel.error); } else { - showAlternativesDialog(context, liveCareModel, (bool isConfirmed) async { + showAlternativesDialog(context, liveCareModel, + (bool isConfirmed) async { GifLoaderDialogUtils.showMyDialog(context); await liveCareModel.endCallWithCharge(patient.vcId, isConfirmed); GifLoaderDialogUtils.hideDialog(context); if (liveCareModel.state == ViewState.ErrorLocal) { DrAppToastMsg.showErrorToast(liveCareModel.error); } else { - DrAppToastMsg.showSuccesToast("You successfully completed call with charge"); + DrAppToastMsg.showSuccesToast( + "You successfully completed call with charge"); Navigator.of(context).pop(); Navigator.of(context).pop(); } @@ -155,22 +165,22 @@ class _EndCallScreenState extends State { TranslationBase.of(context).sendLC, TranslationBase.of(context).instruction, "", - 'assets/images/svgs/profile_screen/health summary.svg', - onTap: () { - Helpers.showConfirmationDialog(context, - "${TranslationBase.of(context).areYouSureYouWantTo} ${TranslationBase.of(context).sendLC} ${TranslationBase.of(context).instruction} ?", - () async { - Navigator.of(context).pop(); - GifLoaderDialogUtils.showMyDialog(context); - await liveCareModel.sendSMSInstruction(patient.vcId); - GifLoaderDialogUtils.hideDialog(context); - if (liveCareModel.state == ViewState.ErrorLocal) { - DrAppToastMsg.showErrorToast(liveCareModel.error); - } else { - DrAppToastMsg.showSuccesToast("You successfully sent SMS instructions"); - } - }); - }, + 'assets/images/svgs/profile_screen/health summary.svg', onTap: () { + Helpers.showConfirmationDialog(context, + "${TranslationBase.of(context).areYouSureYouWantTo} ${TranslationBase.of(context).sendLC} ${TranslationBase.of(context).instruction} ?", + () async { + Navigator.of(context).pop(); + GifLoaderDialogUtils.showMyDialog(context); + await liveCareModel.sendSMSInstruction(patient.vcId); + GifLoaderDialogUtils.hideDialog(context); + if (liveCareModel.state == ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast(liveCareModel.error); + } else { + DrAppToastMsg.showSuccesToast( + "You successfully sent SMS instructions"); + } + }); + }, isInPatient: isInpatient, isDartIcon: true, // isDisable: true, @@ -181,11 +191,13 @@ class _EndCallScreenState extends State { '', 'assets/images/svgs/profile_screen/health summary.svg', onTap: () { Navigator.push( - context, - MaterialPageRoute( - builder: (BuildContext context) => - LivaCareTransferToAdmin(patient: patient), - settings: RouteSettings(name: 'LivaCareTransferToAdmin'),),); + context, + MaterialPageRoute( + builder: (BuildContext context) => + LivaCareTransferToAdmin(patient: patient), + settings: RouteSettings(name: 'LivaCareTransferToAdmin'), + ), + ); }, isInPatient: isInpatient, isDartIcon: true, @@ -201,12 +213,9 @@ class _EndCallScreenState extends State { appBarTitle: TranslationBase.of(context).patientProfile, backgroundColor: Theme.of(context).scaffoldBackgroundColor, isShowAppBar: true, - appBar: PatientProfileAppBar( - patient, - onPressed: (){ - Navigator.pop(context); - - }, + appBar: PatientProfileAppBar(patient, onPressed: () { + Navigator.pop(context); + }, isInpatient: isInpatient, height: (patient.patientStatusType != null && patient.patientStatusType == 43) @@ -269,7 +278,7 @@ class _EndCallScreenState extends State { isLoading: cardsList[index].isLoading, isDartIcon: cardsList[index].isDartIcon, dartIcon: cardsList[index].dartIcon, - color: cardsList[index].color, + color: cardsList[index].color, ), ), ], @@ -341,7 +350,7 @@ class _EndCallScreenState extends State { ), actions: [ AppButton( - onPressed: (){ + onPressed: () { Navigator.of(context).pop(); okFunction(true); }, 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 233f59d8..b4f6cc88 100644 --- a/lib/screens/live_care/live-care_transfer_to_admin.dart +++ b/lib/screens/live_care/live-care_transfer_to_admin.dart @@ -83,7 +83,8 @@ class _LivaCareTransferToAdminState extends State { validationError: noteError, ), Positioned( - top: -2, //MediaQuery.of(context).size.height * 0, + top: -2, + //MediaQuery.of(context).size.height * 0, right: projectViewModel.isArabic ? MediaQuery.of(context).size.width * 0.75 : 15, @@ -117,20 +118,22 @@ class _LivaCareTransferToAdminState extends State { if (noteController.text.isNotEmpty) { Helpers.showConfirmationDialog(context, "${TranslationBase.of(context).areYouSureYouWantTo} ${TranslationBase.of(context).transferTo}${TranslationBase.of(context).admin} ?", - () async { - Navigator.of(context).pop(); - GifLoaderDialogUtils.showMyDialog(context); - await model.transferToAdmin(widget.patient.vcId, noteController.text); - GifLoaderDialogUtils.hideDialog(context); - if (model.state == ViewState.ErrorLocal) { - DrAppToastMsg.showErrorToast(model.error); - } else { - DrAppToastMsg.showSuccesToast("You successfully transfer to admin"); - Navigator.of(context).pop(); - Navigator.of(context).pop(); - Navigator.of(context).pop(); - } - }); + () async { + Navigator.of(context).pop(); + GifLoaderDialogUtils.showMyDialog(context); + await model.transferToAdmin( + widget.patient.vcId, noteController.text); + GifLoaderDialogUtils.hideDialog(context); + if (model.state == ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast(model.error); + } else { + DrAppToastMsg.showSuccesToast( + "You successfully transfer to admin"); + Navigator.of(context).pop(); + Navigator.of(context).pop(); + Navigator.of(context).pop(); + } + }); } }); }, diff --git a/lib/screens/live_care/live_care_patient_screen.dart b/lib/screens/live_care/live_care_patient_screen.dart index dafb2124..8943b68d 100644 --- a/lib/screens/live_care/live_care_patient_screen.dart +++ b/lib/screens/live_care/live_care_patient_screen.dart @@ -26,6 +26,7 @@ class _LiveCarePatientScreenState extends State { Timer timer; LiveCarePatientViewModel _liveCareViewModel; + @override void initState() { super.initState(); diff --git a/lib/screens/live_care/panding_list.dart b/lib/screens/live_care/panding_list.dart index 771e0e45..fed2cad1 100644 --- a/lib/screens/live_care/panding_list.dart +++ b/lib/screens/live_care/panding_list.dart @@ -31,6 +31,7 @@ class _LiveCarePandingListState extends State { Helpers helpers = new Helpers(); bool _isInit = true; LiveCareViewModel _liveCareProvider; + @override void didChangeDependencies() { super.didChangeDependencies(); @@ -255,8 +256,10 @@ MyGlobals myGlobals = new MyGlobals(); class MyGlobals { GlobalKey _scaffoldKey; + MyGlobals() { _scaffoldKey = GlobalKey(); } + GlobalKey get scaffoldKey => _scaffoldKey; } diff --git a/lib/screens/live_care/video_call.dart b/lib/screens/live_care/video_call.dart index a87e8a12..1c149f07 100644 --- a/lib/screens/live_care/video_call.dart +++ b/lib/screens/live_care/video_call.dart @@ -18,6 +18,7 @@ class VideoCallPage extends StatefulWidget { final PatiantInformtion patientData; final listContext; final LiveCarePatientViewModel model; + VideoCallPage({this.patientData, this.listContext, this.model}); @override @@ -35,10 +36,12 @@ class _VideoCallPageState extends State { var _tokenData; bool isTransfer = false; String image_url = 'https://hmgwebservices.com/Images/MobileImages/DUBAI/'; + //bool _isOutOfStuck = false; Helpers helpers = new Helpers(); var doctorprofile = {}; var notes; + @override void didChangeDependencies() { super.didChangeDependencies(); @@ -66,9 +69,13 @@ class _VideoCallPageState extends State { //'1_MX40NjgwMzIyNH5-MTU5MzY4MzYzODYwM35ucExWYVRVSm5Hcy9uWGZmM1lOa3czZHV-fg', kApiKey: '46209962', vcId: widget.patientData.vcId, - isRecording: tokenData != null ? tokenData.isRecording: false, - patientName: widget.patientData.fullName ?? widget.patientData.firstName != null ? "${widget.patientData.firstName} ${widget.patientData.lastName}" : "-", - tokenID: token, //"hfkjshdf347r8743", + isRecording: tokenData != null ? tokenData.isRecording : false, + patientName: widget.patientData.fullName ?? + widget.patientData.firstName != null + ? "${widget.patientData.firstName} ${widget.patientData.lastName}" + : "-", + tokenID: token, + //"hfkjshdf347r8743", generalId: "Cs2020@2016\$2958", doctorId: doctorprofile['DoctorID'], onFailure: (String error) { diff --git a/lib/screens/medical-file/health_summary_page.dart b/lib/screens/medical-file/health_summary_page.dart index 5aa6b8d6..9155ffc1 100644 --- a/lib/screens/medical-file/health_summary_page.dart +++ b/lib/screens/medical-file/health_summary_page.dart @@ -22,6 +22,7 @@ class HealthSummaryPage extends StatefulWidget { class _HealthSummaryPageState extends State { PatiantInformtion patient; + @override Widget build(BuildContext context) { final routeArgs = ModalRoute.of(context).settings.arguments as Map; @@ -31,7 +32,9 @@ class _HealthSummaryPageState extends State { bool isInpatient = routeArgs['isInpatient']; return BaseView( onModelReady: (model) => model.getMedicalFile(mrn: patient.patientId), - builder: (BuildContext context, MedicalFileViewModel model, Widget child) => AppScaffold( + builder: + (BuildContext context, MedicalFileViewModel model, Widget child) => + AppScaffold( appBar: PatientProfileAppBar( patient, isInpatient: isInpatient, @@ -45,7 +48,8 @@ class _HealthSummaryPageState extends State { child: Column( children: [ Padding( - padding: EdgeInsets.symmetric(horizontal: 12.0, vertical: 8.0), + padding: + EdgeInsets.symmetric(horizontal: 12.0, vertical: 8.0), child: Container( child: Padding( padding: const EdgeInsets.all(8.0), @@ -75,18 +79,25 @@ class _HealthSummaryPageState extends State { ), ), ), - (model.medicalFileList != null && model.medicalFileList.length != 0) + (model.medicalFileList != null && + model.medicalFileList.length != 0) ? ListView.builder( //physics: , physics: NeverScrollableScrollPhysics(), scrollDirection: Axis.vertical, shrinkWrap: true, - itemCount: model.medicalFileList[0].entityList[0].timelines.length, + itemCount: model.medicalFileList[0].entityList[0] + .timelines.length, itemBuilder: (BuildContext ctxt, int index) { return InkWell( onTap: () async { - if (model.medicalFileList[0].entityList[0].timelines[index].timeLineEvents[0] - .consulations.length != + if (model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .timeLineEvents[0] + .consulations + .length != 0) await locator().logEvent( eventCategory: "Health Summary Page", @@ -96,55 +107,99 @@ class _HealthSummaryPageState extends State { context, MaterialPageRoute( builder: (context) => MedicalFileDetails( - age: patient.age is String ? patient.age ?? "" : "${patient.age}", + age: patient.age is String + ? patient.age ?? "" + : "${patient.age}", firstName: patient.firstName, lastName: patient.lastName, gender: patient.genderDescription, encounterNumber: index, pp: patient.patientId, patient: patient, - doctorName: model.medicalFileList[0].entityList[0].timelines[index] - .timeLineEvents[0].consulations.isNotEmpty - ? model.medicalFileList[0].entityList[0].timelines[index].doctorName - : "", - clinicName: model.medicalFileList[0].entityList[0].timelines[index] - .timeLineEvents[0].consulations.isNotEmpty - ? model.medicalFileList[0].entityList[0].timelines[index].clinicName + doctorName: model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .timeLineEvents[0] + .consulations + .isNotEmpty + ? model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .doctorName : "", - doctorImage: model.medicalFileList[0].entityList[0].timelines[index] - .timeLineEvents[0].consulations.isNotEmpty - ? model.medicalFileList[0].entityList[0].timelines[index].doctorImage + clinicName: model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .timeLineEvents[0] + .consulations + .isNotEmpty + ? model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .clinicName : "", - episode: model.medicalFileList[0].entityList[0].timelines[index] - .timeLineEvents[0].consulations.isNotEmpty - ? model.medicalFileList[0].entityList[0].timelines[index].timeLineEvents[0] - .consulations[0].episodeID - .toString() + doctorImage: model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .timeLineEvents[0] + .consulations + .isNotEmpty + ? model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .doctorImage : "", + episode: + model.medicalFileList[0].entityList[0].timelines[index].timeLineEvents[0].consulations.isNotEmpty ? model.medicalFileList[0].entityList[0].timelines[index].timeLineEvents[0].consulations[0].episodeID.toString() : "", vistDate: model.medicalFileList[0].entityList[0].timelines[index].date.toString()), - settings: RouteSettings(name: 'MedicalFileDetails'), + settings: RouteSettings( + name: 'MedicalFileDetails'), ), ); }, child: DoctorCard( - doctorName: model.medicalFileList[0].entityList[0].timelines[index].doctorName, - clinic: model.medicalFileList[0].entityList[0].timelines[index].clinicName, - branch: model.medicalFileList[0].entityList[0].timelines[index].projectName, - profileUrl: model.medicalFileList[0].entityList[0].timelines[index].doctorImage, - appointmentDate: AppDateUtils.getDateTimeFromServerFormat( - model.medicalFileList[0].entityList[0].timelines[index].date, + doctorName: model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .doctorName, + clinic: model.medicalFileList[0].entityList[0] + .timelines[index].clinicName, + branch: model.medicalFileList[0].entityList[0] + .timelines[index].projectName, + profileUrl: model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .doctorImage, + appointmentDate: + AppDateUtils.getDateTimeFromServerFormat( + model.medicalFileList[0].entityList[0] + .timelines[index].date, ), isPrescriptions: true, - isShowEye: model.medicalFileList[0].entityList[0].timelines[index].timeLineEvents[0] - .consulations.length != + isShowEye: model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .timeLineEvents[0] + .consulations + .length != 0 ? true : false), ); }) : Center( - child: ErrorMessage(error: TranslationBase.of(context).noMedicalFileFound,) - ) + child: ErrorMessage( + error: TranslationBase.of(context).noMedicalFileFound, + )) ], ), ), diff --git a/lib/screens/medical-file/medical_file_details.dart b/lib/screens/medical-file/medical_file_details.dart index 12ce738b..eb76ead9 100644 --- a/lib/screens/medical-file/medical_file_details.dart +++ b/lib/screens/medical-file/medical_file_details.dart @@ -87,6 +87,7 @@ class _MedicalFileDetailsState extends State { this.clinicName, this.episode, this.doctorImage}); + bool isPhysicalExam = true; bool isProcedureExpand = true; bool isHistoryExpand = true; @@ -105,7 +106,7 @@ class _MedicalFileDetailsState extends State { (BuildContext context, MedicalFileViewModel model, Widget child) => AppScaffold( appBar: PatientProfileAppBar( - patient, + patient, doctorName: doctorName, profileUrl: doctorImage, clinic: clinicName, @@ -630,9 +631,10 @@ class _MedicalFileDetailsState extends State { ": ", ), AppText( - AppDateUtils.getDateFormatted( - DateTime - .parse( + AppDateUtils + .getDateFormatted( + DateTime + .parse( model .medicalFileList[ 0] @@ -930,8 +932,9 @@ class _MedicalFileDetailsState extends State { ), ) : Center( - child: ErrorMessage(error: TranslationBase.of(context).noDataAvailable,) - ) + child: ErrorMessage( + error: TranslationBase.of(context).noDataAvailable, + )) ], ), ), diff --git a/lib/screens/medicine/pharmacies_list_screen.dart b/lib/screens/medicine/pharmacies_list_screen.dart index 49c39c53..a9e21274 100644 --- a/lib/screens/medicine/pharmacies_list_screen.dart +++ b/lib/screens/medicine/pharmacies_list_screen.dart @@ -34,7 +34,6 @@ class _PharmaciesListState extends State { Helpers helpers = new Helpers(); ProjectViewModel projectsProvider; - @override Widget build(BuildContext context) { projectsProvider = Provider.of(context); @@ -52,71 +51,68 @@ class _PharmaciesListState extends State { 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, - ), - ], + 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(), + ), ), - ) - ], - )): 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, + ), + ], + ), + ) + ], + )) + : Container(), Container( margin: EdgeInsets.only( top: SizeConfig.widthMultiplier * 2, @@ -137,12 +133,13 @@ class _PharmaciesListState extends State { ), Container( width: SizeConfig.screenWidth * 0.99, - margin: EdgeInsets.only(left: 10,right: 10), + margin: EdgeInsets.only(left: 10, right: 10), child: ListView.builder( shrinkWrap: true, physics: const NeverScrollableScrollPhysics(), - itemCount: model.pharmaciesList == null ? 0 : model - .pharmaciesList.length, + itemCount: model.pharmaciesList == null + ? 0 + : model.pharmaciesList.length, itemBuilder: (BuildContext context, int index) { return RoundedContainer( margin: EdgeInsets.only(top: 5), @@ -152,14 +149,12 @@ class _PharmaciesListState extends State { flex: 1, child: ClipRRect( borderRadius: - BorderRadius.all(Radius.circular(7)), + BorderRadius.all(Radius.circular(7)), child: Image.network( - model - .pharmaciesList[index]["ProjectImageURL"], - height: - SizeConfig.imageSizeMultiplier * 15, - width: - SizeConfig.imageSizeMultiplier * 15, + model.pharmaciesList[index] + ["ProjectImageURL"], + height: SizeConfig.imageSizeMultiplier * 15, + width: SizeConfig.imageSizeMultiplier * 15, fit: BoxFit.cover, ), ), @@ -167,8 +162,8 @@ class _PharmaciesListState extends State { Expanded( flex: 4, child: AppText( - model - .pharmaciesList[index]["LocationDescription"], + model.pharmaciesList[index] + ["LocationDescription"], margin: 10, ), ), @@ -186,10 +181,9 @@ class _PharmaciesListState extends State { Icons.call, color: Colors.red, ), - onTap: () => - launch("tel://" + - model - .pharmaciesList[index]["PhoneNumber"]), + onTap: () => launch("tel://" + + model.pharmaciesList[index] + ["PhoneNumber"]), ), ), Padding( @@ -202,13 +196,13 @@ class _PharmaciesListState extends State { onTap: () { MapsLauncher.launchCoordinates( double.parse( - model - .pharmaciesList[index]["Latitude"]), + model.pharmaciesList[index] + ["Latitude"]), double.parse( - model - .pharmaciesList[index]["Longitude"]), + model.pharmaciesList[index] + ["Longitude"]), model.pharmaciesList[index] - ["LocationDescription"]); + ["LocationDescription"]); }, ), ), @@ -221,18 +215,18 @@ class _PharmaciesListState extends State { }), ) ]), - ),),); + ), + ), + ); } - Image imageFromBase64String(String base64String) { return Image.memory(base64Decode(base64String)); } //TODO CHECK THE URL IS NULL OR NOT Uint8List dataFromBase64String(String base64String) { - if(base64String !=null) - return base64Decode(base64String); + if (base64String != null) return base64Decode(base64String); } String base64String(Uint8List data) { 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 a7d1d0b5..9f3c7810 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 @@ -50,6 +50,7 @@ class _AddPatientSickLeaveScreenState extends State { AddSickLeaveRequest addSickLeave = AddSickLeaveRequest(); bool isFormSubmitted = false; + void _presentDatePicker() { showDatePicker( context: context, 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 1064036f..a2bc5a23 100644 --- a/lib/screens/patient-sick-leave/patient_sick_leave_screen.dart +++ b/lib/screens/patient-sick-leave/patient_sick_leave_screen.dart @@ -121,27 +121,27 @@ class PatientSickLeaveScreen extends StatelessWidget { child: InkWell( child: Column( children: [ - if(item.doctorName != null) - Row( - crossAxisAlignment: - CrossAxisAlignment.start, - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - Expanded( - // width: MediaQuery.of(context).size.width*0.51, - child: AppText( - Helpers.capitalize( - item.doctorName ?? ""), - fontSize: 18, - color: Color(0xff2e303a), - fontWeight: FontWeight.w700, - fontFamily: 'Poppins', - textOverflow: - TextOverflow.ellipsis, + if (item.doctorName != null) + Row( + crossAxisAlignment: + CrossAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + Expanded( + // width: MediaQuery.of(context).size.width*0.51, + child: AppText( + Helpers.capitalize( + item.doctorName ?? ""), + fontSize: 18, + color: Color(0xff2e303a), + fontWeight: FontWeight.w700, + fontFamily: 'Poppins', + textOverflow: + TextOverflow.ellipsis, + ), ), - ), - ]), + ]), SizedBox( height: 10, ), @@ -151,8 +151,7 @@ class PatientSickLeaveScreen extends StatelessWidget { borderRadius: BorderRadius.circular(50.0), child: CachedNetworkImage( - imageUrl: item - .doctorImageURL ?? + imageUrl: item.doctorImageURL ?? "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", height: 30, width: 30, @@ -172,8 +171,8 @@ class PatientSickLeaveScreen extends StatelessWidget { children: [ CustomRow( label: TranslationBase.of( - context) - .daysSickleave , + context) + .daysSickleave, labelSize: SizeConfig .getTextMultiplierBasedOnWidth() * 3.3, diff --git a/lib/screens/patients/DischargedPatientPage.dart b/lib/screens/patients/DischargedPatientPage.dart index 1876fd26..fe61d80a 100644 --- a/lib/screens/patients/DischargedPatientPage.dart +++ b/lib/screens/patients/DischargedPatientPage.dart @@ -35,16 +35,15 @@ class _DischargedPatientState extends State { body: model.myDischargedPatient.isEmpty ? Center( child: Container( - child: ErrorMessage(error: TranslationBase.of(context).referralEmptyMsg, - ), - ) - ) + child: ErrorMessage( + error: TranslationBase.of(context).referralEmptyMsg, + ), + )) : Padding( padding: const EdgeInsets.all(8.0), child: Column( crossAxisAlignment: CrossAxisAlignment.center, children: [ - SizedBox( height: 12, ), diff --git a/lib/screens/patients/ECGPage.dart b/lib/screens/patients/ECGPage.dart index ba4c108c..d477f0cb 100644 --- a/lib/screens/patients/ECGPage.dart +++ b/lib/screens/patients/ECGPage.dart @@ -39,84 +39,116 @@ class ECGPage extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ // PatientProfileHeaderNewDesign(patient,arrivalType??'0',patientType), - SizedBox(height: 12,), - AppText('Service',style: "caption2",color: Colors.black,), - AppText('ECG',bold: true,fontSize: 22,), - SizedBox(height: 12,), - ...List.generate(model.patientMuseResultsModelList.length, (index) => InkWell( - onTap: () async { - await launch( - model.patientMuseResultsModelList[index].imageURL); - }, - child: Container( - width: double.infinity, - height: 120, - margin: EdgeInsets.only(top: 5,bottom: 5), - padding: EdgeInsets.all(10), - decoration: BoxDecoration( - border: Border.all(color: Colors.white,width: 2), - color: Colors.white, - borderRadius: BorderRadius.circular(8) - ), - child: Column( - children: [ - Row( - // mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText('ECG Report',fontWeight: FontWeight.w700,fontSize: 17,), - SizedBox(height:3), - RichText( - text: TextSpan( - style: TextStyle( - fontSize: 1.6 * - SizeConfig.textMultiplier, - color: Colors.black), - children: [ - new TextSpan( - text: - TranslationBase.of(context).orderNo, - style: TextStyle( - fontSize: 12, - fontFamily: - 'Poppins')), - new TextSpan( - text: '${/*model.patientMuseResultsModelList[index].orderNo?? */'3455'}', - style: TextStyle( - fontWeight: FontWeight.w600, - fontFamily: - 'Poppins', - fontSize: 14)), - ], + SizedBox( + height: 12, + ), + AppText( + 'Service', + style: "caption2", + color: Colors.black, + ), + AppText( + 'ECG', + bold: true, + fontSize: 22, + ), + SizedBox( + height: 12, + ), + ...List.generate( + model.patientMuseResultsModelList.length, + (index) => InkWell( + onTap: () async { + await launch(model + .patientMuseResultsModelList[index].imageURL); + }, + child: Container( + width: double.infinity, + height: 120, + margin: EdgeInsets.only(top: 5, bottom: 5), + padding: EdgeInsets.all(10), + decoration: BoxDecoration( + border: + Border.all(color: Colors.white, width: 2), + color: Colors.white, + borderRadius: BorderRadius.circular(8)), + child: Column( + children: [ + Row( + // mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Expanded( + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + 'ECG Report', + fontWeight: FontWeight.w700, + fontSize: 17, + ), + SizedBox(height: 3), + RichText( + text: TextSpan( + style: TextStyle( + fontSize: 1.6 * + SizeConfig.textMultiplier, + color: Colors.black), + children: [ + new TextSpan( + text: TranslationBase.of( + context) + .orderNo, + style: TextStyle( + fontSize: 12, + fontFamily: 'Poppins')), + new TextSpan( + text: + '${/*model.patientMuseResultsModelList[index].orderNo?? */ '3455'}', + style: TextStyle( + fontWeight: + FontWeight.w600, + fontFamily: 'Poppins', + fontSize: 14)), + ], + ), + ) + ], + ), ), - ) - ], - ), - ), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - AppText('${AppDateUtils.getDayMonthYearDateFormatted(model.patientMuseResultsModelList[index].createdOnDateTime,isArabic: projectViewModel.isArabic)}',color: Colors.black,fontWeight: FontWeight.w600,fontSize: 14,), - AppText('${AppDateUtils.getHour(model.patientMuseResultsModelList[index].createdOnDateTime)}',fontWeight: FontWeight.w600,color: Colors.grey[700],fontSize: 14,), - ], - ), + Expanded( + child: Column( + crossAxisAlignment: + CrossAxisAlignment.end, + children: [ + AppText( + '${AppDateUtils.getDayMonthYearDateFormatted(model.patientMuseResultsModelList[index].createdOnDateTime, isArabic: projectViewModel.isArabic)}', + color: Colors.black, + fontWeight: FontWeight.w600, + fontSize: 14, + ), + AppText( + '${AppDateUtils.getHour(model.patientMuseResultsModelList[index].createdOnDateTime)}', + fontWeight: FontWeight.w600, + color: Colors.grey[700], + fontSize: 14, + ), + ], + ), + ), + ], + ), + SizedBox( + height: 15, + ), + Align( + alignment: Alignment.topRight, + child: Icon(DoctorApp.external_link), + ) + ], ), - ], - ), - SizedBox(height: 15,), - Align( - alignment: Alignment.topRight, - child: Icon(DoctorApp.external_link), - ) - ], - ), - ), - )), - + ), + )), ], ), ), diff --git a/lib/screens/patients/In_patient/NoData.dart b/lib/screens/patients/In_patient/NoData.dart index 0c48cd2a..47cd999d 100644 --- a/lib/screens/patients/In_patient/NoData.dart +++ b/lib/screens/patients/In_patient/NoData.dart @@ -17,4 +17,4 @@ class NoData extends StatelessWidget { ), ); } -} \ No newline at end of file +} diff --git a/lib/screens/patients/In_patient/in_patient_screen.dart b/lib/screens/patients/In_patient/in_patient_screen.dart index 7c7a7572..a2ef497a 100644 --- a/lib/screens/patients/In_patient/in_patient_screen.dart +++ b/lib/screens/patients/In_patient/in_patient_screen.dart @@ -23,6 +23,7 @@ class InPatientScreen extends StatefulWidget { bool isAllClinic = true; bool showBottomSheet = false; String selectedClinicName; + InPatientScreen({Key key, this.specialClinic}); @override @@ -108,7 +109,6 @@ class _InPatientScreenState extends State Expanded( child: Scaffold( extendBodyBehindAppBar: false, - appBar: PreferredSize( preferredSize: Size.fromHeight( MediaQuery.of(context).size.height * 0.070), @@ -124,13 +124,12 @@ class _InPatientScreenState extends State child: Container( margin: EdgeInsets.only(top: 9), color: Helpers.getBgTabColor(), - child: TabBar( isScrollable: false, controller: _tabController, indicatorColor: AppGlobal.appRedColor, indicatorWeight: 0.001, - indicator:BoxDecoration(), + indicator: BoxDecoration(), // indicatorSize: TabBarIndicatorSize.tab, // labelColor: Theme.of(context).primaryColor, labelPadding: EdgeInsets.only( @@ -138,13 +137,25 @@ class _InPatientScreenState extends State // unselectedLabelColor: Colors.grey[800], tabs: [ tabWidget(screenSize, _activeTab == 0, - TranslationBase.of(context).inPatientAll,context: context, - counter: model.inPatientList.length, isFirst: true), - tabWidget(screenSize, _activeTab == 1, - TranslationBase.of(context).myInPatientTitle, - counter: model.myIinPatientList.length, isMiddle: true, context: context,), - tabWidget(screenSize, _activeTab == 2, - TranslationBase.of(context).discharged, isLast:true, context: context,), + TranslationBase.of(context).inPatientAll, + context: context, + counter: model.inPatientList.length, + isFirst: true), + tabWidget( + screenSize, + _activeTab == 1, + TranslationBase.of(context).myInPatientTitle, + counter: model.myIinPatientList.length, + isMiddle: true, + context: context, + ), + tabWidget( + screenSize, + _activeTab == 2, + TranslationBase.of(context).discharged, + isLast: true, + context: context, + ), ], ), ), @@ -195,23 +206,27 @@ class _InPatientScreenState extends State Widget tabWidget(Size screenSize, bool isActive, String title, {int counter = -1, - bool isFirst = false, - bool isMiddle = false, - bool isLast = false,BuildContext context}) { - + bool isFirst = false, + bool isMiddle = false, + bool isLast = false, + BuildContext context}) { ProjectViewModel projectsProvider = Provider.of(context); - return Center( child: Container( height: Helpers.getTabHeight(context), - decoration:Helpers.getBoxTabsBoxDecoration(isActive: isActive,isFirst: isFirst, isMiddle: isMiddle, isLast: isLast,projectViewModel: projectsProvider), + decoration: Helpers.getBoxTabsBoxDecoration( + isActive: isActive, + isFirst: isFirst, + isMiddle: isMiddle, + isLast: isLast, + projectViewModel: projectsProvider), child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Helpers.getTabText(title:title, isActive:isActive), + Helpers.getTabText(title: title, isActive: isActive), if (counter != -1) - Helpers.getTabCounter(isActive:isActive,counter:counter) + Helpers.getTabCounter(isActive: isActive, counter: counter) ], ), ), diff --git a/lib/screens/patients/In_patient/list_of_all_in_patient.dart b/lib/screens/patients/In_patient/list_of_all_in_patient.dart index 06634819..5c84e819 100644 --- a/lib/screens/patients/In_patient/list_of_all_in_patient.dart +++ b/lib/screens/patients/In_patient/list_of_all_in_patient.dart @@ -16,7 +16,6 @@ class ListOfAllInPatient extends StatelessWidget { final bool isAllClinic; final bool hasQuery; - final PatientSearchViewModel patientSearchViewModel; @override @@ -32,7 +31,7 @@ class ListOfAllInPatient extends StatelessWidget { patientSearchViewModel.filteredInPatientItems.length, scrollDirection: Axis.vertical, shrinkWrap: true, - physics: const AlwaysScrollableScrollPhysics (), + physics: const AlwaysScrollableScrollPhysics(), itemBuilder: (context, index) { return PatientCard( patientInfo: patientSearchViewModel @@ -69,11 +68,13 @@ class ListOfAllInPatient extends StatelessWidget { onNotification: (notification) { if (isAllClinic && !hasQuery) if (notification is ScrollUpdateNotification) { - if (notification.metrics.pixels >= notification.metrics.maxScrollExtent - 50) { + if (notification.metrics.pixels >= + notification.metrics.maxScrollExtent - 50) { patientSearchViewModel.addOnFilteredList(); } - if (notification.metrics.pixels <= notification.metrics.minScrollExtent - 50) { + if (notification.metrics.pixels <= + notification.metrics.minScrollExtent - 50) { patientSearchViewModel.removeOnFilteredList(); } } diff --git a/lib/screens/patients/In_patient/list_of_my_inpatient.dart b/lib/screens/patients/In_patient/list_of_my_inpatient.dart index f5f7c070..5f33bc77 100644 --- a/lib/screens/patients/In_patient/list_of_my_inpatient.dart +++ b/lib/screens/patients/In_patient/list_of_my_inpatient.dart @@ -4,6 +4,7 @@ import 'package:flutter/material.dart'; import '../../../routes.dart'; import 'NoData.dart'; + class ListOfMyInpatient extends StatelessWidget { const ListOfMyInpatient({ Key key, @@ -19,47 +20,50 @@ class ListOfMyInpatient extends StatelessWidget { @override Widget build(BuildContext context) { return Expanded( - child:Container( + child: Container( margin: EdgeInsets.symmetric(horizontal: 16.0), - child: patientSearchViewModel.filteredMyInPatientItems.length == 0 - ? NoData():NotificationListener( - child: ListView.builder( - itemCount: patientSearchViewModel.filteredMyInPatientItems.length, - scrollDirection: Axis.vertical, - // physics: ScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, index) { - return PatientCard( - patientInfo: patientSearchViewModel.filteredMyInPatientItems[index], - patientType: "1", - arrivalType: "1", - isInpatient: true, - isMyPatient: true, - onTap: () { - FocusScopeNode currentFocus = FocusScope.of(context); - if (!currentFocus.hasPrimaryFocus) { - currentFocus.unfocus(); - } + child: patientSearchViewModel.filteredMyInPatientItems.length == 0 + ? NoData() + : NotificationListener( + child: ListView.builder( + itemCount: + patientSearchViewModel.filteredMyInPatientItems.length, + scrollDirection: Axis.vertical, + // physics: ScrollPhysics(), + shrinkWrap: true, + itemBuilder: (context, index) { + return PatientCard( + patientInfo: patientSearchViewModel + .filteredMyInPatientItems[index], + patientType: "1", + arrivalType: "1", + isInpatient: true, + isMyPatient: true, + onTap: () { + FocusScopeNode currentFocus = FocusScope.of(context); + if (!currentFocus.hasPrimaryFocus) { + currentFocus.unfocus(); + } - Navigator.of(context) - .pushNamed(PATIENTS_PROFILE, arguments: { - "patient": - patientSearchViewModel.filteredMyInPatientItems[index], - "patientType": "1", - "from": "0", - "to": "0", - "isSearch": false, - "isInpatient": true, - "arrivalType": "1", - "isMyPatient": true, - }); - }, - ); - }), - onNotification: (t) { - return; - }, - ), + Navigator.of(context) + .pushNamed(PATIENTS_PROFILE, arguments: { + "patient": patientSearchViewModel + .filteredMyInPatientItems[index], + "patientType": "1", + "from": "0", + "to": "0", + "isSearch": false, + "isInpatient": true, + "arrivalType": "1", + "isMyPatient": true, + }); + }, + ); + }), + onNotification: (t) { + return; + }, + ), ), ); } diff --git a/lib/screens/patients/ReferralDischargedPatientDetails.dart b/lib/screens/patients/ReferralDischargedPatientDetails.dart index a52df188..58f9db26 100644 --- a/lib/screens/patients/ReferralDischargedPatientDetails.dart +++ b/lib/screens/patients/ReferralDischargedPatientDetails.dart @@ -150,9 +150,10 @@ class ReferralDischargedPatientDetails extends StatelessWidget { ), Expanded( child: AppText( - AppDateUtils.convertDateFromServerFormat( - referredPatient.admissionDate, - "dd MMM,yyyy"), + AppDateUtils + .convertDateFromServerFormat( + referredPatient.admissionDate, + "dd MMM,yyyy"), fontFamily: 'Poppins', fontWeight: FontWeight.w700, fontSize: @@ -175,9 +176,10 @@ class ReferralDischargedPatientDetails extends StatelessWidget { ), Expanded( child: AppText( - AppDateUtils.convertDateFromServerFormat( - referredPatient.dischargeDate, - "dd MMM,yyyy"), + AppDateUtils + .convertDateFromServerFormat( + referredPatient.dischargeDate, + "dd MMM,yyyy"), fontFamily: 'Poppins', fontWeight: FontWeight.w700, fontSize: @@ -436,9 +438,10 @@ class ReferralDischargedPatientDetails extends StatelessWidget { ), Expanded( child: AppText( - AppDateUtils.convertDateFromServerFormat( - referredPatient.mAXResponseTime, - "dd MMM,yyyy"), + AppDateUtils + .convertDateFromServerFormat( + referredPatient.mAXResponseTime, + "dd MMM,yyyy"), fontFamily: 'Poppins', fontWeight: FontWeight.w700, fontSize: diff --git a/lib/screens/patients/ReferralDischargedPatientPage.dart b/lib/screens/patients/ReferralDischargedPatientPage.dart index 4677a0ba..fd5ce080 100644 --- a/lib/screens/patients/ReferralDischargedPatientPage.dart +++ b/lib/screens/patients/ReferralDischargedPatientPage.dart @@ -14,73 +14,108 @@ import 'ReferralDischargedPatientDetails.dart'; class ReferralDischargedPatientPage extends StatefulWidget { @override - _ReferralDischargedPatientPageState createState() => _ReferralDischargedPatientPageState(); + _ReferralDischargedPatientPageState createState() => + _ReferralDischargedPatientPageState(); } -class _ReferralDischargedPatientPageState extends State { - +class _ReferralDischargedPatientPageState + extends State { @override Widget build(BuildContext context) { return BaseView( onModelReady: (model) => model.gtMyDischargeReferralPatient(), builder: (_, model, w) => AppScaffold( appBarTitle: 'Referral Discharged ', - backgroundColor: Colors.grey[200], + backgroundColor: Colors.grey[200], isShowAppBar: false, baseViewModel: model, - body: model.myDischargeReferralPatient.isEmpty?Center( - child: Container( - child: ErrorMessage(error: TranslationBase.of(context).referralEmptyMsg, - ), - ) - ):Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - SizedBox(height: 5,), - Expanded( - child: ListView.builder( - itemCount: model.myDischargeReferralPatient.length, - itemBuilder: (context,index)=>InkWell( - onTap: () { - Navigator.push( - context, - FadePage( - page: ReferralDischargedPatientDetails(model.myDischargeReferralPatient[index]), - ), - ); - }, - child: PatientReferralItemWidget( - referralStatus: model.getReferralStatusNameByCode(model.myDischargeReferralPatient[index].referralStatus,context), - referralStatusCode: model.myDischargeReferralPatient[index].referralStatus, - patientName: model.myDischargeReferralPatient[index].firstName+" "+model.myDischargeReferralPatient[index].lastName, - patientGender: model.myDischargeReferralPatient[index].gender, - referredDate: AppDateUtils.getDayMonthYearDateFormatted(model.myDischargeReferralPatient[index].referralDate), - referredTime: AppDateUtils.getTimeHHMMA(model.myDischargeReferralPatient[index].referralDate), - patientID: "${model.myDischargeReferralPatient[index].patientID}", - isSameBranch: false, - isReferral: true, - isReferralClinic: true, - referralClinic:"${model.myDischargeReferralPatient[index].referringClinicDescription}", - remark: model.myDischargeReferralPatient[index].referringDoctorRemarks, - nationality: model.myDischargeReferralPatient[index].nationalityName, - nationalityFlag: '',//model.myDischargeReferralPatient[index].nationalityFlagURL, //TODO From backend - doctorAvatar: '',//model.myDischargeReferralPatient[index].doctorImageURL, //TODO From backend - referralDoctorName: model.myDischargeReferralPatient[index].referringDoctorName, - clinicDescription: model.myDischargeReferralPatient[index].referringClinicDescription, - infoIcon: Icon(FontAwesomeIcons.arrowRight, - size: 25, color: Colors.black), - ), - )), + body: model.myDischargeReferralPatient.isEmpty + ? Center( + child: Container( + child: ErrorMessage( + error: TranslationBase.of(context).referralEmptyMsg, + ), + )) + : Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: 5, + ), + Expanded( + child: ListView.builder( + itemCount: model.myDischargeReferralPatient.length, + itemBuilder: (context, index) => InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: ReferralDischargedPatientDetails( + model.myDischargeReferralPatient[ + index]), + ), + ); + }, + child: PatientReferralItemWidget( + referralStatus: + model.getReferralStatusNameByCode( + model + .myDischargeReferralPatient[index] + .referralStatus, + context), + referralStatusCode: model + .myDischargeReferralPatient[index] + .referralStatus, + patientName: model + .myDischargeReferralPatient[index] + .firstName + + " " + + model.myDischargeReferralPatient[index] + .lastName, + patientGender: model + .myDischargeReferralPatient[index].gender, + referredDate: + AppDateUtils.getDayMonthYearDateFormatted( + model + .myDischargeReferralPatient[index] + .referralDate), + referredTime: AppDateUtils.getTimeHHMMA(model + .myDischargeReferralPatient[index] + .referralDate), + patientID: + "${model.myDischargeReferralPatient[index].patientID}", + isSameBranch: false, + isReferral: true, + isReferralClinic: true, + referralClinic: + "${model.myDischargeReferralPatient[index].referringClinicDescription}", + remark: model + .myDischargeReferralPatient[index] + .referringDoctorRemarks, + nationality: model + .myDischargeReferralPatient[index] + .nationalityName, + nationalityFlag: '', + //model.myDischargeReferralPatient[index].nationalityFlagURL, //TODO From backend + doctorAvatar: '', + //model.myDischargeReferralPatient[index].doctorImageURL, //TODO From backend + referralDoctorName: model + .myDischargeReferralPatient[index] + .referringDoctorName, + clinicDescription: model + .myDischargeReferralPatient[index] + .referringClinicDescription, + infoIcon: Icon(FontAwesomeIcons.arrowRight, + size: 25, color: Colors.black), + ), + )), + ), + ], + ), ), - - ], - ), - ), ), ); } - - } diff --git a/lib/screens/patients/insurance_approval_screen_patient.dart b/lib/screens/patients/insurance_approval_screen_patient.dart index 9aeb386b..cc503cbd 100644 --- a/lib/screens/patients/insurance_approval_screen_patient.dart +++ b/lib/screens/patients/insurance_approval_screen_patient.dart @@ -119,8 +119,9 @@ class _InsuranceApprovalScreenNewState ], ) : Center( - child: ErrorMessage(error: TranslationBase.of(context).referralEmptyMsg,) - ), + child: ErrorMessage( + error: TranslationBase.of(context).referralEmptyMsg, + )), ), ) : SingleChildScrollView( @@ -191,8 +192,10 @@ class _InsuranceApprovalScreenNewState ], ) : Center( - child: ErrorMessage(error: TranslationBase.of(context).noInsuranceApprovalFound,) - )), + child: ErrorMessage( + error: TranslationBase.of(context) + .noInsuranceApprovalFound, + ))), ), ), ); diff --git a/lib/screens/patients/insurance_approvals_details.dart b/lib/screens/patients/insurance_approvals_details.dart index e81a843a..4695b7d4 100644 --- a/lib/screens/patients/insurance_approvals_details.dart +++ b/lib/screens/patients/insurance_approvals_details.dart @@ -21,6 +21,7 @@ class InsuranceApprovalsDetails extends StatefulWidget { InsuranceApprovalsDetails( {this.patient, this.indexInsurance, this.patientType}); + @override _InsuranceApprovalsDetailsState createState() => _InsuranceApprovalsDetailsState( diff --git a/lib/screens/patients/out_patient_prescription_details_screen.dart b/lib/screens/patients/out_patient_prescription_details_screen.dart index c7056ce3..0bad2313 100644 --- a/lib/screens/patients/out_patient_prescription_details_screen.dart +++ b/lib/screens/patients/out_patient_prescription_details_screen.dart @@ -21,33 +21,31 @@ class OutPatientPrescriptionDetailsScreen extends StatefulWidget { class _OutPatientPrescriptionDetailsScreenState extends State { - - - getPrescriptionReport(BuildContext context,PatientViewModel model ){ - RequestPrescriptionReport prescriptionReqModel = - RequestPrescriptionReport( + getPrescriptionReport(BuildContext context, PatientViewModel model) { + RequestPrescriptionReport prescriptionReqModel = RequestPrescriptionReport( appointmentNo: widget.prescriptionResModel.appointmentNo, episodeID: widget.prescriptionResModel.episodeID, setupID: widget.prescriptionResModel.setupID, patientTypeID: widget.prescriptionResModel.patientID); model.getPrescriptionReport(prescriptionReqModel.toJson()); } + @override Widget build(BuildContext context) { return BaseView( onModelReady: (model) => getPrescriptionReport(context, model), builder: (_, model, w) => AppScaffold( appBarTitle: TranslationBase.of(context).prescriptionDetails, - body: CardWithBgWidgetNew( - widget: ListView.builder( - itemCount: model.prescriptionReport.length, - itemBuilder: (BuildContext context, int index) { - return OutPatientPrescriptionDetailsItem( - prescriptionReport: - model.prescriptionReport[index], - ); - }), - ), - ),); + body: CardWithBgWidgetNew( + widget: ListView.builder( + itemCount: model.prescriptionReport.length, + itemBuilder: (BuildContext context, int index) { + return OutPatientPrescriptionDetailsItem( + prescriptionReport: model.prescriptionReport[index], + ); + }), + ), + ), + ); } } diff --git a/lib/screens/patients/patient_search/time_bar.dart b/lib/screens/patients/patient_search/time_bar.dart index a1ee2cab..c7807f6f 100644 --- a/lib/screens/patients/patient_search/time_bar.dart +++ b/lib/screens/patients/patient_search/time_bar.dart @@ -20,6 +20,7 @@ class TimeBar extends StatefulWidget { this.patientSearchRequestModel, this.isSearchWithKeyInfo}) : super(key: key); + @override _TimeBarState createState() => _TimeBarState(); } diff --git a/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart b/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart index 901dcfe1..995df353 100644 --- a/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart +++ b/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart @@ -27,11 +27,11 @@ class UcafDetailScreen extends StatefulWidget { UcafDetailScreen(this.patient, this.model, {this.changeLoadingState}); @override - _UcafDetailScreenState createState() => _UcafDetailScreenState(this.patient, this.model); + _UcafDetailScreenState createState() => + _UcafDetailScreenState(this.patient, this.model); } class _UcafDetailScreenState extends State { - final PatiantInformtion patient; final UcafViewModel model; @@ -43,17 +43,15 @@ class _UcafDetailScreenState extends State { @override void initState() { - model.saveUCAFOnTap = () async{ + model.saveUCAFOnTap = () async { widget.changeLoadingState(true); await ucafModel.postUCAF(patient); widget.changeLoadingState(false); if (ucafModel.state == ViewState.Idle) { DrAppToastMsg.showSuccesToast( - TranslationBase.of(context) - .postUcafSuccessMsg); + TranslationBase.of(context).postUcafSuccessMsg); Navigator.of(context).popUntil((route) { - return route.settings.name == - PATIENTS_PROFILE; + return route.settings.name == PATIENTS_PROFILE; }); } else { DrAppToastMsg.showErrorToast(ucafModel.error); @@ -105,7 +103,6 @@ class _UcafDetailScreenState extends State { ), ), ), - ], ), )); @@ -236,7 +233,6 @@ class _UcafDetailScreenState extends State { ]; } } - } class DiagnosisWidget extends StatelessWidget { diff --git a/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart b/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart index c169b0e0..ddad858f 100644 --- a/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart +++ b/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart @@ -379,11 +379,11 @@ class _UCAFInputScreenState extends State { : model.patientChiefComplaintList != null || model.patientVitalSignsHistory != null ? Center( - child: ErrorMessage(error: model.patientVitalSignsHistory == null || model.patientVitalSignsHistory.length == 0 - ? TranslationBase.of(context).vitalSignEmptyMsg - : TranslationBase.of(context) - ) - ) + child: ErrorMessage( + error: model.patientVitalSignsHistory == null || + model.patientVitalSignsHistory.length == 0 + ? TranslationBase.of(context).vitalSignEmptyMsg + : TranslationBase.of(context))) : Container(), ), ); diff --git a/lib/screens/patients/profile/UCAF/page-stepper-widget.dart b/lib/screens/patients/profile/UCAF/page-stepper-widget.dart index 6d9838f4..628f6663 100644 --- a/lib/screens/patients/profile/UCAF/page-stepper-widget.dart +++ b/lib/screens/patients/profile/UCAF/page-stepper-widget.dart @@ -18,7 +18,11 @@ class PageStepperWidget extends StatelessWidget { final Size screenSize; final List stepsTitles; - PageStepperWidget({this.stepsCount, this.currentStepIndex, this.screenSize, this.stepsTitles}); + PageStepperWidget( + {this.stepsCount, + this.currentStepIndex, + this.screenSize, + this.stepsTitles}); @override Widget build(BuildContext context) { @@ -33,11 +37,23 @@ class PageStepperWidget extends StatelessWidget { children: [ for (int i = 1; i <= stepsCount; i++) if (i == currentStepIndex) - StepWidget(i, true, i == stepsCount, i < currentStepIndex, - dividerWidth, stepsTitles: stepsTitles,) + StepWidget( + i, + true, + i == stepsCount, + i < currentStepIndex, + dividerWidth, + stepsTitles: stepsTitles, + ) else - StepWidget(i, false, i == stepsCount, i < currentStepIndex, - dividerWidth, stepsTitles: stepsTitles,) + StepWidget( + i, + false, + i == stepsCount, + i < currentStepIndex, + dividerWidth, + stepsTitles: stepsTitles, + ) ], ) ], @@ -47,7 +63,6 @@ class PageStepperWidget extends StatelessWidget { } class StepWidget extends StatelessWidget { - final int index; final bool isInProgress; final bool isFinalStep; @@ -56,7 +71,8 @@ class StepWidget extends StatelessWidget { final List stepsTitles; StepWidget(this.index, this.isInProgress, this.isFinalStep, this.isStepFinish, - this.dividerWidth, {this.stepsTitles}); + this.dividerWidth, + {this.stepsTitles}); @override Widget build(BuildContext context) { @@ -64,9 +80,9 @@ class StepWidget extends StatelessWidget { if (isInProgress) { status = StepStatus.InProgress; } else { - if(isStepFinish){ + if (isStepFinish) { status = StepStatus.Completed; - }else { + } else { status = StepStatus.Locked; } } @@ -82,17 +98,27 @@ class StepWidget extends StatelessWidget { width: 30, height: 30, decoration: BoxDecoration( - color: status == StepStatus.InProgress ? Color(0xFFCC9B14) : status == StepStatus.Locked ? Color(0xFFE3E3E3) : Color(0xFF359846), + color: status == StepStatus.InProgress + ? Color(0xFFCC9B14) + : status == StepStatus.Locked + ? Color(0xFFE3E3E3) + : Color(0xFF359846), shape: BoxShape.circle, border: Border.all( - color: status == StepStatus.InProgress ? Color(0xFFCC9B14) : status == StepStatus.Locked ? Color(0xFFE3E3E3) : Color(0xFF359846), + color: status == StepStatus.InProgress + ? Color(0xFFCC9B14) + : status == StepStatus.Locked + ? Color(0xFFE3E3E3) + : Color(0xFF359846), width: 1), ), child: Center( child: Icon( Icons.check, size: 20, - color: status == StepStatus.Locked ? Color(0xFF969696) : Colors.white, + color: status == StepStatus.Locked + ? Color(0xFF969696) + : Colors.white, )), ), if (!isFinalStep) @@ -100,7 +126,9 @@ class StepWidget extends StatelessWidget { margin: EdgeInsets.symmetric(horizontal: 4), width: dividerWidth, height: 2, - color: status == StepStatus.Completed ? Color(0xFF359846) : Color(0xFFCCCCCC), + color: status == StepStatus.Completed + ? Color(0xFF359846) + : Color(0xFFCCCCCC), ), ], ), @@ -108,7 +136,9 @@ class StepWidget extends StatelessWidget { height: 8, ), AppText( - stepsTitles == null ? "${TranslationBase.of(context).step} $index" : "${stepsTitles[index - 1]}", + stepsTitles == null + ? "${TranslationBase.of(context).step} $index" + : "${stepsTitles[index - 1]}", fontWeight: FontWeight.bold, color: status == StepStatus.Locked ? Color(0xFF969696) : Colors.black, fontFamily: 'Poppins', @@ -126,11 +156,13 @@ class StepWidget extends StatelessWidget { borderRadius: BorderRadius.all( Radius.circular(4.0), ), - border: Border.all(color: status == StepStatus.InProgress - ? Color(0xFFF1E9D3) - : status == StepStatus.Locked - ? Color(0x29797979) - : Color(0xFFD8E8D8), width: 0.30), + border: Border.all( + color: status == StepStatus.InProgress + ? Color(0xFFF1E9D3) + : status == StepStatus.Locked + ? Color(0x29797979) + : Color(0xFFD8E8D8), + width: 0.30), ), child: AppText( status == StepStatus.InProgress @@ -145,8 +177,8 @@ class StepWidget extends StatelessWidget { color: status == StepStatus.InProgress ? Color(0xFFCC9B14) : status == StepStatus.Locked - ? Color(0xFF969696) - : Color(0xFF359846), + ? Color(0xFF969696) + : Color(0xFF359846), ), ) ], @@ -158,4 +190,4 @@ enum StepStatus { InProgress, Locked, Completed, -} \ No newline at end of file +} diff --git a/lib/screens/patients/profile/UCAF/ucaf_pager_screen.dart b/lib/screens/patients/profile/UCAF/ucaf_pager_screen.dart index 74f5cf48..b2a28f9a 100644 --- a/lib/screens/patients/profile/UCAF/ucaf_pager_screen.dart +++ b/lib/screens/patients/profile/UCAF/ucaf_pager_screen.dart @@ -176,7 +176,6 @@ class _UCAFPagerScreenState extends State borderColor: Colors.white, color: Colors.white, fontColor: Color(0xFFB8382B), - onPressed: () { Navigator.of(context).popUntil((route) { return route.settings.name == PATIENTS_PROFILE; @@ -198,7 +197,6 @@ class _UCAFPagerScreenState extends State borderColor: Color(0xFFB8382B), color: AppGlobal.appRedColor, fontColor: Colors.white, - onPressed: () { model.saveUCAFOnTap(); }, 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 9fa78cef..b74c2ef3 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 @@ -25,10 +25,12 @@ import '../../../../routes.dart'; class AdmissionRequestFirstScreen extends StatefulWidget { @override - _AdmissionRequestThirdScreenState createState() => _AdmissionRequestThirdScreenState(); + _AdmissionRequestThirdScreenState createState() => + _AdmissionRequestThirdScreenState(); } -class _AdmissionRequestThirdScreenState extends State { +class _AdmissionRequestThirdScreenState + extends State { final _dietTypeRemarksController = TextEditingController(); final _sickLeaveCommentsController = TextEditingController(); final _postMedicalHistoryController = TextEditingController(); @@ -99,12 +101,14 @@ class _AdmissionRequestThirdScreenState extends State 0 + onClick: model.clinicList != null && + model.clinicList.length > 0 ? () { openListDialogField( - projectViewModel.isArabic ? 'clinicNameArabic' : 'clinicNameEnglish', + projectViewModel.isArabic + ? 'clinicNameArabic' + : 'clinicNameEnglish', 'clinicID', model.clinicList, (selectedValue) { setState(() { @@ -135,21 +142,30 @@ class _AdmissionRequestThirdScreenState extends State GifLoaderDialogUtils.hideDialog(context)); - if (model.state == ViewState.Idle && model.clinicList.length > 0) { + GifLoaderDialogUtils.showMyDialog( + context); + await model.getClinics().then((_) => + GifLoaderDialogUtils.hideDialog( + context)); + if (model.state == ViewState.Idle && + model.clinicList.length > 0) { openListDialogField( - projectViewModel.isArabic ? 'clinicNameArabic' : 'clinicNameEnglish', + projectViewModel.isArabic + ? 'clinicNameArabic' + : 'clinicNameEnglish', 'clinicID', model.clinicList, (selectedValue) { setState(() { _selectedClinic = selectedValue; }); }); - } else if (model.state == ViewState.ErrorLocal) { - DrAppToastMsg.showErrorToast(model.error); + } else if (model.state == + ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast( + model.error); } else { - DrAppToastMsg.showErrorToast("Empty List"); + DrAppToastMsg.showErrorToast( + "Empty List"); } }, ), @@ -160,13 +176,17 @@ class _AdmissionRequestThirdScreenState extends State 0 + ? model.doctorsList != null && + model.doctorsList.length > 0 ? () { - openListDialogField('DoctorName', 'DoctorID', model.doctorsList, + openListDialogField('DoctorName', + 'DoctorID', model.doctorsList, (selectedValue) { setState(() { _selectedDoctor = selectedValue; @@ -174,21 +194,29 @@ class _AdmissionRequestThirdScreenState extends State GifLoaderDialogUtils.hideDialog(context)); - if (model.state == ViewState.Idle && model.doctorsList.length > 0) { - openListDialogField('DoctorName', 'DoctorID', model.doctorsList, + .getClinicDoctors( + _selectedClinic['clinicID']) + .then((_) => GifLoaderDialogUtils + .hideDialog(context)); + if (model.state == ViewState.Idle && + model.doctorsList.length > 0) { + openListDialogField('DoctorName', + 'DoctorID', model.doctorsList, (selectedValue) { setState(() { _selectedDoctor = selectedValue; }); }); - } else if (model.state == ViewState.ErrorLocal) { - DrAppToastMsg.showErrorToast(model.error); + } else if (model.state == + ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast( + model.error); } else { - DrAppToastMsg.showErrorToast("Empty List"); + DrAppToastMsg.showErrorToast( + "Empty List"); } } : null, @@ -220,7 +248,8 @@ class _AdmissionRequestThirdScreenState extends State 0 + onClick: model.dietTypesList != null && + model.dietTypesList.length > 0 ? () { - openListDialogField('nameEn', 'id', model.dietTypesList, (selectedValue) { + openListDialogField( + 'nameEn', 'id', model.dietTypesList, + (selectedValue) { setState(() { _selectedDietType = selectedValue; }); }); } : () async { - GifLoaderDialogUtils.showMyDialog(context); + GifLoaderDialogUtils.showMyDialog( + context); await model .getDietTypes(patient.patientId) - .then((_) => GifLoaderDialogUtils.hideDialog(context)); - if (model.state == ViewState.Idle && model.dietTypesList.length > 0) { - openListDialogField('nameEn', 'id', model.dietTypesList, (selectedValue) { + .then((_) => + GifLoaderDialogUtils.hideDialog( + context)); + if (model.state == ViewState.Idle && + model.dietTypesList.length > 0) { + openListDialogField( + 'nameEn', 'id', model.dietTypesList, + (selectedValue) { setState(() { _selectedDietType = selectedValue; }); }); - } else if (model.state == ViewState.ErrorLocal) { - DrAppToastMsg.showErrorToast(model.error); + } else if (model.state == + ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast( + model.error); } else { - DrAppToastMsg.showErrorToast("Empty List"); + DrAppToastMsg.showErrorToast( + "Empty List"); } }, ), @@ -288,7 +332,8 @@ class _AdmissionRequestThirdScreenState extends State list, Function(dynamic selectedValue) okFunction) { + void openListDialogField(String attributeName, String attributeValueId, + List list, Function(dynamic selectedValue) okFunction) { ListSelectDialog dialog = ListSelectDialog( list: list, attributeName: attributeName, 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 99097777..fb805129 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 @@ -25,10 +25,12 @@ import '../../../../routes.dart'; class AdmissionRequestThirdScreen extends StatefulWidget { @override - _AdmissionRequestThirdScreenState createState() => _AdmissionRequestThirdScreenState(); + _AdmissionRequestThirdScreenState createState() => + _AdmissionRequestThirdScreenState(); } -class _AdmissionRequestThirdScreenState extends State { +class _AdmissionRequestThirdScreenState + extends State { dynamic _selectedDiagnosis; dynamic _selectedIcd; dynamic _selectedDiagnosisType; @@ -105,13 +107,18 @@ class _AdmissionRequestThirdScreenState extends State 0 + onClick: model.diagnosisTypesList != null && + model.diagnosisTypesList.length > 0 ? () { - openListDialogField('nameEn', 'id', model.diagnosisTypesList, (selectedValue) { + openListDialogField('nameEn', 'id', + model.diagnosisTypesList, + (selectedValue) { setState(() { _selectedDiagnosis = selectedValue; }); @@ -119,17 +126,24 @@ class _AdmissionRequestThirdScreenState extends State GifLoaderDialogUtils.hideDialog(context)); - if (model.state == ViewState.Idle && model.diagnosisTypesList.length > 0) { - openListDialogField('nameEn', 'id', model.diagnosisTypesList, (selectedValue) { + await model.getDiagnosis().then((_) => + GifLoaderDialogUtils.hideDialog( + context)); + if (model.state == ViewState.Idle && + model.diagnosisTypesList.length > 0) { + openListDialogField('nameEn', 'id', + model.diagnosisTypesList, + (selectedValue) { setState(() { _selectedDiagnosis = selectedValue; }); }); - } else if (model.state == ViewState.ErrorLocal) { + } else if (model.state == + ViewState.ErrorLocal) { DrAppToastMsg.showErrorToast(model.error); } else { - DrAppToastMsg.showErrorToast("Empty List"); + DrAppToastMsg.showErrorToast( + "Empty List"); } }, ), @@ -139,13 +153,18 @@ class _AdmissionRequestThirdScreenState extends State 0 + onClick: model.icdCodes != null && + model.icdCodes.length > 0 ? () { - openListDialogField('description', 'code', model.icdCodes, (selectedValue) { + openListDialogField( + 'description', 'code', model.icdCodes, + (selectedValue) { setState(() { _selectedIcd = selectedValue; }); @@ -155,17 +174,24 @@ class _AdmissionRequestThirdScreenState extends State GifLoaderDialogUtils.hideDialog(context)); - if (model.state == ViewState.Idle && model.icdCodes.length > 0) { - openListDialogField('description', 'code', model.icdCodes, (selectedValue) { + .then((_) => + GifLoaderDialogUtils.hideDialog( + context)); + if (model.state == ViewState.Idle && + model.icdCodes.length > 0) { + openListDialogField( + 'description', 'code', model.icdCodes, + (selectedValue) { setState(() { _selectedIcd = selectedValue; }); }); - } else if (model.state == ViewState.ErrorLocal) { + } else if (model.state == + ViewState.ErrorLocal) { DrAppToastMsg.showErrorToast(model.error); } else { - DrAppToastMsg.showErrorToast("Empty List"); + DrAppToastMsg.showErrorToast( + "Empty List"); } }, ), @@ -175,14 +201,19 @@ class _AdmissionRequestThirdScreenState extends State 0 + onClick: model.listOfDiagnosisSelectionTypes != + null && + model.listOfDiagnosisSelectionTypes.length > + 0 ? () { - openListDialogField('description', 'code', model.listOfDiagnosisSelectionTypes, + openListDialogField('description', 'code', + model.listOfDiagnosisSelectionTypes, (selectedValue) { setState(() { _selectedDiagnosisType = selectedValue; @@ -192,20 +223,29 @@ class _AdmissionRequestThirdScreenState extends State GifLoaderDialogUtils.hideDialog(context)); + .getMasterLookup(MasterKeysService + .DiagnosisSelectionType) + .then((_) => + GifLoaderDialogUtils.hideDialog( + context)); if (model.state == ViewState.Idle && - model.listOfDiagnosisSelectionTypes.length > 0) { - openListDialogField('description', 'code', model.listOfDiagnosisSelectionTypes, + model.listOfDiagnosisSelectionTypes + .length > + 0) { + openListDialogField('description', 'code', + model.listOfDiagnosisSelectionTypes, (selectedValue) { setState(() { - _selectedDiagnosisType = selectedValue; + _selectedDiagnosisType = + selectedValue; }); }); - } else if (model.state == ViewState.ErrorLocal) { + } else if (model.state == + ViewState.ErrorLocal) { DrAppToastMsg.showErrorToast(model.error); } else { - DrAppToastMsg.showErrorToast("Empty List"); + DrAppToastMsg.showErrorToast( + "Empty List"); } }, ), @@ -244,47 +284,60 @@ class _AdmissionRequestThirdScreenState extends State list, Function(dynamic selectedValue) okFunction) { + void openListDialogField(String attributeName, String attributeValueId, + List list, Function(dynamic selectedValue) okFunction) { ListSelectDialog dialog = ListSelectDialog( list: list, attributeName: attributeName, 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 0258d26f..394112fa 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 @@ -28,10 +28,12 @@ import '../../../../routes.dart'; class AdmissionRequestSecondScreen extends StatefulWidget { @override - _AdmissionRequestSecondScreenState createState() => _AdmissionRequestSecondScreenState(); + _AdmissionRequestSecondScreenState createState() => + _AdmissionRequestSecondScreenState(); } -class _AdmissionRequestSecondScreenState extends State { +class _AdmissionRequestSecondScreenState + extends State { final _postPlansEstimatedCostController = TextEditingController(); final _estimatedCostController = TextEditingController(); final _expectedDaysController = TextEditingController(); @@ -111,12 +113,14 @@ class _AdmissionRequestSecondScreenState extends State 0 + onClick: model.floorList != null && + model.floorList.length > 0 ? () { - openListDialogField('description', 'floorID', model.floorList, (selectedValue) { + openListDialogField( + 'description', + 'floorID', + model.floorList, (selectedValue) { setState(() { _selectedFloor = selectedValue; }); }); } : () async { - GifLoaderDialogUtils.showMyDialog(context); - await model.getFloors().then((_) => GifLoaderDialogUtils.hideDialog(context)); - if (model.state == ViewState.Idle && model.floorList.length > 0) { - openListDialogField('description', 'floorID', model.floorList, - (selectedValue) { + GifLoaderDialogUtils.showMyDialog( + context); + await model.getFloors().then((_) => + GifLoaderDialogUtils.hideDialog( + context)); + if (model.state == ViewState.Idle && + model.floorList.length > 0) { + openListDialogField( + 'description', + 'floorID', + model.floorList, (selectedValue) { setState(() { _selectedFloor = selectedValue; }); }); - } else if (model.state == ViewState.ErrorLocal) { - DrAppToastMsg.showErrorToast(model.error); + } else if (model.state == + ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast( + model.error); } else { - DrAppToastMsg.showErrorToast("Empty List"); + DrAppToastMsg.showErrorToast( + "Empty List"); } }, ), @@ -243,32 +274,46 @@ class _AdmissionRequestSecondScreenState extends State 0 + onClick: model.wardList != null && + model.wardList.length > 0 ? () { - openListDialogField('description', 'nursingStationID', model.wardList, - (selectedValue) { + openListDialogField( + 'description', + 'nursingStationID', + model.wardList, (selectedValue) { setState(() { _selectedWard = selectedValue; }); }); } : () async { - GifLoaderDialogUtils.showMyDialog(context); - await model.getWards().then((_) => GifLoaderDialogUtils.hideDialog(context)); - if (model.state == ViewState.Idle && model.wardList.length > 0) { - openListDialogField('description', 'nursingStationID', model.wardList, - (selectedValue) { + GifLoaderDialogUtils.showMyDialog( + context); + await model.getWards().then((_) => + GifLoaderDialogUtils.hideDialog( + context)); + if (model.state == ViewState.Idle && + model.wardList.length > 0) { + openListDialogField( + 'description', + 'nursingStationID', + model.wardList, (selectedValue) { setState(() { _selectedWard = selectedValue; }); }); - } else if (model.state == ViewState.ErrorLocal) { - DrAppToastMsg.showErrorToast(model.error); + } else if (model.state == + ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast( + model.error); } else { - DrAppToastMsg.showErrorToast("Empty List"); + DrAppToastMsg.showErrorToast( + "Empty List"); } }, ), @@ -277,37 +322,54 @@ class _AdmissionRequestSecondScreenState extends State 0 + onClick: model.roomCategoryList != null && + model.roomCategoryList.length > 0 ? () { - openListDialogField('description', 'categoryID', model.roomCategoryList, + openListDialogField( + 'description', + 'categoryID', + model.roomCategoryList, (selectedValue) { setState(() { - _selectedRoomCategory = selectedValue; + _selectedRoomCategory = + selectedValue; }); }); } : () async { - GifLoaderDialogUtils.showMyDialog(context); - await model - .getRoomCategories() - .then((_) => GifLoaderDialogUtils.hideDialog(context)); - if (model.state == ViewState.Idle && model.roomCategoryList.length > 0) { - openListDialogField('description', 'categoryID', model.roomCategoryList, + GifLoaderDialogUtils.showMyDialog( + context); + await model.getRoomCategories().then( + (_) => + GifLoaderDialogUtils.hideDialog( + context)); + if (model.state == ViewState.Idle && + model.roomCategoryList.length > 0) { + openListDialogField( + 'description', + 'categoryID', + model.roomCategoryList, (selectedValue) { setState(() { - _selectedRoomCategory = selectedValue; + _selectedRoomCategory = + selectedValue; }); }); - } else if (model.state == ViewState.ErrorLocal) { - DrAppToastMsg.showErrorToast(model.error); + } else if (model.state == + ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast( + model.error); } else { - DrAppToastMsg.showErrorToast("Empty List"); + DrAppToastMsg.showErrorToast( + "Empty List"); } }, ), @@ -315,7 +377,8 @@ class _AdmissionRequestSecondScreenState extends State 0 + onClick: model.admissionTypeList != null && + model.admissionTypeList.length > 0 ? () { - openListDialogField('nameEn', 'id', model.admissionTypeList, (selectedValue) { + openListDialogField('nameEn', 'id', + model.admissionTypeList, + (selectedValue) { setState(() { - _selectedAdmissionType = selectedValue; + _selectedAdmissionType = + selectedValue; }); }); } : () async { - GifLoaderDialogUtils.showMyDialog(context); + GifLoaderDialogUtils.showMyDialog( + context); await model - .getMasterLookup(MasterKeysService.AdmissionRequestType) - .then((_) => GifLoaderDialogUtils.hideDialog(context)); - if (model.state == ViewState.Idle && model.admissionTypeList.length > 0) { - openListDialogField('nameEn', 'id', model.admissionTypeList, (selectedValue) { + .getMasterLookup(MasterKeysService + .AdmissionRequestType) + .then((_) => + GifLoaderDialogUtils.hideDialog( + context)); + if (model.state == ViewState.Idle && + model.admissionTypeList.length > + 0) { + openListDialogField('nameEn', 'id', + model.admissionTypeList, + (selectedValue) { setState(() { - _selectedAdmissionType = selectedValue; + _selectedAdmissionType = + selectedValue; }); }); - } else if (model.state == ViewState.ErrorLocal) { - DrAppToastMsg.showErrorToast(model.error); + } else if (model.state == + ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast( + model.error); } else { - DrAppToastMsg.showErrorToast("Empty List"); + DrAppToastMsg.showErrorToast( + "Empty List"); } }, ), @@ -417,107 +501,140 @@ class _AdmissionRequestSecondScreenState extends State list, Function(dynamic selectedValue) okFunction) { + void openListDialogField(String attributeName, String attributeValueId, + List list, Function(dynamic selectedValue) okFunction) { ListSelectDialog dialog = ListSelectDialog( list: list, attributeName: attributeName, diff --git a/lib/screens/patients/profile/diabetic_chart/diabetic_chart.dart b/lib/screens/patients/profile/diabetic_chart/diabetic_chart.dart index cd6e6229..de9f6476 100644 --- a/lib/screens/patients/profile/diabetic_chart/diabetic_chart.dart +++ b/lib/screens/patients/profile/diabetic_chart/diabetic_chart.dart @@ -38,7 +38,10 @@ class _DiabeticChartState extends State { DiabeticType(nameAr: "Urine Glucose", nameEn: "Urine Glucose", value: 1), DiabeticType(nameAr: "Urine Acet", nameEn: "Urine Acet", value: 2), DiabeticType(nameAr: "Blood Glucose", nameEn: "Blood Glucose", value: 3), - DiabeticType(nameAr: "Blood Glucose(Glucometer)", nameEn: "Blood Glucose(Glucometer)", value: 4) + DiabeticType( + nameAr: "Blood Glucose(Glucometer)", + nameEn: "Blood Glucose(Glucometer)", + value: 4) ]; DiabeticType selectedDiabeticType; @@ -52,7 +55,8 @@ class _DiabeticChartState extends State { onModelReady: (model) async { selectedDiabeticType = diabeticType[2]; - await model.getDiabeticChartValues(patient, selectedDiabeticType.value, isLocalBusy: false); + await model.getDiabeticChartValues(patient, selectedDiabeticType.value, + isLocalBusy: false); generateData(model); }, builder: (_, model, w) => AppScaffold( @@ -66,84 +70,69 @@ class _DiabeticChartState extends State { child: Column( children: [ Container( - width: MediaQuery.of(context).size.width * 0.7, + width: MediaQuery.of(context).size.width * 0.7, child: DropdownButtonHideUnderline( child: DropdownButton( - dropdownColor: Colors.white, - iconEnabledColor: Colors.black, - isExpanded: true, - value: selectedDiabeticType.value, - iconSize: 25, - elevation: 16, - selectedItemBuilder: (BuildContext context) { - return diabeticType - .map((item) { - return Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: - MainAxisAlignment.end, - children: [ - Column( - mainAxisAlignment: - MainAxisAlignment.center, - children: [ - Container( - - padding: EdgeInsets.all(2), - margin: EdgeInsets.all(2), - decoration: new BoxDecoration( - color: Colors.red[800], - borderRadius: - BorderRadius.circular( - 20), - ), - constraints: BoxConstraints( - minWidth: 20, - minHeight: 20, - ), - child: Center( - child: AppText( - diabeticType - .length - .toString(), - color: Colors.white, - fontSize: projectsProvider - .isArabic - ? 10 - : 11, - textAlign: - TextAlign.center, - ), - )), - ], - ), - AppText( - selectedDiabeticType.nameEn, - fontSize: 12, - color: Colors.black, - fontWeight: FontWeight.bold, - textAlign: TextAlign.end), + dropdownColor: Colors.white, + iconEnabledColor: Colors.black, + isExpanded: true, + value: selectedDiabeticType.value, + iconSize: 25, + elevation: 16, + selectedItemBuilder: (BuildContext context) { + return diabeticType.map((item) { + return Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + padding: EdgeInsets.all(2), + margin: EdgeInsets.all(2), + decoration: new BoxDecoration( + color: Colors.red[800], + borderRadius: BorderRadius.circular(20), + ), + constraints: BoxConstraints( + minWidth: 20, + minHeight: 20, + ), + child: Center( + child: AppText( + diabeticType.length.toString(), + color: Colors.white, + fontSize: + projectsProvider.isArabic ? 10 : 11, + textAlign: TextAlign.center, + ), + )), ], - ); - }).toList(); - }, - onChanged: (newValue) async { - await onChangeFunc(newValue, model, patient); - setState(() { - - }); - }, - items: diabeticType - .map((item) { - return DropdownMenuItem( - child: AppText( - item.nameEn, - textAlign: TextAlign.left, ), - value: item.value, - ); - }).toList(), - )), + AppText(selectedDiabeticType.nameEn, + fontSize: 12, + color: Colors.black, + fontWeight: FontWeight.bold, + textAlign: TextAlign.end), + ], + ); + }).toList(); + }, + onChanged: (newValue) async { + await onChangeFunc(newValue, model, patient); + setState(() {}); + }, + items: diabeticType.map((item) { + return DropdownMenuItem( + child: AppText( + item.nameEn, + textAlign: TextAlign.left, + ), + value: item.value, + ); + }).toList(), + )), ), timeSeriesData1.length != 0 || timeSeriesData2.length != 0 ? Padding( @@ -151,7 +140,6 @@ class _DiabeticChartState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Container( margin: EdgeInsets.symmetric(horizontal: 8), decoration: BoxDecoration( @@ -195,7 +183,9 @@ class _DiabeticChartState extends State { ], ), ) - : Center(child: ErrorMessage(error: TranslationBase.of(context).noItem)), + : Center( + child: ErrorMessage( + error: TranslationBase.of(context).noItem)), ], ), )), @@ -232,20 +222,17 @@ class _DiabeticChartState extends State { onChangeFunc(newValue, PatientViewModel model, patient) async { GifLoaderDialogUtils.showMyDialog(context); setState(() { - selectedDiabeticType = diabeticType[newValue-1]; + selectedDiabeticType = diabeticType[newValue - 1]; timeSeriesData1.clear(); timeSeriesData2.clear(); }); - await model.getDiabeticChartValues(patient, selectedDiabeticType.value,isLocalBusy:true); - if(model.state == ViewState.ErrorLocal){ + await model.getDiabeticChartValues(patient, selectedDiabeticType.value, + isLocalBusy: true); + if (model.state == ViewState.ErrorLocal) { Helpers.showErrorToast(model.error); } generateData(model); GifLoaderDialogUtils.hideDialog(context); - - - - } } 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 b3b1b581..5a84f94f 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 @@ -12,8 +12,10 @@ import 'package:provider/provider.dart'; class DiabeticDetails extends StatefulWidget { final List diabeticDetailsList; - DiabeticDetails( - {Key key, this.diabeticDetailsList,}); + DiabeticDetails({ + Key key, + this.diabeticDetailsList, + }); @override _VitalSignDetailsWidgetState createState() => _VitalSignDetailsWidgetState(); @@ -40,7 +42,6 @@ class _VitalSignDetailsWidgetState extends State { TranslationBase.of(context).date, fontSize: SizeConfig.textMultiplier * 1.5, fontWeight: FontWeight.bold, - fontFamily: 'Poppins', ), // height: 60, @@ -52,7 +53,7 @@ class _VitalSignDetailsWidgetState extends State { padding: EdgeInsets.all(8), child: Container( child: AppText( - "Result", + "Result", fontSize: SizeConfig.textMultiplier * 1.5, fontWeight: FontWeight.bold, fontFamily: 'Poppins', @@ -70,7 +71,8 @@ class _VitalSignDetailsWidgetState extends State { ), Table( border: TableBorder( - horizontalInside: BorderSide(width: 1.0, color: Colors.grey[300]), + horizontalInside: + BorderSide(width: 1.0, color: Colors.grey[300]), ), children: fullData(projectViewModel), ), diff --git a/lib/screens/patients/profile/diabetic_chart/line_chart_for_diabetic.dart b/lib/screens/patients/profile/diabetic_chart/line_chart_for_diabetic.dart index fc4d84ab..297c8fbb 100644 --- a/lib/screens/patients/profile/diabetic_chart/line_chart_for_diabetic.dart +++ b/lib/screens/patients/profile/diabetic_chart/line_chart_for_diabetic.dart @@ -11,7 +11,7 @@ class LineChartForDiabetic extends StatelessWidget { final bool isOX; LineChartForDiabetic( - {this.title, this.timeSeries1, this.indexes, this.isOX= false}); + {this.title, this.timeSeries1, this.indexes, this.isOX = false}); List xAxixs = List(); List yAxixs = List(); @@ -92,10 +92,12 @@ class LineChartForDiabetic extends StatelessWidget { titlesData: FlTitlesData( bottomTitles: SideTitles( showTitles: true, - getTextStyles: (context, value) { return TextStyle( - color: Colors.black, - fontSize: 10, - );}, + getTextStyles: (context, value) { + return TextStyle( + color: Colors.black, + fontSize: 10, + ); + }, rotateAngle: -65, //rotateAngle:-65, interval: 100, @@ -120,12 +122,17 @@ class LineChartForDiabetic extends StatelessWidget { ), leftTitles: SideTitles( showTitles: true, - getTextStyles: (context, value) { return TextStyle( - color: Colors.black, - fontSize: 10, - );}, - interval:getMaxY() - getMinY() <=500?50:getMaxY() - getMinY() <=1000?100:200, - + getTextStyles: (context, value) { + return TextStyle( + color: Colors.black, + fontSize: 10, + ); + }, + interval: getMaxY() - getMinY() <= 500 + ? 50 + : getMaxY() - getMinY() <= 1000 + ? 100 + : 200, margin: 12, ), ), @@ -224,10 +231,10 @@ class LineChartForDiabetic extends StatelessWidget { ); List lineChartData = List(); - if(spots.isNotEmpty){ + if (spots.isNotEmpty) { lineChartData.add(lineChartBarData1); } - if(spots2.isNotEmpty){ + if (spots2.isNotEmpty) { lineChartData.add(lineChartBarData2); } return lineChartData; 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 532d5e46..56742976 100644 --- a/lib/screens/patients/profile/discharge_summary/all_discharge_summary.dart +++ b/lib/screens/patients/profile/discharge_summary/all_discharge_summary.dart @@ -21,6 +21,7 @@ class AllDischargeSummary extends StatefulWidget { class _AllDischargeSummaryState extends State { int pageIndex = 1; + @override Widget build(BuildContext context) { return BaseView( 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 9557bbba..cf32675b 100644 --- a/lib/screens/patients/profile/discharge_summary/discharge_Summary_widget.dart +++ b/lib/screens/patients/profile/discharge_summary/discharge_Summary_widget.dart @@ -23,6 +23,7 @@ class DischargeSummaryWidget extends StatefulWidget { class _DischargeSummaryWidgetState extends State { bool isCardExpanded = false; + @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); diff --git a/lib/screens/patients/profile/lab_result/FlowChartPage.dart b/lib/screens/patients/profile/lab_result/FlowChartPage.dart index 726e1038..0f0c22c6 100644 --- a/lib/screens/patients/profile/lab_result/FlowChartPage.dart +++ b/lib/screens/patients/profile/lab_result/FlowChartPage.dart @@ -49,8 +49,9 @@ class FlowChartPage extends StatelessWidget { ) : Container( child: Center( - child: ErrorMessage(error: TranslationBase.of(context).noDataAvailable,) - ), + child: ErrorMessage( + error: TranslationBase.of(context).noDataAvailable, + )), ), ), ); diff --git a/lib/screens/patients/profile/lab_result/LabResultHistoryPage.dart b/lib/screens/patients/profile/lab_result/LabResultHistoryPage.dart index 118bc476..3fff6106 100644 --- a/lib/screens/patients/profile/lab_result/LabResultHistoryPage.dart +++ b/lib/screens/patients/profile/lab_result/LabResultHistoryPage.dart @@ -15,6 +15,7 @@ class LabResultHistoryPage extends StatelessWidget { final PatiantInformtion patient; LabResultHistoryPage({this.patientLabOrder, this.filterName, this.patient}); + // TODO mosa UI changes @override Widget build(BuildContext context) { @@ -34,14 +35,17 @@ class LabResultHistoryPage extends StatelessWidget { ...List.generate(model.labOrdersResultHistoryList.length, (index) { return Container( - margin: EdgeInsets.symmetric(vertical: 8.0, horizontal: 16.0), + margin: EdgeInsets.symmetric( + vertical: 8.0, horizontal: 16.0), child: Column( children: [ Row( children: [ AppText( TranslationBase.of(context).description, - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3, + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3, color: Color(0xFF575757), fontWeight: FontWeight.w600, ), @@ -49,8 +53,11 @@ class LabResultHistoryPage extends StatelessWidget { width: 1, ), AppText( - model.labOrdersResultHistoryList[index].description, - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5, + model.labOrdersResultHistoryList[index] + .description, + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3.5, color: Color(0xFF2E303A), fontWeight: FontWeight.w700, isCopyable: true, @@ -61,7 +68,9 @@ class LabResultHistoryPage extends StatelessWidget { children: [ AppText( "Reference Range", - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3, + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3, color: Color(0xFF575757), fontWeight: FontWeight.w600, ), @@ -69,8 +78,11 @@ class LabResultHistoryPage extends StatelessWidget { width: 1, ), AppText( - model.labOrdersResultHistoryList[index].referanceRange, - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5, + model.labOrdersResultHistoryList[index] + .referanceRange, + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3.5, color: Color(0xFF2E303A), fontWeight: FontWeight.w700, isCopyable: true, @@ -81,7 +93,9 @@ class LabResultHistoryPage extends StatelessWidget { children: [ AppText( "Result Value", - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3, + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3, color: Color(0xFF575757), fontWeight: FontWeight.w600, ), @@ -89,8 +103,11 @@ class LabResultHistoryPage extends StatelessWidget { width: 1, ), AppText( - model.labOrdersResultHistoryList[index].resultValue, - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5, + model.labOrdersResultHistoryList[index] + .resultValue, + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3.5, color: Color(0xFF2E303A), fontWeight: FontWeight.w700, isCopyable: true, @@ -101,7 +118,9 @@ class LabResultHistoryPage extends StatelessWidget { children: [ AppText( "Verified On", - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3, + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3, color: Color(0xFF575757), fontWeight: FontWeight.w600, ), @@ -109,8 +128,11 @@ class LabResultHistoryPage extends StatelessWidget { width: 1, ), AppText( - model.labOrdersResultHistoryList[index].verifiedOn, - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5, + model.labOrdersResultHistoryList[index] + .verifiedOn, + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + 3.5, color: Color(0xFF2E303A), fontWeight: FontWeight.w700, isCopyable: true, diff --git a/lib/screens/patients/profile/lab_result/LabResultWidget.dart b/lib/screens/patients/profile/lab_result/LabResultWidget.dart index bc0a586e..b212c067 100644 --- a/lib/screens/patients/profile/lab_result/LabResultWidget.dart +++ b/lib/screens/patients/profile/lab_result/LabResultWidget.dart @@ -161,21 +161,27 @@ class LabResultWidget extends StatelessWidget { child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - if(patientLabResultList[index].checkResultStatus() != 0) - Container( - decoration: BoxDecoration( - shape: BoxShape.circle, - color: Colors.red.shade700, - // borderRadius: BorderRadius.all( - // Radius.circular(25.0), - // ), - ), - child: Icon( - patientLabResultList[index].checkResultStatus() == 1 ? Icons.arrow_upward : Icons.arrow_downward, - color: Colors.white, - size: 16, + if (patientLabResultList[index] + .checkResultStatus() != + 0) + Container( + decoration: BoxDecoration( + shape: BoxShape.circle, + color: Colors.red.shade700, + // borderRadius: BorderRadius.all( + // Radius.circular(25.0), + // ), + ), + child: Icon( + patientLabResultList[index] + .checkResultStatus() == + 1 + ? Icons.arrow_upward + : Icons.arrow_downward, + color: Colors.white, + size: 16, + ), ), - ), Expanded( child: Container( alignment: Alignment.center, @@ -183,13 +189,15 @@ class LabResultWidget extends StatelessWidget { vertical: 10, horizontal: 4), child: Center( child: AppText( - patientLabResultList[index].resultValue ?? + patientLabResultList[index] + .resultValue ?? "" + " " + "${patientLabResultList[index].uOM ?? ""}", textAlign: TextAlign.center, isCopyable: true, - fontSize: SizeConfig.textMultiplier * 1.8, + fontSize: + SizeConfig.textMultiplier * 1.8, ), ), ), @@ -219,8 +227,8 @@ class LabResultWidget extends StatelessWidget { context, FadePage( page: FlowChartPage( - filterName: - patientLabResultList[index].description, + filterName: patientLabResultList[index] + .description, patientLabOrder: patientLabOrder, patient: patient, isInpatient: isInpatient, 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 697d16d2..940003e8 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,7 +24,7 @@ class _VitalSignDetailsWidgetState extends State { Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); return Container( - /* decoration: BoxDecoration( + /* decoration: BoxDecoration( color: Colors.transparent, borderRadius: BorderRadius.only( topLeft: Radius.circular(10.0), topRight: Radius.circular(10.0)), @@ -94,10 +94,9 @@ class _VitalSignDetailsWidgetState extends State { padding: EdgeInsets.all(8), color: Colors.white, child: AppText( - '${projectViewModel.isArabic? AppDateUtils.getWeekDayArabic(date.weekday): AppDateUtils.getWeekDay(date.weekday)} ,${date.day} ${projectViewModel.isArabic? AppDateUtils.getMonthArabic(date.month) : AppDateUtils.getMonth(date.month)} ${date.year}', + '${projectViewModel.isArabic ? AppDateUtils.getWeekDayArabic(date.weekday) : AppDateUtils.getWeekDay(date.weekday)} ,${date.day} ${projectViewModel.isArabic ? AppDateUtils.getMonthArabic(date.month) : AppDateUtils.getMonth(date.month)} ${date.year}', fontSize: SizeConfig.textMultiplier * 1.8, fontWeight: FontWeight.w600, - fontFamily: 'Poppins', ), ), @@ -110,7 +109,6 @@ class _VitalSignDetailsWidgetState extends State { '${vital.resultValue}', fontSize: SizeConfig.textMultiplier * 1.8, fontWeight: FontWeight.w600, - fontFamily: 'Poppins', ), ), diff --git a/lib/screens/patients/profile/lab_result/Lab_Result_history_details_wideget.dart b/lib/screens/patients/profile/lab_result/Lab_Result_history_details_wideget.dart index edd0cc30..84256efc 100644 --- a/lib/screens/patients/profile/lab_result/Lab_Result_history_details_wideget.dart +++ b/lib/screens/patients/profile/lab_result/Lab_Result_history_details_wideget.dart @@ -19,7 +19,8 @@ class LabResultHistoryDetailsWidget extends StatefulWidget { _VitalSignDetailsWidgetState createState() => _VitalSignDetailsWidgetState(); } -class _VitalSignDetailsWidgetState extends State { +class _VitalSignDetailsWidgetState + extends State { @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); @@ -113,4 +114,4 @@ class _VitalSignDetailsWidgetState extends State }); return tableRow; } -} \ No newline at end of file +} diff --git a/lib/screens/patients/profile/lab_result/LineChartCurved.dart b/lib/screens/patients/profile/lab_result/LineChartCurved.dart index 079c5e90..002b108d 100644 --- a/lib/screens/patients/profile/lab_result/LineChartCurved.dart +++ b/lib/screens/patients/profile/lab_result/LineChartCurved.dart @@ -59,7 +59,6 @@ class LineChartCurvedState extends State { widget.title, fontSize: SizeConfig.textMultiplier * 2.1, fontWeight: FontWeight.bold, - fontFamily: 'Poppins', textAlign: TextAlign.center, ), @@ -97,23 +96,25 @@ class LineChartCurvedState extends State { titlesData: FlTitlesData( bottomTitles: SideTitles( showTitles: true, - getTextStyles: (context, value) { return TextStyle( - color: Colors.black, - fontSize: 10, - );}, + getTextStyles: (context, value) { + return TextStyle( + color: Colors.black, + fontSize: 10, + ); + }, margin: 28, - rotateAngle:-65, + rotateAngle: -65, getTitles: (value) { print(value); - DateTime date = AppDateUtils.convertStringToDate(widget.labResult[value.toInt()].verifiedOnDateTime); + DateTime date = AppDateUtils.convertStringToDate( + widget.labResult[value.toInt()].verifiedOnDateTime); if (widget.labResult.length < 8) { if (widget.labResult.length > value.toInt()) { return '${date.day}/ ${date.year}'; } else return ''; } else { - if (value.toInt() == 0) - return '${date.day}/ ${date.year}'; + if (value.toInt() == 0) return '${date.day}/ ${date.year}'; if (value.toInt() == widget.labResult.length - 1) return '${date.day}/ ${date.year}'; if (xAxixs.contains(value.toInt())) { @@ -121,17 +122,17 @@ class LineChartCurvedState extends State { } } - - return ''; }, ), leftTitles: SideTitles( showTitles: true, - getTextStyles: (context, value) { return TextStyle( - color: Colors.black, - fontSize: 10, - );}, + getTextStyles: (context, value) { + return TextStyle( + color: Colors.black, + fontSize: 10, + ); + }, getTitles: (value) { return '${value.toInt()}'; }, @@ -159,7 +160,7 @@ class LineChartCurvedState extends State { ), minX: 0, maxX: (widget.labResult.length - 1).toDouble(), - maxY: getMaxY()+2, + maxY: getMaxY() + 2, minY: getMinY(), lineBarsData: getData(), ); @@ -168,10 +169,10 @@ class LineChartCurvedState extends State { double getMaxY() { double max = 0; widget.labResult.forEach((element) { - try{ - double resultValueDouble = double.parse(element.resultValue); - if (resultValueDouble > max) max = resultValueDouble;} - catch(e){ + try { + double resultValueDouble = double.parse(element.resultValue); + if (resultValueDouble > max) max = resultValueDouble; + } catch (e) { print(e); } }); @@ -181,13 +182,14 @@ class LineChartCurvedState extends State { double getMinY() { double min = 0; - try{ - min = double.parse(widget.labResult[0].resultValue); - - widget.labResult.forEach((element) { - double resultValueDouble = double.parse(element.resultValue); - if (resultValueDouble < min) min = resultValueDouble; - });}catch(e){ + try { + min = double.parse(widget.labResult[0].resultValue); + + widget.labResult.forEach((element) { + double resultValueDouble = double.parse(element.resultValue); + if (resultValueDouble < min) min = resultValueDouble; + }); + } catch (e) { print(e); } int value = min.toInt(); @@ -198,13 +200,13 @@ class LineChartCurvedState extends State { List getData() { List spots = List(); for (int index = 0; index < widget.labResult.length; index++) { - try{ - var resultValueDouble = double.parse(widget.labResult[index].resultValue); - spots.add(FlSpot(index.toDouble(), resultValueDouble)); - }catch(e){ + try { + var resultValueDouble = + double.parse(widget.labResult[index].resultValue); + spots.add(FlSpot(index.toDouble(), resultValueDouble)); + } catch (e) { print(e); spots.add(FlSpot(index.toDouble(), 0.0)); - } } diff --git a/lib/screens/patients/profile/lab_result/LineChartCurvedLabHistory.dart b/lib/screens/patients/profile/lab_result/LineChartCurvedLabHistory.dart index b4c260af..f358abd2 100644 --- a/lib/screens/patients/profile/lab_result/LineChartCurvedLabHistory.dart +++ b/lib/screens/patients/profile/lab_result/LineChartCurvedLabHistory.dart @@ -98,10 +98,12 @@ class LineChartCurvedLabHistoryState extends State { titlesData: FlTitlesData( bottomTitles: SideTitles( showTitles: true, - getTextStyles: (context, value) { return TextStyle( - color: Colors.black, - fontSize: 10, - );}, + getTextStyles: (context, value) { + return TextStyle( + color: Colors.black, + fontSize: 10, + ); + }, margin: 28, rotateAngle: -65, getTitles: (value) { @@ -127,10 +129,12 @@ class LineChartCurvedLabHistoryState extends State { ), leftTitles: SideTitles( showTitles: true, - getTextStyles: (context, value) { return TextStyle( - color: Colors.black, - fontSize: 10, - );}, + getTextStyles: (context, value) { + return TextStyle( + color: Colors.black, + fontSize: 10, + ); + }, getTitles: (value) { return '${value.toInt()}'; }, 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 0a809abd..6dfe77b0 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 @@ -191,8 +191,9 @@ class _AllLabSpecialResultState extends State { if (model.allSpecialLabList.isEmpty && patient.patientStatusType != 43) Center( - child: ErrorMessage(error: TranslationBase.of(context).noDataAvailable,) - ) + child: ErrorMessage( + error: TranslationBase.of(context).noDataAvailable, + )) ], ), ), diff --git a/lib/screens/patients/profile/lab_result/lab_result_chart_and_detials.dart b/lib/screens/patients/profile/lab_result/lab_result_chart_and_detials.dart index 6026c9e9..42b4206d 100644 --- a/lib/screens/patients/profile/lab_result/lab_result_chart_and_detials.dart +++ b/lib/screens/patients/profile/lab_result/lab_result_chart_and_detials.dart @@ -1,4 +1,3 @@ - import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/model/labs/LabOrderResult.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; @@ -8,7 +7,6 @@ import 'package:flutter/material.dart'; import 'Lab_Result_details_wideget.dart'; import 'LineChartCurved.dart'; - class LabResultChartAndDetails extends StatelessWidget { LabResultChartAndDetails({ Key key, @@ -19,7 +17,6 @@ class LabResultChartAndDetails extends StatelessWidget { final List labResult; final String name; - @override Widget build(BuildContext context) { return Padding( @@ -30,18 +27,17 @@ class LabResultChartAndDetails extends StatelessWidget { Container( margin: EdgeInsets.symmetric(horizontal: 8), decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(12) + color: Colors.white, borderRadius: BorderRadius.circular(12)), + child: LineChartCurved( + title: name, + labResult: labResult, ), - child: LineChartCurved(title: name,labResult:labResult,), ), Container( margin: EdgeInsets.symmetric(horizontal: 8, vertical: 16), padding: EdgeInsets.only(top: 16, right: 18.0, left: 16.0), decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(12) - ), + color: Colors.white, borderRadius: BorderRadius.circular(12)), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -51,7 +47,9 @@ class LabResultChartAndDetails extends StatelessWidget { fontWeight: FontWeight.bold, fontFamily: 'Poppins', ), - SizedBox(height: 8,), + SizedBox( + height: 8, + ), LabResultDetailsWidget( labResult: labResult.reversed.toList(), ), @@ -62,5 +60,4 @@ class LabResultChartAndDetails extends StatelessWidget { ), ); } - } 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 dd8ace01..0a6af767 100644 --- a/lib/screens/patients/profile/lab_result/lab_result_secreen.dart +++ b/lib/screens/patients/profile/lab_result/lab_result_secreen.dart @@ -69,7 +69,6 @@ class _LabResultState extends State { ), ], ), - ], ), ), 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 4ccd4379..0ead8fea 100644 --- a/lib/screens/patients/profile/lab_result/laboratory_result_page.dart +++ b/lib/screens/patients/profile/lab_result/laboratory_result_page.dart @@ -39,12 +39,11 @@ class _LaboratoryResultPageState extends State { builder: (_, model, w) => AppScaffold( isShowAppBar: true, appBar: PatientProfileAppBar( - widget.patient, - isInpatient:widget.isInpatient, - isFromLabResult: true, + widget.patient, + isInpatient: widget.isInpatient, + isFromLabResult: true, appointmentDate: widget.patientLabOrders.orderDate, ), - baseViewModel: model, body: AppScaffold( isShowAppBar: false, 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 9bf81081..529c7716 100644 --- a/lib/screens/patients/profile/lab_result/laboratory_result_widget.dart +++ b/lib/screens/patients/profile/lab_result/laboratory_result_widget.dart @@ -81,11 +81,12 @@ class _LaboratoryResultWidgetState extends State { padding: EdgeInsets.all(10.0), margin: EdgeInsets.only(left: 5, right: 5), decoration: BoxDecoration( - shape: BoxShape.rectangle, - color: Colors.white, - borderRadius: BorderRadius.all( - Radius.circular(5.0), - ),), + shape: BoxShape.rectangle, + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(5.0), + ), + ), child: Row( children: [ Expanded( @@ -95,7 +96,8 @@ class _LaboratoryResultWidgetState extends State { child: AppText( TranslationBase.of(context) .generalResult, - fontSize: SizeConfig.textMultiplier * 2.3, + fontSize: + SizeConfig.textMultiplier * 2.3, bold: false, ))), Container( @@ -138,9 +140,11 @@ class _LaboratoryResultWidgetState extends State { shrinkWrap: true, itemBuilder: (context, index) { return LabResultWidget( - patientLabOrder: widget.patientLabOrder, + patientLabOrder: + widget.patientLabOrder, filterName: model - .labResultLists[index].filterName, + .labResultLists[index] + .filterName, patientLabResultList: model .labResultLists[index] .patientLabResultList, @@ -186,12 +190,13 @@ class _LaboratoryResultWidgetState extends State { children: [ Expanded( child: Container( - margin: EdgeInsets.only( - left: 0, right: 0), + margin: + EdgeInsets.only(left: 0, right: 0), child: AppText( TranslationBase.of(context) .specialResult, - fontSize: SizeConfig.textMultiplier * 2.3, + fontSize: + SizeConfig.textMultiplier * 2.3, bold: false, ))), Container( 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 6073cab0..8352db28 100644 --- a/lib/screens/patients/profile/lab_result/labs_home_page.dart +++ b/lib/screens/patients/profile/lab_result/labs_home_page.dart @@ -222,8 +222,9 @@ class _LabsHomePageState extends State { if (model.patientLabOrdersList.isEmpty && patient.patientStatusType != 43) Center( - child: ErrorMessage(error: TranslationBase.of(context).noDataAvailable,) - ) + child: ErrorMessage( + error: TranslationBase.of(context).noDataAvailable, + )) ], ), ), 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 db86dd72..da21ca3d 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 @@ -13,7 +13,8 @@ class SpecialLabResultDetailsPage extends StatelessWidget { final String resultData; final PatiantInformtion patient; - const SpecialLabResultDetailsPage({Key key, this.resultData, this.patient}) : super(key: key); + const SpecialLabResultDetailsPage({Key key, this.resultData, this.patient}) + : super(key: key); @override Widget build(BuildContext context) { @@ -53,8 +54,10 @@ class SpecialLabResultDetailsPage extends StatelessWidget { resultData != null ? Container( width: double.infinity, - margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16), - padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16), + margin: + EdgeInsets.symmetric(horizontal: 16, vertical: 16), + padding: + EdgeInsets.symmetric(horizontal: 16, vertical: 16), decoration: BoxDecoration( color: Colors.white, shape: BoxShape.rectangle, diff --git a/lib/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart b/lib/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart index b91b38a6..9bd1da29 100644 --- a/lib/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart +++ b/lib/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart @@ -39,6 +39,7 @@ class AddVerifyMedicalReport extends StatefulWidget { class _AddVerifyMedicalReportState extends State { HtmlEditorController _controller = HtmlEditorController(); + @override Widget build(BuildContext context) { String txtOfMedicalReport; @@ -69,14 +70,26 @@ class _AddVerifyMedicalReportState extends State { children: [ if (model.medicalReportTemplate.length > 0) HtmlRichEditor( - initialText: (widget.medicalReport != null + initialText: (widget.medicalReport != + null ? widget.medicalNote - : widget.model.medicalReportTemplate[0].templateText.length > 0 - ? widget.model.medicalReportTemplate[0].templateText + : widget + .model + .medicalReportTemplate[ + 0] + .templateText + .length > + 0 + ? widget + .model + .medicalReportTemplate[0] + .templateText : ""), controller: _controller, hint: "Write the medical report ", - height: MediaQuery.of(context).size.height * 0.75, + height: + MediaQuery.of(context).size.height * + 0.75, ), ], ), @@ -107,22 +120,30 @@ class _AddVerifyMedicalReportState extends State { if (txtOfMedicalReport.isNotEmpty) { GifLoaderDialogUtils.showMyDialog(context); widget.medicalReport != null - ?await widget.model.updateMedicalReport( + ? await widget.model.updateMedicalReport( widget.patient, txtOfMedicalReport, - widget.medicalReport != null ? widget.medicalReport.lineItemNo : null, - widget.medicalReport != null ? widget.medicalReport.invoiceNo : null) - : await widget.model.addMedicalReport(widget.patient, txtOfMedicalReport); + widget.medicalReport != null + ? widget.medicalReport.lineItemNo + : null, + widget.medicalReport != null + ? widget.medicalReport.invoiceNo + : null) + : await widget.model.addMedicalReport( + widget.patient, txtOfMedicalReport); //model.getMedicalReportList(patient); Navigator.pop(context); GifLoaderDialogUtils.hideDialog(context); - if (widget.model.state == ViewState.ErrorLocal) { - DrAppToastMsg.showErrorToast(widget.model.error); + if (widget.model.state == + ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast( + widget.model.error); } } else { - DrAppToastMsg.showErrorToast("Please enter medical note"); + DrAppToastMsg.showErrorToast( + "Please enter medical note"); } }, ), @@ -139,17 +160,22 @@ class _AddVerifyMedicalReportState extends State { color: Color(0xff359846), fontWeight: FontWeight.w700, onPressed: () async { - txtOfMedicalReport = await _controller.getText(); + txtOfMedicalReport = + await _controller.getText(); if (txtOfMedicalReport.isNotEmpty) { GifLoaderDialogUtils.showMyDialog(context); - await widget.model.verifyMedicalReport(widget.patient, widget.medicalReport); + await widget.model.verifyMedicalReport( + widget.patient, widget.medicalReport); GifLoaderDialogUtils.hideDialog(context); Navigator.pop(context); - if (widget.model.state == ViewState.ErrorLocal) { - DrAppToastMsg.showErrorToast(widget.model.error); + if (widget.model.state == + ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast( + widget.model.error); } } else { - DrAppToastMsg.showErrorToast("Please enter medical note"); + DrAppToastMsg.showErrorToast( + "Please enter medical note"); } }, ), diff --git a/lib/screens/patients/profile/medical_report/MedicalReportDetailPage.dart b/lib/screens/patients/profile/medical_report/MedicalReportDetailPage.dart index d925116a..eb28c528 100644 --- a/lib/screens/patients/profile/medical_report/MedicalReportDetailPage.dart +++ b/lib/screens/patients/profile/medical_report/MedicalReportDetailPage.dart @@ -56,27 +56,31 @@ class MedicalReportDetailPage extends StatelessWidget { ], ), ), - medicalReport.reportDataHtml != null ? Container( - width: double.infinity, - margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16), - padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16), - decoration: BoxDecoration( - color: Colors.white, - shape: BoxShape.rectangle, - borderRadius: BorderRadius.all(Radius.circular(8)), - border: Border.fromBorderSide( - BorderSide( - color: Colors.white, - width: 1.0, + medicalReport.reportDataHtml != null + ? Container( + width: double.infinity, + margin: + EdgeInsets.symmetric(horizontal: 16, vertical: 16), + padding: + EdgeInsets.symmetric(horizontal: 16, vertical: 16), + decoration: BoxDecoration( + color: Colors.white, + shape: BoxShape.rectangle, + borderRadius: BorderRadius.all(Radius.circular(8)), + border: Border.fromBorderSide( + BorderSide( + color: Colors.white, + width: 1.0, + ), + ), + ), + child: Html(data: medicalReport.reportDataHtml ?? ""), + ) + : Container( + child: ErrorMessage( + error: "No Data", + ), ), - ), - ), - child: Html( - data: medicalReport.reportDataHtml ?? "" - ), - ) : Container( - child: ErrorMessage(error: "No Data",), - ), ], ), ), diff --git a/lib/screens/patients/profile/medical_report/MedicalReportPage.dart b/lib/screens/patients/profile/medical_report/MedicalReportPage.dart index bb03a9bc..b124f2cc 100644 --- a/lib/screens/patients/profile/medical_report/MedicalReportPage.dart +++ b/lib/screens/patients/profile/medical_report/MedicalReportPage.dart @@ -117,12 +117,15 @@ class _MedicalReportPageState extends State { arrivalType: arrivalType, medicalReport: model.medicalReportList[index], model: model, - medicalNote: model.medicalReportList[index].reportDataHtml, + medicalNote: model + .medicalReportList[index].reportDataHtml, ), - settings: RouteSettings(name: 'AddVerifyMedicalReport')), + settings: + RouteSettings(name: 'AddVerifyMedicalReport')), ); } else { - Navigator.of(context).pushNamed(PATIENT_MEDICAL_REPORT_DETAIL, arguments: { + Navigator.of(context) + .pushNamed(PATIENT_MEDICAL_REPORT_DETAIL, arguments: { 'patient': patient, 'patientType': patientType, 'arrivalType': arrivalType, @@ -136,7 +139,9 @@ class _MedicalReportPageState extends State { margin: EdgeInsets.symmetric(horizontal: 8), child: CardWithBgWidget( hasBorder: false, - bgColor: model.medicalReportList[index].status == 1 ? Color(0xFFCC9B14) : AppGlobal.appGreenColor, + bgColor: model.medicalReportList[index].status == 1 + ? Color(0xFFCC9B14) + : AppGlobal.appGreenColor, widget: Column( children: [ Row( @@ -149,16 +154,22 @@ class _MedicalReportPageState extends State { model.medicalReportList[index].status == 1 ? TranslationBase.of(context).onHold : TranslationBase.of(context).verified, - color: model.medicalReportList[index].status == 1 - ? Color(0xFFCC9B14) - : AppGlobal.appGreenColor, + color: + model.medicalReportList[index].status == + 1 + ? Color(0xFFCC9B14) + : AppGlobal.appGreenColor, fontSize: 1.4 * SizeConfig.textMultiplier, bold: true, ), AppText( projectViewModel.isArabic - ? model.medicalReportList[index].doctorNameN ?? "" - : model.medicalReportList[index].doctorName ?? "", + ? model.medicalReportList[index] + .doctorNameN ?? + "" + : model.medicalReportList[index] + .doctorName ?? + "", fontSize: 1.9 * SizeConfig.textMultiplier, fontWeight: FontWeight.w700, color: Color(0xFF2E303A), @@ -188,12 +199,16 @@ class _MedicalReportPageState extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( - margin: EdgeInsets.only(left: 0, top: 4, right: 8, bottom: 0), + margin: EdgeInsets.only( + left: 0, top: 4, right: 8, bottom: 0), child: LargeAvatar( name: projectViewModel.isArabic - ? model.medicalReportList[index].doctorNameN - : model.medicalReportList[index].doctorName, - url: model.medicalReportList[index].doctorImageURL, + ? model + .medicalReportList[index].doctorNameN + : model + .medicalReportList[index].doctorName, + url: model + .medicalReportList[index].doctorImageURL, ), width: 50, height: 50, @@ -201,20 +216,27 @@ class _MedicalReportPageState extends State { Expanded( child: Container( child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ AppText( projectViewModel.isArabic - ? model.medicalReportList[index].projectNameN - : model.medicalReportList[index].projectName, - fontSize: 1.6 * SizeConfig.textMultiplier, + ? model.medicalReportList[index] + .projectNameN + : model.medicalReportList[index] + .projectName, + fontSize: + 1.6 * SizeConfig.textMultiplier, color: Color(0xFF2E303A), ), AppText( projectViewModel.isArabic - ? model.medicalReportList[index].clinicNameN - : model.medicalReportList[index].clinicName, - fontSize: 1.6 * SizeConfig.textMultiplier, + ? model.medicalReportList[index] + .clinicNameN + : model.medicalReportList[index] + .clinicName, + fontSize: + 1.6 * SizeConfig.textMultiplier, color: Color(0xFF2E303A), ), ], @@ -227,7 +249,9 @@ class _MedicalReportPageState extends State { mainAxisAlignment: MainAxisAlignment.end, children: [ Icon( - model.medicalReportList[index].status == 1 ? DoctorApp.edit_1 : EvaIcons.eye, + model.medicalReportList[index].status == 1 + ? DoctorApp.edit_1 + : EvaIcons.eye, ), ], ), 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 e09a8764..ae6681e7 100644 --- a/lib/screens/patients/profile/notes/note/progress_note_screen.dart +++ b/lib/screens/patients/profile/notes/note/progress_note_screen.dart @@ -27,8 +27,6 @@ import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:provider/provider.dart'; - - DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); class ProgressNoteScreen extends StatefulWidget { @@ -93,8 +91,12 @@ class _ProgressNoteState extends State { body: model.patientProgressNoteList == null || model.patientProgressNoteList.length == 0 ? widget.visitType == 3 - ? ErrorMessage(error: TranslationBase.of(context).errorNoOrders,) - : ErrorMessage(error: TranslationBase.of(context).errorNoProgressNote,) + ? ErrorMessage( + error: TranslationBase.of(context).errorNoOrders, + ) + : ErrorMessage( + error: TranslationBase.of(context).errorNoProgressNote, + ) : Container( color: Colors.grey[200], child: Column( @@ -169,10 +171,8 @@ class _ProgressNoteState extends State { index] .createdBy) AppText( - TranslationBase.of(context) .notePending, - fontWeight: FontWeight.bold, color: Color(0xFFCC9B14), fontSize: 12, @@ -320,7 +320,8 @@ class _ProgressNoteState extends State { }, child: Container( decoration: BoxDecoration( - color: AppGlobal.appGreenColor, + color: AppGlobal + .appGreenColor, borderRadius: BorderRadius.circular( 10), @@ -477,7 +478,7 @@ class _ProgressNoteState extends State { fontWeight: FontWeight.w600, fontSize: 12, - isCopyable:true, + isCopyable: true, ), ), ], @@ -511,7 +512,7 @@ class _ProgressNoteState extends State { .isArabic), fontWeight: FontWeight.w600, fontSize: 14, - isCopyable:true, + isCopyable: true, ), AppText( model @@ -529,7 +530,7 @@ class _ProgressNoteState extends State { DateTime.now()), fontWeight: FontWeight.w600, fontSize: 14, - isCopyable:true, + isCopyable: true, ), ], crossAxisAlignment: @@ -551,7 +552,7 @@ class _ProgressNoteState extends State { index] .notes, fontSize: 10, - isCopyable:true, + 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 3fde4262..85b33f5e 100644 --- a/lib/screens/patients/profile/notes/note/update_note.dart +++ b/lib/screens/patients/profile/notes/note/update_note.dart @@ -173,22 +173,22 @@ class _UpdateNoteOrderState extends State { ), ), bottomSheet: Container( - height: progressNoteController.text.isNotEmpty? 130:70, + 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 = ''; - }); - }, - ), - ), + 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( diff --git a/lib/screens/patients/profile/operation_report/operation_report.dart b/lib/screens/patients/profile/operation_report/operation_report.dart index 7b7fc814..409e118d 100644 --- a/lib/screens/patients/profile/operation_report/operation_report.dart +++ b/lib/screens/patients/profile/operation_report/operation_report.dart @@ -59,306 +59,311 @@ class _ProgressNoteState extends State { ), body: Container( color: Colors.grey[200], - child:model.reservationList == null || - model.reservationList.length == 0 + child: model.reservationList == null || + model.reservationList.length == 0 ? Center( - child: ErrorMessage( - error: TranslationBase.of(context).noDataAvailable, ), - ): Column( - children: [ - Expanded( - child: Container( - child: ListView.builder( - itemCount: model.reservationList.length, - itemBuilder: (BuildContext ctxt, int index) { - return FractionallySizedBox( - widthFactor: 0.95, - child: CardWithBgWidget( - hasBorder: false, - bgColor: Colors.white, - widget: Column( - children: [ - Column( - crossAxisAlignment: - CrossAxisAlignment.start, - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Container( - width: MediaQuery.of(context) - .size - .width * - 0.60, - child: Column( - crossAxisAlignment: + child: ErrorMessage( + error: TranslationBase.of(context).noDataAvailable, + ), + ) + : Column( + children: [ + Expanded( + child: Container( + child: ListView.builder( + itemCount: model.reservationList.length, + itemBuilder: (BuildContext ctxt, int index) { + return FractionallySizedBox( + widthFactor: 0.95, + child: CardWithBgWidget( + hasBorder: false, + bgColor: Colors.white, + widget: Column( + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ - Row( + Container( + width: MediaQuery.of(context) + .size + .width * + 0.60, + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Row( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + AppText( + TranslationBase.of( + context) + .createdBy, + fontSize: 10, + ), + Expanded( + child: AppText( + model + .reservationList[ + index] + .doctorName ?? + '', + fontWeight: + FontWeight.w600, + fontSize: 12, + ), + ), + ], + ), + ], + ), + ), + Column( + children: [ + AppText( + model.reservationList[index] + .createdOn != + null + ? AppDateUtils.getDayMonthYearDateFormatted( + AppDateUtils + .getDateTimeFromServerFormat(model + .reservationList[ + index] + .createdOn), + isArabic: + projectViewModel + .isArabic, + isMonthShort: true) + : AppDateUtils + .getDayMonthYearDateFormatted( + DateTime.now(), + isArabic: + projectViewModel + .isArabic), + fontWeight: FontWeight.w600, + fontSize: 14, + ), + AppText( + model.reservationList[index] + .createdOn != + null + ? AppDateUtils.getHour( + AppDateUtils + .getDateTimeFromServerFormat(model + .reservationList[ + index] + .createdOn)) + : AppDateUtils.getHour( + DateTime.now()), + fontWeight: FontWeight.w600, + fontSize: 14, + ), + ], crossAxisAlignment: - CrossAxisAlignment - .start, + CrossAxisAlignment.end, + ) + ], + ), + SizedBox( + height: 8, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .reservation, + fontSize: 10, + ), + Expanded( + child: AppText( + model.reservationList[index] + .oTReservationID + .toString(), + fontSize: 10, + ), + ) + ]), + SizedBox( + height: 8, + ), + if (model.reservationList[index] + .operationDate != + null) + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .operationDate, + fontSize: 10, + ), + Expanded( + child: AppText( + AppDateUtils.getDayMonthYearDateFormatted( + AppDateUtils + .getDateTimeFromServerFormat(model + .reservationList[ + index] + .operationDate), + isArabic: + projectViewModel + .isArabic, + isMonthShort: true), + fontSize: 10, + ), + ) + ]), + if (model.reservationList[index] + .timeStart != + null) + Row( + mainAxisAlignment: + MainAxisAlignment.start, children: [ AppText( - TranslationBase.of( - context) - .createdBy, + TranslationBase.of(context) + .operationTimeStart, fontSize: 10, ), Expanded( child: AppText( model .reservationList[ - index] - .doctorName ?? + index] + .timeStart, + fontSize: 10, + ), + ) + ]), + if (model.reservationList[index] + .remarks != + null) + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .remarks, + fontSize: 10, + ), + Expanded( + child: AppText( + model + .reservationList[ + index] + .remarks ?? '', - fontWeight: - FontWeight.w600, - fontSize: 12, + fontSize: 10, ), ), - ], - ), - ], - ), - ), - Column( - children: [ - AppText( - model - .reservationList[ - index] - .createdOn != - null - ? AppDateUtils.getDayMonthYearDateFormatted( - AppDateUtils - .getDateTimeFromServerFormat(model - .reservationList[ - index] - .createdOn), - isArabic: - projectViewModel - .isArabic, - isMonthShort: true) - : AppDateUtils - .getDayMonthYearDateFormatted( - DateTime.now(), - isArabic: - projectViewModel - .isArabic), - fontWeight: FontWeight.w600, - fontSize: 14, - ), - AppText( - model - .reservationList[ - index] - .createdOn != - null - ? AppDateUtils.getHour( - AppDateUtils - .getDateTimeFromServerFormat(model - .reservationList[ - index] - .createdOn)) - : AppDateUtils.getHour( - DateTime.now()), - fontWeight: FontWeight.w600, - fontSize: 14, - ), - ], - crossAxisAlignment: - CrossAxisAlignment.end, - ) - ], - ), - SizedBox( - height: 8, - ), - Row( + ]) + ], + ), + + SizedBox( + height: 20, + ), + + // if ( + // authenticationViewModel + // .doctorProfile.doctorID == + // model + // .operationReportList[ + // index] + // .createdBy) + Row( + crossAxisAlignment: + CrossAxisAlignment.start, mainAxisAlignment: - MainAxisAlignment.start, + MainAxisAlignment.end, children: [ - AppText( - TranslationBase.of(context).reservation, - fontSize: 10, - ), - Expanded( - child: AppText( - model.reservationList[index].oTReservationID.toString(), - fontSize: 10, - ), - ) - ]), - SizedBox( - height: 8, - ), - if (model.reservationList[index] - .operationDate != - null) - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).operationDate, - fontSize: 10, - ), - Expanded( - child: AppText( - AppDateUtils.getDayMonthYearDateFormatted( - AppDateUtils - .getDateTimeFromServerFormat(model - .reservationList[ - index] - .operationDate), - isArabic: - projectViewModel - .isArabic, - isMonthShort: true), - fontSize: 10, + InkWell( + onTap: () async { + await locator() + .logEvent( + eventCategory: + "Operation Report Screen", + eventAction: + "Update Operation Report ", + ); + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + UpdateOperationReport( + reservation: model + .reservationList[ + index], + patient: patient, + isUpdate: true, + )), + ); + }, + child: Container( + decoration: BoxDecoration( + color: AppGlobal.appGreenColor, + borderRadius: + BorderRadius.circular(10), ), - ) - ]), - if (model.reservationList[index] - .timeStart != - null) - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).operationTimeStart , - fontSize: 10, - ), - Expanded( - child: AppText( - model - .reservationList[ - index] - .timeStart, - fontSize: 10, - ), - ) - ]), - if (model.reservationList[index] - .remarks != - null) - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).remarks, - fontSize: 10, - ), - Expanded( - child: AppText( - model - .reservationList[ - index] - .remarks ?? - '', - fontSize: 10, - ), - ), - ]) - ], - ), + // color:Colors.red[600], - SizedBox( - height: 20, - ), - - // if ( - // authenticationViewModel - // .doctorProfile.doctorID == - // model - // .operationReportList[ - // index] - // .createdBy) - Row( - crossAxisAlignment: - CrossAxisAlignment.start, - mainAxisAlignment: - MainAxisAlignment.end, - children: [ - InkWell( - onTap: () async { - await locator() - .logEvent( - eventCategory: - "Operation Report Screen", - eventAction: - "Update Operation Report ", - ); - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - UpdateOperationReport( - reservation: model - .reservationList[ - index], - patient: patient, - isUpdate: true, - )), - ); - }, - child: Container( - decoration: BoxDecoration( - color: AppGlobal.appGreenColor, - borderRadius: - BorderRadius.circular(10), - ), - // color:Colors.red[600], - - child: Row( - children: [ - Icon( - DoctorApp.edit_1, - size: 12, - color: Colors.white, - ), - SizedBox( - width: 2, - ), - AppText( - TranslationBase.of(context).operationReports, - fontSize: 10, - color: Colors.white, + child: Row( + children: [ + Icon( + DoctorApp.edit_1, + size: 12, + color: Colors.white, + ), + SizedBox( + width: 2, + ), + AppText( + TranslationBase.of(context) + .operationReports, + fontSize: 10, + color: Colors.white, + ), + ], + ), + padding: EdgeInsets.all(6), ), - ], - ), - padding: EdgeInsets.all(6), + ), + SizedBox( + width: 10, + ), + SizedBox( + width: 10, + ), + ], ), - ), - SizedBox( - width: 10, - ), - SizedBox( - width: 10, - ), - ], - ), - SizedBox( - height: 10, + SizedBox( + height: 10, + ), + ], + ), ), - ], - ), - ), - ); - }), + ); + }), + ), + ), + ], ), - ), - ], - ), ), ), ); 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 1ac433a3..12f6739c 100644 --- a/lib/screens/patients/profile/operation_report/update_operation_report.dart +++ b/lib/screens/patients/profile/operation_report/update_operation_report.dart @@ -22,6 +22,7 @@ import 'package:speech_to_text/speech_to_text.dart' as stt; class UpdateOperationReport extends StatefulWidget { final GetReservationsResponseModel reservation; + // final OperationReportViewModel operationReportViewModel; final PatiantInformtion patient; final int visitType; @@ -88,8 +89,7 @@ class _UpdateOperationReportState extends State { return BaseView( onModelReady: (model) async { - await model - .getOperationReportDetails(widget.reservation); + await model.getOperationReportDetails(widget.reservation); OTReservationID.text = widget.reservation.oTReservationID.toString(); if (model.operationDetailsList.isNotEmpty) { @@ -144,7 +144,8 @@ class _UpdateOperationReportState extends State { child: Column( children: [ AppTextFieldCustom( - hintText:TranslationBase.of(context).reservation, + hintText: TranslationBase.of(context) + .reservation, controller: OTReservationID, maxLines: 1, minLines: 1, @@ -155,7 +156,8 @@ class _UpdateOperationReportState extends State { height: 4, ), AppTextFieldCustom( - hintText:TranslationBase.of(context).preOperationDiagnosis, + hintText: TranslationBase.of(context) + .preOperationDiagnosis, controller: preOpDiagmosisController, maxLines: 20, minLines: 8, @@ -173,7 +175,8 @@ class _UpdateOperationReportState extends State { height: 4, ), AppTextFieldCustom( - hintText: TranslationBase.of(context).postOperationDiagnosis, + hintText: TranslationBase.of(context) + .postOperationDiagnosis, controller: postOpDiagmosisNoteController, maxLines: 20, minLines: 8, @@ -191,7 +194,8 @@ class _UpdateOperationReportState extends State { height: 4, ), AppTextFieldCustom( - hintText: TranslationBase.of(context).surgeon, + hintText: + TranslationBase.of(context).surgeon, controller: surgeonController, maxLines: 1, minLines: 1, @@ -208,7 +212,8 @@ class _UpdateOperationReportState extends State { height: 4, ), AppTextFieldCustom( - hintText:TranslationBase.of(context).assistant, + hintText: + TranslationBase.of(context).assistant, controller: assistantNoteController, maxLines: 1, minLines: 1, @@ -227,7 +232,7 @@ class _UpdateOperationReportState extends State { ), AppTextFieldCustom( hintText: - TranslationBase.of(context).operation, + TranslationBase.of(context).operation, controller: operationController, maxLines: 20, minLines: 4, @@ -264,7 +269,8 @@ class _UpdateOperationReportState extends State { height: 4, ), AppTextFieldCustom( - hintText: TranslationBase.of(context).finding, + hintText: + TranslationBase.of(context).finding, controller: findingController, maxLines: 20, minLines: 4, @@ -282,7 +288,8 @@ class _UpdateOperationReportState extends State { height: 4, ), AppTextFieldCustom( - hintText: TranslationBase.of(context).surgeryProcedure, + hintText: TranslationBase.of(context) + .surgeryProcedure, controller: surgeryProcedureController, maxLines: 20, minLines: 8, @@ -301,7 +308,8 @@ class _UpdateOperationReportState extends State { height: 4, ), AppTextFieldCustom( - hintText: TranslationBase.of(context).postOperationInstruction, + hintText: TranslationBase.of(context) + .postOperationInstruction, controller: postOpInstructionController, maxLines: 20, minLines: 8, @@ -320,7 +328,8 @@ class _UpdateOperationReportState extends State { height: 4, ), AppTextFieldCustom( - hintText: TranslationBase.of(context).complicationDetails1, + hintText: TranslationBase.of(context) + .complicationDetails1, controller: complicationDetailsController, maxLines: 20, minLines: 4, @@ -338,7 +347,8 @@ class _UpdateOperationReportState extends State { height: 4, ), AppTextFieldCustom( - hintText: TranslationBase.of(context).bloodLossDetail, + hintText: TranslationBase.of(context) + .bloodLossDetail, controller: bloodLossDetailController, maxLines: 20, minLines: 4, @@ -356,7 +366,8 @@ class _UpdateOperationReportState extends State { height: 4, ), AppTextFieldCustom( - hintText: TranslationBase.of(context).histopathSpecimen, + hintText: TranslationBase.of(context) + .histopathSpecimen, controller: histopathSpecimenController, maxLines: 20, minLines: 4, @@ -375,7 +386,8 @@ class _UpdateOperationReportState extends State { height: 4, ), AppTextFieldCustom( - hintText: TranslationBase.of(context).microbiologySpecimen, + hintText: TranslationBase.of(context) + .microbiologySpecimen, controller: microbiologySpecimenController, maxLines: 20, @@ -395,7 +407,8 @@ class _UpdateOperationReportState extends State { height: 4, ), AppTextFieldCustom( - hintText: TranslationBase.of(context).otherSpecimen, + hintText: TranslationBase.of(context) + .otherSpecimen, controller: otherSpecimenController, maxLines: 20, minLines: 4, @@ -413,7 +426,8 @@ class _UpdateOperationReportState extends State { height: 4, ), AppTextFieldCustom( - hintText: TranslationBase.of(context).scrubNurse, + hintText: TranslationBase.of(context) + .scrubNurse, controller: scrubNurseController, maxLines: 1, minLines: 1, @@ -431,7 +445,8 @@ class _UpdateOperationReportState extends State { height: 4, ), AppTextFieldCustom( - hintText:TranslationBase.of(context).circulatingNurse, + hintText: TranslationBase.of(context) + .circulatingNurse, controller: circulatingNurseController, maxLines: 1, minLines: 1, @@ -450,7 +465,8 @@ class _UpdateOperationReportState extends State { height: 4, ), AppTextFieldCustom( - hintText: TranslationBase.of(context).bloodTransfusedDetail, + hintText: TranslationBase.of(context) + .bloodTransfusedDetail, controller: BloodTransfusedDetailController, maxLines: 20, @@ -470,7 +486,8 @@ class _UpdateOperationReportState extends State { height: 4, ), AppTextFieldCustom( - hintText: TranslationBase.of(context).anesthetist, + hintText: TranslationBase.of(context) + .anesthetist, controller: anasthetistController, maxLines: 1, minLines: 1, @@ -498,93 +515,101 @@ class _UpdateOperationReportState extends State { ), ), ), - bottomSheet: model.state != ViewState.Idle?Container(height: 0,): Container( - height: 70, - margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5), - child: Column( - children: [ - Container( - margin: EdgeInsets.all(5), - child: AppButton( - title: (widget.isUpdate - ? TranslationBase.of(context).noteUpdate - : TranslationBase.of(context).noteAdd) +" "+ - TranslationBase.of(context).operationReports, - color: Color(0xff359846), - // disabled: operationReportsController.text.isEmpty, - fontWeight: FontWeight.w700, - onPressed: () async { - setState(() { - isSubmitted = true; - }); - if (isFormValid()) { - GifLoaderDialogUtils.showMyDialog(context); - await model - .getDoctorProfile(); - - CreateUpdateOperationReportRequestModel - createUpdateOperationReportRequestModel = - CreateUpdateOperationReportRequestModel( - inasion: inasionController.text, - - /// TODO Elham* Add dynamic reservation - reservationNo: - widget.reservation.oTReservationID, - preOpDiagmosis: - preOpDiagmosisController.text, - postOpDiagmosis: - postOpDiagmosisNoteController.text, - surgeon: surgeonController.text, - assistant: assistantNoteController.text, - anasthetist: assistantNoteController.text, - operation: operationController.text, - finding: findingController.text, - surgeryProcedure: surgeonController.text, - postOpInstruction: - postOpInstructionController.text, - complicationDetails: - complicationDetailsController.text, - bloodLossDetail: - bloodLossDetailController.text, - histopathSpecimen: - histopathSpecimenController.text, - microbiologySpecimen: - microbiologySpecimenController.text, - otherSpecimen: otherSpecimenController.text, - scrubNurse: surgeonController.text, - circulatingNurse: - circulatingNurseController.text, - bloodTransfusedDetail: - bloodLossDetailController.text, - patientID: widget.patient.patientId, - admissionNo: - int.parse(widget.patient.admissionNo), - createdBy: model - .doctorProfile.doctorID, - setupID: "010266"); - await model - .updateOperationReport( - createUpdateOperationReportRequestModel); - - if (model.state == - ViewState.ErrorLocal) { - Helpers.showErrorToast( - model.error); - } else { - // await model.( - // operationReportsRequest.toJson()); - - DrAppToastMsg.showSuccesToast( - "Your Order added Successfully"); - } - GifLoaderDialogUtils.hideDialog(context); - } - }, + bottomSheet: model.state != ViewState.Idle + ? Container( + height: 0, + ) + : Container( + height: 70, + margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5), + child: Column( + children: [ + Container( + margin: EdgeInsets.all(5), + child: AppButton( + title: (widget.isUpdate + ? TranslationBase.of(context).noteUpdate + : TranslationBase.of(context).noteAdd) + + " " + + TranslationBase.of(context).operationReports, + color: Color(0xff359846), + // disabled: operationReportsController.text.isEmpty, + fontWeight: FontWeight.w700, + onPressed: () async { + setState(() { + isSubmitted = true; + }); + if (isFormValid()) { + GifLoaderDialogUtils.showMyDialog(context); + await model.getDoctorProfile(); + + CreateUpdateOperationReportRequestModel + createUpdateOperationReportRequestModel = + CreateUpdateOperationReportRequestModel( + inasion: inasionController.text, + + /// TODO Elham* Add dynamic reservation + reservationNo: widget + .reservation.oTReservationID, + preOpDiagmosis: + preOpDiagmosisController.text, + postOpDiagmosis: + postOpDiagmosisNoteController + .text, + surgeon: surgeonController.text, + assistant: + assistantNoteController.text, + anasthetist: + assistantNoteController.text, + operation: operationController.text, + finding: findingController.text, + surgeryProcedure: + surgeonController.text, + postOpInstruction: + postOpInstructionController.text, + complicationDetails: + complicationDetailsController + .text, + bloodLossDetail: + bloodLossDetailController.text, + histopathSpecimen: + histopathSpecimenController.text, + microbiologySpecimen: + microbiologySpecimenController + .text, + otherSpecimen: + otherSpecimenController.text, + scrubNurse: surgeonController.text, + circulatingNurse: + circulatingNurseController.text, + bloodTransfusedDetail: + bloodLossDetailController.text, + patientID: widget.patient.patientId, + admissionNo: int.parse( + widget.patient.admissionNo), + createdBy: + model.doctorProfile.doctorID, + setupID: "010266"); + await model.updateOperationReport( + createUpdateOperationReportRequestModel); + + if (model.state == ViewState.ErrorLocal) { + Helpers.showErrorToast(model.error); + } else { + // await model.( + // operationReportsRequest.toJson()); + + DrAppToastMsg.showSuccesToast( + "Your Order added Successfully"); + } + GifLoaderDialogUtils.hideDialog(context); + } + }, + ), + ), + ], ), ), - ], - ), - ), )); } 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 a4c47231..589c4680 100644 --- a/lib/screens/patients/profile/pending_orders/pending_orders_screen.dart +++ b/lib/screens/patients/profile/pending_orders/pending_orders_screen.dart @@ -36,9 +36,10 @@ class PendingOrdersScreen extends StatelessWidget { body: model.pendingOrdersList == null || model.pendingOrdersList.length == 0 ? Center( - child: ErrorMessage( - error: TranslationBase.of(context).noDataAvailable, ), - ) + child: ErrorMessage( + error: TranslationBase.of(context).noDataAvailable, + ), + ) : Column( children: [ Padding( @@ -69,10 +70,9 @@ class PendingOrdersScreen extends StatelessWidget { ), Expanded( child: Container( - height: MediaQuery.of(context).size.height *.9, + height: MediaQuery.of(context).size.height * .9, child: ListView.builder( - itemCount: - model.pendingOrdersList.length, + itemCount: model.pendingOrdersList.length, itemBuilder: (BuildContext ctxt, int index) { return FractionallySizedBox( widthFactor: 0.95, 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 50585143..a7e0f7e2 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 @@ -51,44 +51,44 @@ class _OutPatientPrescriptionDetailsItemState !_showDetails ? Container() : AnimatedContainer( - duration: Duration(milliseconds: 200), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - height: 5, - ), - Divider( - color: Color(0xFF000000), - height: 0.5, - ), - Table( - border: TableBorder.symmetric( - inside: BorderSide(width: 0.5), + duration: Duration(milliseconds: 200), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 5, + ), + Divider( + color: Color(0xFF000000), + height: 0.5, + ), + Table( + border: TableBorder.symmetric( + inside: BorderSide(width: 0.5), + ), + children: [ + buildTableRow( + key: 'Route', + des: widget.prescriptionReport.route), + buildTableRow( + key: 'Frequency Timing', + des: widget.prescriptionReport.frequency), + buildTableRow(key: 'Insurance Covered', des: ''), + buildTableRow( + key: 'Duration Days', + des: widget.prescriptionReport.days), + buildTableRow( + key: 'IDoctor Remarks', + des: widget.prescriptionReport.remarks), + ], + ), + Divider( + color: Color(0xFF000000), + height: 0.5, + ), + ], ), - children: [ - buildTableRow( - key: 'Route', - des: widget.prescriptionReport.route), - buildTableRow( - key: 'Frequency Timing', - des: widget.prescriptionReport.frequency), - buildTableRow(key: 'Insurance Covered', des: ''), - buildTableRow( - key: 'Duration Days', - des: widget.prescriptionReport.days), - buildTableRow( - key: 'IDoctor Remarks', - des: widget.prescriptionReport.remarks), - ], - ), - Divider( - color: Color(0xFF000000), - height: 0.5, - ), - ], - ), - ) + ) ], ), ); @@ -115,7 +115,7 @@ class _OutPatientPrescriptionDetailsItemState Expanded( child: Container( margin: - EdgeInsets.only(left: 4, top: 2.5, right: 2.5, bottom: 2.5), + EdgeInsets.only(left: 4, top: 2.5, right: 2.5, bottom: 2.5), padding: EdgeInsets.all(5), child: Column( crossAxisAlignment: CrossAxisAlignment.center, @@ -135,4 +135,4 @@ class _OutPatientPrescriptionDetailsItemState ), ]); } -} \ No newline at end of file +} 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 a62fae57..6cf1acb0 100644 --- a/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart +++ b/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart @@ -231,14 +231,14 @@ class _PatientProfileScreenState extends State top: 180, left: 20, right: 20, - child: Row( + child: Row( children: [ Expanded(child: Container()), if (patient.episodeNo == 0) AppButton( - loading: model.state== ViewState.BusyLocal, - disabled: model.state== ViewState.BusyLocal, - + loading: model.state == ViewState.BusyLocal, + disabled: + model.state == ViewState.BusyLocal, title: "${TranslationBase.of(context).createNew}\n${TranslationBase.of(context).episode}", color: isFromLiveCare || isInpatient @@ -260,7 +260,8 @@ class _PatientProfileScreenState extends State onPressed: () async { if ((isFromLiveCare && patient.appointmentNo != null) || - patient.patientStatusType == 43 || isInpatient ) { + patient.patientStatusType == 43 || + isInpatient) { createEpisode( patient: patient, model: model); } @@ -268,12 +269,15 @@ class _PatientProfileScreenState extends State ), if (patient.episodeNo != 0) AppButton( - loading: model.state== ViewState.BusyLocal, - disabled: model.state== ViewState.BusyLocal, - + loading: + model.state == ViewState.BusyLocal, + disabled: + model.state == ViewState.BusyLocal, title: "${TranslationBase.of(context).update}\n${TranslationBase.of(context).episode}", - color: ((isInpatient) || isFromLiveCare) && model.state!= ViewState.BusyLocal + color: ((isInpatient) || + isFromLiveCare) && + model.state != ViewState.BusyLocal ? Colors.red.shade700 : patient.patientStatusType == 43 ? Colors.red.shade700 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 4ead880f..797fc6a3 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 @@ -32,43 +32,77 @@ class ProfileGridForOther extends StatelessWidget { @override Widget build(BuildContext context) { final List cardsList = [ - PatientProfileCardModel(TranslationBase.of(context).vital, TranslationBase.of(context).signs, VITAL_SIGN_DETAILS, + PatientProfileCardModel( + TranslationBase.of(context).vital, + TranslationBase.of(context).signs, + VITAL_SIGN_DETAILS, 'assets/images/svgs/profile_screen/vital signs.svg', isInPatient: isInpatient), PatientProfileCardModel( - TranslationBase.of(context).lab, TranslationBase.of(context).result, LAB_RESULT, 'assets/images/svgs/profile_screen/lab results.svg', + TranslationBase.of(context).lab, + TranslationBase.of(context).result, + LAB_RESULT, + 'assets/images/svgs/profile_screen/lab results.svg', isInPatient: isInpatient), - PatientProfileCardModel(TranslationBase.of(context).lab, TranslationBase.of(context).special, - ALL_SPECIAL_LAB_RESULT, 'assets/images/svgs/profile_screen/lab results.svg', + PatientProfileCardModel( + TranslationBase.of(context).lab, + TranslationBase.of(context).special, + ALL_SPECIAL_LAB_RESULT, + 'assets/images/svgs/profile_screen/lab results.svg', isInPatient: isInpatient), - PatientProfileCardModel(TranslationBase.of(context).radiology, TranslationBase.of(context).service, - RADIOLOGY_PATIENT, 'assets/images/svgs/profile_screen/health summary.svg', + PatientProfileCardModel( + TranslationBase.of(context).radiology, + TranslationBase.of(context).service, + RADIOLOGY_PATIENT, + 'assets/images/svgs/profile_screen/health summary.svg', isInPatient: isInpatient), - PatientProfileCardModel(TranslationBase.of(context).orders, TranslationBase.of(context).prescription, - ORDER_PRESCRIPTION_NEW, 'assets/images/svgs/profile_screen/order prescription.svg', + PatientProfileCardModel( + TranslationBase.of(context).orders, + TranslationBase.of(context).prescription, + ORDER_PRESCRIPTION_NEW, + 'assets/images/svgs/profile_screen/order prescription.svg', isInPatient: isInpatient), - PatientProfileCardModel(TranslationBase.of(context).health, TranslationBase.of(context).summary, HEALTH_SUMMARY, + PatientProfileCardModel( + TranslationBase.of(context).health, + TranslationBase.of(context).summary, + HEALTH_SUMMARY, 'assets/images/svgs/profile_screen/health summary.svg', isInPatient: isInpatient), - PatientProfileCardModel(TranslationBase.of(context).patient, "ECG", PATIENT_ECG, 'assets/images/svgs/profile_screen/ECG.svg', + PatientProfileCardModel(TranslationBase.of(context).patient, "ECG", + PATIENT_ECG, 'assets/images/svgs/profile_screen/ECG.svg', isInPatient: isInpatient), - PatientProfileCardModel(TranslationBase.of(context).orders, TranslationBase.of(context).procedures, - ORDER_PROCEDURE, 'assets/images/svgs/profile_screen/Order Procedures.svg', + PatientProfileCardModel( + TranslationBase.of(context).orders, + TranslationBase.of(context).procedures, + ORDER_PROCEDURE, + 'assets/images/svgs/profile_screen/Order Procedures.svg', isInPatient: isInpatient), - PatientProfileCardModel(TranslationBase.of(context).insurance, TranslationBase.of(context).service, - PATIENT_INSURANCE_APPROVALS_NEW, 'assets/images/svgs/profile_screen/insurance approval.svg', + PatientProfileCardModel( + TranslationBase.of(context).insurance, + TranslationBase.of(context).service, + PATIENT_INSURANCE_APPROVALS_NEW, + 'assets/images/svgs/profile_screen/insurance approval.svg', isInPatient: isInpatient), - PatientProfileCardModel(TranslationBase.of(context).patientSick, TranslationBase.of(context).leave, ADD_SICKLEAVE, + PatientProfileCardModel( + TranslationBase.of(context).patientSick, + TranslationBase.of(context).leave, + ADD_SICKLEAVE, 'assets/images/svgs/profile_screen/patient sick leave.svg', isInPatient: isInpatient), - if (isFromLiveCare || (patient.appointmentNo != null && patient.appointmentNo != 0)) - PatientProfileCardModel(TranslationBase.of(context).patient, TranslationBase.of(context).ucaf, - PATIENT_UCAF_REQUEST, 'assets/images/svgs/profile_screen/UCAF.svg', + if (isFromLiveCare || + (patient.appointmentNo != null && patient.appointmentNo != 0)) + PatientProfileCardModel( + TranslationBase.of(context).patient, + TranslationBase.of(context).ucaf, + PATIENT_UCAF_REQUEST, + 'assets/images/svgs/profile_screen/UCAF.svg', isInPatient: isInpatient, isDisable: isFromLiveCare ? patient.appointmentNo == null - : patient.patientStatusType != 43 || patient.appointmentNo == null), - if (isFromLiveCare || (patient.appointmentNo != null && patient.appointmentNo != 0)) + : patient.patientStatusType != 43 || + patient.appointmentNo == null), + if (isFromLiveCare || + (patient.appointmentNo != null && patient.appointmentNo != 0)) PatientProfileCardModel( TranslationBase.of(context).referral, TranslationBase.of(context).patient, @@ -77,15 +111,21 @@ class ProfileGridForOther extends StatelessWidget { isInPatient: isInpatient, isDisable: isFromLiveCare ? patient.appointmentNo == null - : patient.patientStatusType != 43 || patient.appointmentNo == null, + : patient.patientStatusType != 43 || + patient.appointmentNo == null, ), - if (isFromLiveCare || (patient.appointmentNo != null && patient.appointmentNo != 0)) - PatientProfileCardModel(TranslationBase.of(context).admission, TranslationBase.of(context).request, - PATIENT_ADMISSION_REQUEST, 'assets/images/svgs/profile_screen/admission req.svg', + if (isFromLiveCare || + (patient.appointmentNo != null && patient.appointmentNo != 0)) + PatientProfileCardModel( + TranslationBase.of(context).admission, + TranslationBase.of(context).request, + PATIENT_ADMISSION_REQUEST, + 'assets/images/svgs/profile_screen/admission req.svg', isInPatient: isInpatient, isDisable: isFromLiveCare ? patient.appointmentNo == null - : patient.patientStatusType != 43 || patient.appointmentNo == null), + : patient.patientStatusType != 43 || + patient.appointmentNo == null), ]; return Padding( padding: const EdgeInsets.symmetric(vertical: 15.0, horizontal: 15), 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 767e8876..ef195a9c 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 @@ -16,56 +16,102 @@ class ProfileGridForSearch extends StatelessWidget { String to; ProfileGridForSearch( - {Key key, this.patient, this.patientType, this.arrivalType, this.height, this.isInpatient, this.from, this.to}) + {Key key, + this.patient, + this.patientType, + this.arrivalType, + this.height, + this.isInpatient, + this.from, + this.to}) : super(key: key); @override Widget build(BuildContext context) { final List cardsList = [ - PatientProfileCardModel(TranslationBase.of(context).vital, TranslationBase.of(context).signs, VITAL_SIGN_DETAILS, + PatientProfileCardModel( + TranslationBase.of(context).vital, + TranslationBase.of(context).signs, + VITAL_SIGN_DETAILS, 'assets/images/svgs/profile_screen/vital signs.svg', isInPatient: isInpatient), PatientProfileCardModel( - TranslationBase.of(context).lab, TranslationBase.of(context).result, LAB_RESULT, 'assets/images/svgs/profile_screen/lab results.svg', + TranslationBase.of(context).lab, + TranslationBase.of(context).result, + LAB_RESULT, + 'assets/images/svgs/profile_screen/lab results.svg', isInPatient: isInpatient), - PatientProfileCardModel(TranslationBase.of(context).lab, TranslationBase.of(context).special, - ALL_SPECIAL_LAB_RESULT, 'assets/images/svgs/profile_screen/lab results.svg', + PatientProfileCardModel( + TranslationBase.of(context).lab, + TranslationBase.of(context).special, + ALL_SPECIAL_LAB_RESULT, + 'assets/images/svgs/profile_screen/lab results.svg', isInPatient: isInpatient), - PatientProfileCardModel(TranslationBase.of(context).radiology, TranslationBase.of(context).service, - RADIOLOGY_PATIENT, 'assets/images/svgs/profile_screen/health summary.svg', + PatientProfileCardModel( + TranslationBase.of(context).radiology, + TranslationBase.of(context).service, + RADIOLOGY_PATIENT, + 'assets/images/svgs/profile_screen/health summary.svg', isInPatient: isInpatient), - PatientProfileCardModel(TranslationBase.of(context).orders, TranslationBase.of(context).prescription, - ORDER_PRESCRIPTION_NEW, 'assets/images/svgs/profile_screen/order prescription.svg', + PatientProfileCardModel( + TranslationBase.of(context).orders, + TranslationBase.of(context).prescription, + ORDER_PRESCRIPTION_NEW, + 'assets/images/svgs/profile_screen/order prescription.svg', isInPatient: isInpatient), - PatientProfileCardModel(TranslationBase.of(context).health, TranslationBase.of(context).summary, HEALTH_SUMMARY, + PatientProfileCardModel( + TranslationBase.of(context).health, + TranslationBase.of(context).summary, + HEALTH_SUMMARY, 'assets/images/svgs/profile_screen/health summary.svg', isInPatient: isInpatient), - PatientProfileCardModel(TranslationBase.of(context).patient, "ECG", PATIENT_ECG, 'assets/images/svgs/profile_screen/ECG.svg', + PatientProfileCardModel(TranslationBase.of(context).patient, "ECG", + PATIENT_ECG, 'assets/images/svgs/profile_screen/ECG.svg', isInPatient: isInpatient), - PatientProfileCardModel(TranslationBase.of(context).orders, TranslationBase.of(context).procedures, - ORDER_PROCEDURE, 'assets/images/svgs/profile_screen/Order Procedures.svg', + PatientProfileCardModel( + TranslationBase.of(context).orders, + TranslationBase.of(context).procedures, + ORDER_PROCEDURE, + 'assets/images/svgs/profile_screen/Order Procedures.svg', isInPatient: isInpatient), - PatientProfileCardModel(TranslationBase.of(context).insurance, TranslationBase.of(context).service, - PATIENT_INSURANCE_APPROVALS_NEW, 'assets/images/svgs/profile_screen/vital signs.svg', + PatientProfileCardModel( + TranslationBase.of(context).insurance, + TranslationBase.of(context).service, + PATIENT_INSURANCE_APPROVALS_NEW, + 'assets/images/svgs/profile_screen/vital signs.svg', isInPatient: isInpatient), - PatientProfileCardModel(TranslationBase.of(context).patientSick, TranslationBase.of(context).leave, ADD_SICKLEAVE, + PatientProfileCardModel( + TranslationBase.of(context).patientSick, + TranslationBase.of(context).leave, + ADD_SICKLEAVE, 'assets/images/svgs/profile_screen/patient sick leave.svg', isInPatient: isInpatient), if (patient.appointmentNo != null && patient.appointmentNo != 0) - PatientProfileCardModel(TranslationBase.of(context).patient, TranslationBase.of(context).ucaf, - PATIENT_UCAF_REQUEST, 'assets/images/svgs/profile_screen/UCAF.svg', - isInPatient: isInpatient, isDisable: patient.patientStatusType != 43 ? true : false), + PatientProfileCardModel( + TranslationBase.of(context).patient, + TranslationBase.of(context).ucaf, + PATIENT_UCAF_REQUEST, + 'assets/images/svgs/profile_screen/UCAF.svg', + isInPatient: isInpatient, + isDisable: patient.patientStatusType != 43 ? true : false), if (patient.appointmentNo != null && patient.appointmentNo != 0) - PatientProfileCardModel(TranslationBase.of(context).referral, TranslationBase.of(context).patient, - REFER_PATIENT_TO_DOCTOR, 'assets/images/svgs/profile_screen/refer patient.svg', - isInPatient: isInpatient, isDisable: patient.patientStatusType != 43 ? true : false), + PatientProfileCardModel( + TranslationBase.of(context).referral, + TranslationBase.of(context).patient, + REFER_PATIENT_TO_DOCTOR, + 'assets/images/svgs/profile_screen/refer patient.svg', + isInPatient: isInpatient, + isDisable: patient.patientStatusType != 43 ? true : false), if (patient.appointmentNo != null && patient.appointmentNo != 0) - PatientProfileCardModel(TranslationBase.of(context).admission, TranslationBase.of(context).request, - PATIENT_ADMISSION_REQUEST, 'assets/images/svgs/profile_screen/admission req.svg', - isInPatient: isInpatient, isDisable: patient.patientStatusType != 43 ? true : false), + PatientProfileCardModel( + TranslationBase.of(context).admission, + TranslationBase.of(context).request, + PATIENT_ADMISSION_REQUEST, + 'assets/images/svgs/profile_screen/admission req.svg', + isInPatient: isInpatient, + isDisable: patient.patientStatusType != 43 ? true : false), ]; - return Padding( padding: const EdgeInsets.symmetric(vertical: 15.0, horizontal: 15), child: GridView( diff --git a/lib/screens/patients/profile/radiology/radiology_details_page.dart b/lib/screens/patients/profile/radiology/radiology_details_page.dart index 1e742de9..7f1fa507 100644 --- a/lib/screens/patients/profile/radiology/radiology_details_page.dart +++ b/lib/screens/patients/profile/radiology/radiology_details_page.dart @@ -22,7 +22,12 @@ class RadiologyDetailsPage extends StatelessWidget { final bool isInpatient; RadiologyDetailsPage( - {Key key, this.finalRadiology, this.patient, this.patientType, this.arrivalType, this.isInpatient = false}); + {Key key, + this.finalRadiology, + this.patient, + this.patientType, + this.arrivalType, + this.isInpatient = false}); @override Widget build(BuildContext context) { @@ -94,7 +99,8 @@ class RadiologyDetailsPage extends StatelessWidget { height: 80, width: double.maxFinite, child: Container( - margin: EdgeInsets.only(left: 35, right: 35, top: 12, bottom: 12), + margin: + EdgeInsets.only(left: 35, right: 35, top: 12, bottom: 12), child: SecondaryButton( color: Color(0xffD02127), disabled: finalRadiology.dIAPACSURL == "", diff --git a/lib/screens/patients/profile/radiology/radiology_home_page.dart b/lib/screens/patients/profile/radiology/radiology_home_page.dart index 450e94de..cc7ada28 100644 --- a/lib/screens/patients/profile/radiology/radiology_home_page.dart +++ b/lib/screens/patients/profile/radiology/radiology_home_page.dart @@ -47,7 +47,8 @@ class _RadiologyHomePageState extends State { Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); return BaseView( - onModelReady: (model) => model.getPatientRadOrders(patient, patientType: patientType, isInPatient: false), + onModelReady: (model) => model.getPatientRadOrders(patient, + patientType: patientType, isInPatient: false), builder: (_, model, widget) => AppScaffold( isShowAppBar: true, backgroundColor: Colors.grey[100], @@ -65,7 +66,8 @@ class _RadiologyHomePageState extends State { SizedBox( height: 12, ), - if (model.radiologyList.isNotEmpty && patient.patientStatusType != 43) + if (model.radiologyList.isNotEmpty && + patient.patientStatusType != 43) Padding( padding: const EdgeInsets.all(8.0), child: Column( @@ -85,7 +87,8 @@ class _RadiologyHomePageState extends State { ], ), ), - if (patient.patientStatusType != null && patient.patientStatusType == 43) + if (patient.patientStatusType != null && + patient.patientStatusType == 43) Padding( padding: const EdgeInsets.all(8.0), child: Column( @@ -105,7 +108,8 @@ class _RadiologyHomePageState extends State { ], ), ), - if ((patient.patientStatusType != null && patient.patientStatusType == 43) || + if ((patient.patientStatusType != null && + patient.patientStatusType == 43) || (isFromLiveCare && patient.appointmentNo != null)) AddNewOrder( onTap: () { @@ -142,26 +146,43 @@ class _RadiologyHomePageState extends State { height: 160, decoration: BoxDecoration( //Colors.red[900] Color(0xff404545) - color: model.radiologyList[index].isLiveCareAppodynamicment + color: model.radiologyList[index] + .isLiveCareAppodynamicment ? Colors.red[900] : !model.radiologyList[index].isInOutPatient ? Colors.black : Color(0xffa9a089), borderRadius: BorderRadius.only( - topLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8), - bottomLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8), - topRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0), - bottomRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0)), + topLeft: projectViewModel.isArabic + ? Radius.circular(0) + : Radius.circular(8), + bottomLeft: projectViewModel.isArabic + ? Radius.circular(0) + : Radius.circular(8), + topRight: projectViewModel.isArabic + ? Radius.circular(8) + : Radius.circular(0), + bottomRight: projectViewModel.isArabic + ? Radius.circular(8) + : Radius.circular(0)), ), child: RotatedBox( quarterTurns: 3, child: Center( child: Text( - model.radiologyList[index].isLiveCareAppodynamicment - ? TranslationBase.of(context).liveCare.toUpperCase() - : !model.radiologyList[index].isInOutPatient - ? TranslationBase.of(context).inPatientLabel.toUpperCase() - : TranslationBase.of(context).outpatient.toUpperCase(), + model.radiologyList[index] + .isLiveCareAppodynamicment + ? TranslationBase.of(context) + .liveCare + .toUpperCase() + : !model.radiologyList[index] + .isInOutPatient + ? TranslationBase.of(context) + .inPatientLabel + .toUpperCase() + : TranslationBase.of(context) + .outpatient + .toUpperCase(), style: TextStyle(color: Colors.white), ), )), @@ -169,19 +190,26 @@ class _RadiologyHomePageState extends State { Expanded( child: DoctorCard( isNoMargin: true, - doctorName: model.radiologyList[index].doctorName, - profileUrl: model.radiologyList[index].doctorImageURL, - invoiceNO: '${model.radiologyList[index].invoiceNo}', - branch: '${model.radiologyList[index].projectName}', - clinic: model.radiologyList[index].clinicDescription, + doctorName: + model.radiologyList[index].doctorName, + profileUrl: + model.radiologyList[index].doctorImageURL, + invoiceNO: + '${model.radiologyList[index].invoiceNo}', + branch: + '${model.radiologyList[index].projectName}', + clinic: model + .radiologyList[index].clinicDescription, appointmentDate: - model.radiologyList[index].orderDate ?? model.radiologyList[index].reportDate, + model.radiologyList[index].orderDate ?? + model.radiologyList[index].reportDate, onTap: () { Navigator.push( context, FadePage( page: RadiologyDetailsPage( - finalRadiology: model.radiologyList[index], + finalRadiology: + model.radiologyList[index], patient: patient, isInpatient: isInpatient), ), @@ -192,10 +220,12 @@ class _RadiologyHomePageState extends State { ], ), )), - if (model.radiologyList.isEmpty && patient.patientStatusType != 43) + if (model.radiologyList.isEmpty && + patient.patientStatusType != 43) Center( - child: ErrorMessage(error: TranslationBase.of(context).noDataAvailable,) - ) + child: ErrorMessage( + error: TranslationBase.of(context).noDataAvailable, + )) ], ), ), diff --git a/lib/screens/patients/profile/radiology/radiology_report_screen.dart b/lib/screens/patients/profile/radiology/radiology_report_screen.dart index e7714074..d0a6e15e 100644 --- a/lib/screens/patients/profile/radiology/radiology_report_screen.dart +++ b/lib/screens/patients/profile/radiology/radiology_report_screen.dart @@ -38,7 +38,9 @@ class RadiologyReportScreen extends StatelessWidget { fontSize: 2.5 * SizeConfig.textMultiplier, ), ), - SizedBox(height:MediaQuery.of(context).size.height * 0.13 ,) + SizedBox( + height: MediaQuery.of(context).size.height * 0.13, + ) ], ), ), diff --git a/lib/screens/patients/profile/referral/AddReplayOnReferralPatient.dart b/lib/screens/patients/profile/referral/AddReplayOnReferralPatient.dart index ba0d1d52..0c2c4d8d 100644 --- a/lib/screens/patients/profile/referral/AddReplayOnReferralPatient.dart +++ b/lib/screens/patients/profile/referral/AddReplayOnReferralPatient.dart @@ -36,10 +36,12 @@ class AddReplayOnReferralPatient extends StatefulWidget { : super(key: key); @override - _AddReplayOnReferralPatientState createState() => _AddReplayOnReferralPatientState(); + _AddReplayOnReferralPatientState createState() => + _AddReplayOnReferralPatientState(); } -class _AddReplayOnReferralPatientState extends State { +class _AddReplayOnReferralPatientState + extends State { bool isSubmitted = false; int replay = 1; int reject = 2; @@ -52,7 +54,8 @@ class _AddReplayOnReferralPatientState extends State void initState() { requestPermissions(); super.initState(); - replayOnReferralController.text = widget.myReferralInPatientModel.referredDoctorRemarks ?? ""; + replayOnReferralController.text = + widget.myReferralInPatientModel.referredDoctorRemarks ?? ""; } @override @@ -84,7 +87,9 @@ class _AddReplayOnReferralPatientState extends State maxLines: 35, minLines: 25, hasBorder: true, - validationError: replayOnReferralController.text.isEmpty && isSubmitted + validationError: replayOnReferralController + .text.isEmpty && + isSubmitted ? TranslationBase.of(context).emptyMessage : null, ), @@ -144,18 +149,25 @@ class _AddReplayOnReferralPatientState extends State ); if (replayOnReferralController.text.isNotEmpty) { GifLoaderDialogUtils.showMyDialog(context); - await widget.patientReferralViewModel.replayReferred( - replayOnReferralController.text.trim(), widget.myReferralInPatientModel, reject); - if (widget.patientReferralViewModel.state == ViewState.ErrorLocal) { - Helpers.showErrorToast(widget.patientReferralViewModel.error); + await widget.patientReferralViewModel + .replayReferred( + replayOnReferralController.text.trim(), + widget.myReferralInPatientModel, + reject); + if (widget.patientReferralViewModel.state == + ViewState.ErrorLocal) { + Helpers.showErrorToast( + widget.patientReferralViewModel.error); } else { GifLoaderDialogUtils.hideDialog(context); - DrAppToastMsg.showSuccesToast("Has been rejected"); + DrAppToastMsg.showSuccesToast( + "Has been rejected"); Navigator.of(context).pop(); Navigator.of(context).pop(); } } else { - Helpers.showErrorToast("You can't add empty reply"); + Helpers.showErrorToast( + "You can't add empty reply"); setState(() { isSubmitted = false; }); @@ -177,18 +189,25 @@ class _AddReplayOnReferralPatientState extends State }); if (replayOnReferralController.text.isNotEmpty) { GifLoaderDialogUtils.showMyDialog(context); - await widget.patientReferralViewModel.replayReferred( - replayOnReferralController.text.trim(), widget.myReferralInPatientModel, replay); - if (widget.patientReferralViewModel.state == ViewState.ErrorLocal) { - Helpers.showErrorToast(widget.patientReferralViewModel.error); + await widget.patientReferralViewModel + .replayReferred( + replayOnReferralController.text.trim(), + widget.myReferralInPatientModel, + replay); + if (widget.patientReferralViewModel.state == + ViewState.ErrorLocal) { + Helpers.showErrorToast( + widget.patientReferralViewModel.error); } else { GifLoaderDialogUtils.hideDialog(context); - DrAppToastMsg.showSuccesToast("Your Reply Added Successfully"); + DrAppToastMsg.showSuccesToast( + "Your Reply Added Successfully"); Navigator.of(context).pop(); Navigator.of(context).pop(); } } else { - Helpers.showErrorToast("You can't add empty reply"); + Helpers.showErrorToast( + "You can't add empty reply"); setState(() { isSubmitted = false; }); @@ -213,7 +232,8 @@ class _AddReplayOnReferralPatientState extends State 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); + bool available = await speech.initialize( + onStatus: statusListener, onError: errorListener); if (available) { speech.listen( onResult: resultListener, diff --git a/lib/screens/patients/profile/referral/ReplySummeryOnReferralPatient.dart b/lib/screens/patients/profile/referral/ReplySummeryOnReferralPatient.dart index c6838a51..9af341b0 100644 --- a/lib/screens/patients/profile/referral/ReplySummeryOnReferralPatient.dart +++ b/lib/screens/patients/profile/referral/ReplySummeryOnReferralPatient.dart @@ -36,13 +36,12 @@ class _ReplySummeryOnReferralPatientState body: Container( child: Column( children: [ - Expanded( child: SingleChildScrollView( child: Container( width: double.infinity, - margin: - EdgeInsets.symmetric(horizontal: 16, vertical: 16), + margin: EdgeInsets.symmetric( + horizontal: 16, vertical: 16), padding: EdgeInsets.symmetric( horizontal: 16, vertical: 16), decoration: BoxDecoration( @@ -94,7 +93,9 @@ class _ReplySummeryOnReferralPatientState color: Colors.red[600], ), ), - SizedBox(width: 4,), + SizedBox( + width: 4, + ), Expanded( child: AppButton( onPressed: () {}, 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 dfdb492b..8d9293fe 100644 --- a/lib/screens/patients/profile/referral/my-referral-detail-screen.dart +++ b/lib/screens/patients/profile/referral/my-referral-detail-screen.dart @@ -400,7 +400,6 @@ class MyReferralDetailScreen extends StatelessWidget { title: TranslationBase.of(context).reject, color: AppGlobal.appRedColor, fontColor: Colors.white, - hPadding: 8, vPadding: 12, disabled: model.state == ViewState.Busy, diff --git a/lib/screens/patients/profile/referral/my-referral-inpatient-screen.dart b/lib/screens/patients/profile/referral/my-referral-inpatient-screen.dart index 17bd1287..1d633b48 100644 --- a/lib/screens/patients/profile/referral/my-referral-inpatient-screen.dart +++ b/lib/screens/patients/profile/referral/my-referral-inpatient-screen.dart @@ -48,7 +48,8 @@ class _MyReferralInPatientScreenState extends State { if (patientType == PatientType.IN_PATIENT) { await model.getMyReferralPatientService(localBusy: true); } else { - await model.getMyReferralOutPatientService(localBusy: true); + await model.getMyReferralOutPatientService( + localBusy: true); } GifLoaderDialogUtils.hideDialog(context); }, @@ -57,8 +58,9 @@ class _MyReferralInPatientScreenState extends State { ), model.myReferralPatients.isEmpty ? Center( - child: ErrorMessage(error: TranslationBase.of(context).referralEmptyMsg,) - ) + child: ErrorMessage( + error: TranslationBase.of(context).referralEmptyMsg, + )) : Expanded( child: SingleChildScrollView( child: Container( @@ -80,8 +82,9 @@ class _MyReferralInPatientScreenState extends State { context, FadePage( page: MyReferralDetailScreen( - referralPatient: model - .myReferralPatients[index]), + referralPatient: + model.myReferralPatients[ + index]), ), ); } else { @@ -89,7 +92,8 @@ class _MyReferralInPatientScreenState extends State { context, FadePage( page: ReferralPatientDetailScreen( - model.myReferralPatients[index], + model.myReferralPatients[ + index], model), ), ); diff --git a/lib/screens/patients/profile/referral/my-referral-patient-screen.dart b/lib/screens/patients/profile/referral/my-referral-patient-screen.dart index 33eb4f8d..1813a6d2 100644 --- a/lib/screens/patients/profile/referral/my-referral-patient-screen.dart +++ b/lib/screens/patients/profile/referral/my-referral-patient-screen.dart @@ -21,9 +21,9 @@ class MyReferralPatientScreen extends StatelessWidget { body: model.pendingReferral == null || model.pendingReferral.length == 0 ? Center( child: Container( - child: ErrorMessage(error: TranslationBase.of(context).referralEmptyMsg, - )) - ) + child: ErrorMessage( + error: TranslationBase.of(context).referralEmptyMsg, + ))) : SingleChildScrollView( child: Container( margin: EdgeInsets.only(top: 70), diff --git a/lib/screens/patients/profile/referral/patient_referral_screen.dart b/lib/screens/patients/profile/referral/patient_referral_screen.dart index 53b2fad8..687f1463 100644 --- a/lib/screens/patients/profile/referral/patient_referral_screen.dart +++ b/lib/screens/patients/profile/referral/patient_referral_screen.dart @@ -57,7 +57,7 @@ class _PatientReferralScreen extends State // backgroundColor: Colors.white, appBar: PreferredSize( preferredSize: - Size.fromHeight(MediaQuery.of(context).size.height * 0.070), + Size.fromHeight(MediaQuery.of(context).size.height * 0.070), child: Center( child: Container( height: Helpers.getTabHeight(context), @@ -71,31 +71,42 @@ class _PatientReferralScreen extends State indicatorSize: TabBarIndicatorSize.tab, labelColor: Theme.of(context).primaryColor, labelPadding: - EdgeInsets.only(top: 0, left: 0, right: 0, bottom: 0), + EdgeInsets.only(top: 0, left: 0, right: 0, bottom: 0), unselectedLabelColor: Colors.grey[800], tabs: [ Container( decoration: Helpers.getBoxTabsBoxDecoration( - isActive: index == 0, isFirst: true, projectViewModel:projectsProvider ), + isActive: index == 0, + isFirst: true, + projectViewModel: projectsProvider), child: Center( - child: Helpers.getTabText(title:TranslationBase.of(context).myReferredPatient, isActive:index == 0 ) - ), + child: Helpers.getTabText( + title: TranslationBase.of(context) + .myReferredPatient, + isActive: index == 0)), ), Center( child: Container( - decoration:Helpers.getBoxTabsBoxDecoration( - isActive: index == 1, isMiddle: true, projectViewModel:projectsProvider ), + decoration: Helpers.getBoxTabsBoxDecoration( + isActive: index == 1, + isMiddle: true, + projectViewModel: projectsProvider), child: Center( - child:Helpers.getTabText(title:TranslationBase.of(context).referral, isActive:index == 1 ) - ), + child: Helpers.getTabText( + title: TranslationBase.of(context).referral, + isActive: index == 1)), ), ), Center( child: Container( - decoration:Helpers.getBoxTabsBoxDecoration( - isActive: index == 2, isLast: true, projectViewModel:projectsProvider ), + decoration: Helpers.getBoxTabsBoxDecoration( + isActive: index == 2, + isLast: true, + projectViewModel: projectsProvider), child: Center( - child: Helpers.getTabText(title:TranslationBase.of(context).discharged, isActive:index == 2 ), + child: Helpers.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 554a4209..5ecba4a1 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 @@ -262,21 +262,22 @@ class _PatientMakeInPatientReferralScreenState attributeValueId: 'facilityId', okText: TranslationBase.of(context).ok, okFunction: (selectedValue) async { - _selectedBranch = selectedValue; - _selectedClinic = null; - _selectedDoctor = null; - GifLoaderDialogUtils.showMyDialog( - context); - await model - .getClinics( - _selectedBranch['facilityId']) - .then((_) => GifLoaderDialogUtils - .hideDialog(context)); - if (model.state == - ViewState.ErrorLocal) { - DrAppToastMsg.showErrorToast( - model.error); - } + _selectedBranch = selectedValue; + _selectedClinic = null; + _selectedDoctor = null; + GifLoaderDialogUtils.showMyDialog( + context); + await model + .getClinics( + _selectedBranch['facilityId']) + .then((_) => + GifLoaderDialogUtils.hideDialog( + context)); + if (model.state == + ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast( + model.error); + } }, ); showDialog( @@ -315,24 +316,23 @@ class _PatientMakeInPatientReferralScreenState .clinicSearch, okText: TranslationBase.of(context).ok, okFunction: (selectedValue) async { - - _selectedDoctor = null; - _selectedClinic = selectedValue; - GifLoaderDialogUtils.showMyDialog( - context); - await model - .getClinicDoctors( - patient, - _selectedClinic['ClinicID'], - _selectedBranch['facilityId']) - .then((_) => GifLoaderDialogUtils - .hideDialog(context)); - if (model.state == - ViewState.ErrorLocal) { - DrAppToastMsg.showErrorToast( - model.error); - } - + _selectedDoctor = null; + _selectedClinic = selectedValue; + GifLoaderDialogUtils.showMyDialog( + context); + await model + .getClinicDoctors( + patient, + _selectedClinic['ClinicID'], + _selectedBranch['facilityId']) + .then((_) => + GifLoaderDialogUtils.hideDialog( + context)); + if (model.state == + ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast( + model.error); + } }, ); showDialog( diff --git a/lib/screens/patients/profile/referral/refer-patient-screen.dart b/lib/screens/patients/profile/referral/refer-patient-screen.dart index 40325374..622c7927 100644 --- a/lib/screens/patients/profile/referral/refer-patient-screen.dart +++ b/lib/screens/patients/profile/referral/refer-patient-screen.dart @@ -123,6 +123,7 @@ class _PatientMakeReferralScreenState extends State { model.patientReferral.length - 1] .patientDetails .gender, + ///TODO Elham* check this // referredDate: model // .patientReferral[ @@ -174,35 +175,34 @@ class _PatientMakeReferralScreenState extends State { fontWeight: FontWeight.w700, color: HexColor("#359846"), onPressed: () async { - - await locator().logEvent( - eventCategory: "Refer Patient", - eventAction: "Submit Refer", - ); - if (_referTo == null) { - branchError = - TranslationBase.of(context).fieldRequired; - } else { - branchError = null; - } - if (_selectedBranch == null) { - hospitalError = - TranslationBase.of(context).fieldRequired; - } else { - hospitalError = null; - } - if (_selectedClinic == null) { - clinicError = - TranslationBase.of(context).fieldRequired; - } else { - clinicError = null; - } - if (_selectedDoctor == null) { - doctorError = - TranslationBase.of(context).fieldRequired; - } else { - doctorError = null; - } + await locator().logEvent( + eventCategory: "Refer Patient", + eventAction: "Submit Refer", + ); + if (_referTo == null) { + branchError = + TranslationBase.of(context).fieldRequired; + } else { + branchError = null; + } + if (_selectedBranch == null) { + hospitalError = + TranslationBase.of(context).fieldRequired; + } else { + hospitalError = null; + } + if (_selectedClinic == null) { + clinicError = + TranslationBase.of(context).fieldRequired; + } else { + clinicError = null; + } + if (_selectedDoctor == null) { + doctorError = + TranslationBase.of(context).fieldRequired; + } else { + doctorError = null; + } if (appointmentDate == null || _selectedBranch == null || @@ -310,19 +310,17 @@ class _PatientMakeReferralScreenState extends State { attributeValueId: 'facilityId', okText: TranslationBase.of(context).ok, okFunction: (selectedValue) async { - - _selectedBranch = selectedValue; - _selectedClinic = null; - _selectedDoctor = null; - GifLoaderDialogUtils.showMyDialog(context); - await model - .getClinics(_selectedBranch['facilityId']) - .then((_) => - GifLoaderDialogUtils.hideDialog(context)); - if (model.state == ViewState.ErrorLocal) { - DrAppToastMsg.showErrorToast(model.error); - } - + _selectedBranch = selectedValue; + _selectedClinic = null; + _selectedDoctor = null; + GifLoaderDialogUtils.showMyDialog(context); + await model + .getClinics(_selectedBranch['facilityId']) + .then((_) => + GifLoaderDialogUtils.hideDialog(context)); + if (model.state == ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast(model.error); + } }, ); showDialog( @@ -359,20 +357,19 @@ class _PatientMakeReferralScreenState extends State { hintSearchText: TranslationBase.of(context).clinicSearch, okText: TranslationBase.of(context).ok, okFunction: (selectedValue) async { - - _selectedDoctor = null; - _selectedClinic = selectedValue; - GifLoaderDialogUtils.showMyDialog(context); - await model - .getClinicDoctors( - patient, - _selectedClinic['ClinicID'], - _selectedBranch['facilityId']) - .then((_) => - GifLoaderDialogUtils.hideDialog(context)); - if (model.state == ViewState.ErrorLocal) { - DrAppToastMsg.showErrorToast(model.error); - } + _selectedDoctor = null; + _selectedClinic = selectedValue; + GifLoaderDialogUtils.showMyDialog(context); + await model + .getClinicDoctors( + patient, + _selectedClinic['ClinicID'], + _selectedBranch['facilityId']) + .then((_) => + GifLoaderDialogUtils.hideDialog(context)); + if (model.state == ViewState.ErrorLocal) { + DrAppToastMsg.showErrorToast(model.error); + } }, ); showDialog( 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 64a7e293..66c443c8 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 @@ -23,7 +23,8 @@ class ReferralPatientDetailScreen extends StatelessWidget { final MyReferralPatientModel referredPatient; final PatientReferralViewModel patientReferralViewModel; - ReferralPatientDetailScreen(this.referredPatient, this.patientReferralViewModel); + ReferralPatientDetailScreen( + this.referredPatient, this.patientReferralViewModel); @override Widget build(BuildContext context) { @@ -54,7 +55,8 @@ class ReferralPatientDetailScreen extends StatelessWidget { ), Expanded( child: AppText( - (Helpers.capitalize("${referredPatient.firstName} ${referredPatient.lastName}")), + (Helpers.capitalize( + "${referredPatient.firstName} ${referredPatient.lastName}")), fontSize: SizeConfig.textMultiplier * 2.5, fontWeight: FontWeight.bold, fontFamily: 'Poppins', @@ -71,14 +73,18 @@ class ReferralPatientDetailScreen extends StatelessWidget { ), InkWell( onTap: () { - PatiantInformtion patient = model.getPatientFromReferralO(referredPatient); - Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: { + PatiantInformtion patient = model + .getPatientFromReferralO(referredPatient); + Navigator.of(context) + .pushNamed(PATIENTS_PROFILE, arguments: { "patient": patient, "patientType": "1", "isInpatient": true, "arrivalType": "1", - "from": AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'), - "to": AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'), + "from": AppDateUtils.convertDateToFormat( + DateTime.now(), 'yyyy-MM-dd'), + "to": AppDateUtils.convertDateToFormat( + DateTime.now(), 'yyyy-MM-dd'), }); }, child: Icon( @@ -95,14 +101,18 @@ class ReferralPatientDetailScreen extends StatelessWidget { children: [ InkWell( onTap: () { - PatiantInformtion patient = model.getPatientFromReferralO(referredPatient); - Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: { + PatiantInformtion patient = model + .getPatientFromReferralO(referredPatient); + Navigator.of(context) + .pushNamed(PATIENTS_PROFILE, arguments: { "patient": patient, "patientType": "1", "isInpatient": true, "arrivalType": "1", - "from": AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'), - "to": AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'), + "from": AppDateUtils.convertDateToFormat( + DateTime.now(), 'yyyy-MM-dd'), + "to": AppDateUtils.convertDateToFormat( + DateTime.now(), 'yyyy-MM-dd'), }); }, child: Padding( @@ -137,7 +147,8 @@ class ReferralPatientDetailScreen extends StatelessWidget { child: Column( children: [ Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, children: [ AppText( "${model.getReferralStatusNameByCode(referredPatient.referralStatus, context)}", @@ -146,7 +157,11 @@ class ReferralPatientDetailScreen extends StatelessWidget { fontWeight: FontWeight.w700, color: referredPatient.referralStatus == 1 ? Color(0xffc4aa54) - : referredPatient.referralStatus == 46 || referredPatient.referralStatus == 2 + : referredPatient.referralStatus == + 46 || + referredPatient + .referralStatus == + 2 ? AppGlobal.appGreenColor : Colors.red[700], ), @@ -162,23 +177,28 @@ class ReferralPatientDetailScreen extends StatelessWidget { ], ), Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, children: [ Row( - mainAxisAlignment: MainAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment.start, children: [ AppText( - TranslationBase.of(context).fileNumber, + TranslationBase.of(context) + .fileNumber, fontFamily: 'Poppins', fontWeight: FontWeight.w600, - fontSize: 1.5 * SizeConfig.textMultiplier, + fontSize: + 1.5 * SizeConfig.textMultiplier, color: Color(0XFF575757), ), AppText( "${referredPatient.patientID}", fontFamily: 'Poppins', fontWeight: FontWeight.w700, - fontSize: 1.6 * SizeConfig.textMultiplier, + fontSize: + 1.6 * SizeConfig.textMultiplier, color: Color(0XFF2E303A), ), ], @@ -195,29 +215,35 @@ class ReferralPatientDetailScreen extends StatelessWidget { ], ), Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.center, children: [ Expanded( child: Column( children: [ Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ AppText( "${TranslationBase.of(context).refClinic}: ", fontFamily: 'Poppins', fontWeight: FontWeight.w600, - fontSize: 1.5 * SizeConfig.textMultiplier, + fontSize: 1.5 * + SizeConfig.textMultiplier, color: Color(0XFF575757), ), Expanded( child: AppText( - referredPatient.referringClinicDescription, + referredPatient + .referringClinicDescription, fontFamily: 'Poppins', fontWeight: FontWeight.w700, - fontSize: 1.6 * SizeConfig.textMultiplier, + fontSize: 1.6 * + SizeConfig.textMultiplier, color: Color(0XFF2E303A), ), ), @@ -225,22 +251,31 @@ class ReferralPatientDetailScreen extends StatelessWidget { ), if (referredPatient.frequency != null) Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ AppText( - TranslationBase.of(context).frequency + ": ", + TranslationBase.of(context) + .frequency + + ": ", fontFamily: 'Poppins', fontWeight: FontWeight.w600, - fontSize: 1.5 * SizeConfig.textMultiplier, + fontSize: 1.5 * + SizeConfig.textMultiplier, color: Color(0XFF575757), ), Expanded( child: AppText( - referredPatient.frequencyDescription ?? '', + referredPatient + .frequencyDescription ?? + '', fontFamily: 'Poppins', fontWeight: FontWeight.w700, - fontSize: 1.6 * SizeConfig.textMultiplier, + fontSize: 1.6 * + SizeConfig + .textMultiplier, color: Color(0XFF2E303A), ), ), @@ -252,22 +287,29 @@ class ReferralPatientDetailScreen extends StatelessWidget { Row( children: [ AppText( - referredPatient.nationalityName != null + referredPatient.nationalityName != + null ? referredPatient.nationalityName : "", fontWeight: FontWeight.bold, color: Color(0xFF2E303A), - fontSize: 1.4 * SizeConfig.textMultiplier, + fontSize: + 1.4 * SizeConfig.textMultiplier, ), - referredPatient.nationalityFlagURL != null + referredPatient.nationalityFlagURL != + null ? ClipRRect( - borderRadius: BorderRadius.circular(20.0), + borderRadius: + BorderRadius.circular(20.0), child: Image.network( - referredPatient.nationalityFlagURL, + referredPatient + .nationalityFlagURL, height: 25, width: 30, - errorBuilder: - (BuildContext context, Object exception, StackTrace stackTrace) { + errorBuilder: (BuildContext + context, + Object exception, + StackTrace stackTrace) { return Text('No Image'); }, )) @@ -279,21 +321,26 @@ class ReferralPatientDetailScreen extends StatelessWidget { if (referredPatient.priorityDescription != null) Row( mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ AppText( - TranslationBase.of(context).priority + ": ", + TranslationBase.of(context).priority + + ": ", fontFamily: 'Poppins', fontWeight: FontWeight.w600, - fontSize: 1.5 * SizeConfig.textMultiplier, + fontSize: + 1.5 * SizeConfig.textMultiplier, color: Color(0XFF575757), ), Expanded( child: AppText( - referredPatient.priorityDescription ?? '', + referredPatient.priorityDescription ?? + '', fontFamily: 'Poppins', fontWeight: FontWeight.w700, - fontSize: 1.6 * SizeConfig.textMultiplier, + fontSize: + 1.6 * SizeConfig.textMultiplier, color: Color(0XFF2E303A), ), ), @@ -302,24 +349,33 @@ class ReferralPatientDetailScreen extends StatelessWidget { if (referredPatient.mAXResponseTime != null) Row( mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ AppText( - TranslationBase.of(context).maxResponseTime + ": ", + TranslationBase.of(context) + .maxResponseTime + + ": ", fontFamily: 'Poppins', fontWeight: FontWeight.w600, - fontSize: 1.5 * SizeConfig.textMultiplier, + fontSize: + 1.5 * SizeConfig.textMultiplier, color: Color(0XFF575757), ), Expanded( child: AppText( - referredPatient.mAXResponseTime != null - ? AppDateUtils.convertDateFromServerFormat( - referredPatient.mAXResponseTime, "dd MMM,yyyy") + referredPatient.mAXResponseTime != + null + ? AppDateUtils + .convertDateFromServerFormat( + referredPatient + .mAXResponseTime, + "dd MMM,yyyy") : '', fontFamily: 'Poppins', fontWeight: FontWeight.w700, - fontSize: 1.6 * SizeConfig.textMultiplier, + fontSize: + 1.6 * SizeConfig.textMultiplier, color: Color(0XFF2E303A), ), ), @@ -329,7 +385,8 @@ class ReferralPatientDetailScreen extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( - margin: EdgeInsets.only(left: 10, right: 0), + margin: + EdgeInsets.only(left: 10, right: 0), child: Image.asset( 'assets/images/patient/ic_ref_arrow_up.png', height: 50, @@ -337,17 +394,26 @@ class ReferralPatientDetailScreen extends StatelessWidget { ), ), Container( - margin: EdgeInsets.only(left: 0, top: 25, right: 0, bottom: 0), - padding: EdgeInsets.only(left: 4.0, right: 4.0), - child: referredPatient.doctorImageURL != null + margin: EdgeInsets.only( + left: 0, + top: 25, + right: 0, + bottom: 0), + padding: EdgeInsets.only( + left: 4.0, right: 4.0), + child: referredPatient.doctorImageURL != + null ? ClipRRect( - borderRadius: BorderRadius.circular(20.0), + borderRadius: + BorderRadius.circular(20.0), child: Image.network( referredPatient.doctorImageURL, height: 25, width: 30, errorBuilder: - (BuildContext context, Object exception, StackTrace stackTrace) { + (BuildContext context, + Object exception, + StackTrace stackTrace) { return Text(''); }, )) @@ -363,22 +429,30 @@ class ReferralPatientDetailScreen extends StatelessWidget { Expanded( flex: 4, child: Container( - margin: EdgeInsets.only(left: 10, top: 30, right: 10, bottom: 0), + margin: EdgeInsets.only( + left: 10, + top: 30, + right: 10, + bottom: 0), child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ AppText( "${TranslationBase.of(context).dr} ${referredPatient.referringDoctorName}", fontFamily: 'Poppins', fontWeight: FontWeight.w800, - fontSize: 1.5 * SizeConfig.textMultiplier, + fontSize: 1.5 * + SizeConfig.textMultiplier, color: Colors.black, ), AppText( - referredPatient.referringClinicDescription, + referredPatient + .referringClinicDescription, fontFamily: 'Poppins', fontWeight: FontWeight.w700, - fontSize: 1.3 * SizeConfig.textMultiplier, + fontSize: 1.3 * + SizeConfig.textMultiplier, color: Color(0XFF2E303A), ), ], @@ -402,8 +476,10 @@ class ReferralPatientDetailScreen extends StatelessWidget { children: [ Container( width: double.infinity, - margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16), - padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16), + margin: + EdgeInsets.symmetric(horizontal: 16, vertical: 16), + padding: + EdgeInsets.symmetric(horizontal: 16, vertical: 16), decoration: BoxDecoration( color: Colors.white, shape: BoxShape.rectangle, @@ -440,8 +516,10 @@ class ReferralPatientDetailScreen extends StatelessWidget { referredPatient.referredDoctorRemarks.isNotEmpty) Container( width: double.infinity, - margin: EdgeInsets.symmetric(horizontal: 16, vertical: 0), - padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16), + margin: + EdgeInsets.symmetric(horizontal: 16, vertical: 0), + padding: EdgeInsets.symmetric( + horizontal: 16, vertical: 16), decoration: BoxDecoration( color: Colors.white, shape: BoxShape.rectangle, @@ -499,8 +577,10 @@ class ReferralPatientDetailScreen extends StatelessWidget { widget: AddReplayOnReferralPatient( patientReferralViewModel: patientReferralViewModel, myReferralInPatientModel: referredPatient, - isEdited: referredPatient.referredDoctorRemarks != null && - referredPatient.referredDoctorRemarks.isNotEmpty, + isEdited: + referredPatient.referredDoctorRemarks != null && + referredPatient + .referredDoctorRemarks.isNotEmpty, ), ), ); diff --git a/lib/screens/patients/profile/referral/referred-patient-screen.dart b/lib/screens/patients/profile/referral/referred-patient-screen.dart index 545625fa..fe40a7e6 100644 --- a/lib/screens/patients/profile/referral/referred-patient-screen.dart +++ b/lib/screens/patients/profile/referral/referred-patient-screen.dart @@ -52,8 +52,9 @@ class _ReferredPatientScreenState extends State { model.listMyReferredPatientModel == null || model.listMyReferredPatientModel.length == 0 ? Center( - child: ErrorMessage(error: TranslationBase.of(context).referralEmptyMsg,) - ) + child: ErrorMessage( + error: TranslationBase.of(context).referralEmptyMsg, + )) : Expanded( child: SingleChildScrollView( // DoctorApplication.svc/REST/GtMyReferredPatient 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 53447743..bef369f8 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 @@ -118,9 +118,7 @@ class _AddAssessmentDetailsState extends State { heightFactor: 1, child: BaseView( onModelReady: (model) async { - model.callAddAssessmentLookupsServices(); - }, builder: (_, model, w) => AppScaffold( baseViewModel: model, @@ -218,8 +216,8 @@ class _AddAssessmentDetailsState extends State { ), ) : AppTextFieldCustom( - height: Helpers.getTextFieldHeight(), - onClick: model.listOfICD10 != null + height: Helpers.getTextFieldHeight(), + onClick: model.listOfICD10 != null ? () { setState(() { widget.mySelectedAssessment @@ -242,45 +240,39 @@ class _AddAssessmentDetailsState extends State { )), )), ), - - if(widget.mySelectedAssessment - .selectedICD != null) - Column( - children: [ - SizedBox( - height: 3, - ), - Container( - width: MediaQuery - .of(context) - .size - .width * 0.7, - child: AppText( - widget.mySelectedAssessment - .selectedICD.description + - (' (${widget.mySelectedAssessment - .selectedICD.code} )'), - color: Color(0xFF575757), - fontSize: 10, - fontWeight: FontWeight.w700, - letterSpacing: -0.4, - ), - ), - ], + if (widget.mySelectedAssessment.selectedICD != null) + Column( + children: [ + SizedBox( + height: 3, ), + Container( + width: + MediaQuery.of(context).size.width * 0.7, + child: AppText( + widget.mySelectedAssessment.selectedICD + .description + + (' (${widget.mySelectedAssessment.selectedICD.code} )'), + color: Color(0xFF575757), + fontSize: 10, + fontWeight: FontWeight.w700, + letterSpacing: -0.4, + ), + ), + ], + ), SizedBox( height: 7, ), AppTextFieldCustom( height: Helpers.getTextFieldHeight(), - onClick: model.listOfDiagnosisCondition != null ? () { MasterKeyDailog dialog = MasterKeyDailog( list: model.listOfDiagnosisCondition, okText: TranslationBase.of(context).ok, - selectedValue: widget.mySelectedAssessment.selectedDiagnosisCondition, - + selectedValue: widget.mySelectedAssessment + .selectedDiagnosisCondition, okFunction: (MasterKeyModel selectedValue) { setState(() { @@ -329,13 +321,13 @@ class _AddAssessmentDetailsState extends State { ), AppTextFieldCustom( height: Helpers.getTextFieldHeight(), - onClick: model.listOfDiagnosisType != null ? () { MasterKeyDailog dialog = MasterKeyDailog( list: model.listOfDiagnosisType, okText: TranslationBase.of(context).ok, - selectedValue: widget.mySelectedAssessment.selectedDiagnosisType, + selectedValue: widget.mySelectedAssessment + .selectedDiagnosisType, okFunction: (MasterKeyModel selectedValue) { setState(() { @@ -390,8 +382,12 @@ class _AddAssessmentDetailsState extends State { ), ), SizedBox( - height: SizeConfig.heightMultiplier * (SizeConfig.isHeightVeryShort ?20:SizeConfig.isHeightShort?15:10), - + height: SizeConfig.heightMultiplier * + (SizeConfig.isHeightVeryShort + ? 20 + : SizeConfig.isHeightShort + ? 15 + : 10), ), ])), ), @@ -399,35 +395,34 @@ class _AddAssessmentDetailsState extends State { ), ), ), - bottomSheet: model.state == ViewState.Busy?Container(height: 0,): - - BottomSheetDialogButton( - label: (widget.isUpdate - ? 'Update Assessment Details' - : 'Add Assessment Details'), - onTap: () async { - setState(() { - isFormSubmitted = true; - }); - widget.mySelectedAssessment.remark = - remarkController.text; - widget.mySelectedAssessment.appointmentId = - int.parse(appointmentIdController.text); - if (widget.mySelectedAssessment - .selectedDiagnosisCondition != - null && - widget.mySelectedAssessment - .selectedDiagnosisType != - null && - widget.mySelectedAssessment.selectedICD != null) { - await submitAssessment( - isUpdate: widget.isUpdate, - model: model, - mySelectedAssessment: - widget.mySelectedAssessment); - } - }, - ), + bottomSheet: model.state == ViewState.Busy + ? Container( + height: 0, + ) + : BottomSheetDialogButton( + label: (widget.isUpdate + ? 'Update Assessment Details' + : 'Add Assessment Details'), + onTap: () async { + setState(() { + isFormSubmitted = true; + }); + widget.mySelectedAssessment.remark = remarkController.text; + widget.mySelectedAssessment.appointmentId = + int.parse(appointmentIdController.text); + if (widget.mySelectedAssessment + .selectedDiagnosisCondition != + null && + widget.mySelectedAssessment.selectedDiagnosisType != + null && + widget.mySelectedAssessment.selectedICD != null) { + await submitAssessment( + isUpdate: widget.isUpdate, + model: model, + mySelectedAssessment: widget.mySelectedAssessment); + } + }, + ), ), ), ); @@ -470,7 +465,6 @@ class _AddAssessmentDetailsState extends State { } GifLoaderDialogUtils.hideDialog(context); if (model.state == ViewState.ErrorLocal) { - Helpers.showErrorToast(model.error); } else { Map profile = await sharedPref.getObj(DOCTOR_PROFILE); @@ -478,7 +472,7 @@ class _AddAssessmentDetailsState extends State { DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); mySelectedAssessment.icdCode10ID = mySelectedAssessment.selectedICD.code; mySelectedAssessment.doctorName = doctorProfile.doctorName; - widget.addSelectedAssessment(mySelectedAssessment, isUpdate); + widget.addSelectedAssessment(mySelectedAssessment, isUpdate); Navigator.of(context).pop(); } } diff --git a/lib/screens/patients/profile/soap_update/assessment/assessment_call_back.dart b/lib/screens/patients/profile/soap_update/assessment/assessment_call_back.dart index 331b2d15..0119b076 100644 --- a/lib/screens/patients/profile/soap_update/assessment/assessment_call_back.dart +++ b/lib/screens/patients/profile/soap_update/assessment/assessment_call_back.dart @@ -1,3 +1,3 @@ -abstract class AssessmentCallBack{ - nextFunction(model); -} \ No newline at end of file +abstract class AssessmentCallBack { + nextFunction(model); +} 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 5e075099..c7e82b5f 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 @@ -55,7 +55,7 @@ class _UpdateAssessmentPageState extends State model.setAssessmentCallBack(this); mySelectedAssessmentList.clear(); - await model.onUpdateAssessmentStepStart(widget.patientInfo); + await model.onUpdateAssessmentStepStart(widget.patientInfo); if (model.patientAssessmentList.isNotEmpty) { model.patientAssessmentList.forEach((element) { 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 42b94656..81b296d3 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 @@ -14,7 +14,7 @@ import 'examinations_list_search_widget.dart'; class AddExaminationPage extends StatefulWidget { final List mySelectedExamination; - final Function (List)addSelectedExamination; + final Function(List) addSelectedExamination; final Function(MasterKeyModel) removeExamination; AddExaminationPage( @@ -79,13 +79,13 @@ class _AddExaminationPageState extends State { isServiceSelected(master), removeExamination: (selectedExamination) { setState(() { - mySelectedExaminationLocal.remove(selectedExamination); + mySelectedExaminationLocal + .remove(selectedExamination); }); }, addExamination: (selectedExamination) { - - mySelectedExaminationLocal - .insert(0, selectedExamination); + mySelectedExaminationLocal.insert( + 0, selectedExamination); // setState(() {}); }, ), @@ -105,7 +105,8 @@ class _AddExaminationPageState extends State { : BottomSheetDialogButton( label: "${TranslationBase.of(context).addExamination}", onTap: () { - widget.addSelectedExamination(mySelectedExaminationLocal); + widget + .addSelectedExamination(mySelectedExaminationLocal); }, ), )); 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 c9202e52..18e5d154 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 @@ -66,27 +66,28 @@ class _AddExaminationWidgetState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ InkWell( - onTap: (){ + onTap: () { onExamTap(); }, child: Row( children: [ Checkbox( - value:widget.isServiceSelected(widget.item), + value: widget.isServiceSelected(widget.item), activeColor: Colors.red[800], onChanged: (bool newValue) { onExamTap(); }), Container( child: AppText( - projectViewModel.isArabic - ? widget.item.nameAr != null && widget.item.nameAr != "" - ? widget.item.nameAr - : widget.item.nameEn - : widget.item.nameEn, - + projectViewModel.isArabic + ? widget.item.nameAr != null && + widget.item.nameAr != "" + ? widget.item.nameAr + : widget.item.nameEn + : widget.item.nameEn, color: Color(0xFF575757), - fontSize: SizeConfig.getTextMultiplierBasedOnWidth()*(SizeConfig.isWidthLarge?3:3.8), + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * + (SizeConfig.isWidthLarge ? 3 : 3.8), letterSpacing: -0.56, ), ), @@ -265,22 +266,21 @@ class _AddExaminationWidgetState extends State { ); } - onExamTap(){ - setState(() { - if (widget.isServiceSelected(widget.item)) { - if (examination.isLocal) - widget.removeExamination(examination); - widget.expandClick(); - } else { - examination.isNormal = status == 1; - examination.isAbnormal = status == 2; - examination.notExamined = status == 3; - examination.remark = remarksController.text; - widget.addExamination(examination); - widget.expandClick(); - } - }); - } + onExamTap() { + setState(() { + if (widget.isServiceSelected(widget.item)) { + if (examination.isLocal) widget.removeExamination(examination); + widget.expandClick(); + } else { + examination.isNormal = status == 1; + examination.isAbnormal = status == 2; + examination.notExamined = status == 3; + examination.remark = remarksController.text; + widget.addExamination(examination); + widget.expandClick(); + } + }); + } MySelectedExamination getSelectedExam(MasterKeyModel masterKey) { Iterable exam = widget.mySelectedExamination.where( 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 c041b545..b7f7ef2a 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 @@ -13,13 +13,14 @@ class ExaminationsListSearchWidget extends StatefulWidget { final Function(MySelectedExamination) addExamination; final bool Function(MasterKeyModel) isServiceSelected; final List masterList; - final List mySelectedExamination; + final List mySelectedExamination; ExaminationsListSearchWidget( {this.removeExamination, this.addExamination, this.isServiceSelected, - this.masterList, this.mySelectedExamination}); + this.masterList, + this.mySelectedExamination}); @override _ExaminationsListSearchWidgetState createState() => @@ -47,7 +48,6 @@ class _ExaminationsListSearchWidgetState hintText: TranslationBase.of(context).searchExamination, isTextFieldHasSuffix: true, hasBorder: false, - controller: filteredSearchController, onChanged: (value) { filterSearchResults(value); diff --git a/lib/screens/patients/profile/soap_update/objective/objective_call_back.dart b/lib/screens/patients/profile/soap_update/objective/objective_call_back.dart index 466f344e..402125af 100644 --- a/lib/screens/patients/profile/soap_update/objective/objective_call_back.dart +++ b/lib/screens/patients/profile/soap_update/objective/objective_call_back.dart @@ -1,3 +1,3 @@ -abstract class ObjectiveCallBack{ - nextFunction(model); -} \ No newline at end of file +abstract class ObjectiveCallBack { + nextFunction(model); +} 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 c4964975..bb30eebc 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 @@ -108,8 +108,8 @@ class _UpdateObjectivePageState extends State crossAxisAlignment: CrossAxisAlignment.start, children: [ SOAPStepHeader( - currentIndex: widget.currentIndex, - changePageViewIndex: widget.changePageViewIndex, + currentIndex: widget.currentIndex, + changePageViewIndex: widget.changePageViewIndex, patientInfo: widget.patientInfo, ), ExpandableSOAPWidget( @@ -206,27 +206,33 @@ class _UpdateObjectivePageState extends State submitUpdateObjectivePage(SOAPViewModel model) async { if (mySelectedExamination.isNotEmpty) { - if(!model.isAddExamInProgress && widget.patientInfo.admissionNo != null && + if (!model.isAddExamInProgress && + widget.patientInfo.admissionNo != null && widget.patientInfo.admissionNo.isNotEmpty) { Navigator.of(context).pop(); - }else{ + } else { widget.changeLoadingState(true); Map profile = await sharedPref.getObj(DOCTOR_PROFILE); DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); PostPhysicalExamRequestModel postPhysicalExamRequestModel = - new PostPhysicalExamRequestModel(); + new PostPhysicalExamRequestModel(); mySelectedExamination.forEach((exam) { - if (postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM == + if (postPhysicalExamRequestModel + .listHisProgNotePhysicalExaminationVM == null) postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM = - []; + []; ListHisProgNotePhysicalExaminationVM - listHisProgNotePhysicalExaminationVM = - ListHisProgNotePhysicalExaminationVM( + listHisProgNotePhysicalExaminationVM = + ListHisProgNotePhysicalExaminationVM( patientMRN: widget.patientInfo.patientMRN, - episodeId: widget.patientInfo.episodeNo == null?0: widget.patientInfo.episodeNo, - appointmentNo: widget.patientInfo.appointmentNo == null?0:widget.patientInfo.appointmentNo, + episodeId: widget.patientInfo.episodeNo == null + ? 0 + : widget.patientInfo.episodeNo, + appointmentNo: widget.patientInfo.appointmentNo == null + ? 0 + : widget.patientInfo.appointmentNo, remarks: exam.remark ?? '', createdBy: exam.createdBy ?? doctorProfile.doctorID, createdOn: exam.createdOn ?? DateTime.now().toIso8601String(), @@ -240,13 +246,13 @@ class _UpdateObjectivePageState extends State examinationType: exam.isNormal ? 1 : exam.isAbnormal - ? 2 - : 3, + ? 2 + : 3, examinationTypeName: exam.isNormal ? "Normal" : exam.isAbnormal - ? 'AbNormal' - : "Not Examined", + ? 'AbNormal' + : "Not Examined", isNew: exam.isNew, ); if (widget.patientInfo.admissionNo != null && @@ -269,13 +275,13 @@ class _UpdateObjectivePageState extends State if (model.state == ViewState.ErrorLocal) { widget.changeLoadingState(false); Helpers.showErrorToast(model.error); - if(widget.patientInfo.admissionNo != null && + if (widget.patientInfo.admissionNo != null && widget.patientInfo.admissionNo.isNotEmpty) { // Navigator.of(context).pop(); model.isAddExamInProgress = false; } } else { - if(widget.patientInfo.admissionNo != null && + if (widget.patientInfo.admissionNo != null && widget.patientInfo.admissionNo.isNotEmpty) { // Navigator.of(context).pop(); widget.changeLoadingState(false); @@ -284,10 +290,8 @@ class _UpdateObjectivePageState extends State widget.changeLoadingState(true); widget.changePageViewIndex(2); } - } } - } else { Helpers.showErrorToast(TranslationBase.of(context).examinationErrorMsg); } @@ -329,7 +333,7 @@ class _UpdateObjectivePageState extends State element.selectedExamination.id, orElse: () => null)) == null) { - mySelectedExamination.insert(0,element); + mySelectedExamination.insert(0, element); } }); diff --git a/lib/screens/patients/profile/soap_update/plan/plan_call_back.dart b/lib/screens/patients/profile/soap_update/plan/plan_call_back.dart index 14fef483..0a3efab0 100644 --- a/lib/screens/patients/profile/soap_update/plan/plan_call_back.dart +++ b/lib/screens/patients/profile/soap_update/plan/plan_call_back.dart @@ -1,3 +1,3 @@ -abstract class PlanCallBack{ - nextFunction(model); -} \ No newline at end of file +abstract class PlanCallBack { + nextFunction(model); +} diff --git a/lib/screens/patients/profile/soap_update/shared_soap_widgets/SOAP_open_items.dart b/lib/screens/patients/profile/soap_update/shared_soap_widgets/SOAP_open_items.dart index 6449913c..f66ef604 100644 --- a/lib/screens/patients/profile/soap_update/shared_soap_widgets/SOAP_open_items.dart +++ b/lib/screens/patients/profile/soap_update/shared_soap_widgets/SOAP_open_items.dart @@ -8,48 +8,45 @@ class SOAPOpenItems extends StatelessWidget { final String label; const SOAPOpenItems({Key key, this.onTap, this.label}) : super(key: key); + @override Widget build(BuildContext context) { - return InkWell( + return InkWell( onTap: onTap, child: Container( - padding: EdgeInsets.symmetric( - vertical: 8, horizontal: 8.0), + padding: EdgeInsets.symmetric(vertical: 8, horizontal: 8.0), margin: EdgeInsets.symmetric(vertical: 8), decoration: BoxDecoration( - border: Border.all( - color: Colors.grey.shade400, width: 0.5), + border: Border.all(color: Colors.grey.shade400, width: 0.5), borderRadius: BorderRadius.all( Radius.circular(8), ), color: Colors.white, ), child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, + mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.center, children: [ Expanded( child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - "$label", - fontSize:SizeConfig.getTextMultiplierBasedOnWidth()*4.5, - fontWeight: FontWeight.w700, - color: Color(0xFF2E303A), - letterSpacing:-0.44 , - ), - AppText( - "${TranslationBase.of(context).searchHere}", - fontSize:SizeConfig.getTextMultiplierBasedOnWidth()*3.5, - fontWeight: FontWeight.w500, - color: Color(0xFF575757), - letterSpacing:-0.56 , - ), - ], - )), + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + "$label", + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 4.5, + fontWeight: FontWeight.w700, + color: Color(0xFF2E303A), + letterSpacing: -0.44, + ), + AppText( + "${TranslationBase.of(context).searchHere}", + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5, + fontWeight: FontWeight.w500, + color: Color(0xFF575757), + letterSpacing: -0.56, + ), + ], + )), Icon( Icons.add_box_rounded, size: 28, @@ -61,6 +58,3 @@ class SOAPOpenItems extends StatelessWidget { ); } } - - - 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 8d29150e..da7453b2 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 @@ -8,7 +8,9 @@ import 'package:flutter/material.dart'; class SOAPStepHeader extends StatelessWidget { const SOAPStepHeader({ Key key, - this.currentIndex, this.changePageViewIndex, this.patientInfo, + this.currentIndex, + this.changePageViewIndex, + this.patientInfo, }) : super(key: key); final int currentIndex; @@ -21,19 +23,27 @@ class SOAPStepHeader extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ - SizedBox(height: SizeConfig.isHeightVeryShort?30:SizeConfig.isHeightShort?35: 15,), + SizedBox( + height: SizeConfig.isHeightVeryShort + ? 30 + : SizeConfig.isHeightShort + ? 35 + : 15, + ), AppText( TranslationBase.of(context).createNew, - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * (SizeConfig.isWidthLarge? 3: 4), + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * + (SizeConfig.isWidthLarge ? 3 : 4), fontWeight: FontWeight.w700, - letterSpacing:-0.72, + letterSpacing: -0.72, color: Color(0xFF2E303A), - ), - AppText(TranslationBase.of(context).episode, - fontSize:SizeConfig.getTextMultiplierBasedOnWidth() * (SizeConfig.isWidthLarge? 6: 8), + AppText( + TranslationBase.of(context).episode, + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * + (SizeConfig.isWidthLarge ? 6 : 8), fontWeight: FontWeight.bold, - letterSpacing:-1.44, + letterSpacing: -1.44, color: Color(0xFF2E303A), ), Container( @@ -45,8 +55,8 @@ class SOAPStepHeader extends StatelessWidget { ), ), SizedBox( - height:SizeConfig.heightMultiplier * - (SizeConfig.isHeightVeryShort ? 1 : 2), + height: SizeConfig.heightMultiplier * + (SizeConfig.isHeightVeryShort ? 1 : 2), ), ], ); diff --git a/lib/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart b/lib/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart index f5134c1c..ef7f246d 100644 --- a/lib/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart +++ b/lib/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart @@ -10,6 +10,7 @@ class BottomSheetTitle extends StatelessWidget with PreferredSizeWidget { final String title; double headerHeight = SizeConfig.heightMultiplier * 15; + @override Widget build(BuildContext context) { return Container( diff --git a/lib/screens/patients/profile/soap_update/shared_soap_widgets/expandable_SOAP_widget.dart b/lib/screens/patients/profile/soap_update/shared_soap_widgets/expandable_SOAP_widget.dart index c1b2d443..e9164cdc 100644 --- a/lib/screens/patients/profile/soap_update/shared_soap_widgets/expandable_SOAP_widget.dart +++ b/lib/screens/patients/profile/soap_update/shared_soap_widgets/expandable_SOAP_widget.dart @@ -14,24 +14,28 @@ class ExpandableSOAPWidget extends StatelessWidget { final bool isRequired; const ExpandableSOAPWidget( - {Key key, this.isExpanded, this.child, this.onTap, this.headerTitle, this.isRequired= true}) + {Key key, + this.isExpanded, + this.child, + this.onTap, + this.headerTitle, + this.isRequired = true}) : super(key: key); @override Widget build(BuildContext context) { return Container( - padding: EdgeInsets.symmetric(vertical: SizeConfig.isHeightVeryShort ?10:20, horizontal: 10), + padding: EdgeInsets.symmetric( + vertical: SizeConfig.isHeightVeryShort ? 10 : 20, horizontal: 10), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.all( Radius.circular(10.0), ), - border: Border.all( - color: HexColor('#707070'), - width: 0.30), + border: Border.all(color: HexColor('#707070'), width: 0.30), ), child: HeaderBodyExpandableNotifier( - headerWidget: InkWell( + headerWidget: InkWell( onTap: onTap, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -40,24 +44,32 @@ class ExpandableSOAPWidget extends StatelessWidget { onTap: onTap, child: Row( children: [ - AppText(headerTitle, - variant: isExpanded ? "bodyText" : '', - fontSize: SizeConfig.getTextMultiplierBasedOnWidth()*(SizeConfig.isHeightVeryShort?4.8: SizeConfig.isWidthLarge?4: 5), - letterSpacing:-0.64, + AppText( + headerTitle, + variant: isExpanded ? "bodyText" : '', + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * + (SizeConfig.isHeightVeryShort + ? 4.8 + : SizeConfig.isWidthLarge + ? 4 + : 5), + letterSpacing: -0.64, fontWeight: FontWeight.w700, - color: Color(0xFF2E303A),), - if(isRequired) - Icon( - FontAwesomeIcons.asterisk, - size: SizeConfig.getTextMultiplierBasedOnWidth()*2.5, - ) + color: Color(0xFF2E303A), + ), + if (isRequired) + Icon( + FontAwesomeIcons.asterisk, + size: SizeConfig.getTextMultiplierBasedOnWidth() * 2.5, + ) ], ), ), InkWell( onTap: onTap, - child: Icon( - isExpanded ? EvaIcons.arrowIosUpwardOutline: EvaIcons.arrowIosDownwardOutline), + child: Icon(isExpanded + ? EvaIcons.arrowIosUpwardOutline + : EvaIcons.arrowIosDownwardOutline), ) ], ), @@ -67,4 +79,4 @@ class ExpandableSOAPWidget extends StatelessWidget { ), ); } -} \ No newline at end of file +} diff --git a/lib/screens/patients/profile/soap_update/shared_soap_widgets/remark_text.dart b/lib/screens/patients/profile/soap_update/shared_soap_widgets/remark_text.dart index 91ef6954..c3a66b77 100644 --- a/lib/screens/patients/profile/soap_update/shared_soap_widgets/remark_text.dart +++ b/lib/screens/patients/profile/soap_update/shared_soap_widgets/remark_text.dart @@ -1,11 +1,12 @@ - import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; class RemarkText extends StatelessWidget { - final String remark; + final String remark; + const RemarkText({ - Key key, this.remark, + Key key, + this.remark, }) : super(key: key); @override @@ -21,4 +22,4 @@ class RemarkText extends StatelessWidget { ), ); } -} \ No newline at end of file +} diff --git a/lib/screens/patients/profile/soap_update/shared_soap_widgets/remove_button.dart b/lib/screens/patients/profile/soap_update/shared_soap_widgets/remove_button.dart index 1e5231c9..51384bdc 100644 --- a/lib/screens/patients/profile/soap_update/shared_soap_widgets/remove_button.dart +++ b/lib/screens/patients/profile/soap_update/shared_soap_widgets/remove_button.dart @@ -1,4 +1,3 @@ - import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; @@ -19,17 +18,17 @@ class RemoveButton extends StatelessWidget { children: [ Container( child: AppText( - label??TranslationBase.of(context).remove, - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3.5, + label ?? TranslationBase.of(context).remove, + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5, fontWeight: FontWeight.w700, color: HexColor("#D02127"), - letterSpacing:-0.48, + letterSpacing: -0.48, ), ), Icon( FontAwesomeIcons.times, color: HexColor("#D02127"), - size: SizeConfig.getTextMultiplierBasedOnWidth() *4, + size: SizeConfig.getTextMultiplierBasedOnWidth() * 4, ), ], ), diff --git a/lib/screens/patients/profile/soap_update/shared_soap_widgets/steper/Step_details_widget.dart b/lib/screens/patients/profile/soap_update/shared_soap_widgets/steper/Step_details_widget.dart index fb1bdcc9..75ec62f8 100644 --- a/lib/screens/patients/profile/soap_update/shared_soap_widgets/steper/Step_details_widget.dart +++ b/lib/screens/patients/profile/soap_update/shared_soap_widgets/steper/Step_details_widget.dart @@ -7,16 +7,17 @@ class StepDetailsWidget extends StatelessWidget { final double marginLeft; const StepDetailsWidget({ - Key key, this.stepLabel, this.marginLeft = 0, + Key key, + this.stepLabel, + this.marginLeft = 0, }) : super(key: key); @override Widget build(BuildContext context) { - return AppText( - stepLabel, + return AppText(stepLabel, fontWeight: FontWeight.bold, marginLeft: marginLeft, - fontSize:SizeConfig.getTextMultiplierBasedOnWidth() * 3.5 //12, - ); + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5 //12, + ); } -} \ No newline at end of file +} 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 10562d53..ea75d348 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 @@ -23,8 +23,8 @@ class StatusLabel extends StatelessWidget { color: stepId == selectedStepId ? Color(0xFFF1E9D3) : stepId < selectedStepId - ? Color(0xFFD8E8DB) - : Color(0xFFCCCCCC), + ? Color(0xFFD8E8DB) + : Color(0xFFCCCCCC), borderRadius: BorderRadius.all( Radius.circular(5.0), ), @@ -35,18 +35,18 @@ class StatusLabel extends StatelessWidget { stepId == selectedStepId ? TranslationBase.of(context).inProgress : stepId < selectedStepId - ? TranslationBase.of(context).completed - : TranslationBase.of(context).locked, + ? TranslationBase.of(context).completed + : TranslationBase.of(context).locked, fontWeight: FontWeight.bold, textAlign: TextAlign.center, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 2.7, color: stepId == selectedStepId ? Color(0xFFCC9B14) : stepId < selectedStepId - ? Color(0xFF359846) - : Color(0xFF969696), + ? Color(0xFF359846) + : Color(0xFF969696), ), ), ); } -} \ No newline at end of file +} 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 e1c97d75..bd31e4ce 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 @@ -115,7 +115,7 @@ class StepsWidget extends StatelessWidget { Positioned( top: circleTop, left: patientInfo.admissionNo == null || - patientInfo.admissionNo.isEmpty + patientInfo.admissionNo.isEmpty ? MediaQuery.of(context).size.width * 0.25 : MediaQuery.of(context).size.width * 0.71, child: InkWell( @@ -167,7 +167,7 @@ class StepsWidget extends StatelessWidget { ), ), if (patientInfo.admissionNo == null || - patientInfo.admissionNo.isEmpty) + patientInfo.admissionNo.isEmpty) Positioned( top: circleTop, left: MediaQuery.of(context).size.width * 0.47, @@ -222,7 +222,7 @@ class StepsWidget extends StatelessWidget { ), ), if (patientInfo.admissionNo == null || - patientInfo.admissionNo.isEmpty) + patientInfo.admissionNo.isEmpty) Positioned( top: circleTop, right: 0, @@ -288,8 +288,11 @@ class StepsWidget extends StatelessWidget { top: 30, child: Center( child: Container( - width: MediaQuery.of(context).size.width * (patientInfo.admissionNo == null || - patientInfo.admissionNo.isEmpty?0.9:0.85), + width: MediaQuery.of(context).size.width * + (patientInfo.admissionNo == null || + patientInfo.admissionNo.isEmpty + ? 0.9 + : 0.85), child: Divider( color: Colors.grey, height: 0.75, @@ -348,8 +351,11 @@ class StepsWidget extends StatelessWidget { ), Positioned( top: circleTop, - right: MediaQuery.of(context).size.width * (patientInfo.admissionNo == null || - patientInfo.admissionNo.isEmpty?0.25:0.71), + right: MediaQuery.of(context).size.width * + (patientInfo.admissionNo == null || + patientInfo.admissionNo.isEmpty + ? 0.25 + : 0.71), child: InkWell( onTap: () => index >= 2 ? changeCurrentTab(1) : null, child: Column( @@ -396,7 +402,7 @@ class StepsWidget extends StatelessWidget { ), ), if (patientInfo.admissionNo == null || - patientInfo.admissionNo.isEmpty) + patientInfo.admissionNo.isEmpty) Positioned( top: circleTop, right: MediaQuery.of(context).size.width * 0.50, @@ -451,7 +457,7 @@ class StepsWidget extends StatelessWidget { ), ), if (patientInfo.admissionNo == null || - patientInfo.admissionNo.isEmpty) + patientInfo.admissionNo.isEmpty) Positioned( top: circleTop, left: 0, diff --git a/lib/screens/patients/profile/soap_update/soap_utils.dart b/lib/screens/patients/profile/soap_update/soap_utils.dart index 6c5d4f02..77ba1028 100644 --- a/lib/screens/patients/profile/soap_update/soap_utils.dart +++ b/lib/screens/patients/profile/soap_update/soap_utils.dart @@ -36,7 +36,7 @@ class SoapUtils { static MySelectedExamination generateMySelectedExamination( {examination, allergySeverity, - isChecked = false, + isChecked = false, remark, isLocal = true, isNormal, 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 60c43d00..09495bb6 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 @@ -186,4 +186,3 @@ class _AddAllergiesState extends State { } } } - 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 130e730d..7d22fa26 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 @@ -84,7 +84,8 @@ class _AddAllergiesItemState extends State { : widget.item.nameEn : widget.item.nameEn, color: Color(0xFF575757), - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * (SizeConfig.isWidthLarge?3:3.8), + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * + (SizeConfig.isWidthLarge ? 3 : 3.8), letterSpacing: -0.56, ), width: MediaQuery.of(context).size.width * 0.55, 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 8819f04a..44456897 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 @@ -10,7 +10,6 @@ import 'package:flutter/material.dart'; import 'allergies_item.dart'; - class MasterKeyCheckboxSearchAllergiesWidget extends StatefulWidget { final SOAPViewModel model; final Function() addSelectedAllergy; @@ -68,8 +67,7 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState child: Column( children: [ AppTextFieldCustom( - hintText: - TranslationBase.of(context).selectAllergy, + hintText: TranslationBase.of(context).selectAllergy, isTextFieldHasSuffix: true, hasBorder: false, controller: filteredSearchController, @@ -95,14 +93,15 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState child: ListView.builder( itemCount: items.length, itemBuilder: (context, index) { - return AddAllergiesItem( - item:items[index], + item: items[index], model: widget.model, removeAllergy: widget.removeAllergy, - addAllergy:widget.addAllergy, - isServiceSelected: widget.isServiceSelected, - getServiceSelectedAllergy: widget.getServiceSelectedAllergy, + addAllergy: widget.addAllergy, + isServiceSelected: + widget.isServiceSelected, + getServiceSelectedAllergy: + widget.getServiceSelectedAllergy, ); }, ), 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 c8a519c3..283907bd 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 @@ -71,7 +71,9 @@ class _UpdateAllergiesWidgetState extends State { : TextDecoration.lineThrough, bold: true, color: Color(0xFF2B353E), - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3.5, + fontSize: + SizeConfig.getTextMultiplierBasedOnWidth() * + 3.5, fontWeight: FontWeight.w700, letterSpacing: -0.48, // fontHeight:0.18 , @@ -87,7 +89,9 @@ class _UpdateAllergiesWidgetState extends State { ? null : TextDecoration.lineThrough, color: Color(0xFFCC9B14), - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3, + fontSize: + SizeConfig.getTextMultiplierBasedOnWidth() * + 3, fontWeight: FontWeight.w700, letterSpacing: -0.48, ), @@ -105,7 +109,9 @@ class _UpdateAllergiesWidgetState extends State { padding: const EdgeInsets.symmetric(vertical: 8), child: Row( children: [ - RemarkText(remark: selectedAllergy.remark,), + RemarkText( + remark: selectedAllergy.remark, + ), ], ), ), @@ -202,5 +208,3 @@ class _UpdateAllergiesWidgetState extends State { }); } } - - diff --git a/lib/screens/patients/profile/soap_update/subjective/cheif_complaints/update_Chief_complaints.dart b/lib/screens/patients/profile/soap_update/subjective/cheif_complaints/update_Chief_complaints.dart index 0e5e6ec1..a1afa20f 100644 --- a/lib/screens/patients/profile/soap_update/subjective/cheif_complaints/update_Chief_complaints.dart +++ b/lib/screens/patients/profile/soap_update/subjective/cheif_complaints/update_Chief_complaints.dart @@ -45,52 +45,44 @@ class UpdateChiefComplaints extends StatelessWidget { ? complaintsControllerError : null, ), - SizedBox( + SizedBox( height: 20, ), AppTextFieldCustom( - hintText: TranslationBase - .of(context) - .historyOfPresentIllness, + hintText: TranslationBase.of(context).historyOfPresentIllness, controller: illnessController, inputType: TextInputType.multiline, - maxLines: 25, minLines: 7, hasBorder: true, - validationError: illnessControllerError != '' - ? illnessControllerError - : null, - ), - SizedBox( - height: 10, - ), - UpdateMedicationWidget( - medicationController: medicationController, - ), - SizedBox( - height: 10, - ), + validationError: + illnessControllerError != '' ? illnessControllerError : null, + ), + SizedBox( + height: 10, + ), + UpdateMedicationWidget( + medicationController: medicationController, + ), + SizedBox( + height: 10, + ), AppTextFieldCustom( - hintText: TranslationBase - .of(context) - .currentMedications, + hintText: TranslationBase.of(context).currentMedications, controller: medicationController, maxLines: 25, minLines: 7, hasBorder: true, inputType: TextInputType.multiline, - validationError: medicationControllerError != '' ? medicationControllerError : null, - - ), - SizedBox( - height: 10, - ), - ]), + ), + SizedBox( + height: 10, + ), + ]), ); } -} \ No newline at end of file +} diff --git a/lib/screens/patients/profile/soap_update/subjective/history/priority_bar.dart b/lib/screens/patients/profile/soap_update/subjective/history/priority_bar.dart index 57698f56..cadab120 100644 --- a/lib/screens/patients/profile/soap_update/subjective/history/priority_bar.dart +++ b/lib/screens/patients/profile/soap_update/subjective/history/priority_bar.dart @@ -68,15 +68,21 @@ class _PriorityBarState extends State { : item, textAlign: TextAlign.center, style: TextStyle( - fontSize: SizeConfig.getTextMultiplierBasedOnWidth()*3.5, + fontSize: + SizeConfig.getTextMultiplierBasedOnWidth() * + 3.5, color: Colors.black, fontWeight: FontWeight.bold, ), ), ), ), - if(_isActive) - Container(width: 120,height: 4,color: AppGlobal.appRedColor,) + if (_isActive) + Container( + width: 120, + height: 4, + color: AppGlobal.appRedColor, + ) ], ), ), 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 e00a83f5..07b83abb 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 @@ -67,7 +67,8 @@ class _UpdateHistoryWidgetState extends State ? null : TextDecoration.lineThrough, color: Color(0xFF2B353E), - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3.5, + fontSize: + SizeConfig.getTextMultiplierBasedOnWidth() * 3.5, fontWeight: FontWeight.w700, letterSpacing: -0.48, ), 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 c6427511..9fe4cf64 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 @@ -22,11 +22,12 @@ class _UpdateMedicationWidgetState extends State { Widget build(BuildContext context) { return Column( children: [ - - SOAPOpenItems(label: "${TranslationBase.of(context).addMedication}",onTap: () { - openMedicationList(context); - - },), + SOAPOpenItems( + label: "${TranslationBase.of(context).addMedication}", + onTap: () { + openMedicationList(context); + }, + ), SizedBox( height: 20, ) @@ -34,7 +35,6 @@ class _UpdateMedicationWidgetState extends State { ); } - openMedicationList(BuildContext context) { showModalBottomSheet( backgroundColor: Colors.white, @@ -49,6 +49,3 @@ class _UpdateMedicationWidgetState extends State { }); } } - - - diff --git a/lib/screens/patients/profile/soap_update/subjective/subjective_call_back.dart b/lib/screens/patients/profile/soap_update/subjective/subjective_call_back.dart index e8d0e11f..2736ff9f 100644 --- a/lib/screens/patients/profile/soap_update/subjective/subjective_call_back.dart +++ b/lib/screens/patients/profile/soap_update/subjective/subjective_call_back.dart @@ -1,3 +1,3 @@ -abstract class SubjectiveCallBack{ +abstract class SubjectiveCallBack { Function nextFunction(model); -} \ No newline at end of file +} 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 a6740a2c..c2dcf103 100644 --- a/lib/screens/patients/profile/soap_update/update_soap_index.dart +++ b/lib/screens/patients/profile/soap_update/update_soap_index.dart @@ -57,17 +57,16 @@ class _UpdateSoapIndexState extends State }); } - void changeStateFun(){ - setState(() { - - }); + void changeStateFun() { + setState(() {}); } + @override Widget build(BuildContext context) { final routeArgs = ModalRoute.of(context).settings.arguments as Map; PatiantInformtion patient = routeArgs['patient']; return BaseView( - builder: (_,model,w)=>AppScaffold( + builder: (_, model, w) => AppScaffold( isLoading: _isLoading, isShowAppBar: true, appBar: PatientProfileAppBar(patient), @@ -127,35 +126,37 @@ class _UpdateSoapIndexState extends State ], ), ), - bottomSheet:_isLoading?Container(height: 0,): Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.all( - Radius.circular(0.0), - ), - border: Border.all(color: HexColor('#707070'), width: 0), - ), - height: SizeConfig.heightMultiplier * - (SizeConfig.isHeightVeryShort ? 12 : 10), - width: double.infinity, - child: Column( - children: [ - SizedBox( - height: 10, - ), - Container( - child: FractionallySizedBox( - widthFactor: .80, - child: getBottomSheet(model, patient) + bottomSheet: _isLoading + ? Container( + height: 0, + ) + : Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(0.0), + ), + border: Border.all(color: HexColor('#707070'), width: 0), + ), + height: SizeConfig.heightMultiplier * + (SizeConfig.isHeightVeryShort ? 12 : 10), + width: double.infinity, + child: Column( + children: [ + SizedBox( + height: 10, + ), + Container( + child: FractionallySizedBox( + widthFactor: .80, + child: getBottomSheet(model, patient)), + ), + SizedBox( + height: 5, + ), + ], ), ), - SizedBox( - height: 5, - ), - ], - ), - ), - ), ); } @@ -204,7 +205,10 @@ class _UpdateSoapIndexState extends State Expanded( child: AppButton( title: patient.admissionNo != null && - patient.admissionNo.isNotEmpty && !model.isAddExamInProgress?TranslationBase.of(context).finish: TranslationBase.of(context).next, + patient.admissionNo.isNotEmpty && + !model.isAddExamInProgress + ? TranslationBase.of(context).finish + : TranslationBase.of(context).next, fontWeight: FontWeight.w600, color: Colors.red[700], height: SizeConfig.heightMultiplier * @@ -254,7 +258,7 @@ class _UpdateSoapIndexState extends State padding: 10, disabled: model.state == ViewState.BusyLocal, onPressed: () async { - model.nextOnAssessmentPage(model); + model.nextOnAssessmentPage(model); }, ), ), @@ -279,7 +283,7 @@ class _UpdateSoapIndexState extends State fontWeight: FontWeight.w600, disabled: model.state == ViewState.BusyLocal, onPressed: () async { - changePageViewIndex(2); + changePageViewIndex(2); }, ), ), @@ -298,7 +302,7 @@ class _UpdateSoapIndexState extends State color: Colors.red[700], disabled: model.progressNoteText.isEmpty, onPressed: () async { - model.nextOnPlanPage(model); + model.nextOnPlanPage(model); }, ), ), diff --git a/lib/screens/patients/profile/vital_sign/LineChartCurved.dart b/lib/screens/patients/profile/vital_sign/LineChartCurved.dart index 01251dd9..8fa55b37 100644 --- a/lib/screens/patients/profile/vital_sign/LineChartCurved.dart +++ b/lib/screens/patients/profile/vital_sign/LineChartCurved.dart @@ -110,10 +110,12 @@ class LineChartCurved extends StatelessWidget { titlesData: FlTitlesData( bottomTitles: SideTitles( showTitles: true, - getTextStyles: (context, value) { return TextStyle( - color: Colors.black, - fontSize: 10, - );}, + getTextStyles: (context, value) { + return TextStyle( + color: Colors.black, + fontSize: 10, + ); + }, rotateAngle: -65, //rotateAngle:-65, margin: 22, @@ -162,10 +164,12 @@ class LineChartCurved extends StatelessWidget { ), leftTitles: SideTitles( showTitles: true, - getTextStyles: (context, value) { return TextStyle( - color: Colors.black, - fontSize: 10, - );}, + getTextStyles: (context, value) { + return TextStyle( + color: Colors.black, + fontSize: 10, + ); + }, getTitles: (value) { // if (timeSeries.length < 10) { // return '${value.toInt()}'; diff --git a/lib/screens/patients/profile/vital_sign/LineChartCurvedBloodPressure.dart b/lib/screens/patients/profile/vital_sign/LineChartCurvedBloodPressure.dart index 095367ef..0af3c575 100644 --- a/lib/screens/patients/profile/vital_sign/LineChartCurvedBloodPressure.dart +++ b/lib/screens/patients/profile/vital_sign/LineChartCurvedBloodPressure.dart @@ -13,7 +13,11 @@ class LineChartCurvedBloodPressure extends StatelessWidget { final bool isOX; LineChartCurvedBloodPressure( - {this.title, this.timeSeries1, this.indexes, this.timeSeries2, this.isOX= false}); + {this.title, + this.timeSeries1, + this.indexes, + this.timeSeries2, + this.isOX = false}); List xAxixs = List(); List yAxixs = List(); @@ -43,7 +47,6 @@ class LineChartCurvedBloodPressure extends StatelessWidget { title, fontSize: SizeConfig.textMultiplier * 2.1, fontWeight: FontWeight.bold, - fontFamily: 'Poppins', textAlign: TextAlign.center, ), @@ -79,22 +82,30 @@ class LineChartCurvedBloodPressure extends StatelessWidget { shape: BoxShape.rectangle, color: Theme.of(context).primaryColor), ), - SizedBox(width: 5,), - AppText(isOX? "SAO2":TranslationBase.of(context).systolicLng) + SizedBox( + width: 5, + ), + AppText( + isOX ? "SAO2" : TranslationBase.of(context).systolicLng) ], ), - SizedBox(width: 15,), + SizedBox( + width: 15, + ), Row( children: [ Container( width: 20, height: 20, decoration: BoxDecoration( - shape: BoxShape.rectangle, - color: Colors.red), + shape: BoxShape.rectangle, color: Colors.red), + ), + SizedBox( + width: 5, ), - SizedBox(width: 5,), - AppText(isOX? "FIO2":TranslationBase.of(context).diastolicLng,) + AppText( + isOX ? "FIO2" : TranslationBase.of(context).diastolicLng, + ) ], ), ], @@ -128,10 +139,12 @@ class LineChartCurvedBloodPressure extends StatelessWidget { titlesData: FlTitlesData( bottomTitles: SideTitles( showTitles: true, - getTextStyles: (context, value) { return TextStyle( - color: Colors.black, - fontSize: 10, - );}, + getTextStyles: (context, value) { + return TextStyle( + color: Colors.black, + fontSize: 10, + ); + }, rotateAngle: -65, //rotateAngle:-65, margin: 22, @@ -155,10 +168,12 @@ class LineChartCurvedBloodPressure extends StatelessWidget { ), leftTitles: SideTitles( showTitles: true, - getTextStyles: (context, value) { return TextStyle( - color: Colors.black, - fontSize: 10, - );}, + getTextStyles: (context, value) { + return TextStyle( + color: Colors.black, + fontSize: 10, + ); + }, getTitles: (value) { return '${value.toInt()}'; }, @@ -260,10 +275,10 @@ class LineChartCurvedBloodPressure extends StatelessWidget { ); List lineChartData = List(); - if(spots.isNotEmpty){ + if (spots.isNotEmpty) { lineChartData.add(lineChartBarData1); } - if(spots2.isNotEmpty){ + if (spots2.isNotEmpty) { lineChartData.add(lineChartBarData2); } return lineChartData; 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 146a8ddb..af67f3e3 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 @@ -91,8 +91,10 @@ class VitalSignDetailPainScale extends StatelessWidget { Expanded( child: Container( child: AppText( - TranslationBase.of(context).painScale, - fontSize: SizeConfig.textMultiplier * 1.5, + TranslationBase.of(context) + .painScale, + fontSize: + SizeConfig.textMultiplier * 1.5, color: Color(0XFF28353E), fontWeight: FontWeight.w600, ), @@ -105,7 +107,9 @@ class VitalSignDetailPainScale extends StatelessWidget { "${vitalList[index].painScoreDesc ?? "-"}", fontWeight: FontWeight.w700, color: Color(0XFF28353E), - fontSize: SizeConfig.textMultiplier * 1.3, + fontSize: + SizeConfig.textMultiplier * + 1.3, ), ), ), @@ -119,7 +123,8 @@ class VitalSignDetailPainScale extends StatelessWidget { child: Container( child: AppText( "Location", - fontSize: SizeConfig.textMultiplier * 1.5, + fontSize: + SizeConfig.textMultiplier * 1.5, color: Color(0XFF28353E), fontWeight: FontWeight.w600, ), @@ -132,7 +137,9 @@ class VitalSignDetailPainScale extends StatelessWidget { "${vitalList[index].painLocation ?? "-"}", fontWeight: FontWeight.w700, color: Color(0XFF28353E), - fontSize: SizeConfig.textMultiplier * 1.3, + fontSize: + SizeConfig.textMultiplier * + 1.3, ), ), ), @@ -144,8 +151,9 @@ class VitalSignDetailPainScale extends StatelessWidget { Expanded( child: Container( child: AppText( - "Character", - fontSize: SizeConfig.textMultiplier * 1.5, + "Character", + fontSize: + SizeConfig.textMultiplier * 1.5, color: Color(0XFF28353E), fontWeight: FontWeight.w600, ), @@ -158,7 +166,9 @@ class VitalSignDetailPainScale extends StatelessWidget { "${vitalList[index].painCharacter ?? "-"}", fontWeight: FontWeight.w700, color: Color(0XFF28353E), - fontSize: SizeConfig.textMultiplier * 1.3, + fontSize: + SizeConfig.textMultiplier * + 1.3, ), ), ), @@ -171,7 +181,8 @@ class VitalSignDetailPainScale extends StatelessWidget { child: Container( child: AppText( "Duration", - fontSize: SizeConfig.textMultiplier * 1.5, + fontSize: + SizeConfig.textMultiplier * 1.5, color: Color(0XFF28353E), fontWeight: FontWeight.w600, ), @@ -184,7 +195,9 @@ class VitalSignDetailPainScale extends StatelessWidget { "${vitalList[index].painDuration ?? "-"}", fontWeight: FontWeight.w700, color: Color(0XFF28353E), - fontSize: SizeConfig.textMultiplier * 1.3, + fontSize: + SizeConfig.textMultiplier * + 1.3, ), ), ), @@ -196,8 +209,10 @@ class VitalSignDetailPainScale extends StatelessWidget { Expanded( child: Container( child: AppText( - TranslationBase.of(context).painManagement, - fontSize: SizeConfig.textMultiplier * 1.5, + TranslationBase.of(context) + .painManagement, + fontSize: + SizeConfig.textMultiplier * 1.5, color: Color(0XFF28353E), fontWeight: FontWeight.w600, ), @@ -210,7 +225,9 @@ class VitalSignDetailPainScale extends StatelessWidget { "${vitalList[index].isPainManagementDone ?? "-"}", fontWeight: FontWeight.w700, color: Color(0XFF28353E), - fontSize: SizeConfig.textMultiplier * 1.3, + fontSize: + SizeConfig.textMultiplier * + 1.3, ), ), ), @@ -223,7 +240,8 @@ class VitalSignDetailPainScale extends StatelessWidget { child: Container( child: AppText( "Frequency", - fontSize: SizeConfig.textMultiplier * 1.5, + fontSize: + SizeConfig.textMultiplier * 1.5, color: Color(0XFF28353E), fontWeight: FontWeight.w600, ), @@ -236,7 +254,9 @@ class VitalSignDetailPainScale extends StatelessWidget { "${vitalList[index].painFrequency ?? "-"}", fontWeight: FontWeight.w700, color: Color(0XFF28353E), - fontSize: SizeConfig.textMultiplier * 1.3, + fontSize: + SizeConfig.textMultiplier * + 1.3, ), ), ), 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 69f45d6e..ab10a76e 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 @@ -50,7 +50,6 @@ class _VitalSignDetailsWidgetState extends State { TranslationBase.of(context).date, fontSize: SizeConfig.textMultiplier * 1.5, fontWeight: FontWeight.bold, - fontFamily: 'Poppins', ), // height: 60, @@ -65,7 +64,6 @@ class _VitalSignDetailsWidgetState extends State { widget.title2, fontSize: SizeConfig.textMultiplier * 1.5, fontWeight: FontWeight.bold, - fontFamily: 'Poppins', ), // height: 60 @@ -80,7 +78,6 @@ class _VitalSignDetailsWidgetState extends State { widget.title3, fontSize: SizeConfig.textMultiplier * 1.5, fontWeight: FontWeight.bold, - fontFamily: 'Poppins', ), // height: 60 @@ -96,7 +93,8 @@ class _VitalSignDetailsWidgetState extends State { ), Table( border: TableBorder( - horizontalInside: BorderSide(width: 1.0, color: Colors.grey[300]), + horizontalInside: + BorderSide(width: 1.0, color: Colors.grey[300]), ), children: fullData(projectViewModel), ), 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 09694ad6..33c796b0 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 @@ -20,7 +20,8 @@ class VitalSignDetailsScreen extends StatelessWidget { int projectID; bool isNotOneAppointment; - VitalSignDetailsScreen({this.appointmentNo, this.projectID, this.isNotOneAppointment = true}); + VitalSignDetailsScreen( + {this.appointmentNo, this.projectID, this.isNotOneAppointment = true}); @override Widget build(BuildContext context) { @@ -35,7 +36,8 @@ class VitalSignDetailsScreen extends StatelessWidget { String assetBasePath = "${imageBasePath}patient/vital_signs/"; return BaseView( - onModelReady: (model) => model.getPatientVitalSignHistory(patient, from, to, isInpatient), + onModelReady: (model) => + model.getPatientVitalSignHistory(patient, from, to, isInpatient), builder: (_, mode, widget) => AppScaffold( baseViewModel: mode, isShowAppBar: true, @@ -74,7 +76,8 @@ class VitalSignDetailsScreen extends StatelessWidget { height: MediaQuery.of(context).size.height * 0.23, width: double.infinity, padding: EdgeInsets.all(12.0), - margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0), + margin: EdgeInsets.symmetric( + horizontal: 16.0, vertical: 8.0), decoration: BoxDecoration( shape: BoxShape.rectangle, color: Colors.white, @@ -98,13 +101,17 @@ class VitalSignDetailsScreen extends StatelessWidget { children: [ Expanded( child: Column( - crossAxisAlignment: CrossAxisAlignment.center, + crossAxisAlignment: + CrossAxisAlignment.center, children: [ Image.asset( mode.getBMIStatus() != 1 ? '${assetBasePath}underweight_BMI.png' : '${assetBasePath}underweight_BMI-r.png', - height: MediaQuery.of(context).size.height * 0.10, + height: MediaQuery.of(context) + .size + .height * + 0.10, ), const SizedBox( height: 4, @@ -112,28 +119,38 @@ class VitalSignDetailsScreen extends StatelessWidget { AppText( "${TranslationBase.of(context).bmiUnderWeight}", fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.15, - color: mode.getBMIStatus() == 1 ? Color(0XFFD02127) : null, + fontSize: + SizeConfig.textMultiplier * 1.15, + color: mode.getBMIStatus() == 1 + ? Color(0XFFD02127) + : null, fontWeight: FontWeight.w700, ), AppText( "(<18.5)", fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.15, - color: mode.getBMIStatus() == 1 ? Color(0XFFD02127) : null, + fontSize: + SizeConfig.textMultiplier * 1.15, + color: mode.getBMIStatus() == 1 + ? Color(0XFFD02127) + : null, fontWeight: FontWeight.w700, ), ], )), Expanded( child: Column( - crossAxisAlignment: CrossAxisAlignment.center, + crossAxisAlignment: + CrossAxisAlignment.center, children: [ Image.asset( mode.getBMIStatus() != 2 ? '${assetBasePath}health_BMI.png' : '${assetBasePath}health_BMI-r.png', - height: MediaQuery.of(context).size.height * 0.10, + height: MediaQuery.of(context) + .size + .height * + 0.10, ), const SizedBox( height: 4, @@ -142,29 +159,40 @@ class VitalSignDetailsScreen extends StatelessWidget { child: AppText( "${TranslationBase.of(context).normal}", fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.15, + fontSize: + SizeConfig.textMultiplier * + 1.15, fontWeight: FontWeight.w700, - color: mode.getBMIStatus() == 2 ? Color(0XFFD02127) : null, + color: mode.getBMIStatus() == 2 + ? Color(0XFFD02127) + : null, ), ), AppText( "(18.5-24.9)", fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.15, + fontSize: + SizeConfig.textMultiplier * 1.15, fontWeight: FontWeight.w700, - color: mode.getBMIStatus() == 2 ? Color(0XFFD02127) : null, + color: mode.getBMIStatus() == 2 + ? Color(0XFFD02127) + : null, ), ], )), Expanded( child: Column( - crossAxisAlignment: CrossAxisAlignment.center, + crossAxisAlignment: + CrossAxisAlignment.center, children: [ Image.asset( mode.getBMIStatus() != 3 ? '${assetBasePath}ovrweight_BMI.png' : '${assetBasePath}ovrweight_BMI-r.png', - height: MediaQuery.of(context).size.height * 0.10, + height: MediaQuery.of(context) + .size + .height * + 0.10, ), const SizedBox( height: 4, @@ -172,28 +200,38 @@ class VitalSignDetailsScreen extends StatelessWidget { AppText( "${TranslationBase.of(context).bmiOverWeight}", fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.155, + fontSize: + SizeConfig.textMultiplier * 1.155, fontWeight: FontWeight.w700, - color: mode.getBMIStatus() == 3 ? Color(0XFFD02127) : null, + color: mode.getBMIStatus() == 3 + ? Color(0XFFD02127) + : null, ), AppText( "(25-29.9)", fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.155, + fontSize: + SizeConfig.textMultiplier * 1.155, fontWeight: FontWeight.w700, - color: mode.getBMIStatus() == 3 ? Color(0XFFD02127) : null, + color: mode.getBMIStatus() == 3 + ? Color(0XFFD02127) + : null, ), ], )), Expanded( child: Column( - crossAxisAlignment: CrossAxisAlignment.center, + crossAxisAlignment: + CrossAxisAlignment.center, children: [ Image.asset( mode.getBMIStatus() != 4 ? '${assetBasePath}Obese_BMI.png' : '${assetBasePath}Obese_BMI-r.png', - height: MediaQuery.of(context).size.height * 0.10, + height: MediaQuery.of(context) + .size + .height * + 0.10, ), const SizedBox( height: 4, @@ -201,28 +239,38 @@ class VitalSignDetailsScreen extends StatelessWidget { AppText( "${TranslationBase.of(context).bmiObese}", fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.15, + fontSize: + SizeConfig.textMultiplier * 1.15, fontWeight: FontWeight.w700, - color: mode.getBMIStatus() == 4 ? Color(0XFFD02127) : null, + color: mode.getBMIStatus() == 4 + ? Color(0XFFD02127) + : null, ), AppText( "(30-34.9)", fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.15, + fontSize: + SizeConfig.textMultiplier * 1.15, fontWeight: FontWeight.w700, - color: mode.getBMIStatus() == 4 ? Color(0XFFD02127) : null, + color: mode.getBMIStatus() == 4 + ? Color(0XFFD02127) + : null, ), ], )), Expanded( child: Column( - crossAxisAlignment: CrossAxisAlignment.center, + crossAxisAlignment: + CrossAxisAlignment.center, children: [ Image.asset( mode.getBMIStatus() != 5 ? '${assetBasePath}Obese_BMI.png' : '${assetBasePath}Obese_BMI-r.png', - height: MediaQuery.of(context).size.height * 0.10, + height: MediaQuery.of(context) + .size + .height * + 0.10, ), const SizedBox( height: 4, @@ -232,17 +280,24 @@ class VitalSignDetailsScreen extends StatelessWidget { child: AppText( "${TranslationBase.of(context).bmiObeseExtreme}", fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.15, + fontSize: + SizeConfig.textMultiplier * + 1.15, fontWeight: FontWeight.w700, - color: mode.getBMIStatus() == 5 ? Color(0XFFD02127) : null, + color: mode.getBMIStatus() == 5 + ? Color(0XFFD02127) + : null, ), ), AppText( "(35<)", fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.15, + fontSize: + SizeConfig.textMultiplier * 1.15, fontWeight: FontWeight.w700, - color: mode.getBMIStatus() == 5 ? Color(0XFFD02127) : null, + color: mode.getBMIStatus() == 5 + ? Color(0XFFD02127) + : null, ), ], )), @@ -254,7 +309,8 @@ class VitalSignDetailsScreen extends StatelessWidget { Expanded( child: SingleChildScrollView( child: Container( - margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 16), + margin: EdgeInsets.symmetric( + horizontal: 16.0, vertical: 16), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -270,10 +326,16 @@ class VitalSignDetailsScreen extends StatelessWidget { ? Navigator.push( context, FadePage( - page: VitalSignItemDetailsScreen( - pageKey: vitalSignDetails.Height, - pageTitle: TranslationBase.of(context).height, - vitalList: mode.patientVitalSignsHistory, + page: + VitalSignItemDetailsScreen( + pageKey: vitalSignDetails + .Height, + pageTitle: + TranslationBase.of( + context) + .height, + vitalList: mode + .patientVitalSignsHistory, patient: patient, patientType: patientType, arrivalType: arrivalType, @@ -283,28 +345,40 @@ class VitalSignDetailsScreen extends StatelessWidget { : null, child: Container( child: VitalSignItem( - des: TranslationBase.of(context).height, - imagePath: "${assetBasePath}height.png", + des: TranslationBase.of(context) + .height, + imagePath: + "${assetBasePath}height.png", lastVal: mode.heightCm, - unit: TranslationBase.of(context).cm, + unit: TranslationBase.of(context) + .cm, ), ), ), if (isNotOneAppointment) InkWell( onTap: () async { - await locator().logEvent( - eventCategory: "Vital Sign Details Screen", - eventAction: "Vital Sign Details", + await locator() + .logEvent( + eventCategory: + "Vital Sign Details Screen", + eventAction: + "Vital Sign Details", ); Navigator.push( context, FadePage( - page: VitalSignItemDetailsScreen( - pageKey: vitalSignDetails.Weight, - pageTitle: TranslationBase.of(context).weight, - vitalList: mode.patientVitalSignsHistory, + page: + VitalSignItemDetailsScreen( + pageKey: + vitalSignDetails.Weight, + pageTitle: + TranslationBase.of( + context) + .weight, + vitalList: mode + .patientVitalSignsHistory, patient: patient, patientType: patientType, arrivalType: arrivalType, @@ -313,9 +387,12 @@ class VitalSignDetailsScreen extends StatelessWidget { ); }, child: VitalSignItem( - des: TranslationBase.of(context).weight, - imagePath: "${assetBasePath}weight.png", - unit: TranslationBase.of(context).kg, + des: TranslationBase.of(context) + .weight, + imagePath: + "${assetBasePath}weight.png", + unit: TranslationBase.of(context) + .kg, lastVal: mode.weightKg, ), ), @@ -324,10 +401,16 @@ class VitalSignDetailsScreen extends StatelessWidget { ? Navigator.push( context, FadePage( - page: VitalSignItemDetailsScreen( - pageKey: vitalSignDetails.Temperature, - pageTitle: TranslationBase.of(context).temperature, - vitalList: mode.patientVitalSignsHistory, + page: + VitalSignItemDetailsScreen( + pageKey: vitalSignDetails + .Temperature, + pageTitle: + TranslationBase.of( + context) + .temperature, + vitalList: mode + .patientVitalSignsHistory, patient: patient, patientType: patientType, arrivalType: arrivalType, @@ -337,10 +420,13 @@ class VitalSignDetailsScreen extends StatelessWidget { : null, child: Container( child: VitalSignItem( - des: TranslationBase.of(context).temperature, - imagePath: "${assetBasePath}temperature.png", + des: TranslationBase.of(context) + .temperature, + imagePath: + "${assetBasePath}temperature.png", lastVal: mode.temperatureCelcius, - unit: TranslationBase.of(context).tempC, + unit: TranslationBase.of(context) + .tempC, ), ), ), @@ -349,10 +435,16 @@ class VitalSignDetailsScreen extends StatelessWidget { ? Navigator.push( context, FadePage( - page: VitalSignItemDetailsScreen( - pageKey: vitalSignDetails.heart, - pageTitle: TranslationBase.of(context).heart, - vitalList: mode.patientVitalSignsHistory, + page: + VitalSignItemDetailsScreen( + pageKey: vitalSignDetails + .heart, + pageTitle: + TranslationBase.of( + context) + .heart, + vitalList: mode + .patientVitalSignsHistory, patient: patient, patientType: patientType, arrivalType: arrivalType, @@ -361,10 +453,13 @@ class VitalSignDetailsScreen extends StatelessWidget { ) : null, child: VitalSignItem( - des: TranslationBase.of(context).heart, - imagePath: "${assetBasePath}heart_rate.png", + des: TranslationBase.of(context) + .heart, + imagePath: + "${assetBasePath}heart_rate.png", lastVal: mode.hartRat, - unit: TranslationBase.of(context).bpm, + unit: + TranslationBase.of(context).bpm, ), ), InkWell( @@ -372,10 +467,16 @@ class VitalSignDetailsScreen extends StatelessWidget { ? Navigator.push( context, FadePage( - page: VitalSignItemDetailsScreen( - pageKey: vitalSignDetails.Respiration, - pageTitle: TranslationBase.of(context).respirationRate, - vitalList: mode.patientVitalSignsHistory, + page: + VitalSignItemDetailsScreen( + pageKey: vitalSignDetails + .Respiration, + pageTitle: + TranslationBase.of( + context) + .respirationRate, + vitalList: mode + .patientVitalSignsHistory, patient: patient, patientType: patientType, arrivalType: arrivalType, @@ -384,10 +485,14 @@ class VitalSignDetailsScreen extends StatelessWidget { ) : null, child: VitalSignItem( - des: TranslationBase.of(context).respirationRate, - imagePath: "${assetBasePath}respiration_rate.png", - lastVal: mode.respirationBeatPerMinute, - unit: TranslationBase.of(context).respirationSigns, + des: TranslationBase.of(context) + .respirationRate, + imagePath: + "${assetBasePath}respiration_rate.png", + lastVal: + mode.respirationBeatPerMinute, + unit: TranslationBase.of(context) + .respirationSigns, ), ), InkWell( @@ -395,10 +500,16 @@ class VitalSignDetailsScreen extends StatelessWidget { ? Navigator.push( context, FadePage( - page: VitalSignItemDetailsScreen( - pageKey: vitalSignDetails.BloodPressure, - pageTitle: TranslationBase.of(context).bloodPressure, - vitalList: mode.patientVitalSignsHistory, + page: + VitalSignItemDetailsScreen( + pageKey: vitalSignDetails + .BloodPressure, + pageTitle: + TranslationBase.of( + context) + .bloodPressure, + vitalList: mode + .patientVitalSignsHistory, patient: patient, patientType: patientType, arrivalType: arrivalType, @@ -407,10 +518,13 @@ class VitalSignDetailsScreen extends StatelessWidget { ) : null, child: VitalSignItem( - des: TranslationBase.of(context).bloodPressure, - imagePath: "${assetBasePath}blood_pressure.png", + des: TranslationBase.of(context) + .bloodPressure, + imagePath: + "${assetBasePath}blood_pressure.png", lastVal: mode.bloodPressure, - unit: TranslationBase.of(context).sysDias, + unit: TranslationBase.of(context) + .sysDias, ), ), InkWell( @@ -418,10 +532,16 @@ class VitalSignDetailsScreen extends StatelessWidget { ? Navigator.push( context, FadePage( - page: VitalSignItemDetailsScreen( - pageKey: vitalSignDetails.Oxygenation, - pageTitle: TranslationBase.of(context).oxygenation, - vitalList: mode.patientVitalSignsHistory, + page: + VitalSignItemDetailsScreen( + pageKey: vitalSignDetails + .Oxygenation, + pageTitle: + TranslationBase.of( + context) + .oxygenation, + vitalList: mode + .patientVitalSignsHistory, patient: patient, patientType: patientType, arrivalType: arrivalType, @@ -430,8 +550,10 @@ class VitalSignDetailsScreen extends StatelessWidget { ) : null, child: VitalSignItem( - des: TranslationBase.of(context).oxygenation, - imagePath: "${assetBasePath}oxg.png", + des: TranslationBase.of(context) + .oxygenation, + imagePath: + "${assetBasePath}oxg.png", lastVal: "${mode.oxygenation}%", unit: "", ), @@ -441,10 +563,16 @@ class VitalSignDetailsScreen extends StatelessWidget { ? Navigator.push( context, FadePage( - page: VitalSignItemDetailsScreen( - pageKey: vitalSignDetails.PainScale, - pageTitle: TranslationBase.of(context).painScale, - vitalList: mode.patientVitalSignsHistory, + page: + VitalSignItemDetailsScreen( + pageKey: vitalSignDetails + .PainScale, + pageTitle: + TranslationBase.of( + context) + .painScale, + vitalList: mode + .patientVitalSignsHistory, patient: patient, patientType: patientType, arrivalType: arrivalType, @@ -453,10 +581,13 @@ class VitalSignDetailsScreen extends StatelessWidget { ) : null, child: VitalSignItem( - des: TranslationBase.of(context).painScale, - imagePath: "${assetBasePath}painScale.png", + des: TranslationBase.of(context) + .painScale, + imagePath: + "${assetBasePath}painScale.png", lastVal: mode.painScore, - unit: TranslationBase.of(context).severe, + unit: TranslationBase.of(context) + .severe, ), ), ], 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 cec53580..085a11ba 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 @@ -55,7 +55,6 @@ class _VitalSignDetailsWidgetState extends State { TranslationBase.of(context).date, fontSize: SizeConfig.textMultiplier * 1.6, fontWeight: FontWeight.bold, - fontFamily: 'Poppins', ), // height: 60, @@ -77,7 +76,6 @@ class _VitalSignDetailsWidgetState extends State { widget.title2, fontSize: SizeConfig.textMultiplier * 1.6, fontWeight: FontWeight.bold, - fontFamily: 'Poppins', ), // height: 60 @@ -93,7 +91,8 @@ class _VitalSignDetailsWidgetState extends State { ), Table( border: TableBorder( - horizontalInside: BorderSide(width: 1.0, color: Colors.grey[300]), + horizontalInside: + BorderSide(width: 1.0, color: Colors.grey[300]), ), children: fullData(projectViewModel), ), 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 0ed9da56..26f418e8 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 @@ -191,7 +191,8 @@ class VitalSignItemDetailsScreen extends StatelessWidget { backgroundColor: Color.fromRGBO(248, 248, 248, 1), isShowAppBar: true, appBar: PatientProfileAppBar( - patient,), + patient, + ), body: SingleChildScrollView( child: Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -202,7 +203,7 @@ class VitalSignItemDetailsScreen extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( - "${patient.firstName ?? patient?.patientDetails?.firstName?? patient.fullName?? ''}'s", + "${patient.firstName ?? patient?.patientDetails?.firstName ?? patient.fullName ?? ''}'s", fontFamily: 'Poppins', fontSize: SizeConfig.textMultiplier * 1.6, fontWeight: FontWeight.w600, @@ -230,7 +231,8 @@ class VitalSignItemDetailsScreen extends StatelessWidget { } if (vitalListTemp.length != 0 && - chartInfo['viewKey'] == 'BloodPressure' || chartInfo['viewKey'] == 'O2') { + chartInfo['viewKey'] == 'BloodPressure' || + chartInfo['viewKey'] == 'O2') { return VitalSingChartBloodPressure( vitalList: vitalList, name: projectViewModel.isArabic @@ -243,8 +245,12 @@ class VitalSignItemDetailsScreen extends StatelessWidget { title3: projectViewModel.isArabic ? chartInfo['title3Ar'] : chartInfo['title3'], - viewKey1: chartInfo['viewKey'] == 'BloodPressure' ? 'BloodPressureHigher' : 'SAO2', - viewKey2: chartInfo['viewKey'] == 'BloodPressure' ? 'BloodPressureLower' : 'FIO2', + viewKey1: chartInfo['viewKey'] == 'BloodPressure' + ? 'BloodPressureHigher' + : 'SAO2', + viewKey2: chartInfo['viewKey'] == 'BloodPressure' + ? 'BloodPressureLower' + : 'FIO2', ); } 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 ef8049ce..4c0d07af 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 @@ -31,50 +31,49 @@ class VitalSingChartAndDetials extends StatelessWidget { generateData(); return timeSeriesData.length != 0 ? Padding( - padding: const EdgeInsets.all(10.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - margin: EdgeInsets.symmetric(horizontal: 8), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(12) + padding: const EdgeInsets.all(10.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.symmetric(horizontal: 8), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(12)), + child: LineChartCurved( + title: name, + timeSeries: timeSeriesData, + indexes: timeSeriesData.length ~/ 5.5, + ), ), - child: LineChartCurved( - title: name, - timeSeries: timeSeriesData, - indexes: timeSeriesData.length ~/ 5.5, + Container( + margin: EdgeInsets.symmetric(horizontal: 8, vertical: 16), + padding: EdgeInsets.only(top: 16, right: 18.0, left: 16.0), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(12)), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).graphDetails, + fontSize: SizeConfig.textMultiplier * 2.1, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + ), + SizedBox( + height: 8, + ), + VitalSignDetailsWidget( + vitalList: vitalList, + title1: title1, + title2: title2, + viewKey: viewKey, + ), + ], + ), ), - ), - Container( - margin: EdgeInsets.symmetric(horizontal: 8, vertical: 16), - padding: EdgeInsets.only(top: 16, right: 18.0, left: 16.0), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(12) - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).graphDetails, - fontSize: SizeConfig.textMultiplier * 2.1, - fontWeight: FontWeight.bold, - - fontFamily: 'Poppins', - ), - SizedBox(height: 8,), - VitalSignDetailsWidget( - vitalList: vitalList, - title1: title1, - title2: title2, - viewKey: viewKey, - ), - ], - ), - ), - /*AppExpandableNotifier( + /*AppExpandableNotifier( // isExpand: true, headerWid: LineChartCurved(title: name,timeSeries:timeSeriesData,indexes: timeSeriesData.length~/5.5,), bodyWid: VitalSignDetailsWidget( @@ -84,9 +83,9 @@ class VitalSingChartAndDetials extends StatelessWidget { viewKey: viewKey, ), ),*/ - ], - ), - ) + ], + ), + ) : Container( width: double.infinity, height: MediaQuery.of(context).size.height, @@ -101,7 +100,7 @@ class VitalSingChartAndDetials extends StatelessWidget { vitalList.reversed.toList().forEach( (element) { DateTime elementDate = - AppDateUtils.getDateTimeFromServerFormat(element.createdOn); + AppDateUtils.getDateTimeFromServerFormat(element.createdOn); if (element.toJson()[viewKey] != null && element.toJson()[viewKey]?.toInt() != 0) timeSeriesData.add( 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 0910c1c1..92483ff4 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 @@ -47,7 +47,7 @@ class VitalSingChartBloodPressure extends StatelessWidget { borderRadius: BorderRadius.circular(12)), child: LineChartCurvedBloodPressure( title: name, - isOX: title2=="SAO2", + isOX: title2 == "SAO2", timeSeries1: timeSeriesData1, timeSeries2: timeSeriesData2, indexes: timeSeriesData1.length ~/ 5.5, @@ -116,8 +116,9 @@ class VitalSingChartBloodPressure extends StatelessWidget { vitalList.reversed.toList().forEach( (element) { DateTime elementDate = - AppDateUtils.getDateTimeFromServerFormat(element.createdOn); - if (element.toJson()[viewKey1]?.toInt() != 0 && element.toJson()[viewKey1]?.toInt() != null) + AppDateUtils.getDateTimeFromServerFormat(element.createdOn); + if (element.toJson()[viewKey1]?.toInt() != 0 && + element.toJson()[viewKey1]?.toInt() != null) timeSeriesData1.add( TimeSeriesSales2( new DateTime( @@ -125,7 +126,8 @@ class VitalSingChartBloodPressure extends StatelessWidget { element.toJson()[viewKey1]?.toDouble(), ), ); - if (element.toJson()[viewKey2]?.toInt() != 0 && element.toJson()[viewKey2]?.toInt() != null) + if (element.toJson()[viewKey2]?.toInt() != 0 && + element.toJson()[viewKey2]?.toInt() != null) timeSeriesData2.add( TimeSeriesSales2( new DateTime( diff --git a/lib/screens/patients/register_patient/CustomEditableText.dart b/lib/screens/patients/register_patient/CustomEditableText.dart index 17405829..5a289bb8 100644 --- a/lib/screens/patients/register_patient/CustomEditableText.dart +++ b/lib/screens/patients/register_patient/CustomEditableText.dart @@ -9,7 +9,8 @@ class CustomEditableText extends StatefulWidget { Key key, @required this.controller, this.hint, - this.isEditable = false, this.isSubmitted, + this.isEditable = false, + this.isSubmitted, }) : super(key: key); final TextEditingController controller; @@ -27,7 +28,7 @@ class _CustomEditableTextState extends State { Widget build(BuildContext context) { return Column( children: [ - if(!widget.isEditable) + if (!widget.isEditable) Container( height: 60, decoration: BoxDecoration( @@ -62,7 +63,6 @@ class _CustomEditableTextState extends State { child: Icon( DoctorApp.edit_1, size: 20, - ), onTap: () { setState(() { @@ -74,17 +74,15 @@ class _CustomEditableTextState extends State { ), ), ), - if(widget.isEditable) + if (widget.isEditable) AppTextFieldCustom( hintText: widget.hint, //TranslationBase.of(context).addoperationReports, controller: widget.controller, - validationError: widget.controller - .text.isEmpty && - widget.isSubmitted - ? TranslationBase.of(context) - .emptyMessage - : null, + validationError: + widget.controller.text.isEmpty && widget.isSubmitted + ? TranslationBase.of(context).emptyMessage + : null, maxLines: 1, minLines: 1, hasBorder: true, @@ -92,4 +90,4 @@ class _CustomEditableTextState extends State { ], ); } -} \ No newline at end of file +} diff --git a/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart b/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart index a6308b21..f3d1ba6b 100644 --- a/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart +++ b/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart @@ -351,7 +351,6 @@ class _RegisterConfirmationPatientPageState borderColor: Color(0xFFeaeaea), color: Color(0xFFeaeaea), fontColor: Colors.black, - onPressed: () { Navigator.of(context).pop(); }, @@ -371,7 +370,6 @@ class _RegisterConfirmationPatientPageState borderColor: Color(0xFFB8382B), color: HexColor("#D02127"), fontColor: Colors.white, - onPressed: () async { setState(() { isSubmitted = true; diff --git a/lib/screens/patients/register_patient/RegisterPatientPage.dart b/lib/screens/patients/register_patient/RegisterPatientPage.dart index 1dd06f8a..59747e37 100644 --- a/lib/screens/patients/register_patient/RegisterPatientPage.dart +++ b/lib/screens/patients/register_patient/RegisterPatientPage.dart @@ -142,7 +142,6 @@ class _RegisterPatientPageState extends State borderColor: Color(0xFFeaeaea), color: Color(0xFFeaeaea), fontColor: Colors.black, - onPressed: () { Navigator.of(context).pop(); }, @@ -162,7 +161,6 @@ class _RegisterPatientPageState extends State borderColor: Color(0xFF359846), color: Color(0xFF359846), fontColor: Colors.white, - onPressed: () {}, ), ), @@ -185,7 +183,6 @@ class _RegisterPatientPageState extends State borderColor: Color(0xFFeaeaea), color: Color(0xFFeaeaea), fontColor: Colors.black, - onPressed: () { Navigator.of(context).pop(); }, @@ -205,7 +202,6 @@ class _RegisterPatientPageState extends State borderColor: Color(0xFFB8382B), color: AppGlobal.appRedColor, fontColor: Colors.white, - onPressed: () { changePageViewIndex(_currentIndex + 1); }, diff --git a/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart b/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart index e109ee93..7a2866b5 100644 --- a/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart +++ b/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart @@ -284,8 +284,10 @@ class _RegisterSearchPatientPageState extends State { } else { _birthDateInGregorian = selectedDate; birthDateInHijri = HijriCalendar() - .gregorianToHijri(selectedDate.year, - selectedDate.month, selectedDate.day) as HijriCalendar; + .gregorianToHijri( + selectedDate.year, + selectedDate.month, + selectedDate.day) as HijriCalendar; print(_birthDateInGregorian); print(birthDateInHijri); @@ -319,7 +321,6 @@ class _RegisterSearchPatientPageState extends State { borderColor: Color(0xFFeaeaea), color: Color(0xFFeaeaea), fontColor: Colors.black, - onPressed: () { Navigator.of(context).pop(); }, @@ -339,7 +340,6 @@ class _RegisterSearchPatientPageState extends State { borderColor: Color(0xFFB8382B), color: AppGlobal.appRedColor, fontColor: Colors.white, - onPressed: () async { setState(() { isSubmitted = true; diff --git a/lib/screens/patients/register_patient/VerifyMethodPage.dart b/lib/screens/patients/register_patient/VerifyMethodPage.dart index c2effd82..bfc8b035 100644 --- a/lib/screens/patients/register_patient/VerifyMethodPage.dart +++ b/lib/screens/patients/register_patient/VerifyMethodPage.dart @@ -437,7 +437,6 @@ class _ActivationPageState extends State { borderColor: Color(0xFFeaeaea), color: Color(0xFFeaeaea), fontColor: Colors.black, - onPressed: () { Navigator.of(context).pop(); }, @@ -457,7 +456,6 @@ class _ActivationPageState extends State { borderColor: Color(0xFFB8382B), color: HexColor("#D02127"), fontColor: Colors.white, - onPressed: () async { GifLoaderDialogUtils.showMyDialog(context); await widget.model.checkActivationCode( diff --git a/lib/screens/prescription/drugtodrug.dart b/lib/screens/prescription/drugtodrug.dart index 15abfeb6..78f5afae 100644 --- a/lib/screens/prescription/drugtodrug.dart +++ b/lib/screens/prescription/drugtodrug.dart @@ -18,7 +18,9 @@ class DrugToDrug extends StatefulWidget { final PatiantInformtion patient; final prescription; final List listAssessment; + DrugToDrug(this.patient, this.prescription, this.listAssessment); + @override _DrugToDrug createState() => _DrugToDrug(); } @@ -34,9 +36,12 @@ class _DrugToDrug extends State { {'name': 'INFO', 'level': 'INFO'}, ]; GeneralGetReqForSOAP generalGetReqForSOAP = GeneralGetReqForSOAP( - patientMRN: 2954208, //widget.patient.patientMRN, - episodeId: 210011002, //widget.patient.episodeNo, - appointmentNo: 2016055308, //widget.patient.appointmentNo, + patientMRN: 2954208, + //widget.patient.patientMRN, + episodeId: 210011002, + //widget.patient.episodeNo, + appointmentNo: 2016055308, + //widget.patient.appointmentNo, doctorID: '', editedBy: ''); diff --git a/lib/screens/prescription/prescription_authorazation_form.dart b/lib/screens/prescription/prescription_authorazation_form.dart index e69de29b..8b137891 100644 --- a/lib/screens/prescription/prescription_authorazation_form.dart +++ b/lib/screens/prescription/prescription_authorazation_form.dart @@ -0,0 +1 @@ + diff --git a/lib/screens/prescription/prescription_checkout_screen.dart b/lib/screens/prescription/prescription_checkout_screen.dart index cac2f99a..608dd643 100644 --- a/lib/screens/prescription/prescription_checkout_screen.dart +++ b/lib/screens/prescription/prescription_checkout_screen.dart @@ -37,14 +37,21 @@ class PrescriptionCheckOutScreen extends StatefulWidget { final List prescriptionList; final ProcedureTempleteDetailsModel groupProcedures; - const PrescriptionCheckOutScreen({Key key, this.model, this.patient, this.prescriptionList, this.groupProcedures}) + const PrescriptionCheckOutScreen( + {Key key, + this.model, + this.patient, + this.prescriptionList, + this.groupProcedures}) : super(key: key); @override - _PrescriptionCheckOutScreenState createState() => _PrescriptionCheckOutScreenState(); + _PrescriptionCheckOutScreenState createState() => + _PrescriptionCheckOutScreenState(); } -class _PrescriptionCheckOutScreenState extends State { +class _PrescriptionCheckOutScreenState + extends State { postPrescription( {String duration, String doseTimeIn, @@ -61,7 +68,8 @@ class _PrescriptionCheckOutScreenState extends State String icdCode, PatiantInformtion patient, String patientType}) async { - PostPrescriptionReqModel postProcedureReqModel = new PostPrescriptionReqModel(); + PostPrescriptionReqModel postProcedureReqModel = + new PostPrescriptionReqModel(); List prescriptionList = List(); postProcedureReqModel.appointmentNo = patient.appointmentNo; @@ -113,7 +121,8 @@ class _PrescriptionCheckOutScreenState extends State DateTime selectedDate; int strengthChar; GetMedicationResponseModel _selectedMedication; - GlobalKey key = new GlobalKey>(); + GlobalKey key = + new GlobalKey>(); TextEditingController drugIdController = TextEditingController(); TextEditingController doseController = TextEditingController(); @@ -151,7 +160,8 @@ class _PrescriptionCheckOutScreenState extends State 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); + bool available = await speech.initialize( + onStatus: statusListener, onError: errorListener); if (available) { speech.listen( onResult: resultListener, @@ -194,7 +204,8 @@ class _PrescriptionCheckOutScreenState extends State } Future initSpeechState() async { - bool hasSpeech = await speech.initialize(onError: errorListener, onStatus: statusListener); + bool hasSpeech = await speech.initialize( + onError: errorListener, onStatus: statusListener); print(hasSpeech); if (!mounted) return; } @@ -210,7 +221,9 @@ class _PrescriptionCheckOutScreenState extends State final screenSize = MediaQuery.of(context).size; return BaseView( onModelReady: (model) async { - model.getItem(itemID: int.parse(widget.groupProcedures.aliasN.replaceAll("item code ;", ""))); + model.getItem( + itemID: int.parse( + widget.groupProcedures.aliasN.replaceAll("item code ;", ""))); x = model.patientAssessmentList.map((element) { return element.icdCode10ID; @@ -251,7 +264,8 @@ class _PrescriptionCheckOutScreenState extends State height: MediaQuery.of(context).size.height * 1.35, color: Color(0xffF8F8F8), child: Padding( - padding: EdgeInsets.symmetric(horizontal: 12.0, vertical: 10.0), + padding: + EdgeInsets.symmetric(horizontal: 12.0, vertical: 10.0), child: Column( children: [ Column( @@ -275,7 +289,8 @@ class _PrescriptionCheckOutScreenState extends State width: 7.0, ), AppText( - TranslationBase.of(context).newPrescriptionOrder, + TranslationBase.of(context) + .newPrescriptionOrder, fontWeight: FontWeight.w700, fontSize: 20, ), @@ -309,14 +324,16 @@ class _PrescriptionCheckOutScreenState extends State child: Column( children: [ AppText( - widget.groupProcedures.procedureName ?? "", + widget.groupProcedures.procedureName ?? + "", bold: true, ), Container( child: Row( children: [ AppText( - TranslationBase.of(context).orderType, + TranslationBase.of(context) + .orderType, fontWeight: FontWeight.w600, ), Radio( @@ -327,7 +344,8 @@ class _PrescriptionCheckOutScreenState extends State setSelectedType(value); }, ), - Text(TranslationBase.of(context).regular), + Text(TranslationBase.of(context) + .regular), ], ), ), @@ -337,7 +355,10 @@ class _PrescriptionCheckOutScreenState extends State child: Row( children: [ Container( - width: MediaQuery.of(context).size.width * 0.35, + width: MediaQuery.of(context) + .size + .width * + 0.35, child: AppTextFieldCustom( height: 40, validationError: strengthError, @@ -350,12 +371,16 @@ class _PrescriptionCheckOutScreenState extends State strengthChar = value.length; }); if (strengthChar >= 5) { - DrAppToastMsg.showErrorToast( - TranslationBase.of(context).only5DigitsAllowedForStrength, + DrAppToastMsg + .showErrorToast( + TranslationBase.of( + context) + .only5DigitsAllowedForStrength, ); } }, - inputType: TextInputType.numberWithOptions( + inputType: TextInputType + .numberWithOptions( decimal: true, ), ), @@ -364,13 +389,17 @@ class _PrescriptionCheckOutScreenState extends State width: 5.0, ), PrescriptionTextFiled( - width: MediaQuery.of(context).size.width * 0.560, + width: MediaQuery.of(context) + .size + .width * + 0.560, element: units, elementError: unitError, keyName: 'description', keyId: 'parameterCode', hintText: 'Select', - elementList: model.itemMedicineListUnit, + elementList: + model.itemMedicineListUnit, okFunction: (selectedValue) { setState(() { units = selectedValue; @@ -383,7 +412,8 @@ class _PrescriptionCheckOutScreenState extends State ), SizedBox(height: spaceBetweenTextFileds), PrescriptionTextFiled( - elementList: model.itemMedicineListRoute, + elementList: + model.itemMedicineListRoute, element: route, elementError: routeError, keyId: 'parameterCode', @@ -394,11 +424,13 @@ class _PrescriptionCheckOutScreenState extends State route['isDefault'] = true; }); }, - hintText: TranslationBase.of(context).route, + hintText: + TranslationBase.of(context).route, ), SizedBox(height: spaceBetweenTextFileds), PrescriptionTextFiled( - hintText: TranslationBase.of(context).frequency, + hintText: TranslationBase.of(context) + .frequency, elementError: frequencyError, element: frequency, elementList: model.itemMedicineList, @@ -411,12 +443,18 @@ class _PrescriptionCheckOutScreenState extends State if (_selectedMedication != null && duration != null && frequency != null && - strengthController.text != null) { + strengthController.text != + null) { model.getBoxQuantity( - freq: frequency['parameterCode'], + freq: frequency[ + 'parameterCode'], duration: duration['id'], - itemCode: _selectedMedication.itemId, - strength: double.parse(strengthController.text)); + itemCode: + _selectedMedication + .itemId, + strength: double.parse( + strengthController + .text)); return; } @@ -424,10 +462,12 @@ class _PrescriptionCheckOutScreenState extends State }), SizedBox(height: spaceBetweenTextFileds), PrescriptionTextFiled( - hintText: TranslationBase.of(context).doseTime, + hintText: TranslationBase.of(context) + .doseTime, elementError: doseTimeError, element: doseTime, - elementList: model.medicationDoseTimeList, + elementList: + model.medicationDoseTimeList, keyId: 'id', keyName: 'nameEn', okFunction: (selectedValue) { @@ -436,7 +476,8 @@ class _PrescriptionCheckOutScreenState extends State }); }), SizedBox(height: spaceBetweenTextFileds), - if (model.patientAssessmentList.isNotEmpty) + if (model + .patientAssessmentList.isNotEmpty) Container( height: screenSize.height * 0.070, width: double.infinity, @@ -444,25 +485,47 @@ class _PrescriptionCheckOutScreenState extends State child: Row( children: [ Container( - width: MediaQuery.of(context).size.width * 0.29, + width: MediaQuery.of(context) + .size + .width * + 0.29, child: TextField( - decoration: textFieldSelectorDecoration( - model.patientAssessmentList[0].icdCode10ID.toString(), - indication != null ? indication['name'] : null, - false), + 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.65, + width: MediaQuery.of(context) + .size + .width * + 0.65, color: Colors.white, child: TextField( maxLines: 5, - decoration: textFieldSelectorDecoration( - model.patientAssessmentList[0].asciiDesc.toString(), - indication != null ? indication['name'] : null, - false), + decoration: + textFieldSelectorDecoration( + model + .patientAssessmentList[ + 0] + .asciiDesc + .toString(), + indication != null + ? indication[ + 'name'] + : null, + false), enabled: true, readOnly: true, ), @@ -475,10 +538,12 @@ class _PrescriptionCheckOutScreenState extends State height: screenSize.height * 0.070, color: Colors.white, child: InkWell( - onTap: () => selectDate(context, widget.model), + onTap: () => + selectDate(context, widget.model), child: TextField( decoration: textFieldSelectorDecoration( - TranslationBase.of(context).date, + TranslationBase.of(context) + .date, selectedDate != null ? "${AppDateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}" : null, @@ -495,8 +560,10 @@ class _PrescriptionCheckOutScreenState extends State PrescriptionTextFiled( element: duration, elementError: durationError, - hintText: TranslationBase.of(context).duration, - elementList: model.medicationDurationList, + hintText: TranslationBase.of(context) + .duration, + elementList: + model.medicationDurationList, keyName: 'nameEn', keyId: 'id', okFunction: (selectedValue) { @@ -505,12 +572,16 @@ class _PrescriptionCheckOutScreenState extends State if (_selectedMedication != null && duration != null && frequency != null && - strengthController.text != null) { + strengthController.text != + null) { model.getBoxQuantity( - freq: frequency['parameterCode'], + freq: + frequency['parameterCode'], duration: duration['id'], - itemCode: _selectedMedication.itemId, - strength: double.parse(strengthController.text), + itemCode: + _selectedMedication.itemId, + strength: double.parse( + strengthController.text), ); box = model.boxQuintity; @@ -524,14 +595,19 @@ class _PrescriptionCheckOutScreenState extends State SizedBox(height: spaceBetweenTextFileds), Container( decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(6.0)), - border: Border.all(width: 1.0, color: HexColor("#CCCCCC"))), + 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, + hintText: + TranslationBase.of(context) + .instruction, controller: instructionController, //keyboardType: TextInputType.number, ), @@ -545,7 +621,9 @@ class _PrescriptionCheckOutScreenState extends State size: 35, ), onPressed: () { - initSpeechState().then((value) => {onVoiceText()}); + initSpeechState().then( + (value) => + {onVoiceText()}); }, ), ), @@ -554,13 +632,15 @@ class _PrescriptionCheckOutScreenState extends State ), SizedBox(height: spaceBetweenTextFileds), Container( - margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5), + margin: EdgeInsets.all( + SizeConfig.widthMultiplier * 5), child: Wrap( alignment: WrapAlignment.center, children: [ AppButton( color: Color(0xff359846), - title: TranslationBase.of(context).addMedication, + title: TranslationBase.of(context) + .addMedication, fontWeight: FontWeight.w600, onPressed: () async { if (route != null && @@ -569,7 +649,8 @@ class _PrescriptionCheckOutScreenState extends State frequency != null && units != null && selectedDate != null && - strengthController.text != "") { + strengthController.text != + "") { // if (_selectedMedication.isNarcotic == true) { // DrAppToastMsg.showErrorToast(TranslationBase.of(context) // .narcoticMedicineCanOnlyBePrescribedFromVida); @@ -577,24 +658,43 @@ class _PrescriptionCheckOutScreenState extends State // return; // } - if (double.parse(strengthController.text) > 1000.0) { - DrAppToastMsg.showErrorToast("1000 is the MAX for the strength"); + 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"); + if (double.parse( + strengthController + .text) < + 0.0) { + DrAppToastMsg.showErrorToast( + "strength can't be zero"); return; } - if (formKey.currentState.validate()) { + if (formKey.currentState + .validate()) { Navigator.pop(context); // openDrugToDrug(model); { postPrescription( - icdCode: model.patientAssessmentList.isNotEmpty - ? model.patientAssessmentList[0].icdCode10ID.isEmpty + icdCode: model + .patientAssessmentList + .isNotEmpty + ? model + .patientAssessmentList[ + 0] + .icdCode10ID + .isEmpty ? "test" - : model.patientAssessmentList[0].icdCode10ID.toString() + : model + .patientAssessmentList[ + 0] + .icdCode10ID + .toString() : "test", // icdCode: model // .patientAssessmentList @@ -603,25 +703,63 @@ class _PrescriptionCheckOutScreenState extends State // .trim()) // .toList() // .join(' '), - dose: strengthController.text, - doseUnit: model.itemMedicineListUnit.length == 1 - ? model.itemMedicineListUnit[0]['parameterCode'].toString() - : units['parameterCode'].toString(), + dose: strengthController + .text, + doseUnit: model + .itemMedicineListUnit + .length == + 1 + ? model + .itemMedicineListUnit[ + 0][ + 'parameterCode'] + .toString() + : units['parameterCode'] + .toString(), patient: widget.patient, - doseTimeIn: doseTime['id'].toString(), + 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: (widget.groupProcedures.aliasN - .replaceAll("item code ;", "")), - strength: strengthController.text, - indication: indicationController.text, - instruction: instructionController.text, + 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: (widget + .groupProcedures + .aliasN + .replaceAll( + "item code ;", + "")), + strength: + strengthController + .text, + indication: + indicationController + .text, + instruction: + instructionController + .text, doseTime: selectedDate, ); } @@ -629,32 +767,52 @@ class _PrescriptionCheckOutScreenState extends State } else { setState(() { if (duration == null) { - durationError = TranslationBase.of(context).fieldRequired; + durationError = + TranslationBase.of( + context) + .fieldRequired; } else { durationError = null; } if (doseTime == null) { - doseTimeError = TranslationBase.of(context).fieldRequired; + doseTimeError = + TranslationBase.of( + context) + .fieldRequired; } else { doseTimeError = null; } if (route == null) { - routeError = TranslationBase.of(context).fieldRequired; + routeError = + TranslationBase.of( + context) + .fieldRequired; } else { routeError = null; } if (frequency == null) { - frequencyError = TranslationBase.of(context).fieldRequired; + frequencyError = + TranslationBase.of( + context) + .fieldRequired; } else { frequencyError = null; } if (units == null) { - unitError = TranslationBase.of(context).fieldRequired; + unitError = + TranslationBase.of( + context) + .fieldRequired; } else { unitError = null; } - if (strengthController.text == "") { - strengthError = TranslationBase.of(context).fieldRequired; + if (strengthController + .text == + "") { + strengthError = + TranslationBase.of( + context) + .fieldRequired; } else { strengthError = null; } @@ -704,7 +862,8 @@ class _PrescriptionCheckOutScreenState extends State } } - InputDecoration textFieldSelectorDecoration(String hintText, String selectedText, bool isDropDown, + InputDecoration textFieldSelectorDecoration( + String hintText, String selectedText, bool isDropDown, {Icon suffixIcon}) { return InputDecoration( focusedBorder: OutlineInputBorder( diff --git a/lib/screens/prescription/prescription_item_in_patient_page.dart b/lib/screens/prescription/prescription_item_in_patient_page.dart index 1b5e71d1..eb95257b 100644 --- a/lib/screens/prescription/prescription_item_in_patient_page.dart +++ b/lib/screens/prescription/prescription_item_in_patient_page.dart @@ -91,7 +91,11 @@ class PrescriptionItemsInPatientPage extends StatelessWidget { color: Colors.grey, ), Expanded( - child: AppText(" " + prescriptions.directionDescription.toString() ?? '')), + child: AppText(" " + + prescriptions + .directionDescription + .toString() ?? + '')), ], ), Row( @@ -100,7 +104,10 @@ class PrescriptionItemsInPatientPage extends StatelessWidget { TranslationBase.of(context).route, color: Colors.grey, ), - AppText(" " + prescriptions.routeDescription.toString() ?? ''), + AppText(" " + + prescriptions.routeDescription + .toString() ?? + ''), ], ), Row( @@ -109,7 +116,12 @@ class PrescriptionItemsInPatientPage extends StatelessWidget { TranslationBase.of(context).refill, color: Colors.grey, ), - Expanded(child: AppText(" " + prescriptions.refillDescription.toString() ?? '')), + Expanded( + child: AppText(" " + + prescriptions + .refillDescription + .toString() ?? + '')), ], ), Row( @@ -150,7 +162,10 @@ class PrescriptionItemsInPatientPage extends StatelessWidget { 'UOM', color: Colors.grey, ), - AppText(" " + prescriptions.uomDescription.toString() ?? ''), + AppText(" " + + prescriptions.uomDescription + .toString() ?? + ''), ], ), Row( @@ -159,7 +174,9 @@ class PrescriptionItemsInPatientPage extends StatelessWidget { TranslationBase.of(context).dailyDoses, color: Colors.grey, ), - AppText(" " + prescriptions.dose.toString() ?? ''), + AppText( + " " + prescriptions.dose.toString() ?? + ''), ], ), Row( @@ -168,7 +185,10 @@ class PrescriptionItemsInPatientPage extends StatelessWidget { TranslationBase.of(context).status, color: Colors.grey, ), - AppText(" " + prescriptions.statusDescription.toString() ?? ''), + AppText(" " + + prescriptions.statusDescription + .toString() ?? + ''), ], ), Row( @@ -177,7 +197,10 @@ class PrescriptionItemsInPatientPage extends StatelessWidget { TranslationBase.of(context).processed, color: Colors.grey, ), - AppText(" " + prescriptions.doctorName.toString() ?? ''), + AppText(" " + + prescriptions.doctorName + .toString() ?? + ''), ], ), // Row( diff --git a/lib/screens/prescription/prescription_items_page.dart b/lib/screens/prescription/prescription_items_page.dart index b97343c4..751a3deb 100644 --- a/lib/screens/prescription/prescription_items_page.dart +++ b/lib/screens/prescription/prescription_items_page.dart @@ -17,23 +17,30 @@ class PrescriptionItemsPage extends StatelessWidget { final PatiantInformtion patient; final String patientType; final String arrivalType; - PrescriptionItemsPage({Key key, this.prescriptions, this.patient, this.patientType, this.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), + onModelReady: (model) => model.getPrescriptionReport( + prescriptions: prescriptions, patient: patient), builder: (_, model, widget) => AppScaffold( isShowAppBar: true, backgroundColor: Colors.grey[100], baseViewModel: model, appBar: PatientProfileAppBar( - patient, + patient, clinic: prescriptions.clinicDescription, branch: prescriptions.name, isPrescriptions: true, - appointmentDate: AppDateUtils.getDateTimeFromServerFormat(prescriptions.appointmentDate), + appointmentDate: AppDateUtils.getDateTimeFromServerFormat( + prescriptions.appointmentDate), doctorName: prescriptions.doctorName, profileUrl: prescriptions.doctorImageURL, isAppointmentHeader: true, @@ -42,11 +49,10 @@ class PrescriptionItemsPage extends StatelessWidget { child: Container( child: Column( children: [ - if (!prescriptions.isInOutPatient) ...List.generate( model.prescriptionReportList.length, - (index) => Container( + (index) => Container( decoration: BoxDecoration( borderRadius: BorderRadius.circular(12), color: Colors.white, @@ -58,179 +64,305 @@ class PrescriptionItemsPage extends StatelessWidget { 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,), + 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,), + SizedBox( + width: 18, + ), Container( decoration: BoxDecoration( shape: BoxShape.circle, - border: Border.all(width: 0.5,color: Colors.grey) - ), + border: Border.all( + width: 0.5, + color: Colors.grey)), height: 55, width: 55, child: InkWell( - onTap: (){ + onTap: () { showDialog( context: context, - builder: (ctx) => ShowImageDialog( - imageUrl: model.prescriptionReportEnhList[index].imageSRCUrl, - ) - ); + builder: (ctx) => + ShowImageDialog( + imageUrl: model + .prescriptionReportEnhList[ + index] + .imageSRCUrl, + )); }, child: Padding( padding: const EdgeInsets.all(8.0), child: Image.network( - model.prescriptionReportList[index].imageSRCUrl, + 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 ?? ''), - ], - ),) - - + 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( + ...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, - - ), + 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,)) - ], - ), + ), + Positioned( + top: 10, + right: 10, + child: Icon( + EvaIcons.search, + color: Colors.grey, + size: 35, + )) + ], ), ), - SizedBox(width: 10,), - Expanded(child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + ), + 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??'')), + 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 ?? ''), + 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() ?? ''), + 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() ?? ''), + AppText( + TranslationBase.of(context) + .duration, + color: Colors.grey, + ), + AppText(" " + + model + .prescriptionReportList[ + index] + .days + .toString() ?? + ''), ], ), - SizedBox(height: 12,), - AppText(model.prescriptionReportEnhList[index].remarks?? ''), + SizedBox( + height: 12, + ), + AppText(model + .prescriptionReportEnhList[index] + .remarks ?? + ''), ], - ),) - - - ], - ) - ], - ), + ), + ) + ], + ) + ], ), ), - ), - - - + ), + ), ], ), ), @@ -239,6 +371,3 @@ class PrescriptionItemsPage extends StatelessWidget { ); } } - - - diff --git a/lib/screens/prescription/prescription_text_filed.dart b/lib/screens/prescription/prescription_text_filed.dart index c63ccd1e..8f2676bc 100644 --- a/lib/screens/prescription/prescription_text_filed.dart +++ b/lib/screens/prescription/prescription_text_filed.dart @@ -43,10 +43,12 @@ class _PrescriptionTextFiledState extends State { ListSelectDialog dialog = ListSelectDialog( list: widget.elementList, attributeName: '${widget.keyName}', - attributeValueId: - widget.elementList.length == 1 ? widget.elementList[0]['${widget.keyId}'] : '${widget.keyId}', + attributeValueId: widget.elementList.length == 1 + ? widget.elementList[0]['${widget.keyId}'] + : '${widget.keyId}', okText: TranslationBase.of(context).ok, - okFunction: (selectedValue) => widget.okFunction(selectedValue), + okFunction: (selectedValue) => + widget.okFunction(selectedValue), ); showDialog( barrierDismissible: false, @@ -65,7 +67,8 @@ class _PrescriptionTextFiledState extends State { ? widget.element['${widget.keyName}'] : null, isTextFieldHasSuffix: true, - validationError: widget.elementList.length != 1 ? widget.elementError : null, + validationError: + widget.elementList.length != 1 ? widget.elementError : null, enabled: false, ), ), diff --git a/lib/screens/prescription/prescriptions_page.dart b/lib/screens/prescription/prescriptions_page.dart index 0805cef1..ef66b82b 100644 --- a/lib/screens/prescription/prescriptions_page.dart +++ b/lib/screens/prescription/prescriptions_page.dart @@ -134,8 +134,10 @@ class PrescriptionsPage extends StatelessWidget { if (model.prescriptionsList.isEmpty && patient.patientStatusType != 43) Center( - child: ErrorMessage(error: TranslationBase.of(context).noPrescriptionsFound,) - ) + child: ErrorMessage( + error: TranslationBase.of(context) + .noPrescriptionsFound, + )) ], ), ) @@ -204,8 +206,10 @@ class PrescriptionsPage extends StatelessWidget { }), if (model.medicationForInPatient.length == 0) Center( - child: ErrorMessage(error: TranslationBase.of(context).noPrescriptionsFound,) - ) + 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 index 915fc0b6..1a39f7e6 100644 --- a/lib/screens/prescription/update_prescription_form.dart +++ b/lib/screens/prescription/update_prescription_form.dart @@ -57,6 +57,7 @@ class UpdatePrescriptionForm extends StatefulWidget { this.drugNameGeneric, this.uom, this.box}); + @override _UpdatePrescriptionFormState createState() => _UpdatePrescriptionFormState(); } @@ -78,6 +79,7 @@ class _UpdatePrescriptionFormState extends State { List indicationList; dynamic indication; DateTime selectedDate; + @override void initState() { super.initState(); diff --git a/lib/screens/procedures/ExpansionProcedure.dart b/lib/screens/procedures/ExpansionProcedure.dart index faa9be0b..228ca33e 100644 --- a/lib/screens/procedures/ExpansionProcedure.dart +++ b/lib/screens/procedures/ExpansionProcedure.dart @@ -70,11 +70,14 @@ class _ExpansionProcedureState extends State { ), Expanded( child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 0), + padding: const EdgeInsets.symmetric( + horizontal: 10, vertical: 0), child: AppText( widget.isProcedure == true - ? "Procedures for " + widget.procedureTempleteModel.templateName - : "Prescription for " + widget.procedureTempleteModel.templateName, + ? "Procedures for " + + widget.procedureTempleteModel.templateName + : "Prescription for " + + widget.procedureTempleteModel.templateName, fontSize: 16.0, variant: "bodyText", bold: true, @@ -87,7 +90,9 @@ class _ExpansionProcedureState extends State { width: 25, height: 25, child: Icon( - _isShowMore ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down, + _isShowMore + ? Icons.keyboard_arrow_up + : Icons.keyboard_arrow_down, color: Colors.grey[800], size: 22, ), @@ -109,7 +114,8 @@ class _ExpansionProcedureState extends State { )), duration: Duration(milliseconds: 7000), child: Column( - children: widget.procedureTempleteModel.procedureTemplate.map((itemProcedure) { + children: widget.procedureTempleteModel.procedureTemplate + .map((itemProcedure) { return InkWell( onTap: () { if (widget.isProcedure) { @@ -133,17 +139,23 @@ class _ExpansionProcedureState extends State { Row( children: [ Padding( - padding: const EdgeInsets.symmetric(horizontal: 11), + padding: const EdgeInsets.symmetric( + horizontal: 11), child: widget.isProcedure ? Checkbox( - value: widget.isEntityFavListSelected(itemProcedure), + value: widget.isEntityFavListSelected( + itemProcedure), activeColor: Color(0xffD02127), onChanged: (bool newValue) { setState(() { - if (widget.isEntityFavListSelected(itemProcedure)) { - widget.removeFavProcedure(itemProcedure); + if (widget + .isEntityFavListSelected( + itemProcedure)) { + widget.removeFavProcedure( + itemProcedure); } else { - widget.addFavProcedure(itemProcedure); + widget.addFavProcedure( + itemProcedure); } }); }) @@ -156,9 +168,13 @@ class _ExpansionProcedureState extends State { })), Expanded( child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 0), + padding: const EdgeInsets.symmetric( + horizontal: 10, vertical: 0), child: AppText(itemProcedure.procedureName, - fontSize: 14.0, variant: "bodyText", bold: true, color: Color(0xff575757)), + fontSize: 14.0, + variant: "bodyText", + bold: true, + color: Color(0xff575757)), ), ), ], diff --git a/lib/screens/procedures/ProcedureCard.dart b/lib/screens/procedures/ProcedureCard.dart index 82bb649c..d531cf35 100644 --- a/lib/screens/procedures/ProcedureCard.dart +++ b/lib/screens/procedures/ProcedureCard.dart @@ -19,6 +19,7 @@ class ProcedureCard extends StatelessWidget { final PatiantInformtion patient; final int doctorID; final bool isInpatient; + const ProcedureCard({ Key key, this.onTap, @@ -55,13 +56,15 @@ class ProcedureCard extends StatelessWidget { topLeft: Radius.circular(10), bottomLeft: Radius.circular(10), ), - color: entityList.orderType == 0 ? Colors.black : Colors.red[500], + color: + entityList.orderType == 0 ? Colors.black : Colors.red[500], ), ), Expanded( child: Container( padding: EdgeInsets.only( - left: projectViewModel.isArabic ? 0 : 15, right: projectViewModel.isArabic ? 15 : 0), + left: projectViewModel.isArabic ? 0 : 15, + right: projectViewModel.isArabic ? 15 : 0), child: InkWell( child: Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -74,8 +77,12 @@ class ProcedureCard extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( - entityList.orderType == 0 ? 'Routine' : 'Urgent', - color: entityList.orderType == 0 ? Colors.black : Colors.red[800], + entityList.orderType == 0 + ? 'Routine' + : 'Urgent', + color: entityList.orderType == 0 + ? Colors.black + : Colors.red[800], fontWeight: FontWeight.w600, ), SizedBox( @@ -139,7 +146,8 @@ class ProcedureCard extends StatelessWidget { ), ), Container( - margin: EdgeInsets.only(left: 0, top: 25, right: 0, bottom: 0), + margin: EdgeInsets.only( + left: 0, top: 25, right: 0, bottom: 0), padding: EdgeInsets.only(left: 4.0, right: 4.0), child: Container( width: 40, @@ -150,7 +158,9 @@ class ProcedureCard extends StatelessWidget { 'assets/images/male_avatar.png', height: 25, width: 30, - errorBuilder: (BuildContext context, Object exception, StackTrace stackTrace) { + errorBuilder: (BuildContext context, + Object exception, + StackTrace stackTrace) { return Text('No Image'); }, ))), @@ -158,7 +168,8 @@ class ProcedureCard extends StatelessWidget { Expanded( flex: 4, child: Container( - margin: EdgeInsets.only(left: 10, top: 25, right: 10, bottom: 0), + margin: EdgeInsets.only( + left: 10, top: 25, right: 10, bottom: 0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -194,7 +205,8 @@ class ProcedureCard extends StatelessWidget { fontSize: 12, ), ), - if ((entityList.categoryID == 2 || entityList.categoryID == 4) && + if ((entityList.categoryID == 2 || + entityList.categoryID == 4) && doctorID == entityList.doctorID && !isInpatient) InkWell( diff --git a/lib/screens/procedures/add-favourite-procedure.dart b/lib/screens/procedures/add-favourite-procedure.dart index 7f4e49b2..0a2a943e 100644 --- a/lib/screens/procedures/add-favourite-procedure.dart +++ b/lib/screens/procedures/add-favourite-procedure.dart @@ -47,8 +47,10 @@ 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) => AppScaffold( + onModelReady: (model) => model.getProcedureTemplate( + categoryID: widget.procedureType.getCategoryId()), + builder: (BuildContext context, ProcedureViewModel model, Widget child) => + AppScaffold( isShowAppBar: false, baseViewModel: model, body: Column( @@ -59,7 +61,8 @@ class _AddFavouriteProcedureState extends State { (model.templateList.length != 0) ? Expanded( child: EntityListCheckboxSearchFavProceduresWidget( - isProcedure: !(widget.procedureType == ProcedureType.PRESCRIPTION), + isProcedure: + !(widget.procedureType == ProcedureType.PRESCRIPTION), model: model, removeFavProcedure: (item) { setState(() { @@ -71,7 +74,8 @@ class _AddFavouriteProcedureState extends State { entityList.add(history); }); }, - isEntityFavListSelected: (master) => isEntityListSelected(master), + isEntityFavListSelected: (master) => + isEntityListSelected(master), groupProcedures: groupProcedures, selectProcedures: (selectedProcedure) { setState(() { @@ -116,12 +120,14 @@ class _AddFavouriteProcedureState extends State { model: widget.prescriptionModel, groupProcedures: groupProcedures, ), - settings: RouteSettings(name: 'PrescriptionCheckOutScreen')), + settings: RouteSettings( + name: 'PrescriptionCheckOutScreen')), ); } else { if (entityList.isEmpty == true) { DrAppToastMsg.showErrorToast( - TranslationBase.of(context).fillTheMandatoryProcedureDetails, + TranslationBase.of(context) + .fillTheMandatoryProcedureDetails, ); return; } @@ -132,10 +138,13 @@ class _AddFavouriteProcedureState extends State { items: entityList, model: model, patient: widget.patient, - addButtonTitle: widget.procedureType.getAddButtonTitle(context), - toolbarTitle: widget.procedureType.getToolbarLabel(context), + addButtonTitle: widget.procedureType + .getAddButtonTitle(context), + toolbarTitle: widget.procedureType + .getToolbarLabel(context), ), - settings: RouteSettings(name: 'ProcedureCheckOutScreen')), + settings: + RouteSettings(name: 'ProcedureCheckOutScreen')), ); } }, @@ -149,7 +158,9 @@ class _AddFavouriteProcedureState extends State { bool isEntityListSelected(ProcedureTempleteDetailsModel masterKey) { Iterable history = entityList.where( - (element) => masterKey.templateID == element.templateID && masterKey.procedureName == element.procedureName); + (element) => + masterKey.templateID == element.templateID && + masterKey.procedureName == element.procedureName); if (history.length > 0) { return true; } diff --git a/lib/screens/procedures/entity_list_checkbox_search_widget.dart b/lib/screens/procedures/entity_list_checkbox_search_widget.dart index 725bb007..361ec695 100644 --- a/lib/screens/procedures/entity_list_checkbox_search_widget.dart +++ b/lib/screens/procedures/entity_list_checkbox_search_widget.dart @@ -59,6 +59,7 @@ class _EntityListCheckboxSearchWidgetState } TextEditingController remarksController = TextEditingController(); + @override Widget build(BuildContext context) { return Container( diff --git a/lib/screens/procedures/entity_list_fav_procedure.dart b/lib/screens/procedures/entity_list_fav_procedure.dart index 1c52d84a..494540b1 100644 --- a/lib/screens/procedures/entity_list_fav_procedure.dart +++ b/lib/screens/procedures/entity_list_fav_procedure.dart @@ -50,7 +50,8 @@ class EntityListCheckboxSearchFavProceduresWidget extends StatefulWidget { _EntityListCheckboxSearchFavProceduresWidgetState(); } -class _EntityListCheckboxSearchFavProceduresWidgetState extends State { +class _EntityListCheckboxSearchFavProceduresWidgetState + extends State { int selectedType = 0; int typeUrgent; int typeRegular; @@ -86,7 +87,9 @@ class _EntityListCheckboxSearchFavProceduresWidgetState extends State _ProcedureCheckOutScreenState(); + _ProcedureCheckOutScreenState createState() => + _ProcedureCheckOutScreenState(); } class _ProcedureCheckOutScreenState extends State { @@ -36,7 +41,8 @@ class _ProcedureCheckOutScreenState extends State { @override Widget build(BuildContext context) { return BaseView( - builder: (BuildContext context, ProcedureViewModel model, Widget child) => AppScaffold( + builder: (BuildContext context, ProcedureViewModel model, Widget child) => + AppScaffold( backgroundColor: Color(0xffF8F8F8).withOpacity(0.9), isShowAppBar: false, body: SingleChildScrollView( @@ -81,8 +87,10 @@ class _ProcedureCheckOutScreenState extends State { widget.items.length, (index) => Container( margin: EdgeInsets.only(bottom: 15.0), - decoration: - BoxDecoration(color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(10.0))), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: + BorderRadius.all(Radius.circular(10.0))), child: ExpansionTile( initiallyExpanded: true, title: Row( @@ -95,7 +103,9 @@ class _ProcedureCheckOutScreenState extends State { SizedBox( width: 6.0, ), - Expanded(child: AppText(widget.items[index].procedureName)), + Expanded( + child: AppText( + widget.items[index].procedureName)), ], ), children: [ @@ -108,9 +118,11 @@ class _ProcedureCheckOutScreenState extends State { Row( children: [ Padding( - padding: const EdgeInsets.symmetric(horizontal: 11), + padding: const EdgeInsets.symmetric( + horizontal: 11), child: AppText( - TranslationBase.of(context).orderType, + TranslationBase.of(context) + .orderType, fontWeight: FontWeight.w700, color: Color(0xff2B353E), ), @@ -122,11 +134,14 @@ class _ProcedureCheckOutScreenState extends State { Radio( activeColor: Color(0xFFD02127), value: 0, - groupValue: widget.items[index].selectedType, + groupValue: + widget.items[index].selectedType, onChanged: (value) { - widget.items[index].selectedType = 0; + widget.items[index].selectedType = + 0; setState(() { - widget.items[index].type = value.toString(); + widget.items[index].type = + value.toString(); }); }, ), @@ -137,12 +152,15 @@ class _ProcedureCheckOutScreenState extends State { ), Radio( activeColor: Color(0xFFD02127), - groupValue: widget.items[index].selectedType, + groupValue: + widget.items[index].selectedType, value: 1, onChanged: (value) { - widget.items[index].selectedType = 1; + widget.items[index].selectedType = + 1; setState(() { - widget.items[index].type = value.toString(); + widget.items[index].type = + value.toString(); }); }, ), @@ -161,7 +179,8 @@ class _ProcedureCheckOutScreenState extends State { height: 2.0, ), Padding( - padding: EdgeInsets.symmetric(horizontal: 12, vertical: 15.0), + padding: EdgeInsets.symmetric( + horizontal: 12, vertical: 15.0), child: TextFields( hintText: TranslationBase.of(context).remarks, controller: remarksController, @@ -193,7 +212,8 @@ class _ProcedureCheckOutScreenState extends State { alignment: WrapAlignment.center, children: [ AppButton( - title: widget.addButtonTitle ?? TranslationBase.of(context).addSelectedProcedures, + title: widget.addButtonTitle ?? + TranslationBase.of(context).addSelectedProcedures, color: Color(0xff359846), fontWeight: FontWeight.w700, onPressed: () async { @@ -214,7 +234,9 @@ class _ProcedureCheckOutScreenState extends State { ); Navigator.pop(context); await model.preparePostProcedure( - entityList: entityList, patient: widget.patient, remarks: remarksController.text); + entityList: entityList, + patient: widget.patient, + remarks: remarksController.text); Navigator.pop(context); Navigator.pop(context); }, diff --git a/lib/screens/procedures/procedure_screen.dart b/lib/screens/procedures/procedure_screen.dart index e0c8909e..16937262 100644 --- a/lib/screens/procedures/procedure_screen.dart +++ b/lib/screens/procedures/procedure_screen.dart @@ -37,9 +37,12 @@ class ProcedureScreen extends StatelessWidget { bool isFromLiveCare = routeArgs['isFromLiveCare']; bool isInpatient = routeArgs['isInpatient']; return BaseView( - onModelReady: (model) => - model.getProcedure(mrn: patient.patientId, patientType: patientType, appointmentNo: patient.appointmentNo), - builder: (BuildContext context, ProcedureViewModel model, Widget child) => AppScaffold( + onModelReady: (model) => model.getProcedure( + mrn: patient.patientId, + patientType: patientType, + appointmentNo: patient.appointmentNo), + builder: (BuildContext context, ProcedureViewModel model, Widget child) => + AppScaffold( isShowAppBar: true, backgroundColor: Colors.grey[100], baseViewModel: model, @@ -55,7 +58,8 @@ class ProcedureScreen extends StatelessWidget { SizedBox( height: 12, ), - if (model.procedureList.length == 0 && patient.patientStatusType != 43) + if (model.procedureList.length == 0 && + patient.patientStatusType != 43) Padding( padding: const EdgeInsets.all(8.0), child: Column( @@ -75,7 +79,8 @@ class ProcedureScreen extends StatelessWidget { ], ), ), - if (patient.patientStatusType != null && patient.patientStatusType == 43) + if (patient.patientStatusType != null && + patient.patientStatusType == 43) Padding( padding: const EdgeInsets.all(8.0), child: Column( @@ -95,7 +100,8 @@ class ProcedureScreen extends StatelessWidget { ], ), ), - if ((patient.patientStatusType != null && patient.patientStatusType == 43) || + if ((patient.patientStatusType != null && + patient.patientStatusType == 43) || (isFromLiveCare && patient.appointmentNo != null)) InkWell( onTap: () { @@ -155,21 +161,32 @@ class ProcedureScreen extends StatelessWidget { ...List.generate( model.procedureList[0].rowcount, (index) => ProcedureCard( - categoryID: model.procedureList[0].entityList[index].categoryID, + categoryID: + model.procedureList[0].entityList[index].categoryID, entityList: model.procedureList[0].entityList[index], onTap: () { - if (model.procedureList[0].entityList[index].categoryID == 2 || + if (model.procedureList[0].entityList[index].categoryID == + 2 || model.procedureList[0].entityList[index].categoryID == 4) updateProcedureForm(context, model: model, patient: patient, - remarks: model.procedureList[0].entityList[index].remarks, - orderType: model.procedureList[0].entityList[index].orderType.toString(), - orderNo: model.procedureList[0].entityList[index].orderNo, - procedureName: model.procedureList[0].entityList[index].procedureName, - categoreId: model.procedureList[0].entityList[index].categoryID.toString(), - procedureId: model.procedureList[0].entityList[index].procedureId, - limetNo: model.procedureList[0].entityList[index].lineItemNo); + remarks: model + .procedureList[0].entityList[index].remarks, + orderType: model + .procedureList[0].entityList[index].orderType + .toString(), + orderNo: model + .procedureList[0].entityList[index].orderNo, + procedureName: model.procedureList[0] + .entityList[index].procedureName, + categoreId: model + .procedureList[0].entityList[index].categoryID + .toString(), + procedureId: model.procedureList[0] + .entityList[index].procedureId, + limetNo: model.procedureList[0].entityList[index] + .lineItemNo); // } else // Helpers.showErrorToast( // 'You Cant Update This Procedure'); @@ -179,10 +196,12 @@ class ProcedureScreen extends StatelessWidget { ), ), if (model.state == ViewState.ErrorLocal || - (model.procedureList.isNotEmpty && model.procedureList[0].entityList.isEmpty)) + (model.procedureList.isNotEmpty && + model.procedureList[0].entityList.isEmpty)) Center( - child: ErrorMessage(error: TranslationBase.of(context).noDataAvailable,) - ), + child: ErrorMessage( + error: TranslationBase.of(context).noDataAvailable, + )), ], ), ), diff --git a/lib/screens/procedures/update-procedure.dart b/lib/screens/procedures/update-procedure.dart index a11ac875..a1f3615e 100644 --- a/lib/screens/procedures/update-procedure.dart +++ b/lib/screens/procedures/update-procedure.dart @@ -69,12 +69,14 @@ class UpdateProcedureWidget extends StatefulWidget { this.categoryId, this.orderNo, this.limetNo}); + @override _UpdateProcedureWidgetState createState() => _UpdateProcedureWidgetState(); } class _UpdateProcedureWidgetState extends State { int selectedType = 0; + setSelectedType(int val) { setState(() { selectedType = val; @@ -88,6 +90,7 @@ class _UpdateProcedureWidgetState extends State { List entityList = List(); dynamic selectedCategory; + @override Widget build(BuildContext context) { final screenSize = MediaQuery.of(context).size; diff --git a/lib/screens/qr_reader/QR_reader_screen.dart b/lib/screens/qr_reader/QR_reader_screen.dart index 59033e0d..468df8df 100644 --- a/lib/screens/qr_reader/QR_reader_screen.dart +++ b/lib/screens/qr_reader/QR_reader_screen.dart @@ -31,7 +31,8 @@ class _QrReaderScreenState extends State { builder: (_, model, w) => AppScaffold( baseViewModel: model, isShowAppBar: false, - appBarTitle: TranslationBase.of(context).qr + TranslationBase.of(context).reader, + appBarTitle: + TranslationBase.of(context).qr + TranslationBase.of(context).reader, body: Center( child: Container( margin: EdgeInsets.only(top: SizeConfig.realScreenHeight / 7), @@ -49,7 +50,9 @@ class _QrReaderScreenState extends State { height: 7, ), AppText(TranslationBase.of(context).scanQrCode, - fontSize: 14, fontWeight: FontWeight.w400, textAlign: TextAlign.center), + fontSize: 14, + fontWeight: FontWeight.w400, + textAlign: TextAlign.center), SizedBox( height: 15, ), @@ -86,10 +89,16 @@ class _QrReaderScreenState extends State { List listOfParams = result.split(','); int patientID = 0; if (listOfParams[1].length != 0) patientID = int.parse(listOfParams[1]); - PatientSearchRequestModel patientSearchRequestModel = PatientSearchRequestModel( - patientID: patientID, clinicID: 0, doctorID: 0, projectID: int.parse(listOfParams[0])); + PatientSearchRequestModel patientSearchRequestModel = + PatientSearchRequestModel( + patientID: patientID, + clinicID: 0, + doctorID: 0, + projectID: int.parse(listOfParams[0])); - await model.getInPatientList(patientSearchRequestModel, isMyInpatient: false).then((d) { + await model + .getInPatientList(patientSearchRequestModel, isMyInpatient: false) + .then((d) { if (model.state != ViewState.ErrorLocal) { if (model.inPatientList.isEmpty) DrAppToastMsg.showErrorToast('No patient'); diff --git a/lib/screens/reschedule-leaves/add-rescheduleleave.dart b/lib/screens/reschedule-leaves/add-rescheduleleave.dart index db8a0140..f52d1dbf 100644 --- a/lib/screens/reschedule-leaves/add-rescheduleleave.dart +++ b/lib/screens/reschedule-leaves/add-rescheduleleave.dart @@ -19,11 +19,13 @@ import 'package:provider/provider.dart'; class AddRescheduleLeavScreen extends StatelessWidget { ProjectViewModel projectsProvider; + @override Widget build(BuildContext context) { projectsProvider = Provider.of(context); return BaseView( - onModelReady: (model) => {model.getRescheduleLeave(), model.getCoveringDoctors()}, + onModelReady: (model) => + {model.getRescheduleLeave(), model.getCoveringDoctors()}, builder: (_, model, w) => AppScaffold( baseViewModel: model, isShowAppBar: true, @@ -48,7 +50,8 @@ class AddRescheduleLeavScreen extends StatelessWidget { ), ), Column( - children: model.getReschduleLeave.map((GetRescheduleLeavesResponse item) { + children: model.getReschduleLeave + .map((GetRescheduleLeavesResponse item) { return Padding( padding: const EdgeInsets.all(8.0), child: RoundedContainer( @@ -76,55 +79,77 @@ class AddRescheduleLeavScreen extends StatelessWidget { child: Wrap( children: [ Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ - Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Container( - padding: EdgeInsets.all(3), - margin: EdgeInsets.only(top: 10), - child: AppText( - item.statusDescription, - fontWeight: FontWeight.bold, - color: item.status == 10 - ? Colors.red[800] - : item.status == 2 - ? HexColor('#CC9B14') - : item.status == 9 - ? AppGlobal.appGreenColor - : Colors.red, - fontSize: 14, - ), - ), - Padding( - padding: EdgeInsets.only(top: 10), - child: AppText( - AppDateUtils.convertStringToDateFormat( - item.createdOn, 'yyyy-MM-dd HH:mm'), - fontWeight: FontWeight.bold, - )) - ]), + Row( + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: [ + Container( + padding: EdgeInsets.all(3), + margin: + EdgeInsets.only(top: 10), + child: AppText( + item.statusDescription, + fontWeight: FontWeight.bold, + color: item.status == 10 + ? Colors.red[800] + : item.status == 2 + ? HexColor( + '#CC9B14') + : item.status == 9 + ? AppGlobal + .appGreenColor + : Colors.red, + fontSize: 14, + ), + ), + Padding( + padding: EdgeInsets.only( + top: 10), + child: AppText( + AppDateUtils + .convertStringToDateFormat( + item.createdOn, + 'yyyy-MM-dd HH:mm'), + fontWeight: + FontWeight.bold, + )) + ]), SizedBox( height: 5, ), Container( child: AppText( item.requisitionType == 1 - ? TranslationBase.of(context).offTime + ? TranslationBase.of(context) + .offTime : item.requisitionType == 2 - ? TranslationBase.of(context).holiday + ? TranslationBase.of( + context) + .holiday : item.requisitionType == 3 - ? TranslationBase.of(context).changeOfSchedule - : TranslationBase.of(context).newSchedule, + ? TranslationBase.of( + context) + .changeOfSchedule + : TranslationBase.of( + context) + .newSchedule, fontWeight: FontWeight.bold, )), SizedBox( height: 5, ), Row(children: [ - AppText(TranslationBase.of(context).startDate), + AppText(TranslationBase.of(context) + .startDate), AppText( - AppDateUtils.convertStringToDateFormat( - item.dateTimeFrom, 'yyyy-MM-dd HH:mm'), + AppDateUtils + .convertStringToDateFormat( + item.dateTimeFrom, + 'yyyy-MM-dd HH:mm'), fontWeight: FontWeight.bold, ) @@ -140,10 +165,14 @@ class AddRescheduleLeavScreen extends StatelessWidget { ), Row( children: [ - AppText(TranslationBase.of(context).endDate), AppText( - AppDateUtils.convertStringToDateFormat( - item.dateTimeTo, 'yyyy-MM-dd HH:mm'), + TranslationBase.of(context) + .endDate), + AppText( + AppDateUtils + .convertStringToDateFormat( + item.dateTimeTo, + 'yyyy-MM-dd HH:mm'), fontWeight: FontWeight.bold, ) ], @@ -155,10 +184,13 @@ class AddRescheduleLeavScreen extends StatelessWidget { model.coveringDoctors.length > 0 ? Row(children: [ AppText( - TranslationBase.of(context).coveringDoctor, + TranslationBase.of(context) + .coveringDoctor, ), AppText( - getDoctor(model.coveringDoctors, item.coveringDoctorId), + getDoctor( + model.coveringDoctors, + item.coveringDoctorId), fontWeight: FontWeight.bold, ) ]) @@ -168,18 +200,31 @@ class AddRescheduleLeavScreen extends StatelessWidget { // .reasons, // fontWeight: FontWeight.bold, // ), - Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Padding( - padding: EdgeInsets.only(bottom: 5), - child: AppText(getReasons(model.allReasons, item.reasonId))), - (item.status == 2) - ? IconButton( - icon: Image.asset('assets/images/edit.png'), - // color: AppGlobal.appGreenColor, //Colors.black, - onPressed: () => {openLeave(context, true, extendedData: item)}, - ) - : SizedBox(), - ]), + Row( + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: [ + Padding( + padding: EdgeInsets.only( + bottom: 5), + child: AppText(getReasons( + model.allReasons, + item.reasonId))), + (item.status == 2) + ? IconButton( + icon: Image.asset( + 'assets/images/edit.png'), + // color: AppGlobal.appGreenColor, //Colors.black, + onPressed: () => { + openLeave( + context, true, + extendedData: + item) + }, + ) + : SizedBox(), + ]), ], ), SizedBox( diff --git a/lib/screens/reschedule-leaves/reschedule_leave.dart b/lib/screens/reschedule-leaves/reschedule_leave.dart index 0e9bff00..62944e47 100644 --- a/lib/screens/reschedule-leaves/reschedule_leave.dart +++ b/lib/screens/reschedule-leaves/reschedule_leave.dart @@ -28,7 +28,9 @@ Helpers helpers = Helpers(); class RescheduleLeaveScreen extends StatefulWidget { final isUpdate; final updateData; + RescheduleLeaveScreen(this.isUpdate, this.updateData); + @override _RescheduleLeaveScreen createState() => _RescheduleLeaveScreen(); } @@ -52,6 +54,7 @@ class _RescheduleLeaveScreen extends State { String toTime; TextEditingController _controller4 = new TextEditingController(); TextEditingController _controller5 = new TextEditingController(); + void _presentDatePicker(id) { var date = new DateTime.now(); var initialDate = id == 'fromDate' @@ -99,7 +102,9 @@ class _RescheduleLeaveScreen extends State { @override Widget build(BuildContext context) { projectsProvider = Provider.of(context); - offTime = widget.updateData != null ? widget.updateData.requisitionType.toString() : offTime; + offTime = widget.updateData != null + ? widget.updateData.requisitionType.toString() + : offTime; return BaseView( onModelReady: (model) => model.getClinicsList(), builder: (_, model, w) => BaseView( @@ -246,17 +251,22 @@ class _RescheduleLeaveScreen extends State { Container( margin: EdgeInsets.all(8), decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(6.0)), - border: Border.all(width: 1.0, color: HexColor("#CCCCCC"))), + borderRadius: BorderRadius.all( + Radius.circular(6.0)), + border: Border.all( + width: 1.0, + color: HexColor("#CCCCCC"))), width: double.infinity, child: Padding( padding: EdgeInsets.only( top: SizeConfig.widthMultiplier * 0.9, - bottom: SizeConfig.widthMultiplier * 0.9, + bottom: + SizeConfig.widthMultiplier * 0.9, right: SizeConfig.widthMultiplier * 3, left: SizeConfig.widthMultiplier * 3), child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ Row( mainAxisSize: MainAxisSize.max, @@ -264,22 +274,35 @@ class _RescheduleLeaveScreen extends State { model2.allOffTime.length > 0 ? Expanded( // add Expanded to have your dropdown button fill remaining space - child: DropdownButtonHideUnderline( - child: DropdownButton( + child: + DropdownButtonHideUnderline( + child: + DropdownButton( // focusColor: Colors.grey, isExpanded: true, - value: offTime == null ? model2.allOffTime[0]['code'] : offTime, + value: offTime == null + ? model2.allOffTime[0] + ['code'] + : offTime, iconSize: 40, elevation: 16, - selectedItemBuilder: (BuildContext context) { - return model2.allOffTime.map((item) { + selectedItemBuilder: + (BuildContext + context) { + return model2.allOffTime + .map((item) { return Row( - mainAxisSize: MainAxisSize.max, + mainAxisSize: + MainAxisSize + .max, children: [ AppText( - item['description'], + item[ + 'description'], - fontSize: SizeConfig.textMultiplier * 2.1, + fontSize: SizeConfig + .textMultiplier * + 2.1, // color: // Colors.grey, ), @@ -293,21 +316,29 @@ class _RescheduleLeaveScreen extends State { }); if (offTime == '1') { model2.getReasons(18); - } else if (offTime == '2') { + } else if (offTime == + '2') { model2.getReasons(19); - } else if (offTime == '3' || offTime == '5') { - model2.getReasons(102); + } else if (offTime == + '3' || + offTime == '5') { + model2 + .getReasons(102); setState(() { offTime = newValue; }); } }, - items: model2.allOffTime.map((item) { - return DropdownMenuItem( - value: item['code'].toString(), + items: model2.allOffTime + .map((item) { + return DropdownMenuItem< + String>( + value: item['code'] + .toString(), child: Text( item['description'], - textAlign: TextAlign.end, + textAlign: + TextAlign.end, ), ); }).toList(), @@ -325,24 +356,37 @@ class _RescheduleLeaveScreen extends State { Container( margin: EdgeInsets.all(8), decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(6.0)), - border: Border.all(width: 1.0, color: HexColor("#CCCCCC"))), + borderRadius: BorderRadius.all( + Radius.circular(6.0)), + border: Border.all( + width: 1.0, + color: + HexColor("#CCCCCC"))), padding: EdgeInsets.all(5), child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ AppTextFormField( - hintText: TranslationBase.of(context).fromDate, + hintText: TranslationBase.of( + context) + .fromDate, borderColor: Colors.white, - prefix: IconButton(icon: Icon(Icons.calendar_today)), - textInputType: TextInputType.number, + prefix: IconButton( + icon: Icon(Icons + .calendar_today)), + textInputType: + TextInputType.number, controller: _toDateController, onTap: () { - _presentDatePicker('fromDate'); + _presentDatePicker( + 'fromDate'); }, inputFormatter: ONLY_DATE, - onChanged: (val) => fromDate = val, - onSaved: (val) => fromDate = val, + onChanged: (val) => + fromDate = val, + onSaved: (val) => + fromDate = val, ) ], )), @@ -352,24 +396,37 @@ class _RescheduleLeaveScreen extends State { child: Container( margin: EdgeInsets.all(8), decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(6.0)), - border: Border.all(width: 1.0, color: HexColor("#CCCCCC"))), + borderRadius: + BorderRadius.all( + Radius.circular( + 6.0)), + border: Border.all( + width: 1.0, + color: HexColor( + "#CCCCCC"))), padding: EdgeInsets.all(5), child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ DateTimePicker( - timeHintText: TranslationBase.of(context).fromTime, - type: DateTimePickerType.time, + timeHintText: + TranslationBase.of( + context) + .fromTime, + type: DateTimePickerType + .time, controller: _controller4, - onChanged: (val) => fromTime = val, + onChanged: (val) => + fromTime = val, validator: (val) { print(val); // setState( // () => _valueToValidate4 = val); return null; }, - onSaved: (val) => fromTime = val, + onSaved: (val) => + fromTime = val, ) ], ), @@ -379,24 +436,37 @@ class _RescheduleLeaveScreen extends State { child: Container( margin: EdgeInsets.all(8), decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(6.0)), - border: Border.all(width: 1.0, color: HexColor("#CCCCCC"))), + borderRadius: + BorderRadius.all( + Radius.circular( + 6.0)), + border: Border.all( + width: 1.0, + color: HexColor( + "#CCCCCC"))), padding: EdgeInsets.all(5), child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ DateTimePicker( - timeHintText: TranslationBase.of(context).toTime, - type: DateTimePickerType.time, + timeHintText: + TranslationBase.of( + context) + .toTime, + type: DateTimePickerType + .time, controller: _controller5, - onChanged: (val) => toTime = val, + onChanged: (val) => + toTime = val, validator: (val) { print(val); // setState( // () => _valueToValidate4 = val); return null; }, - onSaved: (val) => toTime = val, + onSaved: (val) => + toTime = val, ) ], ), @@ -411,21 +481,34 @@ class _RescheduleLeaveScreen extends State { Container( margin: EdgeInsets.all(8), decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(6.0)), - border: Border.all(width: 1.0, color: HexColor("#CCCCCC"))), + borderRadius: BorderRadius.all( + Radius.circular(6.0)), + border: Border.all( + width: 1.0, + color: + HexColor("#CCCCCC"))), padding: EdgeInsets.all(5), child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ AppTextFormField( - hintText: TranslationBase.of(context).fromDate, + hintText: + TranslationBase.of( + context) + .fromDate, borderColor: Colors.white, - prefix: IconButton(icon: Icon(Icons.calendar_today)), - textInputType: TextInputType.number, + prefix: IconButton( + icon: Icon(Icons + .calendar_today)), + textInputType: + TextInputType.number, readOnly: true, - controller: _toDateController, + controller: + _toDateController, onTap: () { - _presentDatePicker('fromDate'); + _presentDatePicker( + 'fromDate'); }, inputFormatter: ONLY_DATE, onChanged: (value) { @@ -438,21 +521,34 @@ class _RescheduleLeaveScreen extends State { Container( margin: EdgeInsets.all(8), decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(6.0)), - border: Border.all(width: 1.0, color: HexColor("#CCCCCC"))), + borderRadius: BorderRadius.all( + Radius.circular(6.0)), + border: Border.all( + width: 1.0, + color: + HexColor("#CCCCCC"))), padding: EdgeInsets.all(5), child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ AppTextFormField( - hintText: TranslationBase.of(context).toDate, + hintText: + TranslationBase + .of(context) + .toDate, readOnly: true, borderColor: Colors.white, - prefix: IconButton(icon: Icon(Icons.calendar_today)), - textInputType: TextInputType.number, - controller: _toDateController2, + prefix: IconButton( + icon: Icon(Icons + .calendar_today)), + textInputType: + TextInputType.number, + controller: + _toDateController2, onTap: () { - _presentDatePicker('toDate'); + _presentDatePicker( + 'toDate'); }, inputFormatter: ONLY_DATE, onChanged: (value) { @@ -467,17 +563,22 @@ class _RescheduleLeaveScreen extends State { Container( margin: EdgeInsets.all(8), decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(6.0)), - border: Border.all(width: 1.0, color: HexColor("#CCCCCC"))), + borderRadius: BorderRadius.all( + Radius.circular(6.0)), + border: Border.all( + width: 1.0, + color: HexColor("#CCCCCC"))), width: double.infinity, child: Padding( padding: EdgeInsets.only( top: SizeConfig.widthMultiplier * 0.9, - bottom: SizeConfig.widthMultiplier * 0.9, + bottom: + SizeConfig.widthMultiplier * 0.9, right: SizeConfig.widthMultiplier * 3, left: SizeConfig.widthMultiplier * 3), child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ Row( mainAxisSize: MainAxisSize.max, @@ -485,23 +586,39 @@ class _RescheduleLeaveScreen extends State { model2.allReasons.length > 0 ? Expanded( // add Expanded to have your dropdown button fill remaining space - child: DropdownButtonHideUnderline( - child: DropdownButton( + child: + DropdownButtonHideUnderline( + child: + DropdownButton( focusColor: Colors.grey, isExpanded: true, - value: model2.allReasons[0]['id'].toString() ?? "", + value: model2 + .allReasons[0] + ['id'] + .toString() ?? + "", iconSize: 40, elevation: 16, - selectedItemBuilder: (BuildContext context) { - return model2.allReasons.map((item) { + selectedItemBuilder: + (BuildContext + context) { + return model2.allReasons + .map((item) { return Row( - mainAxisSize: MainAxisSize.max, + mainAxisSize: + MainAxisSize + .max, children: [ AppText( - projectsProvider.isArabic - ? item['nameAr'] - : item['nameEn'], - fontSize: SizeConfig.textMultiplier * 2.1, + projectsProvider + .isArabic + ? item[ + 'nameAr'] + : item[ + 'nameEn'], + fontSize: SizeConfig + .textMultiplier * + 2.1, // color: // Colors.grey, ), @@ -514,12 +631,20 @@ class _RescheduleLeaveScreen extends State { reason = newValue; }) }, - items: model2.allReasons.map((item) { - return DropdownMenuItem( - value: item['id'].toString(), + items: model2.allReasons + .map((item) { + return DropdownMenuItem< + String>( + value: item['id'] + .toString(), child: Text( - projectsProvider.isArabic ? item['nameAr'] : item['nameEn'], - textAlign: TextAlign.end, + projectsProvider + .isArabic + ? item['nameAr'] + : item[ + 'nameEn'], + textAlign: + TextAlign.end, ), ); }).toList(), @@ -535,17 +660,22 @@ class _RescheduleLeaveScreen extends State { Container( margin: EdgeInsets.all(8), decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(6.0)), - border: Border.all(width: 1.0, color: HexColor("#CCCCCC"))), + borderRadius: BorderRadius.all( + Radius.circular(6.0)), + border: Border.all( + width: 1.0, + color: HexColor("#CCCCCC"))), width: double.infinity, child: Padding( padding: EdgeInsets.only( top: SizeConfig.widthMultiplier * 0.9, - bottom: SizeConfig.widthMultiplier * 0.9, + bottom: + SizeConfig.widthMultiplier * 0.9, right: SizeConfig.widthMultiplier * 3, left: SizeConfig.widthMultiplier * 3), child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ Row( mainAxisSize: MainAxisSize.max, @@ -556,22 +686,40 @@ class _RescheduleLeaveScreen extends State { child: DropdownSearch( mode: Mode.BOTTOM_SHEET, - dropdownSearchDecoration: InputDecoration( - contentPadding: EdgeInsets.all(0), border: InputBorder.none), + dropdownSearchDecoration: + InputDecoration( + contentPadding: + EdgeInsets + .all(0), + border: + InputBorder + .none), //maxHeight: 300, - items: model2.coveringDoctors.map((item) { - return projectsProvider.isArabic - ? item['doctorNameN'] - : item['doctorName']; + items: model2 + .coveringDoctors + .map((item) { + return projectsProvider + .isArabic + ? item[ + 'doctorNameN'] + : item[ + 'doctorName']; }).toList(), // label: "Doctor List", onChanged: (item) { - model2.coveringDoctors.forEach((newVal) => { - if (newVal['doctorName'] == item) - doctorID = newVal['DoctorID'] - }); + model2.coveringDoctors + .forEach( + (newVal) => { + if (newVal[ + 'doctorName'] == + item) + doctorID = + newVal['DoctorID'] + }); }, - selectedItem: getSelectedDoctor(model2), + selectedItem: + getSelectedDoctor( + model2), showSearchBox: true, // searchBoxDecoration: InputDecoration( // border: OutlineInputBorder(), @@ -580,11 +728,19 @@ class _RescheduleLeaveScreen extends State { // ), popupTitle: Container( height: 50, - decoration: BoxDecoration( - color: Theme.of(context).primaryColorDark, - borderRadius: BorderRadius.only( - topLeft: Radius.circular(20), - topRight: Radius.circular(20), + decoration: + BoxDecoration( + color: Theme.of( + context) + .primaryColorDark, + borderRadius: + BorderRadius.only( + topLeft: + Radius.circular( + 20), + topRight: + Radius.circular( + 20), ), ), child: Center( @@ -592,16 +748,25 @@ class _RescheduleLeaveScreen extends State { '', style: TextStyle( fontSize: 24, - fontWeight: FontWeight.bold, - color: Colors.white, + fontWeight: + FontWeight + .bold, + color: + Colors.white, ), ), ), ), - popupShape: RoundedRectangleBorder( - borderRadius: BorderRadius.only( - topLeft: Radius.circular(24), - topRight: Radius.circular(24), + popupShape: + RoundedRectangleBorder( + borderRadius: + BorderRadius.only( + topLeft: + Radius.circular( + 24), + topRight: + Radius.circular( + 24), ), ), ), @@ -675,14 +840,17 @@ class _RescheduleLeaveScreen extends State { )), SizedBox(height: SizeConfig.screenHeight * .3), Container( - margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5), + margin: EdgeInsets.all( + SizeConfig.widthMultiplier * 5), child: Wrap( alignment: WrapAlignment.center, children: [ AppButton( title: widget.isUpdate == true - ? TranslationBase.of(context).updateReschedule - : TranslationBase.of(context).addReschedule, + ? TranslationBase.of(context) + .updateReschedule + : TranslationBase.of(context) + .addReschedule, color: HexColor('#359846'), onPressed: () { if (offTime == '1' || offTime == '2') { @@ -692,7 +860,9 @@ class _RescheduleLeaveScreen extends State { addRecheduleLeave(model2); } } else { - DrAppToastMsg.showErrorToast(TranslationBase.of(context).onlyOfftimeHoliday); + DrAppToastMsg.showErrorToast( + TranslationBase.of(context) + .onlyOfftimeHoliday); } }, ), @@ -725,13 +895,16 @@ class _RescheduleLeaveScreen extends State { final df = new DateFormat('HH:mm:ss'); final dateFormat = new DateFormat('yyyy-MM-dd'); this.offTime = widget.updateData.requisitionType.toString(); - _toDateController.text = dateFormat.format(DateTime.parse(widget.updateData.dateTimeFrom)); + _toDateController.text = + dateFormat.format(DateTime.parse(widget.updateData.dateTimeFrom)); //df.format(DateTime.parse(widget.updateData.dateTimeFrom)); - this.fromTime = df.format(DateTime.parse(widget.updateData.dateTimeFrom)); + this.fromTime = + df.format(DateTime.parse(widget.updateData.dateTimeFrom)); this.fromTime = this.fromTime.substring(0, this.fromTime.length - 3); this.toTime = df.format(DateTime.parse(widget.updateData.dateTimeTo)); this.toTime = this.toTime.substring(0, this.toTime.length - 3); - _toDateController2.text = dateFormat.format(DateTime.parse(widget.updateData.dateTimeTo)); + _toDateController2.text = + dateFormat.format(DateTime.parse(widget.updateData.dateTimeTo)); _controller5.text = toTime; _controller4.text = fromTime; toDate = _toDateController2.text; @@ -744,7 +917,8 @@ class _RescheduleLeaveScreen extends State { getClinicName(model) { var clinicID = this.profile['ClinicID'] ?? 1; - var clinicInfo = model.clinicsList.where((i) => i['ClinicID'] == clinicID).toList(); + var clinicInfo = + model.clinicsList.where((i) => i['ClinicID'] == clinicID).toList(); return clinicInfo.length > 0 ? clinicInfo[0]['ClinicDescription'] : ""; } @@ -754,10 +928,16 @@ class _RescheduleLeaveScreen extends State { var fromDates = fromDate; var toDates = toDate; if (offTime == '1') { - fromDate = df.format( - DateTime.parse(dateFormat.format(fromDates) + 'T' + fromTime + ':' + DateTime.now().second.toString())); - toDate = df - .format(DateTime.parse(dateFormat.format(fromDates) + 'T' + toTime + ':' + DateTime.now().second.toString())); + fromDate = df.format(DateTime.parse(dateFormat.format(fromDates) + + 'T' + + fromTime + + ':' + + DateTime.now().second.toString())); + toDate = df.format(DateTime.parse(dateFormat.format(fromDates) + + 'T' + + toTime + + ':' + + DateTime.now().second.toString())); } else { fromDate = df.format(fromDates); toDate = df.format(toDates); @@ -772,7 +952,8 @@ class _RescheduleLeaveScreen extends State { "dateTimeTo": toDate, "date": offTime == '1' ? fromDate : df.format(DateTime.now()), "reasonId": reason == null ? model.allOffTime[0]['code'] : reason, - "coveringDoctorId": doctorID == null ? model.coveringDoctors[0]['doctorID'] : doctorID, + "coveringDoctorId": + doctorID == null ? model.coveringDoctors[0]['doctorID'] : doctorID, "status": 2, "schedule": [ { @@ -795,7 +976,8 @@ class _RescheduleLeaveScreen extends State { Navigator.push( context, MaterialPageRoute( - builder: (context) => AddRescheduleLeavScreen(), settings: RouteSettings(name: 'AddRescheduleLeaveScreen') + builder: (context) => AddRescheduleLeavScreen(), + settings: RouteSettings(name: 'AddRescheduleLeaveScreen') // MyReferredPatient(), ), ); @@ -810,13 +992,21 @@ class _RescheduleLeaveScreen extends State { dynamic fromDates = fromDate; dynamic toDates = toDate; if (offTime == '1') { - fromDate = - df.format(DateTime.parse(_toDateController.text)) + 'T' + fromTime + ':' + DateTime.now().second.toString(); - toDate = - df.format(DateTime.parse(_toDateController2.text)) + 'T' + toTime + ':' + DateTime.now().second.toString(); + fromDate = df.format(DateTime.parse(_toDateController.text)) + + 'T' + + fromTime + + ':' + + DateTime.now().second.toString(); + toDate = df.format(DateTime.parse(_toDateController2.text)) + + 'T' + + toTime + + ':' + + DateTime.now().second.toString(); } else { - fromDate = df.format(fromDates is DateTime ? fromDates : DateTime.parse(fromDates)); - toDate = df.format(toDates is DateTime ? toDates : DateTime.parse(toDates)); + fromDate = df.format( + fromDates is DateTime ? fromDates : DateTime.parse(fromDates)); + toDate = + df.format(toDates is DateTime ? toDates : DateTime.parse(toDates)); } Map request = { @@ -829,7 +1019,8 @@ class _RescheduleLeaveScreen extends State { "dateTimeTo": toDate, "date": offTime == '1' ? fromDate : df.format(DateTime.now()), "reasonId": reason == null ? model.allOffTime[0]['code'] : reason, - "coveringDoctorId": doctorID == null ? model.coveringDoctors[0]['doctorID'] : doctorID, + "coveringDoctorId": + doctorID == null ? model.coveringDoctors[0]['doctorID'] : doctorID, "status": 2, "schedule": [ { @@ -867,7 +1058,8 @@ class _RescheduleLeaveScreen extends State { : model2.coveringDoctors[0]['doctorName']; else { model2.coveringDoctors.forEach((newVal) => { - if (newVal['doctorID'].toString() == doctorID) {doctorName = newVal['doctorName']} + if (newVal['doctorID'].toString() == doctorID) + {doctorName = newVal['doctorName']} }); return doctorName; } diff --git a/lib/util/NotificationPermissionUtils.dart b/lib/util/NotificationPermissionUtils.dart index 8950fae3..aec7b0aa 100644 --- a/lib/util/NotificationPermissionUtils.dart +++ b/lib/util/NotificationPermissionUtils.dart @@ -4,39 +4,50 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:permission_handler/permission_handler.dart'; - class AppPermissionsUtils { - - static requestVideoCallPermission({BuildContext context, String type,Function onTapGrant}) async { - + static requestVideoCallPermission( + {BuildContext context, String type, Function onTapGrant}) async { var cameraPermission = Permission.camera; var microphonePermission = Permission.microphone; PermissionStatus permissionCameraStatus = await cameraPermission.status; - PermissionStatus permissionMicrophoneStatus = await microphonePermission.status; + PermissionStatus permissionMicrophoneStatus = + await microphonePermission.status; - if (permissionCameraStatus.isPermanentlyDenied || permissionMicrophoneStatus.isPermanentlyDenied) { - await _showPermissionDialog(context, type,onTapGrant); - } else if (!permissionCameraStatus.isGranted || !permissionMicrophoneStatus.isGranted) { + if (permissionCameraStatus.isPermanentlyDenied || + permissionMicrophoneStatus.isPermanentlyDenied) { + await _showPermissionDialog(context, type, onTapGrant); + } else if (!permissionCameraStatus.isGranted || + !permissionMicrophoneStatus.isGranted) { permissionCameraStatus = await cameraPermission.request(); permissionMicrophoneStatus = await microphonePermission.request(); - if (permissionCameraStatus.isDenied || permissionMicrophoneStatus.isDenied) - await _showPermissionDialog(context, type,onTapGrant); + if (permissionCameraStatus.isDenied || + permissionMicrophoneStatus.isDenied) + await _showPermissionDialog(context, type, onTapGrant); else - onTapGrant(); - } else if (permissionCameraStatus.isDenied || permissionMicrophoneStatus.isDenied) - await _showPermissionDialog(context, type,onTapGrant); + onTapGrant(); + } else if (permissionCameraStatus.isDenied || + permissionMicrophoneStatus.isDenied) + await _showPermissionDialog(context, type, onTapGrant); else onTapGrant(); } - static _showPermissionDialog(BuildContext context, String type,Function onTapGrant) async { + static _showPermissionDialog( + BuildContext context, String type, Function onTapGrant) async { Navigator.push( - context, SlideUpPageRoute(widget: AskPermissionDialog(type: type,onTapGrant: onTapGrant,))); + context, + SlideUpPageRoute( + widget: AskPermissionDialog( + type: type, + onTapGrant: onTapGrant, + ))); } static Future isVideoCallPermissionGranted() async { PermissionStatus permissionCameraStatus = await Permission.camera.status; - PermissionStatus permissionMicrophoneStatus = await Permission.microphone.status; - return permissionCameraStatus.isGranted && permissionMicrophoneStatus.isGranted; + PermissionStatus permissionMicrophoneStatus = + await Permission.microphone.status; + return permissionCameraStatus.isGranted && + permissionMicrophoneStatus.isGranted; } } diff --git a/lib/util/VideoChannel.dart b/lib/util/VideoChannel.dart index 0239bf57..5ce83044 100644 --- a/lib/util/VideoChannel.dart +++ b/lib/util/VideoChannel.dart @@ -1,4 +1,3 @@ - import 'dart:convert'; import 'dart:io' show Platform; @@ -7,22 +6,36 @@ import 'package:doctor_app_flutter/models/livecare/session_status_model.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -class VideoChannel{ +class VideoChannel { /// channel name static const _channel = const MethodChannel("Dr.cloudSolution/videoCall"); - static openVideoCallScreen({kApiKey, kSessionId, kToken, callDuration, warningDuration,int vcId,String tokenID, - String generalId,int doctorId, String patientName, bool isRecording = false, Function() onCallEnd , - Function(SessionStatusModel sessionStatusModel) onCallNotRespond ,Function(String error) onFailure, VoidCallback onCallConnected, VoidCallback onCallDisconnected}) async { - onCallConnected = onCallConnected ?? (){}; - onCallDisconnected = onCallDisconnected ?? (){}; + static openVideoCallScreen( + {kApiKey, + kSessionId, + kToken, + callDuration, + warningDuration, + int vcId, + String tokenID, + String generalId, + int doctorId, + String patientName, + bool isRecording = false, + Function() onCallEnd, + Function(SessionStatusModel sessionStatusModel) onCallNotRespond, + Function(String error) onFailure, + VoidCallback onCallConnected, + VoidCallback onCallDisconnected}) async { + onCallConnected = onCallConnected ?? () {}; + onCallDisconnected = onCallDisconnected ?? () {}; var result; try { _channel.setMethodCallHandler((call) { - if(call.method == 'onCallConnected'){ + if (call.method == 'onCallConnected') { onCallConnected(); } - if(call.method == 'onCallDisconnected'){ + if (call.method == 'onCallDisconnected') { onCallDisconnected(); } return true as dynamic; @@ -39,24 +52,22 @@ class VideoChannel{ "VC_ID": vcId, "TokenID": tokenID, "generalId": generalId, - "DoctorId": doctorId , - "patientName": patientName, - "isRecording": isRecording, + "DoctorId": doctorId, + "patientName": patientName, + "isRecording": isRecording, }, ); - if(result['callResponse'] == 'CallEnd') { + if (result['callResponse'] == 'CallEnd') { onCallEnd(); - } - else { - SessionStatusModel sessionStatusModel = SessionStatusModel.fromJson(Platform.isIOS ?result['sessionStatus'] :json.decode(result['sessionStatus'])); + } else { + SessionStatusModel sessionStatusModel = SessionStatusModel.fromJson( + Platform.isIOS + ? result['sessionStatus'] + : json.decode(result['sessionStatus'])); onCallNotRespond(sessionStatusModel); } - } catch (e) { onFailure(e.toString()); } - } - - -} \ No newline at end of file +} diff --git a/lib/util/date-utils.dart b/lib/util/date-utils.dart index a10a18e3..7c68d649 100644 --- a/lib/util/date-utils.dart +++ b/lib/util/date-utils.dart @@ -24,7 +24,7 @@ class AppDateUtils { return convertDateToFormat(dateTime, dateFormat); } - static String convertToServerFormat(String date, String dateFormat){ + static String convertToServerFormat(String date, String dateFormat) { return '/Date(${DateFormat(dateFormat).parse(date).millisecondsSinceEpoch})/'; } diff --git a/lib/util/dr_app_shared_pref.dart b/lib/util/dr_app_shared_pref.dart index bac296bf..decbe080 100644 --- a/lib/util/dr_app_shared_pref.dart +++ b/lib/util/dr_app_shared_pref.dart @@ -81,10 +81,10 @@ class DrAppSharedPreferances { return prefs.getInt(key); } - getObj(String key) async{ + getObj(String key) async { final SharedPreferences prefs = await _prefs; var string = prefs.getString(key); - if (string == null ){ + if (string == null) { return null; } return json.decode(string); @@ -92,8 +92,8 @@ class DrAppSharedPreferances { clear() async { final SharedPreferences prefs = await _prefs; - var vvas= await prefs.clear(); - var asd; + var vvas = await prefs.clear(); + var asd; } remove(String key) async { diff --git a/lib/util/extenstions.dart b/lib/util/extenstions.dart index da353ad0..0d170be7 100644 --- a/lib/util/extenstions.dart +++ b/lib/util/extenstions.dart @@ -14,9 +14,8 @@ extension Truncate on String { return length <= max ? this : '${substring(0, max - suffix.length)}$suffix'; - } catch (e){ + } catch (e) { return this; } } } - diff --git a/lib/util/helpers.dart b/lib/util/helpers.dart index 82f5c753..3d9a0b1d 100644 --- a/lib/util/helpers.dart +++ b/lib/util/helpers.dart @@ -332,49 +332,56 @@ class Helpers { bool isMiddle = false, bool isLast = false, bool isActive = false, - double radius = 6.0, ProjectViewModel projectViewModel}) { + 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)), + 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)), ); } diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index 0c25bca7e..6aa9c6c7 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -73,15 +73,19 @@ class TranslationBase { String get searchPatient => localizedValues['searchPatient'][locale.languageCode]; + String get searchPatientDashBoard => localizedValues['searchPatientDashBoard'][locale.languageCode]; + String get searchPatientName => localizedValues['searchPatient-name'][locale.languageCode]; String get searchAbout => localizedValues['searchAbout'][locale.languageCode]; String get patient => localizedValues['patient'][locale.languageCode]; + String get patients => localizedValues['patients'][locale.languageCode]; + String get labResult => localizedValues['labResult'][locale.languageCode]; String get todayStatistics => @@ -105,9 +109,12 @@ class TranslationBase { String get referral => localizedValues['referral'][locale.languageCode]; String get inPatient => localizedValues['inPatient'][locale.languageCode]; + String get myInPatient => localizedValues['myInPatient'][locale.languageCode]; + String get myInPatientTitle => localizedValues['myInPatientTitle'][locale.languageCode]; + String get inPatientLabel => localizedValues['inPatientLabel'][locale.languageCode]; @@ -121,6 +128,7 @@ class TranslationBase { String get searchMedicine => localizedValues['searchMedicine'][locale.languageCode]; + String get searchMedicineDashboard => localizedValues['searchMedicineDashboard'][locale.languageCode]; @@ -134,19 +142,24 @@ class TranslationBase { String get myReferredPatient => localizedValues['myReferredPatient'][locale.languageCode]; + String get referredPatient => localizedValues['referredPatient'][locale.languageCode]; + String get referredOn => localizedValues['referredOn'][locale.languageCode]; String get firstName => localizedValues['firstName'][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 lastName => localizedValues['lastName'][locale.languageCode]; + String get lastNameInAr => localizedValues['lastNameInAr'][locale.languageCode]; @@ -260,9 +273,12 @@ class TranslationBase { String get progressNote => localizedValues['progressNote'][locale.languageCode]; + String get operationReports => localizedValues['operationReports'][locale.languageCode]; + String get reports => localizedValues['reports'][locale.languageCode]; + String get operation => localizedValues['operation'][locale.languageCode]; String get progress => localizedValues['progress'][locale.languageCode]; @@ -275,6 +291,7 @@ class TranslationBase { localizedValues['errorNoProgressNote'][locale.languageCode]; String get invoiceNo => localizedValues['invoiceNo:'][locale.languageCode]; + String get orderNo => localizedValues['orderNo'][locale.languageCode]; String get generalResult => @@ -361,10 +378,14 @@ class TranslationBase { String get age => localizedValues['age'][locale.languageCode]; String get nationality => localizedValues['nationality'][locale.languageCode]; + String get occupation => localizedValues['occupation'][locale.languageCode]; + String get healthID => localizedValues['healthID'][locale.languageCode]; + String get identityNumber => localizedValues['identityNumber'][locale.languageCode]; + String get maritalStatus => localizedValues['maritalStatus'][locale.languageCode]; @@ -426,6 +447,7 @@ class TranslationBase { String get myOutPatient => localizedValues['myOutPatient'][locale.languageCode]; + String get myOutPatient_2lines => localizedValues['myOutPatient_2lines'][locale.languageCode]; @@ -559,10 +581,13 @@ class TranslationBase { localizedValues['add-sickleave'][locale.languageCode]; String get add => localizedValues['add'][locale.languageCode]; + String get addSickLeaverequest => localizedValues['addSickLeaveRequest'][locale.languageCode]; + String get extendSickLeaverequest => localizedValues['extendSickLeaveRequest'][locale.languageCode]; + String get approved => localizedValues['approved'][locale.languageCode]; String get extended => localizedValues['extended'][locale.languageCode]; @@ -587,6 +612,7 @@ class TranslationBase { localizedValues['no-priscription-listed'][locale.languageCode]; String get next => localizedValues['next'][locale.languageCode]; + String get finish => localizedValues['finish'][locale.languageCode]; String get previous => localizedValues['previous'][locale.languageCode]; @@ -604,6 +630,7 @@ class TranslationBase { String get referredFrom => localizedValues['referredFrom'][locale.languageCode]; + String get refClinic => localizedValues['refClinic'][locale.languageCode]; String get branch => localizedValues['branch'][locale.languageCode]; @@ -662,6 +689,7 @@ class TranslationBase { String get applyOrRescheduleLeave => localizedValues['applyOrRescheduleLeave'][locale.languageCode]; + String get myQRCode => localizedValues['myQRCode'][locale.languageCode]; String get addMedication => @@ -697,12 +725,17 @@ class TranslationBase { String get yourBodyMassIndex => localizedValues['yourBodyMassIndex'][locale.languageCode]; + String get bmiUnderWeight => localizedValues['bmiUnderWeight'][locale.languageCode]; + String get bmiHealthy => localizedValues['bmiHealthy'][locale.languageCode]; + String get bmiOverWeight => localizedValues['bmiOverWeight'][locale.languageCode]; + String get bmiObese => localizedValues['bmiObese'][locale.languageCode]; + String get bmiObeseExtreme => localizedValues['bmiObeseExtreme'][locale.languageCode]; @@ -786,6 +819,7 @@ class TranslationBase { String get emergencyAdmission => localizedValues['emergencyAdmission'][locale.languageCode]; + String get isSickLeaveRequired => localizedValues['isSickLeaveRequired'][locale.languageCode]; @@ -825,6 +859,7 @@ class TranslationBase { String get postPlansEstimatedCost => localizedValues['postPlansEstimatedCost'][locale.languageCode]; + String get postPlans => localizedValues['postPlans'][locale.languageCode]; String get ucaf => localizedValues['ucaf'][locale.languageCode]; @@ -969,6 +1004,7 @@ class TranslationBase { String get verifySMS => localizedValues['verify-with-sms'][locale.languageCode]; + String get verifyWith => localizedValues['verify-with'][locale.languageCode]; String get verifyWhatsApp => @@ -1007,6 +1043,7 @@ class TranslationBase { String get allergicTO => localizedValues['allergicTO'][locale.languageCode]; String get normal => localizedValues['normal'][locale.languageCode]; + String get notExamined => localizedValues['notExamined'][locale.languageCode]; String get abnormal => localizedValues['abnormal'][locale.languageCode]; @@ -1061,6 +1098,7 @@ class TranslationBase { String get addSelectedProcedures => localizedValues['addSelectedProcedures'][locale.languageCode]; + String get addProcedures => localizedValues['addProcedures'][locale.languageCode]; @@ -1118,6 +1156,7 @@ class TranslationBase { String get chiefComplaintErrorMsg => localizedValues['chiefComplaintErrorMsg'][locale.languageCode]; + String get ICDName => localizedValues['ICDName'][locale.languageCode]; String get referralStatus => @@ -1125,36 +1164,54 @@ class TranslationBase { String get referralRemark => localizedValues['referralRemark'][locale.languageCode]; + String get offTime => localizedValues['offTime'][locale.languageCode]; String get icd => localizedValues['icd'][locale.languageCode]; + String get days => localizedValues['days'][locale.languageCode]; + String get hr => localizedValues['hr'][locale.languageCode]; + String get min => localizedValues['min'][locale.languageCode]; + String get months => localizedValues['months'][locale.languageCode]; + String get years => localizedValues['years'][locale.languageCode]; + String get referralStatusHold => localizedValues['referralStatusHold'][locale.languageCode]; + String get referralStatusActive => localizedValues['referralStatusActive'][locale.languageCode]; + String get referralStatusCancelled => localizedValues['referralStatusCancelled'][locale.languageCode]; + String get referralStatusCompleted => localizedValues['referralStatusCompleted'][locale.languageCode]; + String get referralStatusNotSeen => localizedValues['referralStatusNotSeen'][locale.languageCode]; + String get clinicSearch => localizedValues['clinicSearch'][locale.languageCode]; + String get doctorSearch => localizedValues['doctorSearch'][locale.languageCode]; + String get referralResponse => localizedValues['referralResponse'][locale.languageCode]; + String get estimatedCost => localizedValues['estimatedCost'][locale.languageCode]; + String get diagnosisDetail => localizedValues['diagnosisDetail'][locale.languageCode]; + String get referralSuccessMsgAccept => localizedValues['referralSuccessMsgAccept'][locale.languageCode]; + String get referralSuccessMsgReject => localizedValues['referralSuccessMsgReject'][locale.languageCode]; @@ -1163,28 +1220,41 @@ class TranslationBase { String get appointmentNumber => localizedValues['appointmentNumber'][locale.languageCode]; + String get sickLeaveComments => localizedValues['sickLeaveComments'][locale.languageCode]; + String get pastMedicalHistory => localizedValues['pastMedicalHistory'][locale.languageCode]; + String get pastSurgicalHistory => localizedValues['pastSurgicalHistory'][locale.languageCode]; + String get complications => localizedValues['complications'][locale.languageCode]; + String get floor => localizedValues['floor'][locale.languageCode]; + String get roomCategory => localizedValues['roomCategory'][locale.languageCode]; + String get otherDepartmentsInterventions => localizedValues['otherDepartmentsInterventions'][locale.languageCode]; + String get otherProcedure => localizedValues['otherProcedure'][locale.languageCode]; + String get admissionRequestSuccessMsg => localizedValues['admissionRequestSuccessMsg'][locale.languageCode]; + String get infoStatus => localizedValues['infoStatus'][locale.languageCode]; + String get doctorResponse => localizedValues['doctorResponse'][locale.languageCode]; + String get sickleaveonhold => localizedValues['sickleaveonhold'][locale.languageCode]; + String get noClinic => localizedValues['no-clinic'][locale.languageCode]; String get otherStatistic => @@ -1192,298 +1262,478 @@ class TranslationBase { String get patientsreferral => localizedValues['ptientsreferral'][locale.languageCode]; + String get myPatientsReferral => localizedValues['myPatientsReferral'][locale.languageCode]; + String get arrivalpatient => localizedValues['arrivalpatient'][locale.languageCode]; + String get searchmedicinepatient => localizedValues['searchmedicinepatient'][locale.languageCode]; + String get appointmentDate => localizedValues['appointmentDate'][locale.languageCode]; + String get arrivedP => localizedValues['arrived_p'][locale.languageCode]; String get details => localizedValues['details'][locale.languageCode]; + String get liveCare => localizedValues['liveCare'][locale.languageCode]; + String get outpatient => localizedValues['out-patient'][locale.languageCode]; + String get billNo => localizedValues['BillNo'][locale.languageCode]; + String get labResults => localizedValues['labResults'][locale.languageCode]; + String get sendSuc => localizedValues['sendSuc'][locale.languageCode]; + String get specialResult => localizedValues['SpecialResult'][locale.languageCode]; + String get noDataAvailable => localizedValues['noDataAvailable'][locale.languageCode]; + String get showMoreBtn => localizedValues['show-more-btn'][locale.languageCode]; + String get showDetail => localizedValues['showDetail'][locale.languageCode]; + String get viewProfile => localizedValues['viewProfile'][locale.languageCode]; String get fileNumber => localizedValues['fileNumber'][locale.languageCode]; + String get reschedule => localizedValues['reschedule'][locale.languageCode]; + String get leaves => localizedValues['leaves'][locale.languageCode]; + String get openRad => localizedValues['open-rad'][locale.languageCode]; String get totalApproval => localizedValues['totalApproval'][locale.languageCode]; + String get procedureStatus => localizedValues['procedureStatus'][locale.languageCode]; + String get unusedCount => localizedValues['unusedCount'][locale.languageCode]; + String get companyName => localizedValues['companyName'][locale.languageCode]; + String get procedureName => localizedValues['procedureName'][locale.languageCode]; + String get usageStatus => localizedValues['usageStatus'][locale.languageCode]; + String get prescriptions => localizedValues['prescriptions'][locale.languageCode]; + String get notes => localizedValues['notes'][locale.languageCode]; + String get dailyDoses => localizedValues['dailyDoses'][locale.languageCode]; + String get searchWithOther => localizedValues['searchWithOther'][locale.languageCode]; + String get hideOtherCriteria => localizedValues['hideOtherCriteria'][locale.languageCode]; + String get applyForReschedule => localizedValues['applyForReschedule'][locale.languageCode]; String get startDate => localizedValues['startDate'][locale.languageCode]; + String get endDate => localizedValues['endDate'][locale.languageCode]; String get addReschedule => localizedValues['add-reschedule'][locale.languageCode]; + String get updateReschedule => localizedValues['update-reschedule'][locale.languageCode]; + String get sickLeave => localizedValues['sick_leave'][locale.languageCode]; + String get accepted => localizedValues['accepted'][locale.languageCode]; + String get cancelled => localizedValues['cancelled'][locale.languageCode]; + String get unReplied => localizedValues['unReplied'][locale.languageCode]; + String get replied => localizedValues['replied'][locale.languageCode]; + String get typeHereToReply => localizedValues['typeHereToReply'][locale.languageCode]; + String get searchHere => localizedValues['searchHere'][locale.languageCode]; + String get remove => localizedValues['remove'][locale.languageCode]; + String get inProgress => localizedValues['inProgress'][locale.languageCode]; + String get completed => localizedValues['Completed'][locale.languageCode]; + String get locked => localizedValues['Locked'][locale.languageCode]; String get step => localizedValues['step'][locale.languageCode]; + String get fieldRequired => localizedValues['fieldRequired'][locale.languageCode]; + String get noSickLeave => localizedValues['no-sickleve'][locale.languageCode]; + String get changeOfSchedule => localizedValues['changeOfSchedule'][locale.languageCode]; + String get newSchedule => localizedValues['newSchedule'][locale.languageCode]; + String get enterCredentials => localizedValues['enter_credentials'][locale.languageCode]; + String get patpatientIDMobilenationalientID => localizedValues['patientIDMobilenational'][locale.languageCode]; String get updateNow => localizedValues['updateNow'][locale.languageCode]; + String get updateTheApp => localizedValues['updateTheApp'][locale.languageCode]; + String get admissionDate => localizedValues['admission-date'][locale.languageCode]; + String get noOfDays => localizedValues['noOfDays'][locale.languageCode]; + String get numOfDays => localizedValues['numOfDays'][locale.languageCode]; + String get replayBefore => localizedValues['replayBefore'][locale.languageCode]; + String get trySaying => localizedValues["try-saying"][locale.languageCode]; + String get acknowledged => localizedValues['acknowledged'][locale.languageCode]; + String get didntCatch => localizedValues["didntCatch"][locale.languageCode]; + String get pleaseEnterProcedure => localizedValues["pleaseEnterProcedure"][locale.languageCode]; + String get fillTheMandatoryProcedureDetails => localizedValues["fillTheMandatoryProcedureDetails"][locale.languageCode]; + String get atLeastThreeCharacters => localizedValues["atLeastThreeCharacters"][locale.languageCode]; + String get searchProcedureHere => localizedValues["searchProcedureHere"][locale.languageCode]; + String get noInsuranceApprovalFound => localizedValues["noInsuranceApprovalFound"][locale.languageCode]; + String get procedure => localizedValues["procedure"][locale.languageCode]; + String get stopDate => localizedValues["stopDate"][locale.languageCode]; + String get processed => localizedValues["processed"][locale.languageCode]; + String get direction => localizedValues["direction"][locale.languageCode]; + String get refill => localizedValues["refill"][locale.languageCode]; + String get medicationHasBeenAdded => localizedValues["medicationHasBeenAdded"][locale.languageCode]; + String get newPrescriptionOrder => localizedValues["newPrescriptionOrder"][locale.languageCode]; + String get pleaseFillAllFields => localizedValues["pleaseFillAllFields"][locale.languageCode]; + String get narcoticMedicineCanOnlyBePrescribedFromVida => localizedValues["narcoticMedicineCanOnlyBePrescribedFromVida"] [locale.languageCode]; + String get only5DigitsAllowedForStrength => localizedValues["only5DigitsAllowedForStrength"][locale.languageCode]; + String get unit => localizedValues["unit"][locale.languageCode]; + String get boxQuantity => localizedValues["boxQuantity"][locale.languageCode]; + String get orderTestOr => localizedValues["orderTestOr"][locale.languageCode]; + String get applyForRadiologyOrder => localizedValues["applyForRadiologyOrder"][locale.languageCode]; + String get applyForNewLabOrder => localizedValues["applyForNewLabOrder"][locale.languageCode]; + String get addLabOrder => localizedValues["addLabOrder"][locale.languageCode]; + String get addRadiologyOrder => localizedValues["addRadiologyOrder"][locale.languageCode]; + String get newRadiologyOrder => localizedValues["newRadiologyOrder"][locale.languageCode]; + String get orderDate => localizedValues["orderDate"][locale.languageCode]; + String get examType => localizedValues["examType"][locale.languageCode]; + String get health => localizedValues["health"][locale.languageCode]; + String get summary => localizedValues["summary"][locale.languageCode]; + String get applyForNewPrescriptionsOrder => localizedValues["applyForNewPrescriptionsOrder"][locale.languageCode]; + String get noPrescriptionsFound => localizedValues["noPrescriptionsFound"][locale.languageCode]; + String get noMedicalFileFound => localizedValues["noMedicalFileFound"][locale.languageCode]; + String get insurance22 => localizedValues["insurance22"][locale.languageCode]; + String get approvals22 => localizedValues["approvals22"][locale.languageCode]; + String get severe => localizedValues["severe"][locale.languageCode]; + String get graphDetails => localizedValues["graphDetails"][locale.languageCode]; + String get discharged => localizedValues["discharged"][locale.languageCode]; + String get addNewOrderSheet => localizedValues["addNewOrderSheet"][locale.languageCode]; + String get addNewProgressNote => localizedValues["addNewProgressNote"][locale.languageCode]; + String get notePending => localizedValues["notePending"][locale.languageCode]; + String get noteCanceled => localizedValues["noteCanceled"][locale.languageCode]; + String get noteVerified => localizedValues["noteVerified"][locale.languageCode]; + String get noteVerify => localizedValues["noteVerify"][locale.languageCode]; + String get noteConfirm => localizedValues["noteConfirm"][locale.languageCode]; + String get noteAdd => localizedValues["noteAdd"][locale.languageCode]; String get noteUpdate => localizedValues["noteUpdate"][locale.languageCode]; String get orderSheet => localizedValues["orderSheet"][locale.languageCode]; + String get order => localizedValues["order"][locale.languageCode]; + String get sheet => localizedValues["sheet"][locale.languageCode]; + String get medical => localizedValues["medical"][locale.languageCode]; + String get report => localizedValues["report"][locale.languageCode]; + String get discharge => localizedValues["discharge"][locale.languageCode]; + String get none => localizedValues["none"][locale.languageCode]; + String get notRepliedYet => localizedValues["notRepliedYet"][locale.languageCode]; + String get clearText => localizedValues["clearText"][locale.languageCode]; + String get medicalReportAdd => localizedValues['medicalReportAdd'][locale.languageCode]; + String get medicalReportVerify => localizedValues['medicalReportVerify'][locale.languageCode]; + String get comments => localizedValues['comments'][locale.languageCode]; + String get initiateCall => localizedValues['initiateCall'][locale.languageCode]; + String get endCall => localizedValues['endCall'][locale.languageCode]; String get transferTo => localizedValues['transferTo'][locale.languageCode]; + String get admin => localizedValues['admin'][locale.languageCode]; + String get instructions => localizedValues['instructions'][locale.languageCode]; + String get sendLC => localizedValues['sendLC'][locale.languageCode]; + String get endLC => localizedValues['endLC'][locale.languageCode]; + String get consultation => localizedValues['consultation'][locale.languageCode]; + String get resume => localizedValues['resume'][locale.languageCode]; + String get theCall => localizedValues['theCall'][locale.languageCode]; + String get createNewMedicalReport => localizedValues['createNewMedicalReport'][locale.languageCode]; + String get historyPhysicalFinding => localizedValues['historyPhysicalFinding'][locale.languageCode]; + String get laboratoryPhysicalData => localizedValues['laboratoryPhysicalData'][locale.languageCode]; + String get impressionRecommendation => localizedValues['impressionRecommendation'][locale.languageCode]; + String get onHold => localizedValues['onHold'][locale.languageCode]; + String get verified => localizedValues['verified'][locale.languageCode]; + String get favoriteTemplates => localizedValues['favoriteTemplates'][locale.languageCode]; + String get allProcedures => localizedValues['allProcedures'][locale.languageCode]; + String get allRadiology => localizedValues['allRadiology'][locale.languageCode]; + String get allLab => localizedValues['allLab'][locale.languageCode]; + String get allPrescription => localizedValues['allPrescription'][locale.languageCode]; + String get addPrescription => localizedValues['addPrescription'][locale.languageCode]; + String get edit => localizedValues['edit'][locale.languageCode]; + String get summeryReply => localizedValues['summeryReply'][locale.languageCode]; + String get severityValidationError => localizedValues['severityValidationError'][locale.languageCode]; + String get textCopiedSuccessfully => localizedValues['textCopiedSuccessfully'][locale.languageCode]; + String get roomNo => localizedValues['roomNo'][locale.languageCode]; + String get seeMore => localizedValues['seeMore'][locale.languageCode]; + String get replayCallStatus => localizedValues['replayCallStatus'][locale.languageCode]; + String get patientArrived => localizedValues['patientArrived'][locale.languageCode]; + String get calledAndNoResponse => localizedValues['calledAndNoResponse'][locale.languageCode]; + String get underProcess => localizedValues['underProcess'][locale.languageCode]; + String get textResponse => localizedValues['textResponse'][locale.languageCode]; + String get special => localizedValues['special'][locale.languageCode]; + String get requestType => localizedValues['requestType'][locale.languageCode]; + String get allClinic => localizedValues['allClinic'][locale.languageCode]; + String get notReplied => localizedValues['notReplied'][locale.languageCode]; + String get registerNewPatient => localizedValues['registerNewPatient'][locale.languageCode]; + String get registeraPatient => localizedValues['registeraPatient'][locale.languageCode]; + String get operationTimeStart => localizedValues['operationTimeStart'][locale.languageCode]; + String get operationDate => localizedValues['operationDate'][locale.languageCode]; + String get reservation => localizedValues['reservation'][locale.languageCode]; + String get anesthetist => localizedValues['anesthetist'][locale.languageCode]; + String get bloodTransfusedDetail => localizedValues['bloodTransfusedDetail'][locale.languageCode]; + String get circulatingNurse => localizedValues['circulatingNurse'][locale.languageCode]; + String get scrubNurse => localizedValues['scrubNurse'][locale.languageCode]; + String get otherSpecimen => localizedValues['otherSpecimen'][locale.languageCode]; + String get microbiologySpecimen => localizedValues['microbiologySpecimen'][locale.languageCode]; + String get histopathSpecimen => localizedValues['histopathSpecimen'][locale.languageCode]; + String get bloodLossDetail => localizedValues['bloodLossDetail'][locale.languageCode]; + String get complicationDetails1 => localizedValues['complicationDetails1'][locale.languageCode]; + String get postOperationInstruction => localizedValues['postOperationInstruction'][locale.languageCode]; + String get surgeryProcedure => localizedValues['surgeryProcedure'][locale.languageCode]; + String get finding => localizedValues['finding'][locale.languageCode]; + String get preOperationDiagnosis => localizedValues['preOperationDiagnosis'][locale.languageCode]; + String get postOperationDiagnosis => localizedValues['postOperationDiagnosis'][locale.languageCode]; + String get surgeon => localizedValues['surgeon'][locale.languageCode]; + String get assistant => localizedValues['assistant'][locale.languageCode]; + String get askForIdentification => localizedValues['askForIdentification'][locale.languageCode]; + String get iDNumber => localizedValues['iDNumber'][locale.languageCode]; + String get calender => localizedValues['calender'][locale.languageCode]; + String get gregorian => localizedValues['gregorian'][locale.languageCode]; + String get hijri => localizedValues['hijri'][locale.languageCode]; + String get birthdate => localizedValues['birthdate'][locale.languageCode]; + String get activation => localizedValues['activation'][locale.languageCode]; + String get confirmation => localizedValues['confirmation'][locale.languageCode]; + String get diabetic => localizedValues['diabetic'][locale.languageCode]; + String get chart => localizedValues['chart'][locale.languageCode]; String get investigation => localizedValues['investigation'][locale.languageCode]; + String get conditionOnDischarge => localizedValues['conditionOnDischarge'][locale.languageCode]; + String get planedProcedure => localizedValues['planedProcedure'][locale.languageCode]; + String get moreDetails => localizedValues['moreDetails'][locale.languageCode]; } diff --git a/lib/widgets/auth/method_type_card.dart b/lib/widgets/auth/method_type_card.dart index 9839d0ad..acc5eba1 100644 --- a/lib/widgets/auth/method_type_card.dart +++ b/lib/widgets/auth/method_type_card.dart @@ -72,10 +72,11 @@ import 'package:hexcolor/hexcolor.dart'; class MethodTypeCard extends StatelessWidget { const MethodTypeCard({ Key key, - this.assetPath, - this.onTap, - this.label, - this.height = 20, this.isSvg = true, + this.assetPath, + this.onTap, + this.label, + this.height = 20, + this.isSvg = true, }) : super(key: key); final String assetPath; final GestureTapCallback onTap; @@ -83,10 +84,14 @@ class MethodTypeCard extends StatelessWidget { final double height; final bool isSvg; - @override Widget build(BuildContext context) { - double cardHeight = SizeConfig.heightMultiplier * (SizeConfig.isHeightVeryShort? 22 : SizeConfig.isHeightLarge?25:20); + double cardHeight = SizeConfig.heightMultiplier * + (SizeConfig.isHeightVeryShort + ? 22 + : SizeConfig.isHeightLarge + ? 25 + : 20); return InkWell( onTap: onTap, child: Container( @@ -106,19 +111,23 @@ class MethodTypeCard extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start, children: [ - isSvg?SvgPicture.asset(assetPath, width: SizeConfig.widthMultiplier* (14), - height: cardHeight * 0.20): Image.asset( - assetPath, - width: SizeConfig.widthMultiplier* (12), - height: cardHeight * 0.35, - // height: , - ), + isSvg + ? SvgPicture.asset(assetPath, + width: SizeConfig.widthMultiplier * (14), + height: cardHeight * 0.20) + : Image.asset( + assetPath, + width: SizeConfig.widthMultiplier * (12), + height: cardHeight * 0.35, + // height: , + ), SizedBox( height: height, ), AppText( label, - fontSize: SizeConfig.getTextMultiplierBasedOnWidth()* (SizeConfig.isHeightVeryShort?3:3.7), + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * + (SizeConfig.isHeightVeryShort ? 3 : 3.7), color: AppGlobal.appTextColor, fontWeight: FontWeight.w600, letterSpacing: -0.48, @@ -130,4 +139,3 @@ class MethodTypeCard extends StatelessWidget { ); } } - diff --git a/lib/widgets/auth/sms-popup.dart b/lib/widgets/auth/sms-popup.dart index bd3a31f9..6c1227c0 100644 --- a/lib/widgets/auth/sms-popup.dart +++ b/lib/widgets/auth/sms-popup.dart @@ -46,6 +46,7 @@ class SMSOTP { ProjectViewModel projectProvider; String displayTime = ''; bool isClosed = false; + displayDialog(BuildContext context) async { double dialogWidth = MediaQuery.of(context).size.width * 0.90; double dialogInputWidth = (dialogWidth / 4) - @@ -136,7 +137,8 @@ class SMSOTP { fontSize: SizeConfig .getTextMultiplierBasedOnWidth( width: dialogWidth) * - 3.5, //14, + 3.5, + //14, maxLines: 2, )), Form( diff --git a/lib/widgets/auth/verification_methods_list.dart b/lib/widgets/auth/verification_methods_list.dart index 97fbb42b..061bf468 100644 --- a/lib/widgets/auth/verification_methods_list.dart +++ b/lib/widgets/auth/verification_methods_list.dart @@ -40,18 +40,16 @@ class _VerificationMethodsListState extends State { assetPath: 'assets/images/svgs/verification/verify-whtsapp.svg', onTap: () => {widget.authenticateUser(AuthMethodTypes.WhatsApp, true)}, - label: TranslationBase - .of(context) - .verifyWith+ TranslationBase.of(context).verifyWhatsApp, + label: TranslationBase.of(context).verifyWith + + TranslationBase.of(context).verifyWhatsApp, ); break; case AuthMethodTypes.SMS: return MethodTypeCard( assetPath: "assets/images/svgs/verification/verify-sms.svg", onTap: () => {widget.authenticateUser(AuthMethodTypes.SMS, true)}, - label:TranslationBase - .of(context) - .verifyWith+ TranslationBase.of(context).verifySMS, + label: TranslationBase.of(context).verifyWith + + TranslationBase.of(context).verifySMS, ); break; case AuthMethodTypes.Fingerprint: @@ -60,13 +58,11 @@ class _VerificationMethodsListState extends State { onTap: () async { if (await widget.authenticationViewModel .checkIfBiometricAvailable(BiometricType.fingerprint)) { - widget.authenticateUser(AuthMethodTypes.Fingerprint, true); } }, - label: TranslationBase - .of(context) - .verifyWith+TranslationBase.of(context).verifyFingerprint, + label: TranslationBase.of(context).verifyWith + + TranslationBase.of(context).verifyFingerprint, ); break; case AuthMethodTypes.FaceID: @@ -78,9 +74,8 @@ class _VerificationMethodsListState extends State { widget.authenticateUser(AuthMethodTypes.FaceID, true); } }, - label: TranslationBase - .of(context) - .verifyWith+TranslationBase.of(context).verifyFaceID, + label: TranslationBase.of(context).verifyWith + + TranslationBase.of(context).verifyFaceID, ); break; diff --git a/lib/widgets/charts/app_bar_chart.dart b/lib/widgets/charts/app_bar_chart.dart index aa532306..08b7ff93 100644 --- a/lib/widgets/charts/app_bar_chart.dart +++ b/lib/widgets/charts/app_bar_chart.dart @@ -23,20 +23,19 @@ class AppBarChart extends StatelessWidget { /// (typically bar charts). primaryMeasureAxis: new charts.NumericAxisSpec( renderSpec: new charts.GridlineRendererSpec( - // Display the measure axis labels below the gridline. - // - // 'Before' & 'after' follow the axis value direction. - // Vertical axes draw 'before' below & 'after' above the tick. - // Horizontal axes draw 'before' left & 'after' right the tick. - labelAnchor: charts.TickLabelAnchor.before, + // Display the measure axis labels below the gridline. + // + // 'Before' & 'after' follow the axis value direction. + // Vertical axes draw 'before' below & 'after' above the tick. + // Horizontal axes draw 'before' left & 'after' right the tick. + labelAnchor: charts.TickLabelAnchor.before, - // Left justify the text in the axis. - // - // Note: outside means that the secondary measure axis would right - // justify. - labelJustification: - charts.TickLabelJustification.outside, - )), + // Left justify the text in the axis. + // + // Note: outside means that the secondary measure axis would right + // justify. + labelJustification: charts.TickLabelJustification.outside, + )), ), ); } diff --git a/lib/widgets/charts/app_time_series_chart.dart b/lib/widgets/charts/app_time_series_chart.dart index 670284a1..d8757c80 100644 --- a/lib/widgets/charts/app_time_series_chart.dart +++ b/lib/widgets/charts/app_time_series_chart.dart @@ -42,7 +42,7 @@ class AppTimeSeriesChart extends StatelessWidget { charts.RangeAnnotation( [ charts.RangeAnnotationSegment(startDate, endDate, - charts.RangeAnnotationAxisType.domain ), + charts.RangeAnnotationAxisType.domain), ], ), ], diff --git a/lib/widgets/dashboard/activity_button.dart b/lib/widgets/dashboard/activity_button.dart index 4a6e90cd..4b4c96da 100644 --- a/lib/widgets/dashboard/activity_button.dart +++ b/lib/widgets/dashboard/activity_button.dart @@ -10,18 +10,27 @@ class GetActivityCard extends StatelessWidget { @override Widget build(BuildContext context) { - double width = SizeConfig.heightMultiplier* (SizeConfig.isHeightVeryShort?16:SizeConfig.isHeightShort?14:SizeConfig.isHeightLarge?15:13); + double width = SizeConfig.heightMultiplier * + (SizeConfig.isHeightVeryShort + ? 16 + : SizeConfig.isHeightShort + ? 14 + : SizeConfig.isHeightLarge + ? 15 + : 13); return Container( width: width, - padding: EdgeInsets.symmetric(horizontal: SizeConfig.heightMultiplier * .4, vertical: SizeConfig.heightMultiplier * .2), - margin: EdgeInsets.all(SizeConfig.widthMultiplier *1), + padding: EdgeInsets.symmetric( + horizontal: SizeConfig.heightMultiplier * .4, + vertical: SizeConfig.heightMultiplier * .2), + margin: EdgeInsets.all(SizeConfig.widthMultiplier * 1), decoration: BoxDecoration( color: Colors.white, border: Border.all(width: 1.5, color: Color(0xFFEFEFEF)), borderRadius: BorderRadius.circular(15), ), child: Padding( - padding: const EdgeInsets.fromLTRB(8,8, 8, 4), + padding: const EdgeInsets.fromLTRB(8, 8, 8, 4), child: Center( child: Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -29,21 +38,27 @@ class GetActivityCard extends StatelessWidget { children: [ AppText( value.value.toString(), - fontSize: SizeConfig.getTextMultiplierBasedOnWidth(width: width)* 25, + fontSize: + SizeConfig.getTextMultiplierBasedOnWidth(width: width) * 25, fontWeight: FontWeight.bold, color: AppGlobal.appTextColor, - letterSpacing: -0.93, + letterSpacing: -0.93, ), AppText( value.kPIParameter, textOverflow: TextOverflow.clip, fontHeight: 1.4, - - fontSize: SizeConfig.getTextMultiplierBasedOnWidth(width: width)* (SizeConfig.isHeightVeryShort?8: SizeConfig.isHeightShort?8: 9.3), + fontSize: + SizeConfig.getTextMultiplierBasedOnWidth(width: width) * + (SizeConfig.isHeightVeryShort + ? 8 + : SizeConfig.isHeightShort + ? 8 + : 9.3), color: AppGlobal.appTextColor, textAlign: TextAlign.start, fontWeight: FontWeight.w600, - letterSpacing: -0.33, + letterSpacing: -0.33, ), ], ), diff --git a/lib/widgets/dashboard/dashboard_item_icons_texts.dart b/lib/widgets/dashboard/dashboard_item_icons_texts.dart index 740ebb66..607c4b20 100644 --- a/lib/widgets/dashboard/dashboard_item_icons_texts.dart +++ b/lib/widgets/dashboard/dashboard_item_icons_texts.dart @@ -1,4 +1,3 @@ - import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:flutter/material.dart'; @@ -17,6 +16,7 @@ class DashboardItemIconText extends StatefulWidget { final Color valueFontColor; final double valueFontSize; final Color iconColor; + // OWNER : Ibrahim albitar // DATE : 05-04-2020 // DESCRIPTION : Custom widget for dashboard items has texts and icons widgets @@ -30,6 +30,7 @@ class DashboardItemIconText extends StatefulWidget { this.titleFontColor = Colors.white, this.iconColor = Colors.white, this.borderColor = Colors.white}); + @override _DashboardItemTextsState createState() => _DashboardItemTextsState(); } diff --git a/lib/widgets/dashboard/dashboard_item_texts_widget.dart b/lib/widgets/dashboard/dashboard_item_texts_widget.dart index 659e4562..e1ce6cb8 100644 --- a/lib/widgets/dashboard/dashboard_item_texts_widget.dart +++ b/lib/widgets/dashboard/dashboard_item_texts_widget.dart @@ -27,6 +27,7 @@ class DashboardItemTexts extends StatefulWidget { class _DashboardItemTextsState extends State { ProjectViewModel projectsProvider; + @override Widget build(BuildContext context) { projectsProvider = Provider.of(context); diff --git a/lib/widgets/dashboard/guage_chart.dart b/lib/widgets/dashboard/guage_chart.dart index 6769c568..a2693ca7 100644 --- a/lib/widgets/dashboard/guage_chart.dart +++ b/lib/widgets/dashboard/guage_chart.dart @@ -1,4 +1,3 @@ - import 'package:charts_flutter/flutter.dart' as charts; import 'package:flutter/material.dart'; @@ -16,6 +15,7 @@ class GaugeChart extends StatelessWidget { animate: false, ); } + @override Widget build(BuildContext context) { return new charts.PieChart(seriesList, @@ -50,5 +50,6 @@ class GaugeSegment { final String segment; final int size; final charts.Color color; + GaugeSegment(this.segment, this.size, this.color); } diff --git a/lib/widgets/dashboard/out_patient_stack.dart b/lib/widgets/dashboard/out_patient_stack.dart index 6b3d87d5..afce5f30 100644 --- a/lib/widgets/dashboard/out_patient_stack.dart +++ b/lib/widgets/dashboard/out_patient_stack.dart @@ -12,28 +12,32 @@ class GetOutPatientStack extends StatelessWidget { @override Widget build(BuildContext context) { - - double barHeight = - SizeConfig.heightMultiplier * (SizeConfig.isHeightVeryShort ? 20 : SizeConfig.isHeightLarge?20:17); - value.summaryoptions.sort((Summaryoptions a, Summaryoptions b) => b.value - a.value); + double barHeight = SizeConfig.heightMultiplier * + (SizeConfig.isHeightVeryShort + ? 20 + : SizeConfig.isHeightLarge + ? 20 + : 17); + value.summaryoptions + .sort((Summaryoptions a, Summaryoptions b) => b.value - a.value); value.summaryoptions .sort((Summaryoptions a, Summaryoptions b) => b.value - a.value); var list = new List(); - value.summaryoptions.forEach((result) => - {list.add(getStack(result, value.summaryoptions.first.value,context,barHeight))}); + value.summaryoptions.forEach((result) => { + list.add(getStack( + result, value.summaryoptions.first.value, context, barHeight)) + }); return Container( margin: EdgeInsets.only(bottom: 20, top: 10, left: 5, right: 5), decoration: BoxDecoration( - color: Colors.white, borderRadius: BorderRadius.only( topLeft: Radius.circular(20), topRight: Radius.circular(20), bottomLeft: Radius.circular(20), - bottomRight: Radius.circular(20) - ), + bottomRight: Radius.circular(20)), boxShadow: [ BoxShadow( color: Colors.grey.withOpacity(0.5), @@ -44,43 +48,41 @@ class GetOutPatientStack extends StatelessWidget { ], ), child: Padding( - padding: const EdgeInsets.all(5.0), - child:Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - Container( - padding: EdgeInsets.symmetric(horizontal: 5, vertical: 5), - child: Label( - firstLine: Helpers.getLabelFromKPI(value.kPIName), - secondLine: Helpers.getNameFromKPI(value.kPIName), - color: Color(0xFF2B353E), - firstLineFontSize: - SizeConfig.getHeightMultiplier(height: barHeight) * - (SizeConfig.isHeightVeryShort - ? 10 - : SizeConfig.isHeightShort - ? 10 - : 8.5), - secondLineFontSize: - SizeConfig.getHeightMultiplier(height: barHeight) * - (SizeConfig.isHeightVeryShort - ? 15 - : SizeConfig.isHeightShort - ? 15 - : 14.5), + padding: const EdgeInsets.all(5.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Container( + padding: EdgeInsets.symmetric(horizontal: 5, vertical: 5), + child: Label( + firstLine: Helpers.getLabelFromKPI(value.kPIName), + secondLine: Helpers.getNameFromKPI(value.kPIName), + color: Color(0xFF2B353E), + firstLineFontSize: + SizeConfig.getHeightMultiplier(height: barHeight) * + (SizeConfig.isHeightVeryShort + ? 10 + : SizeConfig.isHeightShort + ? 10 + : 8.5), + secondLineFontSize: + SizeConfig.getHeightMultiplier(height: barHeight) * + (SizeConfig.isHeightVeryShort + ? 15 + : SizeConfig.isHeightShort + ? 15 + : 14.5), + ), ), - ), - Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: list) - ], - ) - - ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: list) + ], + )), ); } - - getStack(Summaryoptions value, max, context, barHeight) { return Expanded( child: Container( @@ -88,8 +90,10 @@ class GetOutPatientStack extends StatelessWidget { decoration: BoxDecoration( gradient: LinearGradient( begin: Alignment.topLeft, - end: Alignment(0.0, 1.0), // 10% of the width, so there are ten blinds. - colors: [Color(0x8FF5F6FA), Colors.red[100]], // red to yellow + end: Alignment(0.0, 1.0), + // 10% of the width, so there are ten blinds. + colors: [Color(0x8FF5F6FA), Colors.red[100]], + // red to yellow tileMode: TileMode.mirror, // repeats the gradient over the canvas ), borderRadius: BorderRadius.circular(4), @@ -119,34 +123,33 @@ class GetOutPatientStack extends StatelessWidget { child: Center( child: Align( child: FittedBox( - child: Row( - children: [ - AppText( - value.kPIParameter, - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 2.5, - textAlign: TextAlign.center, - color: Color(0xFF2B353E), - fontWeight: FontWeight.w500, - letterSpacing: -0.3, - ), - AppText( - ' (' + value.value.toString() + ') ', - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 2.5, - textAlign: TextAlign.center, - color: Color(0xFF2B353E), - letterSpacing: -0.3, - fontWeight: FontWeight.bold, - ), - ], + child: Row( + children: [ + AppText( + value.kPIParameter, + fontSize: + SizeConfig.getTextMultiplierBasedOnWidth() * 2.5, + textAlign: TextAlign.center, + color: Color(0xFF2B353E), + fontWeight: FontWeight.w500, + letterSpacing: -0.3, + ), + AppText( + ' (' + value.value.toString() + ') ', + fontSize: + SizeConfig.getTextMultiplierBasedOnWidth() * 2.5, + textAlign: TextAlign.center, + color: Color(0xFF2B353E), + letterSpacing: -0.3, + fontWeight: FontWeight.bold, ), - )), + ], + ), + )), ), )) ]), ), ); } - } - - diff --git a/lib/widgets/dashboard/row_count.dart b/lib/widgets/dashboard/row_count.dart index 820dcd37..b9ac83f5 100644 --- a/lib/widgets/dashboard/row_count.dart +++ b/lib/widgets/dashboard/row_count.dart @@ -9,13 +9,14 @@ class RowCounts extends StatelessWidget { final Color c; final double height; - RowCounts(this.name, this.count, this.c, {this.height}); + @override Widget build(BuildContext context) { return Container( - padding: EdgeInsets.only(top:SizeConfig.getHeightMultiplier(height:height )* 0.2 , bottom: SizeConfig.getHeightMultiplier(height:height )* 0.2), - + padding: EdgeInsets.only( + top: SizeConfig.getHeightMultiplier(height: height) * 0.2, + bottom: SizeConfig.getHeightMultiplier(height: height) * 0.2), child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -29,16 +30,19 @@ class RowCounts extends StatelessWidget { name, color: AppGlobal.appTextColor, fontWeight: FontWeight.w400, - textAlign: TextAlign.start, // from TextAlign.center + textAlign: TextAlign.start, + // from TextAlign.center fontSize: 14, letterSpacing: -0.84, textOverflow: TextOverflow.ellipsis, ), - SizedBox(width: 4,), + SizedBox( + width: 4, + ), AppText( - count.toString(), - color: AppGlobal.appTextColor, + count.toString(), + color: AppGlobal.appTextColor, textAlign: TextAlign.center, fontSize: 14, letterSpacing: -0.84, diff --git a/lib/widgets/dashboard/swiper_rounded_pagination.dart b/lib/widgets/dashboard/swiper_rounded_pagination.dart index 7e5c2c70..e564399f 100644 --- a/lib/widgets/dashboard/swiper_rounded_pagination.dart +++ b/lib/widgets/dashboard/swiper_rounded_pagination.dart @@ -2,7 +2,9 @@ import 'package:flutter/material.dart'; class SwiperRoundedPagination extends StatelessWidget { final active; + SwiperRoundedPagination(this.active); + @override Widget build(BuildContext context) { return active == true diff --git a/lib/widgets/data_display/list/flexible_container.dart b/lib/widgets/data_display/list/flexible_container.dart index a35fa279..6ed049ad 100644 --- a/lib/widgets/data_display/list/flexible_container.dart +++ b/lib/widgets/data_display/list/flexible_container.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; + /// Flexible container widget /// [widthFactor] If non-null, the fraction of the incoming width given to the child. /// If non-null, the child is given a tight width constraint that is the max diff --git a/lib/widgets/doctor/lab_result_widget.dart b/lib/widgets/doctor/lab_result_widget.dart index 3872063a..9de818a5 100644 --- a/lib/widgets/doctor/lab_result_widget.dart +++ b/lib/widgets/doctor/lab_result_widget.dart @@ -144,7 +144,8 @@ class _LabResultWidgetState extends State { Expanded( child: Container( child: Center( - child: AppText('${result.resultValue}', + child: AppText( + '${result.resultValue}', color: Colors.grey[800]), ), height: 60), diff --git a/lib/widgets/doctor/my_referral_patient_widget.dart b/lib/widgets/doctor/my_referral_patient_widget.dart index 453cff30..d73c5d3f 100644 --- a/lib/widgets/doctor/my_referral_patient_widget.dart +++ b/lib/widgets/doctor/my_referral_patient_widget.dart @@ -431,7 +431,7 @@ class _MyReferralPatientWidgetState extends State { width: double.infinity, margin: EdgeInsets.only(left: 10, right: 10), child: AppButton( - title : TranslationBase.of(context).replay, + title: TranslationBase.of(context).replay, onPressed: () async { final form = _formKey.currentState; if (form.validate()) { diff --git a/lib/widgets/doctor/my_schedule_widget.dart b/lib/widgets/doctor/my_schedule_widget.dart index 5c21f9ad..6be68264 100644 --- a/lib/widgets/doctor/my_schedule_widget.dart +++ b/lib/widgets/doctor/my_schedule_widget.dart @@ -34,7 +34,10 @@ class MyScheduleWidget extends StatelessWidget { height: 10, ), AppText( - projectViewModel.isArabic?AppDateUtils.getWeekDayArabic(workingHoursTable.date.weekday): AppDateUtils.getWeekDay(workingHoursTable.date.weekday) , + projectViewModel.isArabic + ? AppDateUtils.getWeekDayArabic( + workingHoursTable.date.weekday) + : AppDateUtils.getWeekDay(workingHoursTable.date.weekday), fontSize: 16, fontFamily: 'Poppins', // fontSize: 18 @@ -75,33 +78,34 @@ class MyScheduleWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: workingHours.map((work) { return Container( - margin: EdgeInsets.only(bottom:workingHours.length>1? 15:0), + margin: EdgeInsets.only( + bottom: workingHours.length > 1 ? 15 : 0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ SizedBox( height: 5, ), - if(workingHoursTable.clinicName!=null) - AppText( - workingHoursTable.clinicName??"", - fontSize: 15, - fontWeight: FontWeight.w700, - ), + if (workingHoursTable.clinicName != null) + AppText( + workingHoursTable.clinicName ?? "", + fontSize: 15, + fontWeight: FontWeight.w700, + ), Container( - width: MediaQuery.of(context).size.width*0.55, + width: MediaQuery.of(context).size.width * 0.55, child: AppText( - '${work.from} - ${work.to}', + '${work.from} - ${work.to}', fontSize: 15, fontWeight: FontWeight.w300, ), ), - if(workingHoursTable.projectName!=null) - AppText( - workingHoursTable.projectName??"", - fontSize: 15, - fontWeight: FontWeight.w700, - ), + if (workingHoursTable.projectName != null) + AppText( + workingHoursTable.projectName ?? "", + fontSize: 15, + fontWeight: FontWeight.w700, + ), ], ), ); diff --git a/lib/widgets/home/home_item.dart b/lib/widgets/home/home_item.dart index 0de07d7b..55175fab 100644 --- a/lib/widgets/home/home_item.dart +++ b/lib/widgets/home/home_item.dart @@ -7,6 +7,7 @@ class HomeItem extends StatelessWidget { final String link; HomeItem(this.id, this.title, this.image, this.link); + @override Widget build(BuildContext context) { return InkWell( diff --git a/lib/widgets/medicine/medicine_item_widget.dart b/lib/widgets/medicine/medicine_item_widget.dart index 03350f0e..9768d4d1 100644 --- a/lib/widgets/medicine/medicine_item_widget.dart +++ b/lib/widgets/medicine/medicine_item_widget.dart @@ -29,6 +29,7 @@ class MedicineItemWidget extends StatefulWidget { this.showBorder = false, this.borderColor = Colors.white, this.url}); + @override _MedicineItemWidgetState createState() => _MedicineItemWidgetState(); } diff --git a/lib/widgets/patients/clinic_list_dropdwon.dart b/lib/widgets/patients/clinic_list_dropdwon.dart index c903bd7b..3f8f973d 100644 --- a/lib/widgets/patients/clinic_list_dropdwon.dart +++ b/lib/widgets/patients/clinic_list_dropdwon.dart @@ -7,10 +7,9 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; class ClinicList extends StatelessWidget { - ProjectViewModel projectsProvider; final int clinicId; - final Function (int value) onClinicChange; + final Function(int value) onClinicChange; ClinicList({Key key, this.clinicId, this.onClinicChange}) : super(key: key); @@ -20,80 +19,57 @@ class ClinicList extends StatelessWidget { projectsProvider = Provider.of(context); return Container( - child: - projectsProvider - .doctorClinicsList.length > - 0 + child: projectsProvider.doctorClinicsList.length > 0 ? FractionallySizedBox( - widthFactor: 0.9, - child: Column( - children: [ - Container( - width: MediaQuery.of(context).size.width *0.8, - child: Center( - child: DropdownButtonHideUnderline( - child: DropdownButton( - dropdownColor: - Colors.white, - iconEnabledColor: - Colors.black, - isExpanded: true, - value: clinicId == null - ? projectsProvider - .doctorClinicsList[ - 0] - .clinicID - : clinicId, - iconSize: 25, - elevation: 16, - selectedItemBuilder: - (BuildContext - context) { - return projectsProvider - .doctorClinicsList - .map((item) { - return Row( - mainAxisSize: - MainAxisSize - .max, - children: [ - AppText( - item.clinicName, - fontSize: SizeConfig - .textMultiplier * - 2.1, - color: Colors - .black, - ), - ], + widthFactor: 0.9, + child: Column( + children: [ + Container( + width: MediaQuery.of(context).size.width * 0.8, + child: Center( + child: DropdownButtonHideUnderline( + child: DropdownButton( + dropdownColor: Colors.white, + iconEnabledColor: Colors.black, + isExpanded: true, + value: clinicId == null + ? projectsProvider.doctorClinicsList[0].clinicID + : clinicId, + iconSize: 25, + elevation: 16, + selectedItemBuilder: (BuildContext context) { + return projectsProvider.doctorClinicsList.map((item) { + return Row( + mainAxisSize: MainAxisSize.max, + children: [ + AppText( + item.clinicName, + fontSize: SizeConfig.textMultiplier * 2.1, + color: Colors.black, + ), + ], + ); + }).toList(); + }, + onChanged: (newValue) { + onClinicChange(newValue); + }, + items: projectsProvider.doctorClinicsList.map((item) { + return DropdownMenuItem( + child: Text( + item.clinicName, + textAlign: TextAlign.end, + ), + value: item.clinicID, ); - }).toList(); - }, - onChanged: (newValue){ - onClinicChange(newValue); - }, - items: projectsProvider - .doctorClinicsList - .map((item) { - return DropdownMenuItem( - child: Text( - item.clinicName, - textAlign: - TextAlign.end, - ), - value: item.clinicID, - ); - }).toList(), - )), + }).toList(), + )), + ), + ), + ], ), - ), - ], - ), - ) - : AppText( - TranslationBase - .of(context) - .noClinic), + ) + : AppText(TranslationBase.of(context).noClinic), ); } -} \ No newline at end of file +} diff --git a/lib/widgets/patients/dynamic_elements.dart b/lib/widgets/patients/dynamic_elements.dart index d2a68acd..bca60f5b 100644 --- a/lib/widgets/patients/dynamic_elements.dart +++ b/lib/widgets/patients/dynamic_elements.dart @@ -10,7 +10,9 @@ import 'package:intl/intl.dart'; class DynamicElements extends StatefulWidget { final PatientModel _patientSearchFormValues; final bool isFormSubmitted; + DynamicElements(this._patientSearchFormValues, this.isFormSubmitted); + @override _DynamicElementsState createState() => _DynamicElementsState(); } @@ -18,6 +20,7 @@ class DynamicElements extends StatefulWidget { class _DynamicElementsState extends State { TextEditingController _toDateController = new TextEditingController(); TextEditingController _fromDateController = new TextEditingController(); + void _presentDatePicker(id) { showDatePicker( context: context, diff --git a/lib/widgets/patients/patient-referral-item-widget.dart b/lib/widgets/patients/patient-referral-item-widget.dart index d7594707..3935bb6b 100644 --- a/lib/widgets/patients/patient-referral-item-widget.dart +++ b/lib/widgets/patients/patient-referral-item-widget.dart @@ -95,7 +95,7 @@ class PatientReferralItemWidget extends StatelessWidget { : Colors.red[900], ), AppText( - referredDate??"", + referredDate ?? "", fontFamily: 'Poppins', fontWeight: FontWeight.w600, letterSpacing: -0.48, @@ -108,7 +108,7 @@ class PatientReferralItemWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( - patientName??"", + patientName ?? "", fontSize: 16.0, fontWeight: FontWeight.w600, color: Color(0xff2E303A), @@ -129,7 +129,7 @@ class PatientReferralItemWidget extends StatelessWidget { width: 4, ), AppText( - referredTime??"", + referredTime ?? "", fontFamily: 'Poppins', fontWeight: FontWeight.w600, fontSize: 12.0, @@ -146,19 +146,16 @@ class PatientReferralItemWidget extends StatelessWidget { child: Column( children: [ CustomRow( - label: - TranslationBase.of(context).fileNumber, + label: TranslationBase.of(context).fileNumber, value: patientID, ), CustomRow( label: isSameBranch - ? TranslationBase.of(context) - .referredFrom + ? TranslationBase.of(context).referredFrom : TranslationBase.of(context).refClinic, value: !isReferralClinic ? isSameBranch - ? TranslationBase.of(context) - .sameBranch + ? TranslationBase.of(context).sameBranch : TranslationBase.of(context) .otherBranch : " " + referralClinic, diff --git a/lib/widgets/patients/patient_card/PatientCard.dart b/lib/widgets/patients/patient_card/PatientCard.dart index af987a3b..1ec30afb 100644 --- a/lib/widgets/patients/patient_card/PatientCard.dart +++ b/lib/widgets/patients/patient_card/PatientCard.dart @@ -208,30 +208,30 @@ class PatientCard extends StatelessWidget { ) : patientInfo.arrivedOn != null ? Container( - padding: EdgeInsets.only(right: 9), - - child: AppText( - "${AppDateUtils.getStartTime(patientInfo.startTime)}", - fontFamily: 'Poppins', - fontWeight: FontWeight.w600, - fontSize: 11, - letterSpacing: -0.64, - ), - ) + padding: EdgeInsets.only(right: 9), + child: AppText( + "${AppDateUtils.getStartTime(patientInfo.startTime)}", + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 11, + letterSpacing: -0.64, + ), + ) : (patientInfo.appointmentDate != null && patientInfo .appointmentDate.isNotEmpty) ? Container( - padding: EdgeInsets.only(right: 9), - child: AppText( - " ${AppDateUtils.getStartTime(patientInfo.startTime)}", - fontFamily: 'Poppins', - fontWeight: FontWeight.w600, - fontSize: 11, - letterSpacing: -0.64, - ), - ) + padding: + EdgeInsets.only(right: 9), + child: AppText( + " ${AppDateUtils.getStartTime(patientInfo.startTime)}", + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + fontSize: 11, + letterSpacing: -0.64, + ), + ) : SizedBox() ], )) @@ -317,8 +317,8 @@ class PatientCard extends StatelessWidget { patientInfo.nationality != null || patientInfo.nationalityId != null ? Container( - padding: EdgeInsets.only( - right: 7, top: 5), + padding: EdgeInsets.only( + right: 7, top: 5), child: ClipRRect( borderRadius: BorderRadius.circular(20.0), @@ -555,9 +555,7 @@ class PatientCard extends StatelessWidget { children: [ Container( padding: EdgeInsets.only( - left: 9, - right: 9, - bottom: 9), + left: 9, right: 9, bottom: 9), child: SvgPicture.asset( 'assets/images/svgs/inpatient.svg', height: 25, diff --git a/lib/widgets/patients/patient_card/ShowTimer.dart b/lib/widgets/patients/patient_card/ShowTimer.dart index b769588b..5b255f84 100644 --- a/lib/widgets/patients/patient_card/ShowTimer.dart +++ b/lib/widgets/patients/patient_card/ShowTimer.dart @@ -1,4 +1,3 @@ - import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; @@ -7,9 +6,9 @@ import 'package:flutter/material.dart'; class ShowTimer extends StatefulWidget { final PatiantInformtion patientInfo; - const ShowTimer({ - Key key, this.patientInfo, + Key key, + this.patientInfo, }) : super(key: key); @override @@ -17,7 +16,6 @@ class ShowTimer extends StatefulWidget { } class _ShowTimerState extends State { - int remainingTime = 600; String displayTime = ''; @@ -52,7 +50,8 @@ class _ShowTimerState extends State { DateTime now = DateTime.now(); DateTime liveCareDate = DateTime.parse(widget.patientInfo.arrivalTime); String timer = AppDateUtils.differenceBetweenDateAndCurrent( - liveCareDate, context, isShowSecond: true, isShowDays: false); + liveCareDate, context, + isShowSecond: true, isShowDays: false); return timer; } diff --git a/lib/widgets/patients/profile/PatientProfileButton.dart b/lib/widgets/patients/profile/PatientProfileButton.dart index a3c4492f..8588afb0 100644 --- a/lib/widgets/patients/profile/PatientProfileButton.dart +++ b/lib/widgets/patients/profile/PatientProfileButton.dart @@ -71,55 +71,57 @@ class PatientProfileButton extends StatelessWidget { navigator(context, this.route); }, child: Column( - mainAxisAlignment: MainAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, children: [ - Container( - padding: EdgeInsets.fromLTRB(8, 0, 8, 8), - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Container( - child: isDartIcon - ? Icon( - dartIcon, - size: 30, - color: color ?? Color(0xFF333C45), - ) - : new SvgPicture.asset( - icon, - width: 30, - height: 30, - ), - ) - ], - )), - Container( - alignment: projectsProvider.isArabic ? Alignment.topRight : Alignment.topLeft, - padding: EdgeInsets.symmetric(horizontal: 7), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - !projectsProvider.isArabic ? this.nameLine1 : nameLine2, - color: color ?? AppGlobal.appTextColor, - letterSpacing: -0.33, - fontWeight: FontWeight.w600, - textAlign: TextAlign.left, - fontSize: SizeConfig.textMultiplier * 1.30, + Container( + padding: EdgeInsets.fromLTRB(8, 0, 8, 8), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Container( + child: isDartIcon + ? Icon( + dartIcon, + size: 30, + color: color ?? Color(0xFF333C45), + ) + : new SvgPicture.asset( + icon, + width: 30, + height: 30, + ), + ) + ], + )), + Container( + alignment: projectsProvider.isArabic + ? Alignment.topRight + : Alignment.topLeft, + padding: EdgeInsets.symmetric(horizontal: 7), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + !projectsProvider.isArabic ? this.nameLine1 : nameLine2, + color: color ?? AppGlobal.appTextColor, + letterSpacing: -0.33, + fontWeight: FontWeight.w600, + textAlign: TextAlign.left, + fontSize: SizeConfig.textMultiplier * 1.30, + ), + AppText( + !projectsProvider.isArabic ? this.nameLine2 : nameLine1, + color: color ?? Color(0xFF2B353E), + fontWeight: FontWeight.w600, + textAlign: TextAlign.left, + fontHeight: 1.4, + fontSize: SizeConfig.textMultiplier * 1.30, + ), + if (isLoading) DrAppCircularProgressIndeicator() + ], ), - AppText( - !projectsProvider.isArabic ? this.nameLine2 : nameLine1, - color: color ?? Color(0xFF2B353E), - fontWeight: FontWeight.w600, - textAlign: TextAlign.left, - fontHeight: 1.4, - fontSize: SizeConfig.textMultiplier * 1.30, - ), - if (isLoading) DrAppCircularProgressIndeicator() - ], - ), - ), - ]), + ), + ]), ), decoration: BoxDecoration( // border: Border.all(), diff --git a/lib/widgets/patients/profile/avatar_gradients.dart b/lib/widgets/patients/profile/avatar_gradients.dart index a6cce98d..f6a634fb 100644 --- a/lib/widgets/patients/profile/avatar_gradients.dart +++ b/lib/widgets/patients/profile/avatar_gradients.dart @@ -1,8 +1,7 @@ import 'package:flutter/material.dart'; -class AvatarGradients{ - static List getGradients (String name) { - +class AvatarGradients { + static List getGradients(String name) { int code = (name?.length ?? 0) > 0 ? name.toUpperCase()[0].codeUnits[0] : 1; code += (name?.length ?? 0) > 1 ? name.toUpperCase()[1].codeUnits[0] : 0; @@ -39,4 +38,4 @@ class AvatarGradients{ return colors[code % colors.length]; } -} \ No newline at end of file +} diff --git a/lib/widgets/patients/profile/large_avatar.dart b/lib/widgets/patients/profile/large_avatar.dart index 80f54e12..36227ea5 100644 --- a/lib/widgets/patients/profile/large_avatar.dart +++ b/lib/widgets/patients/profile/large_avatar.dart @@ -24,14 +24,12 @@ class LargeAvatar extends StatelessWidget { Widget _getAvatar() { if (url != null && url.isNotEmpty && Uri.parse(url).isAbsolute) { return CircleAvatar( - radius: - SizeConfig.imageSizeMultiplier * 12, + radius: SizeConfig.imageSizeMultiplier * 12, // radius: (52) child: ClipRRect( - borderRadius:BorderRadius.circular(50), - + borderRadius: BorderRadius.circular(50), child: Image.network( - url, + url, fit: BoxFit.fill, width: 700, ), diff --git a/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart b/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart index 46b8ed7f..72e0bc59 100644 --- a/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart +++ b/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart @@ -307,9 +307,10 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget : "${AppDateUtils.convertDateFromServerFormat(patient.admissionDate.toString(), 'yyyy-MM-dd')}"), if (patient.admissionDate != null) HeaderRow( - label: "${TranslationBase.of(context).numOfDays}: ", + label: + "${TranslationBase.of(context).numOfDays}: ", value: isDischargedPatient && - patient.dischargeDate != null + patient.dischargeDate != null ? "${AppDateUtils.getDateTimeFromServerFormat(patient.dischargeDate).difference(AppDateUtils.getDateTimeFromServerFormat(patient.admissionDate)).inDays + 1}" : "${DateTime.now().difference(AppDateUtils.getDateTimeFromServerFormat(patient.admissionDate)).inDays + 1}", ) diff --git a/lib/widgets/patients/profile/prescription_out_patinets_widget.dart b/lib/widgets/patients/profile/prescription_out_patinets_widget.dart index 50afbdcf..0d2c668b 100644 --- a/lib/widgets/patients/profile/prescription_out_patinets_widget.dart +++ b/lib/widgets/patients/profile/prescription_out_patinets_widget.dart @@ -66,13 +66,13 @@ class PrescriptionOutPatientWidget extends StatelessWidget { Navigator.push( context, MaterialPageRoute( - builder: (context) => - OutPatientPrescriptionDetailsScreen( - prescriptionResModel: - patientPrescriptionsList[index], - ), - settings: RouteSettings(name: 'OutPatientPrescriptionDetailsScreen') - ), + builder: (context) => + OutPatientPrescriptionDetailsScreen( + prescriptionResModel: + patientPrescriptionsList[index], + ), + settings: RouteSettings( + name: 'OutPatientPrescriptionDetailsScreen')), ); }, child: CardWithBgWidgetNew( diff --git a/lib/widgets/patients/profile/profile-welcome-widget.dart b/lib/widgets/patients/profile/profile-welcome-widget.dart index 428326de..e3891be1 100644 --- a/lib/widgets/patients/profile/profile-welcome-widget.dart +++ b/lib/widgets/patients/profile/profile-welcome-widget.dart @@ -8,7 +8,8 @@ class ProfileWelcomeWidget extends StatelessWidget { final double height; final bool isClinic; - ProfileWelcomeWidget(this.clinicWidget, {this.height = 150, this.isClinic = false}); + ProfileWelcomeWidget(this.clinicWidget, + {this.height = 150, this.isClinic = false}); @override Widget build(BuildContext context) { @@ -34,7 +35,8 @@ class ProfileWelcomeWidget extends StatelessWidget { child: ClipRRect( borderRadius: BorderRadius.circular(20), child: CachedNetworkImage( - imageUrl: authenticationViewModel.doctorProfile.doctorImageURL, + imageUrl: + authenticationViewModel.doctorProfile.doctorImageURL, fit: BoxFit.fill, width: 75, height: 75, diff --git a/lib/widgets/patients/profile/profile_medical_info_widget.dart b/lib/widgets/patients/profile/profile_medical_info_widget.dart index fec33a62..95e47ed3 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget.dart @@ -16,7 +16,13 @@ class ProfileMedicalInfoWidget extends StatelessWidget { final bool isInpatient; ProfileMedicalInfoWidget( - {Key key, this.patient, this.patientType, this.arrivalType, this.from, this.to, this.isInpatient}); + {Key key, + this.patient, + this.patientType, + this.arrivalType, + this.from, + this.to, + this.isInpatient}); @override Widget build(BuildContext context) { @@ -48,8 +54,10 @@ class ProfileMedicalInfoWidget extends StatelessWidget { patientType: patientType, arrivalType: arrivalType, route: HEALTH_SUMMARY, - nameLine1: "Health", //TranslationBase.of(context).medicalReport, - nameLine2: "Summary", //TranslationBase.of(context).summaryReport, + nameLine1: "Health", + //TranslationBase.of(context).medicalReport, + nameLine2: "Summary", + //TranslationBase.of(context).summaryReport, icon: 'assets/images/svgs/profile_screen/health summary.svg'), PatientProfileButton( key: key, @@ -178,7 +186,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget { patientType: patientType, arrivalType: arrivalType, route: ORDER_NOTE, - nameLine1: "Order", //"Text", + nameLine1: "Order", + //"Text", nameLine2: "Sheet", icon: 'assets/images/svgs/profile_screen/Progress notes.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 a7ab2412..b07982ea 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 @@ -96,8 +96,10 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget { arrivalType: arrivalType, route: ORDER_NOTE, isDischargedPatient: isDischargedPatient, - nameLine1: "Order", //"Text", - nameLine2: "Sheet", //TranslationBase.of(context).orders, + nameLine1: "Order", + //"Text", + nameLine2: "Sheet", + //TranslationBase.of(context).orders, icon: 'assets/images/svgs/profile_screen/Progress notes.svg'), PatientProfileButton( key: key, @@ -126,9 +128,11 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget { arrivalType: arrivalType, isDisable: true, route: HEALTH_SUMMARY, - nameLine1: "Medical", //Health + nameLine1: "Medical", + //Health //TranslationBase.of(context).medicalReport, - nameLine2: "Report", //Report + nameLine2: "Report", + //Report //TranslationBase.of(context).summaryReport, icon: 'assets/images/svgs/profile_screen/health summary.svg'), PatientProfileButton( 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 5a333db7..d340555d 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget_search.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget_search.dart @@ -25,7 +25,9 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { this.to, this.isInpatient, this.isDischargedPatient}); + TabController _tabController; + void initState() { _tabController = TabController(length: 2); } @@ -71,11 +73,12 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { patientType: patientType, arrivalType: arrivalType, route: HEALTH_SUMMARY, - nameLine1: - "Health", //TranslationBase.of(context).medicalReport, - nameLine2: - "Summary", //TranslationBase.of(context).summaryReport, - icon: 'assets/images/svgs/profile_screen/health summary.svg'), + nameLine1: "Health", + //TranslationBase.of(context).medicalReport, + nameLine2: "Summary", + //TranslationBase.of(context).summaryReport, + icon: + 'assets/images/svgs/profile_screen/health summary.svg'), PatientProfileButton( key: key, patient: patient, @@ -95,7 +98,8 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { route: RADIOLOGY_PATIENT, nameLine1: TranslationBase.of(context).radiology, nameLine2: TranslationBase.of(context).service, - icon: 'assets/images/svgs/profile_screen/health summary.svg'), + icon: + 'assets/images/svgs/profile_screen/health summary.svg'), PatientProfileButton( key: key, patient: patient, @@ -113,7 +117,8 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { route: ORDER_PRESCRIPTION_NEW, nameLine1: TranslationBase.of(context).orders, nameLine2: TranslationBase.of(context).prescription, - icon: 'assets/images/svgs/profile_screen/order prescription.svg'), + icon: + 'assets/images/svgs/profile_screen/order prescription.svg'), // if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton( key: key, @@ -123,7 +128,8 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { route: ORDER_PROCEDURE, nameLine1: TranslationBase.of(context).orders, nameLine2: TranslationBase.of(context).procedures, - icon: 'assets/images/svgs/profile_screen/Order Procedures.svg'), + icon: + 'assets/images/svgs/profile_screen/Order Procedures.svg'), //if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton( key: key, @@ -133,7 +139,8 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { route: PATIENT_INSURANCE_APPROVALS_NEW, nameLine1: TranslationBase.of(context).insurance, nameLine2: TranslationBase.of(context).service, - icon: 'assets/images/svgs/profile_screen/insurance approval.svg'), + icon: + 'assets/images/svgs/profile_screen/insurance approval.svg'), // if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton( key: key, @@ -143,46 +150,43 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { route: ADD_SICKLEAVE, nameLine1: TranslationBase.of(context).patientSick, nameLine2: TranslationBase.of(context).leave, - icon: 'assets/images/svgs/profile_screen/patient sick leave.svg'), - if (patient.appointmentNo != null && - patient.appointmentNo != 0) + icon: + 'assets/images/svgs/profile_screen/patient sick leave.svg'), + if (patient.appointmentNo != null && patient.appointmentNo != 0) PatientProfileButton( key: key, patient: patient, patientType: patientType, arrivalType: arrivalType, route: PATIENT_UCAF_REQUEST, - isDisable: - patient.patientStatusType != 43 ? true : false, + isDisable: patient.patientStatusType != 43 ? true : false, nameLine1: TranslationBase.of(context).patient, nameLine2: TranslationBase.of(context).ucaf, icon: 'assets/images/svgs/profile_screen/UCAF.svg'), - if (patient.appointmentNo != null && - patient.appointmentNo != 0) + if (patient.appointmentNo != null && patient.appointmentNo != 0) PatientProfileButton( key: key, patient: patient, patientType: patientType, arrivalType: arrivalType, route: REFER_PATIENT_TO_DOCTOR, - isDisable: - patient.patientStatusType != 43 ? true : false, + isDisable: patient.patientStatusType != 43 ? true : false, nameLine1: TranslationBase.of(context).referral, nameLine2: TranslationBase.of(context).patient, - icon: 'assets/images/svgs/profile_screen/refer patient.svg'), - if (patient.appointmentNo != null && - patient.appointmentNo != 0) + icon: + 'assets/images/svgs/profile_screen/refer patient.svg'), + if (patient.appointmentNo != null && patient.appointmentNo != 0) PatientProfileButton( key: key, patient: patient, patientType: patientType, arrivalType: arrivalType, route: PATIENT_ADMISSION_REQUEST, - isDisable: - patient.patientStatusType != 43 ? true : false, + isDisable: patient.patientStatusType != 43 ? true : false, nameLine1: TranslationBase.of(context).admission, nameLine2: TranslationBase.of(context).request, - icon: 'assets/images/svgs/profile_screen/admission req.svg'), + icon: + 'assets/images/svgs/profile_screen/admission req.svg'), if (isInpatient) PatientProfileButton( key: key, @@ -192,7 +196,8 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { route: PROGRESS_NOTE, nameLine1: TranslationBase.of(context).progress, nameLine2: TranslationBase.of(context).note, - icon: 'assets/images/svgs/profile_screen/Progress notes.svg'), + icon: + 'assets/images/svgs/profile_screen/Progress notes.svg'), if (isInpatient) PatientProfileButton( key: key, @@ -200,9 +205,11 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { patientType: patientType, arrivalType: arrivalType, route: ORDER_NOTE, - nameLine1: "Order", //"Text", + nameLine1: "Order", + //"Text", nameLine2: "Sheet", - icon: 'assets/images/svgs/profile_screen/Progress notes.svg'), + icon: + 'assets/images/svgs/profile_screen/Progress notes.svg'), ], ), ), diff --git a/lib/widgets/patients/vital_sign_details_wideget.dart b/lib/widgets/patients/vital_sign_details_wideget.dart index b8314b03..a4c9d1a7 100644 --- a/lib/widgets/patients/vital_sign_details_wideget.dart +++ b/lib/widgets/patients/vital_sign_details_wideget.dart @@ -25,9 +25,7 @@ class _VitalSignDetailsWidgetState extends State { decoration: BoxDecoration( color: Colors.transparent, borderRadius: BorderRadius.only( - topLeft: Radius.circular(10.0), - topRight: Radius.circular(10.0) - ), + topLeft: Radius.circular(10.0), topRight: Radius.circular(10.0)), border: Border.all(color: Colors.grey, width: 1), ), margin: EdgeInsets.all(20), @@ -38,7 +36,7 @@ class _VitalSignDetailsWidgetState extends State { children: [ Table( border: TableBorder.symmetric( - inside: BorderSide(width: 2.0,color: Colors.grey[300]), + inside: BorderSide(width: 2.0, color: Colors.grey[300]), ), children: fullData(), ), @@ -48,7 +46,7 @@ class _VitalSignDetailsWidgetState extends State { ); } - List fullData(){ + List fullData() { List tableRow = []; tableRow.add(TableRow(children: [ Container( @@ -112,5 +110,4 @@ class _VitalSignDetailsWidgetState extends State { }); return tableRow; } - } diff --git a/lib/widgets/shared/TextFields.dart b/lib/widgets/shared/TextFields.dart index 3674e144..bc4600b4 100644 --- a/lib/widgets/shared/TextFields.dart +++ b/lib/widgets/shared/TextFields.dart @@ -39,46 +39,49 @@ class NumberTextInputFormatter extends TextInputFormatter { final _mobileFormatter = NumberTextInputFormatter(); class TextFields extends StatefulWidget { - TextFields( - {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 = TextInputAction.done, - 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 = 16.0, - this.fontWeight = FontWeight.w700, - this.autoValidate = false, - this.fillColor, - this.hintColor, - this.hasBorder = true, - this.onTapTextFields, - this.hasLabelText = false, - this.showLabelText = false, this.borderRadius= 8.0, this.borderColor, this.borderWidth = 1, }) - : super(key: key); + TextFields({ + 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 = TextInputAction.done, + 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 = 16.0, + this.fontWeight = FontWeight.w700, + this.autoValidate = false, + this.fillColor, + this.hintColor, + this.hasBorder = true, + this.onTapTextFields, + this.hasLabelText = false, + this.showLabelText = false, + this.borderRadius = 8.0, + this.borderColor, + this.borderWidth = 1, + }) : super(key: key); final String hintText; final String initialValue; @@ -203,8 +206,7 @@ class _TextFieldsState extends State { @override Widget build(BuildContext context) { - - widget.borderColor = widget.borderColor?? Colors.grey; + widget.borderColor = widget.borderColor ?? Colors.grey; return (AnimatedContainer( duration: Duration(milliseconds: 300), decoration: widget.bare @@ -281,7 +283,6 @@ class _TextFieldsState extends State { hintText: widget.hintText, hintStyle: TextStyle( fontSize: widget.fontSize, - fontWeight: widget.fontWeight, color: widget.hintColor ?? Theme.of(context).hintColor, ), @@ -310,7 +311,8 @@ class _TextFieldsState extends State { width: 1.0) : BorderSide(color: Colors.transparent, width: 0), borderRadius: widget.hasBorder - ? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius) + ? BorderRadius.circular( + widget.bare ? 0.0 : widget.borderRadius) : BorderRadius.circular(0.0), ), focusedErrorBorder: OutlineInputBorder( @@ -321,28 +323,35 @@ class _TextFieldsState extends State { .withOpacity(widget.bare ? 0.0 : 0.5), width: 1.0) : BorderSide(color: Colors.transparent, width: 0), - borderRadius: BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius)), + borderRadius: BorderRadius.circular( + widget.bare ? 0.0 : widget.borderRadius)), focusedBorder: OutlineInputBorder( borderSide: widget.hasBorder - ? BorderSide(color: widget.borderColor,width: widget.borderWidth) + ? BorderSide( + color: widget.borderColor, width: widget.borderWidth) : BorderSide(color: Colors.transparent, width: 0), borderRadius: widget.hasBorder - ? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius) + ? BorderRadius.circular( + widget.bare ? 0.0 : widget.borderRadius) : BorderRadius.circular(0.0), ), disabledBorder: OutlineInputBorder( borderSide: widget.hasBorder - ? BorderSide(color: widget.borderColor,width: widget.borderWidth) + ? BorderSide( + color: widget.borderColor, width: widget.borderWidth) : BorderSide(color: Colors.transparent, width: 0), borderRadius: widget.hasBorder - ? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius) + ? BorderRadius.circular( + widget.bare ? 0.0 : widget.borderRadius) : BorderRadius.circular(0.0)), enabledBorder: OutlineInputBorder( borderSide: widget.hasBorder - ? BorderSide(color: widget.borderColor,width: widget.borderWidth) + ? BorderSide( + color: widget.borderColor, width: widget.borderWidth) : BorderSide(color: Colors.transparent, width: 0), borderRadius: widget.hasBorder - ? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius) + ? BorderRadius.circular( + widget.bare ? 0.0 : widget.borderRadius) : BorderRadius.circular(0.0), ), ), diff --git a/lib/widgets/shared/app_loader_widget.dart b/lib/widgets/shared/app_loader_widget.dart index 87412b90..6f6e27d9 100644 --- a/lib/widgets/shared/app_loader_widget.dart +++ b/lib/widgets/shared/app_loader_widget.dart @@ -13,20 +13,19 @@ class AppLoaderWidget extends StatefulWidget { } class _AppLoaderWidgetState extends State { - - @override Widget build(BuildContext context) { return Container( height: MediaQuery.of(context).size.height, - child: Stack( children: [ Container( - color: widget.containerColor??Colors.grey.withOpacity(0.6), + color: widget.containerColor ?? Colors.grey.withOpacity(0.6), ), - Container(child: GifLoaderContainer(), margin: EdgeInsets.only( - bottom: MediaQuery.of(context).size.height * 0.09)) + Container( + child: GifLoaderContainer(), + margin: EdgeInsets.only( + bottom: MediaQuery.of(context).size.height * 0.09)) ], ), ); diff --git a/lib/widgets/shared/app_scaffold_widget.dart b/lib/widgets/shared/app_scaffold_widget.dart index b930c21a..880109cc 100644 --- a/lib/widgets/shared/app_scaffold_widget.dart +++ b/lib/widgets/shared/app_scaffold_widget.dart @@ -24,6 +24,7 @@ class AppScaffold extends StatelessWidget { final String subtitle; final bool isHomeIcon; final bool extendBody; + AppScaffold( {this.appBarTitle = '', this.body, @@ -33,7 +34,11 @@ class AppScaffold extends StatelessWidget { this.bottomSheet, this.backgroundColor, this.isHomeIcon = true, - this.appBar, this.subtitle, this.drawer, this.extendBody = false, this.bottomNavigationBar}); + this.appBar, + this.subtitle, + this.drawer, + this.extendBody = false, + this.bottomNavigationBar}); @override Widget build(BuildContext context) { @@ -52,7 +57,8 @@ class AppScaffold extends StatelessWidget { ? appBar ?? AppBar( elevation: 0, - backgroundColor: Colors.white, //HexColor('#515B5D'), + backgroundColor: Colors.white, + //HexColor('#515B5D'), textTheme: TextTheme( headline6: TextStyle( color: Colors.black87, @@ -62,8 +68,11 @@ class AppScaffold extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.center, children: [ Text(appBarTitle.toUpperCase()), - if(subtitle!=null) - Text(subtitle,style: TextStyle(fontSize: 12,color: Colors.red),), + if (subtitle != null) + Text( + subtitle, + style: TextStyle(fontSize: 12, color: Colors.red), + ), ], ), leading: Builder(builder: (BuildContext context) { diff --git a/lib/widgets/shared/bottom_nav_bar.dart b/lib/widgets/shared/bottom_nav_bar.dart index ee44973f..705260bb 100644 --- a/lib/widgets/shared/bottom_nav_bar.dart +++ b/lib/widgets/shared/bottom_nav_bar.dart @@ -42,8 +42,7 @@ class _BottomNavBarState extends State { color: Colors.white, child: Container( decoration: BoxDecoration( - border: Border.all(color: Color(0XFFEFEFEF), width: 1) - ), + border: Border.all(color: Color(0XFFEFEFEF), width: 1)), child: Padding( padding: EdgeInsets.symmetric(horizontal: 18), child: Row( @@ -69,7 +68,6 @@ class _BottomNavBarState extends State { currentIndex: 1, name: TranslationBase.of(context).mySchedule, dashboardViewModel: widget.dashboardViewModel, - ), BottomNavigationItem( icon: DoctorApp.qr_reader, @@ -80,7 +78,6 @@ class _BottomNavBarState extends State { currentIndex: 2, name: TranslationBase.of(context).qr, dashboardViewModel: widget.dashboardViewModel, - ), BottomNavigationItem( icon: DoctorApp.dr_reply_1, @@ -91,7 +88,6 @@ class _BottomNavBarState extends State { currentIndex: 3, name: TranslationBase.of(context).replay2, dashboardViewModel: widget.dashboardViewModel, - ), ], ), diff --git a/lib/widgets/shared/bottom_navigation_item.dart b/lib/widgets/shared/bottom_navigation_item.dart index ffcd706f..6554a8bd 100644 --- a/lib/widgets/shared/bottom_navigation_item.dart +++ b/lib/widgets/shared/bottom_navigation_item.dart @@ -77,7 +77,8 @@ class BottomNavigationItem extends StatelessWidget { child: AppText(name ?? "", textAlign: TextAlign.center, fontSize: - SizeConfig.getTextMultiplierBasedOnWidth() * 2.5, + SizeConfig.getTextMultiplierBasedOnWidth() * + 2.5, letterSpacing: -0.24, color: AppGlobal.appTextColor, fontWeight: FontWeight.w600) //#989898, diff --git a/lib/widgets/shared/buttons/app_buttons_widget.dart b/lib/widgets/shared/buttons/app_buttons_widget.dart index ec29c842..46b6fb6d 100644 --- a/lib/widgets/shared/buttons/app_buttons_widget.dart +++ b/lib/widgets/shared/buttons/app_buttons_widget.dart @@ -52,7 +52,7 @@ class AppButton extends StatefulWidget { class _AppButtonState extends State { @override Widget build(BuildContext context) { - if(widget.fontSize == null ) { + if (widget.fontSize == null) { widget.fontSize = SizeConfig.getHeightMultiplier() * 1.9; } return Container( diff --git a/lib/widgets/shared/buttons/button_bottom_sheet.dart b/lib/widgets/shared/buttons/button_bottom_sheet.dart index 3c5cc32d..8de17cd1 100644 --- a/lib/widgets/shared/buttons/button_bottom_sheet.dart +++ b/lib/widgets/shared/buttons/button_bottom_sheet.dart @@ -3,7 +3,6 @@ import 'package:flutter/material.dart'; import 'app_buttons_widget.dart'; class ButtonBottomSheet extends StatelessWidget { - final GestureTapCallback onPressed; final String title; final IconData iconData; @@ -21,7 +20,8 @@ class ButtonBottomSheet extends StatelessWidget { final double vPadding; final double hPadding; - ButtonBottomSheet({@required this.onPressed, + ButtonBottomSheet({ + @required this.onPressed, this.title, this.iconData, this.icon, @@ -36,7 +36,8 @@ class ButtonBottomSheet extends StatelessWidget { this.hPadding = 0, this.radius = 8.0, this.hasBorder = false, - this.borderColor,}); + this.borderColor, + }); @override Widget build(BuildContext context) { diff --git a/lib/widgets/shared/buttons/secondary_button.dart b/lib/widgets/shared/buttons/secondary_button.dart index 48c65baf..2ef22a80 100644 --- a/lib/widgets/shared/buttons/secondary_button.dart +++ b/lib/widgets/shared/buttons/secondary_button.dart @@ -239,7 +239,7 @@ class _SecondaryButtonState extends State style: TextStyle( color: widget.textColor, fontSize: 16, - fontWeight: FontWeight.w700, + fontWeight: FontWeight.w700, fontFamily: 'Poppins'), ), ) diff --git a/lib/widgets/shared/card_with_bgNew_widget.dart b/lib/widgets/shared/card_with_bgNew_widget.dart index 00b836bc..333d82e3 100644 --- a/lib/widgets/shared/card_with_bgNew_widget.dart +++ b/lib/widgets/shared/card_with_bgNew_widget.dart @@ -21,10 +21,10 @@ class CardWithBgWidgetNew extends StatelessWidget { margin: EdgeInsets.symmetric(vertical: 10.0), width: double.infinity, decoration: BoxDecoration( - borderRadius: BorderRadius.all( - Radius.circular(10.0), - ), + borderRadius: BorderRadius.all( + Radius.circular(10.0), ), + ), child: Material( borderRadius: BorderRadius.all(Radius.circular(10.0)), color: HexColor('#FFFFFF'), @@ -33,18 +33,16 @@ class CardWithBgWidgetNew extends StatelessWidget { Center( child: Container( - // padding:EdgeInsets.fromLTRB(0, 10,0, 10), //EdgeInsets.all(10.0),//10 - // margin: EdgeInsets.only(left: 10), + // padding:EdgeInsets.fromLTRB(0, 10,0, 10), //EdgeInsets.all(10.0),//10 + // margin: EdgeInsets.only(left: 10), child: Padding( - padding: const EdgeInsets.all(8.0), - child: Center(child: widget), - )), + padding: const EdgeInsets.all(8.0), + child: Center(child: widget), + )), ) ], ), ), ); } - - } diff --git a/lib/widgets/shared/card_with_bg_widget.dart b/lib/widgets/shared/card_with_bg_widget.dart index d7513975..4f181c2b 100644 --- a/lib/widgets/shared/card_with_bg_widget.dart +++ b/lib/widgets/shared/card_with_bg_widget.dart @@ -31,7 +31,6 @@ class CardWithBgWidget extends StatelessWidget { border: Border.all( color: hasBorder ? Color(0xFF707070) : Colors.transparent, width: hasBorder ? 0.30 : 0), - ), child: Material( borderRadius: BorderRadius.all(Radius.circular(10.0)), @@ -71,7 +70,9 @@ class CardWithBgWidget extends StatelessWidget { ), Container( padding: EdgeInsets.all(padding), - margin: EdgeInsets.only(left: !projectProvider.isArabic?marginLeft:0, right:projectProvider.isArabic?marginLeft:0 ), + margin: EdgeInsets.only( + left: !projectProvider.isArabic ? marginLeft : 0, + right: projectProvider.isArabic ? marginLeft : 0), child: widget) ], ), diff --git a/lib/widgets/shared/dialogs/ShowImageDialog.dart b/lib/widgets/shared/dialogs/ShowImageDialog.dart index 302366b7..8ef4513f 100644 --- a/lib/widgets/shared/dialogs/ShowImageDialog.dart +++ b/lib/widgets/shared/dialogs/ShowImageDialog.dart @@ -5,6 +5,7 @@ class ShowImageDialog extends StatelessWidget { final String imageUrl; const ShowImageDialog({Key key, this.imageUrl}) : super(key: key); + @override Widget build(BuildContext context) { return SimpleDialog( @@ -12,10 +13,8 @@ class ShowImageDialog extends StatelessWidget { Container( width: 340, height: 340, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(12) - ), - child: Image.network( + decoration: BoxDecoration(borderRadius: BorderRadius.circular(12)), + child: Image.network( imageUrl, fit: BoxFit.fill, ), @@ -23,4 +22,4 @@ class ShowImageDialog extends StatelessWidget { ], ); } -} \ No newline at end of file +} diff --git a/lib/widgets/shared/dialogs/dailog-list-select.dart b/lib/widgets/shared/dialogs/dailog-list-select.dart index dfaf9143..bebd644d 100644 --- a/lib/widgets/shared/dialogs/dailog-list-select.dart +++ b/lib/widgets/shared/dialogs/dailog-list-select.dart @@ -79,7 +79,10 @@ class _ListSelectDialogState extends State { height: MediaQuery.of(context).size.height * 0.070, child: TextField( decoration: Helpers.textFieldSelectorDecoration( - widget.hintSearchText ?? TranslationBase.of(context).search, null, false, + widget.hintSearchText ?? + TranslationBase.of(context).search, + null, + false, suffixIcon: Icon( Icons.search, )), @@ -95,12 +98,17 @@ class _ListSelectDialogState extends State { children: [ ...items .map((item) => RadioListTile( - title: Text("${item[widget.attributeName].toString()}"), - groupValue: widget.selectedValue[widget.attributeValueId].toString(), + title: Text( + "${item[widget.attributeName].toString()}"), + groupValue: widget + .selectedValue[widget.attributeValueId] + .toString(), value: item[widget.attributeValueId].toString(), activeColor: Colors.blue.shade700, - selected: item[widget.attributeValueId].toString() == - widget.selectedValue[widget.attributeValueId].toString(), + selected: item[widget.attributeValueId] + .toString() == + widget.selectedValue[widget.attributeValueId] + .toString(), onChanged: (val) { setState(() { widget.selectedValue = item; @@ -127,7 +135,9 @@ class _ListSelectDialogState extends State { if (query.isNotEmpty) { List dummyListData = List(); dummySearchList.forEach((item) { - if ("${item[widget.attributeName].toString()}".toLowerCase().contains(query.toLowerCase())) { + if ("${item[widget.attributeName].toString()}" + .toLowerCase() + .contains(query.toLowerCase())) { dummyListData.add(item); } }); diff --git a/lib/widgets/shared/dialogs/master_key_dailog.dart b/lib/widgets/shared/dialogs/master_key_dailog.dart index 7c12b54a..80f0b3b1 100644 --- a/lib/widgets/shared/dialogs/master_key_dailog.dart +++ b/lib/widgets/shared/dialogs/master_key_dailog.dart @@ -42,12 +42,22 @@ class _MasterKeyDailogState extends State { showAlertDialog(BuildContext context, ProjectViewModel projectViewModel) { // set up the buttons Widget cancelButton = FlatButton( - child: AppText(TranslationBase.of(context).cancel, color: Colors.grey,fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * (SizeConfig.isWidthLarge?3.5:5),), + child: AppText( + TranslationBase.of(context).cancel, + color: Colors.grey, + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * + (SizeConfig.isWidthLarge ? 3.5 : 5), + ), onPressed: () { Navigator.of(context).pop(); }); Widget continueButton = FlatButton( - child: AppText(this.widget.okText, color: Colors.grey,fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * (SizeConfig.isWidthLarge?3.5:5),), + child: AppText( + this.widget.okText, + color: Colors.grey, + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * + (SizeConfig.isWidthLarge ? 3.5 : 5), + ), onPressed: () { this.widget.okFunction(widget.selectedValue); Navigator.of(context).pop(); @@ -75,7 +85,6 @@ class _MasterKeyDailogState extends State { title: AppText( '${projectViewModel.isArabic ? item.nameAr : item.nameEn}' + (widget.isICD ? '/${item.code}' : ''), - ), groupValue: widget.isICD ? widget.selectedValue.code.toString() diff --git a/lib/widgets/shared/divider_with_spaces_around.dart b/lib/widgets/shared/divider_with_spaces_around.dart index b43557cb..d757edcd 100644 --- a/lib/widgets/shared/divider_with_spaces_around.dart +++ b/lib/widgets/shared/divider_with_spaces_around.dart @@ -2,9 +2,11 @@ import 'package:flutter/material.dart'; class DividerWithSpacesAround extends StatelessWidget { DividerWithSpacesAround({ - Key key, this.height = 0, + Key key, + this.height = 0, }); - final double height ; + + final double height; @override Widget build(BuildContext context) { diff --git a/lib/widgets/shared/doctor_card.dart b/lib/widgets/shared/doctor_card.dart index 5bd12bb8..cc54330c 100644 --- a/lib/widgets/shared/doctor_card.dart +++ b/lib/widgets/shared/doctor_card.dart @@ -32,13 +32,15 @@ class DoctorCard extends StatelessWidget { this.orderNo, this.isPrescriptions = false, this.clinic, - this.isShowEye = true, this.isShowTime= true, this.isNoMargin =false}); + this.isShowEye = true, + this.isShowTime = true, + this.isNoMargin = false}); @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); return Container( - margin: EdgeInsets.all(!isNoMargin? 10:0), + margin: EdgeInsets.all(!isNoMargin ? 10 : 0), decoration: BoxDecoration( border: Border.all( width: 0.5, @@ -73,7 +75,7 @@ class DoctorCard extends StatelessWidget { fontWeight: FontWeight.w600, fontSize: 14, ), - if (!isPrescriptions&& isShowTime) + if (!isPrescriptions && isShowTime) AppText( '${AppDateUtils.getHour(appointmentDate)}', fontWeight: FontWeight.w600, @@ -139,7 +141,8 @@ class DoctorCard extends StatelessWidget { ), if (clinic != null) Row( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ AppText( TranslationBase.of(context).clinic + @@ -157,7 +160,8 @@ class DoctorCard extends StatelessWidget { ), if (branch != null) Row( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ AppText( TranslationBase.of(context).branch + diff --git a/lib/widgets/shared/dr_app_circular_progress_Indeicator.dart b/lib/widgets/shared/dr_app_circular_progress_Indeicator.dart index 2c476ec8..17b9b5e6 100644 --- a/lib/widgets/shared/dr_app_circular_progress_Indeicator.dart +++ b/lib/widgets/shared/dr_app_circular_progress_Indeicator.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; + class DrAppCircularProgressIndeicator extends StatelessWidget { const DrAppCircularProgressIndeicator({ Key key, @@ -11,4 +12,4 @@ class DrAppCircularProgressIndeicator extends StatelessWidget { child: Center(child: const CircularProgressIndicator()), ); } -} \ No newline at end of file +} diff --git a/lib/widgets/shared/errors/dr_app_embedded_error.dart b/lib/widgets/shared/errors/dr_app_embedded_error.dart index de9fd698..62168c93 100644 --- a/lib/widgets/shared/errors/dr_app_embedded_error.dart +++ b/lib/widgets/shared/errors/dr_app_embedded_error.dart @@ -20,12 +20,12 @@ class DrAppEmbeddedError extends StatelessWidget { @override Widget build(BuildContext context) { return Center( - child: AppText( - error, - color: Theme.of(context).errorColor, - textAlign: TextAlign.center, - margin: 10, - ), - ); + child: AppText( + error, + color: Theme.of(context).errorColor, + textAlign: TextAlign.center, + margin: 10, + ), + ); } -} \ No newline at end of file +} diff --git a/lib/widgets/shared/errors/error_message.dart b/lib/widgets/shared/errors/error_message.dart index 2930ae84..c6a075cb 100644 --- a/lib/widgets/shared/errors/error_message.dart +++ b/lib/widgets/shared/errors/error_message.dart @@ -18,17 +18,23 @@ class ErrorMessage extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.center, children: [ - SizedBox(height: 100,), + SizedBox( + height: 100, + ), SvgPicture.asset('assets/images/svgs/no data.svg'), Center( child: Center( child: Padding( - padding: const EdgeInsets.only(top: 12, bottom: 12,right: 20, left: 30), - child: Center(child: AppText(error??'' , textAlign: TextAlign.center,)), + padding: const EdgeInsets.only( + top: 12, bottom: 12, right: 20, left: 30), + child: Center( + child: AppText( + error ?? '', + textAlign: TextAlign.center, + )), ), ), ) - ], ), ), diff --git a/lib/widgets/shared/expandable-widget-header-body.dart b/lib/widgets/shared/expandable-widget-header-body.dart index 20d95bcd..e5f06b7a 100644 --- a/lib/widgets/shared/expandable-widget-header-body.dart +++ b/lib/widgets/shared/expandable-widget-header-body.dart @@ -9,7 +9,8 @@ class HeaderBodyExpandableNotifier extends StatefulWidget { bool expandFlag = false; var controller = new ExpandableController(); - HeaderBodyExpandableNotifier({this.headerWidget, this.bodyWidget, this.collapsed, this.isExpand}); + HeaderBodyExpandableNotifier( + {this.headerWidget, this.bodyWidget, this.collapsed, this.isExpand}); @override _HeaderBodyExpandableNotifierState createState() => @@ -18,12 +19,11 @@ class HeaderBodyExpandableNotifier extends StatefulWidget { class _HeaderBodyExpandableNotifierState extends State { - @override void initState() { super.initState(); - } + @override Widget build(BuildContext context) { setState(() { diff --git a/lib/widgets/shared/expandable_item_widget.dart b/lib/widgets/shared/expandable_item_widget.dart index d369e72a..b03fecf6 100644 --- a/lib/widgets/shared/expandable_item_widget.dart +++ b/lib/widgets/shared/expandable_item_widget.dart @@ -8,84 +8,92 @@ */ import 'package:flutter/material.dart'; -class ExpandableItem extends StatefulWidget{ - - final ListlistItems; +class ExpandableItem extends StatefulWidget { + final List listItems; final String headerTitle; - ExpandableItem(this.headerTitle,this.listItems); + ExpandableItem(this.headerTitle, this.listItems); @override - _ExpandableItemState createState() => _ExpandableItemState(); - + _ExpandableItemState createState() => _ExpandableItemState(); } -class _ExpandableItemState extends State -{ - bool isExpand=false; + +class _ExpandableItemState extends State { + bool isExpand = false; + @override void initState() { super.initState(); - isExpand=false; + isExpand = false; } + @override Widget build(BuildContext context) { - ListlistItem=this.widget.listItems; - return Container( + List listItem = this.widget.listItems; + return Container( child: Padding( - padding: (isExpand==true)?const EdgeInsets.all(6.0):const EdgeInsets.all(8.0), + padding: (isExpand == true) + ? const EdgeInsets.all(6.0) + : const EdgeInsets.all(8.0), child: Container( - decoration:BoxDecoration( - color: Colors.white, - borderRadius: (isExpand!=true)?BorderRadius.all(Radius.circular(50)):BorderRadius.all(Radius.circular(25)), - - - - - - ), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: (isExpand != true) + ? BorderRadius.all(Radius.circular(50)) + : BorderRadius.all(Radius.circular(25)), + ), child: ExpansionTile( key: PageStorageKey(this.widget.headerTitle), title: Container( width: double.infinity, - - child: Text(this.widget.headerTitle,style: TextStyle(fontSize: (isExpand!=true)?18:22,color: Colors.black,fontWeight: FontWeight.bold),)), - - trailing: (isExpand==true)?Icon(Icons.keyboard_arrow_up,color: Colors.black,):Icon(Icons.keyboard_arrow_down,color: Colors.black), - onExpansionChanged: (value){ + child: Text( + this.widget.headerTitle, + style: TextStyle( + fontSize: (isExpand != true) ? 18 : 22, + color: Colors.black, + fontWeight: FontWeight.bold), + )), + trailing: (isExpand == true) + ? Icon( + Icons.keyboard_arrow_up, + color: Colors.black, + ) + : Icon(Icons.keyboard_arrow_down, color: Colors.black), + onExpansionChanged: (value) { setState(() { - isExpand=value; + isExpand = value; }); }, children: [ - for(final item in listItem) - Padding( - padding: const EdgeInsets.all(8.0), - child: InkWell( - onTap: (){ - print(Text("Selected Item $item "+this.widget.headerTitle )); - //========Stop Snak bar=========== Scaffold.of(context).showSnackBar(SnackBar(backgroundColor: Colors.black,duration:Duration(microseconds: 500),content: Text("Selected Item $item "+this.widget.headerTitle ))); - }, - child: Container( - width: double.infinity, - decoration:BoxDecoration( - color: Colors.white, - - border: Border(top: BorderSide(color: Theme.of(context).dividerColor)) - ), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Text(item,style: TextStyle(color: Colors.black),), - - )), - ), - ) - - + for (final item in listItem) + Padding( + padding: const EdgeInsets.all(8.0), + child: InkWell( + onTap: () { + print(Text( + "Selected Item $item " + this.widget.headerTitle)); + //========Stop Snak bar=========== Scaffold.of(context).showSnackBar(SnackBar(backgroundColor: Colors.black,duration:Duration(microseconds: 500),content: Text("Selected Item $item "+this.widget.headerTitle ))); + }, + child: Container( + width: double.infinity, + decoration: BoxDecoration( + color: Colors.white, + border: Border( + top: BorderSide( + color: Theme.of(context).dividerColor))), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + item, + style: TextStyle(color: Colors.black), + ), + )), + ), + ) ], - ), ), ), ); } -} \ No newline at end of file +} diff --git a/lib/widgets/shared/loader/gif_loader_container.dart b/lib/widgets/shared/loader/gif_loader_container.dart index b2c2224b..eb9f2511 100644 --- a/lib/widgets/shared/loader/gif_loader_container.dart +++ b/lib/widgets/shared/loader/gif_loader_container.dart @@ -30,15 +30,14 @@ class _GifLoaderContainerState extends State @override Widget build(BuildContext context) { return Center( - //progress-loading.gif + //progress-loading.gif child: Container( - // margin: EdgeInsets.only(bottom: 40), - child: GifImage( - - controller: controller1, - image: AssetImage( - "assets/images/progress-loading-red.gif"), //NetworkImage("http://img.mp.itc.cn/upload/20161107/5cad975eee9e4b45ae9d3c1238ccf91e.jpg"), - ), - )); + // margin: EdgeInsets.only(bottom: 40), + child: GifImage( + controller: controller1, + image: AssetImage( + "assets/images/progress-loading-red.gif"), //NetworkImage("http://img.mp.itc.cn/upload/20161107/5cad975eee9e4b45ae9d3c1238ccf91e.jpg"), + ), + )); } -} \ No newline at end of file +} diff --git a/lib/widgets/shared/loader/gif_loader_dialog_utils.dart b/lib/widgets/shared/loader/gif_loader_dialog_utils.dart index 264e1a66..1308a671 100644 --- a/lib/widgets/shared/loader/gif_loader_dialog_utils.dart +++ b/lib/widgets/shared/loader/gif_loader_dialog_utils.dart @@ -2,14 +2,12 @@ import 'package:flutter/material.dart'; import 'gif_loader_container.dart'; - class GifLoaderDialogUtils { static showMyDialog(BuildContext context) { showDialog(context: context, builder: (ctx) => GifLoaderContainer()); } static hideDialog(BuildContext context) { - if(Navigator.canPop(context)) - Navigator.of(context).pop(); + if (Navigator.canPop(context)) Navigator.of(context).pop(); } } diff --git a/lib/widgets/shared/master_key_checkbox_search_widget.dart b/lib/widgets/shared/master_key_checkbox_search_widget.dart index c61913a4..5da2c10a 100644 --- a/lib/widgets/shared/master_key_checkbox_search_widget.dart +++ b/lib/widgets/shared/master_key_checkbox_search_widget.dart @@ -44,7 +44,6 @@ class _MasterKeyCheckboxSearchWidgetState List items = List(); TextEditingController filteredSearchController = TextEditingController(); - @override void initState() { items.addAll(widget.masterList); @@ -77,7 +76,8 @@ class _MasterKeyCheckboxSearchWidgetState child: ListView( children: [ AppTextFieldCustom( - height: Helpers.getTextFieldHeight(),//MediaQuery.of(context).size.height * 0.070, + height: Helpers.getTextFieldHeight(), + //MediaQuery.of(context).size.height * 0.070, hintText: TranslationBase.of(context).searchHistory, isTextFieldHasSuffix: true, hasBorder: false, @@ -133,9 +133,10 @@ class _MasterKeyCheckboxSearchWidgetState ? historyInfo.nameAr : historyInfo.nameEn : historyInfo.nameEn, - color: Color(0xFF575757), - fontSize: SizeConfig.getTextMultiplierBasedOnWidth()*(SizeConfig.isWidthLarge?3:3.8), + fontSize: SizeConfig + .getTextMultiplierBasedOnWidth() * + (SizeConfig.isWidthLarge ? 3 : 3.8), letterSpacing: -0.56, ), ), diff --git a/lib/widgets/shared/network_base_view.dart b/lib/widgets/shared/network_base_view.dart index 32232628..2fe52ce7 100644 --- a/lib/widgets/shared/network_base_view.dart +++ b/lib/widgets/shared/network_base_view.dart @@ -31,7 +31,9 @@ class NetworkBaseView extends StatelessWidget { return AppLoaderWidget(); break; case ViewState.Error: - return ErrorMessage(error: baseViewModel.error ,); + return ErrorMessage( + error: baseViewModel.error, + ); break; } } diff --git a/lib/widgets/shared/profile_image_widget.dart b/lib/widgets/shared/profile_image_widget.dart index 3db93f9d..a1f2c9cd 100644 --- a/lib/widgets/shared/profile_image_widget.dart +++ b/lib/widgets/shared/profile_image_widget.dart @@ -17,6 +17,7 @@ class ProfileImageWidget extends StatelessWidget { double width; Color color; double fontsize; + ProfileImageWidget( {this.url, this.name, @@ -32,24 +33,21 @@ class ProfileImageWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( - height: height, - width: width, - child:CircleAvatar( - radius: - SizeConfig.imageSizeMultiplier * 12, - // radius: (52) - child: ClipRRect( - borderRadius:BorderRadius.circular(50), - - child: Image.network( - url, - fit: BoxFit.fill, - width: 700, + height: height, + width: width, + child: CircleAvatar( + radius: SizeConfig.imageSizeMultiplier * 12, + // radius: (52) + child: ClipRRect( + borderRadius: BorderRadius.circular(50), + child: Image.network( + url, + fit: BoxFit.fill, + width: 700, + ), ), - ), - backgroundColor: Colors.transparent, - ) - ), + backgroundColor: Colors.transparent, + )), name == null || des == null ? SizedBox() : SizedBox( diff --git a/lib/widgets/shared/rounded_container_widget.dart b/lib/widgets/shared/rounded_container_widget.dart index 9c622dd3..25a23140 100644 --- a/lib/widgets/shared/rounded_container_widget.dart +++ b/lib/widgets/shared/rounded_container_widget.dart @@ -53,7 +53,7 @@ class _RoundedContainerState extends State { margin: widget.margin, decoration: widget.showBorder == true ? BoxDecoration( - color: Colors.white/*Theme.of(context).primaryColor*/, + color: Colors.white /*Theme.of(context).primaryColor*/, border: Border.all( color: widget.borderColor, width: widget.borderWidth), borderRadius: widget.customCornerRaduis diff --git a/lib/widgets/shared/speech-text-popup.dart b/lib/widgets/shared/speech-text-popup.dart index 21fa6c8a..1a2e1bcd 100644 --- a/lib/widgets/shared/speech-text-popup.dart +++ b/lib/widgets/shared/speech-text-popup.dart @@ -13,6 +13,7 @@ class SpeechToText { final BuildContext context; static var dialog; static stt.SpeechToText speech = stt.SpeechToText(); + SpeechToText({ @required this.context, }); @@ -58,6 +59,7 @@ class _MyStatefulBuilderState extends State { var searchText; static StreamSubscription streamSubscription; static var isClosed = false; + @override void initState() { streamSubscription = event.controller.stream.listen((p) { diff --git a/lib/widgets/shared/text_fields/app-textfield-custom.dart b/lib/widgets/shared/text_fields/app-textfield-custom.dart index 28331c6c..6bf15219 100644 --- a/lib/widgets/shared/text_fields/app-textfield-custom.dart +++ b/lib/widgets/shared/text_fields/app-textfield-custom.dart @@ -96,7 +96,7 @@ class _AppTextFieldCustomState extends State { Container( height: widget.height != 0 && widget.maxLines == 1 ? widget.height + 8 - : null,//MediaQuery.of(context).size.height * 0.098, + : null, //MediaQuery.of(context).size.height * 0.098, decoration: widget.hasBorder ? TextFieldsUtils.containerBorderDecoration( Color(0Xffffffff), 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 e3f4e36c..355a0dc8 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 @@ -34,6 +34,7 @@ class AppTextFieldCustomSearch extends StatelessWidget { final TextInputType inputType; final List inputFormatters; + @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); @@ -60,7 +61,9 @@ class AppTextFieldCustomSearch extends StatelessWidget { onFieldSubmitted: onFieldSubmitted, validationError: validationError), if (positionedChild != null) - projectViewModel.isArabic?Positioned(left: 35, top: 5, child: positionedChild):Positioned(right: 35, top: 5, child: positionedChild) + projectViewModel.isArabic + ? Positioned(left: 35, top: 5, child: positionedChild) + : Positioned(right: 35, top: 5, child: positionedChild) ], ), ); diff --git a/lib/widgets/shared/text_fields/app_text_form_field.dart b/lib/widgets/shared/text_fields/app_text_form_field.dart index 7d3a06da..655c6a9e 100644 --- a/lib/widgets/shared/text_fields/app_text_form_field.dart +++ b/lib/widgets/shared/text_fields/app_text_form_field.dart @@ -17,7 +17,7 @@ class AppTextFormField extends FormField { TextInputType textInputType, String hintText, FocusNode focusNode, - TextInputAction textInputAction=TextInputAction.done, + TextInputAction textInputAction = TextInputAction.done, ValueChanged onFieldSubmitted, IconButton prefix, String labelText, diff --git a/lib/widgets/shared/text_fields/auto_complete_text_field.dart b/lib/widgets/shared/text_fields/auto_complete_text_field.dart index 3b563f3f..a5463854 100644 --- a/lib/widgets/shared/text_fields/auto_complete_text_field.dart +++ b/lib/widgets/shared/text_fields/auto_complete_text_field.dart @@ -13,8 +13,6 @@ class CustomAutoCompleteTextField extends StatelessWidget { this.child, }) : super(key: key); - - @override Widget build(BuildContext context) { return Container( diff --git a/lib/widgets/shared/text_fields/html_rich_editor.dart b/lib/widgets/shared/text_fields/html_rich_editor.dart index a3c0a53a..79e9829f 100644 --- a/lib/widgets/shared/text_fields/html_rich_editor.dart +++ b/lib/widgets/shared/text_fields/html_rich_editor.dart @@ -31,7 +31,7 @@ class HtmlRichEditor extends StatefulWidget { this.darkMode = false, this.showBottomToolbar = false, this.toolbar, - this.controller, + this.controller, }) : super(key: key); @override @@ -39,12 +39,11 @@ class HtmlRichEditor extends StatefulWidget { } class _HtmlRichEditorState extends State { - ProjectViewModel projectViewModel; + ProjectViewModel projectViewModel; stt.SpeechToText speech = stt.SpeechToText(); var recognizedWord; var event = RobotProvider(); - @override void initState() { requestPermissions(); @@ -58,8 +57,6 @@ class _HtmlRichEditorState extends State { super.initState(); } - - @override Widget build(BuildContext context) { projectViewModel = Provider.of(context); @@ -96,11 +93,14 @@ class _HtmlRichEditorState extends State { )), Positioned( top: 50, //MediaQuery.of(context).size.height * 0, - right: projectViewModel.isArabic ? MediaQuery.of(context).size.width * 0.75 : 15, + right: projectViewModel.isArabic + ? MediaQuery.of(context).size.width * 0.75 + : 15, child: Column( children: [ IconButton( - icon: Icon(DoctorApp.speechtotext, color: Colors.black, size: 35), + icon: Icon(DoctorApp.speechtotext, + color: Colors.black, size: 35), onPressed: () { initSpeechState().then((value) => {onVoiceText()}); }, @@ -111,11 +111,11 @@ class _HtmlRichEditorState extends State { ); } - 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); + bool available = await speech.initialize( + onStatus: statusListener, onError: errorListener); if (available) { speech.listen( onResult: resultListener, diff --git a/lib/widgets/shared/text_fields/new_text_Field.dart b/lib/widgets/shared/text_fields/new_text_Field.dart index 2979bfd4..77cd0262 100644 --- a/lib/widgets/shared/text_fields/new_text_Field.dart +++ b/lib/widgets/shared/text_fields/new_text_Field.dart @@ -42,39 +42,39 @@ 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}) + 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; @@ -112,6 +112,7 @@ class NewTextFields extends StatefulWidget { final bool borderOnlyError; final Color hintColor; final String initialValue; + @override _NewTextFieldsState createState() => _NewTextFieldsState(); } @@ -158,15 +159,11 @@ class _NewTextFieldsState extends State { duration: Duration(milliseconds: 300), decoration: BoxDecoration( borderRadius: BorderRadius.circular(12), - border: Border.all( - color: HexColor('#707070'), - width: 0.30), + 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, @@ -176,10 +173,10 @@ class _NewTextFieldsState extends State { textCapitalization: widget.textCapitalization, onFieldSubmitted: widget.inputAction == TextInputAction.next ? (widget.onSubmit != null - ? widget.onSubmit - : (val) { - _focusNode.nextFocus(); - }) + ? widget.onSubmit + : (val) { + _focusNode.nextFocus(); + }) : widget.onSubmit, textInputAction: widget.inputAction, minLines: widget.minLines ?? 1, @@ -196,17 +193,22 @@ class _NewTextFieldsState extends State { validator: widget.validator, onSaved: widget.onSaved, style: Theme.of(context).textTheme.bodyText1.copyWith( - fontSize: widget.fontSize, fontWeight: widget.fontWeight, color: Color(0xFF575757), fontFamily: 'Poppins'), + fontSize: widget.fontSize, + fontWeight: widget.fontWeight, + color: Color(0xFF575757), + fontFamily: 'Poppins'), inputFormatters: widget.keyboardType == TextInputType.phone ? [ - // WhitelistingTextInputFormatter.digitsOnly, - _mobileFormatter, - ] + // WhitelistingTextInputFormatter.digitsOnly, + _mobileFormatter, + ] : widget.inputFormatters, decoration: InputDecoration( labelText: widget.hintText, - labelStyle: - TextStyle(color: Color(0xFF2E303A), fontSize:15,fontWeight: FontWeight.w700), + labelStyle: TextStyle( + color: Color(0xFF2E303A), + fontSize: 15, + fontWeight: FontWeight.w700), errorBorder: OutlineInputBorder( borderSide: BorderSide( color: Theme.of(context).errorColor.withOpacity(0.5), diff --git a/lib/widgets/shared/user-guid/custom_validation_error.dart b/lib/widgets/shared/user-guid/custom_validation_error.dart index fd1f2125..43464f04 100644 --- a/lib/widgets/shared/user-guid/custom_validation_error.dart +++ b/lib/widgets/shared/user-guid/custom_validation_error.dart @@ -1,21 +1,19 @@ - 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'; // ignore: must_be_immutable class CustomValidationError extends StatelessWidget { - String error; + String error; + CustomValidationError({ - Key key, this.error, + Key key, + this.error, }) : super(key: key); @override Widget build(BuildContext context) { - if(error == null ) - error = TranslationBase - .of(context) - .emptyMessage; + if (error == null) error = TranslationBase.of(context).emptyMessage; return Column( children: [ SizedBox( @@ -23,11 +21,13 @@ class CustomValidationError extends StatelessWidget { ), Container( margin: EdgeInsets.symmetric(horizontal: 3), - child: AppText(error, color: Theme - .of(context) - .errorColor, fontSize: 14,), + child: AppText( + error, + color: Theme.of(context).errorColor, + fontSize: 14, + ), ), ], ); } -} \ No newline at end of file +} diff --git a/lib/widgets/transitions/fade_page.dart b/lib/widgets/transitions/fade_page.dart index 7cd3826c..0265d815 100644 --- a/lib/widgets/transitions/fade_page.dart +++ b/lib/widgets/transitions/fade_page.dart @@ -4,30 +4,27 @@ import 'package:flutter/material.dart'; /// [page] class FadePage extends PageRouteBuilder { final Widget page; + FadePage({this.page}) - : super( - opaque: false, - settings: RouteSettings(name: page.runtimeType.toString()), - fullscreenDialog: true, - barrierDismissible: true, - barrierColor: Colors.black.withOpacity(0.8), - pageBuilder: ( - BuildContext context, - Animation animation, - Animation secondaryAnimation, - ) => - page, - transitionDuration: Duration(milliseconds: 300), - transitionsBuilder: ( - BuildContext context, - Animation animation, - Animation secondaryAnimation, - Widget child, - ) { - return FadeTransition( - opacity: animation, - child: child - ); - } - ); -} \ No newline at end of file + : super( + opaque: false, + settings: RouteSettings(name: page.runtimeType.toString()), + fullscreenDialog: true, + barrierDismissible: true, + barrierColor: Colors.black.withOpacity(0.8), + pageBuilder: ( + BuildContext context, + Animation animation, + Animation secondaryAnimation, + ) => + page, + transitionDuration: Duration(milliseconds: 300), + transitionsBuilder: ( + BuildContext context, + Animation animation, + Animation secondaryAnimation, + Widget child, + ) { + return FadeTransition(opacity: animation, child: child); + }); +} diff --git a/lib/widgets/transitions/slide_up_page.dart b/lib/widgets/transitions/slide_up_page.dart index ee0b7473..b83e2386 100644 --- a/lib/widgets/transitions/slide_up_page.dart +++ b/lib/widgets/transitions/slide_up_page.dart @@ -11,7 +11,11 @@ class SlideUpPageRoute extends PageRouteBuilder { final bool opaque; final String settingRoute; - SlideUpPageRoute({this.widget, this.fullscreenDialog = false, this.opaque = true, this.settingRoute}) + SlideUpPageRoute( + {this.widget, + this.fullscreenDialog = false, + this.opaque = true, + this.settingRoute}) : super( pageBuilder: ( BuildContext context, @@ -24,17 +28,22 @@ class SlideUpPageRoute extends PageRouteBuilder { opaque: opaque, barrierColor: Color.fromRGBO(0, 0, 0, 0.5), barrierDismissible: true, - settings: RouteSettings(name: settingRoute ?? widget.runtimeType.toString()), + settings: RouteSettings( + name: settingRoute ?? widget.runtimeType.toString()), transitionDuration: Duration(milliseconds: 800), - transitionsBuilder: - ((BuildContext context, Animation animation, Animation secondaryAnimation, Widget child) { + transitionsBuilder: ((BuildContext context, + Animation animation, + Animation secondaryAnimation, + Widget child) { var begin = Offset(0.0, 1.0); var end = Offset.zero; var curve = Curves.easeInOutQuint; - var tween = Tween(begin: begin, end: end).chain(CurveTween(curve: curve)); + var tween = + Tween(begin: begin, end: end).chain(CurveTween(curve: curve)); - return SlideTransition(position: animation.drive(tween), child: child); + return SlideTransition( + position: animation.drive(tween), child: child); }), ); }