From 5426aae0dc9963cb44f846d309fdcece9100b9a9 Mon Sep 17 00:00:00 2001 From: "taha.alam@cloudsolutions.com.sa" Date: Tue, 25 Nov 2025 10:05:55 +0300 Subject: [PATCH 1/3] IPD changes --- ios/Runner.xcodeproj/project.pbxproj | 27 +- .../xcshareddata/xcschemes/Runner.xcscheme | 3 + ios/Runner/AppDelegate.swift | 32 +-- lib/client/base_app_client.dart | 11 +- lib/config/config.dart | 6 +- lib/config/localized_values.dart | 3 +- .../post_chief_complaint_request_model.dart | 5 +- .../get_episode_for_inpatient_req_model.dart | 2 +- .../admission_orders_request_model.dart | 2 + ...GetDiagnosisForInPatientResponseModel.dart | 28 ++ .../GetDischargeSummaryReqModel.dart | 10 + .../insurance_approval_request_model.dart | 1 + .../GetNursingProgressNoteRequestModel.dart | 4 + lib/core/model/note/note_model.dart | 26 ++ lib/core/model/note/update_note_model.dart | 6 +- .../get_reservations_request_model.dart | 22 +- .../get_reservations_response_model.dart | 2 +- .../model/patient/patiant_info_model.dart | 16 +- .../model/patient/progress_note_request.dart | 2 + .../PatientSearchRequestModel.dart | 31 ++- .../pending_order_request_model.dart | 1 + lib/core/model/referral/ReferralRequest.dart | 7 + .../service/hospitals/hospitals_service.dart | 4 + lib/core/service/patient/ReferralService.dart | 15 +- .../patient-doctor-referral-service.dart | 2 + .../patient/patientInPatientService.dart | 4 +- lib/core/service/patient/patient_service.dart | 95 +++++++ .../profile/operation_report_servive.dart | 10 +- .../PatientMedicalReportService.dart | 28 +- .../prescription/prescription_service.dart | 4 +- lib/core/service/pending_order_service.dart | 23 ++ .../PatientMedicalReportViewModel.dart | 24 +- .../viewModel/PatientSearchViewModel.dart | 11 +- lib/core/viewModel/SOAP_view_model.dart | 7 +- .../viewModel/patient-referral-viewmodel.dart | 37 ++- lib/core/viewModel/patient_view_model.dart | 43 ++- .../viewModel/pednding_orders_view_model.dart | 14 +- .../prescription/prescription_view_model.dart | 4 +- .../profile/discharge_summary_view_model.dart | 7 +- .../profile/operation_report_view_model.dart | 2 +- lib/screens/home/home_screen.dart | 10 +- .../patients/DischargedPatientPage.dart | 3 + .../patients/In_patient/filter_date_page.dart | 253 ++++++++++++++++++ .../In_patient/in_patient_list_page.dart | 25 +- .../In_patient/in_patient_screen.dart | 46 +++- .../In_patient/list_of_all_in_patient.dart | 4 +- .../In_patient/list_of_my_inpatient.dart | 3 + .../insurance_approval_screen_patient.dart | 2 +- .../patients/insurance_approvals_details.dart | 2 +- .../admission_orders_screen.dart | 3 +- .../diabetic_chart/diabetic_chart.dart | 7 +- .../profile/diagnosis/diagnosis_screen.dart | 6 +- .../all_discharge_summary.dart | 6 +- .../discharge_summary/discharge_summary.dart | 5 +- .../pending_discharge_summary.dart | 7 +- .../AddVerifyMedicalReport.dart | 9 +- .../medical_report/MedicalReportPage.dart | 5 +- .../notes/note/progress_note_screen.dart | 14 +- .../profile/notes/note/update_note.dart | 11 +- .../nursing_note/nursing_note_screen.dart | 5 +- .../pending_orders/pending_orders_screen.dart | 4 +- .../patient_profile_card_model.dart | 2 + .../patient_profile_screen.dart | 11 +- .../profile_gird_for_InPatient.dart | 28 +- .../refer-patient-screen-in-patient.dart | 81 +++++- .../prescription/new_prescriptions_page.dart | 12 +- .../prescription/old_prescriptions_page.dart | 7 +- .../prescription_items_in_patient.dart | 4 +- .../translations_delegate_base_utils.dart | 1 + .../profile/PatientProfileButton.dart | 5 +- lib/widgets/shared/app_scaffold_widget.dart | 32 +-- .../shared/dialogs/dailog-list-select.dart | 1 + macos/Podfile | 2 +- macos/Runner.xcodeproj/project.pbxproj | 104 ++++++- .../contents.xcworkspacedata | 3 + macos/Runner/AppDelegate.swift | 6 +- pubspec.lock | 88 +++--- 77 files changed, 1169 insertions(+), 229 deletions(-) create mode 100644 lib/screens/patients/In_patient/filter_date_page.dart diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index c48ab903..37132798 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -194,7 +194,7 @@ 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, C21500C474806845DCE7C12A /* [CP] Embed Pods Frameworks */, - 294E280337160E3088FD37C0 /* [CP] Copy Pods Resources */, + 24EE7472FCD545118644D8C4 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -256,7 +256,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 294E280337160E3088FD37C0 /* [CP] Copy Pods Resources */ = { + 24EE7472FCD545118644D8C4 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -347,14 +347,12 @@ "${BUILT_PRODUCTS_DIR}/MTBBarcodeScanner/MTBBarcodeScanner.framework", "${BUILT_PRODUCTS_DIR}/OrderedSet/OrderedSet.framework", "${BUILT_PRODUCTS_DIR}/PromisesObjC/FBLPromises.framework", - "${BUILT_PRODUCTS_DIR}/Reachability/Reachability.framework", "${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework", "${BUILT_PRODUCTS_DIR}/SwiftProtobuf/SwiftProtobuf.framework", "${BUILT_PRODUCTS_DIR}/SwiftyGif/SwiftyGif.framework", - "${BUILT_PRODUCTS_DIR}/Toast/Toast.framework", "${BUILT_PRODUCTS_DIR}/Try/Try.framework", "${BUILT_PRODUCTS_DIR}/barcode_scan2/barcode_scan2.framework", - "${BUILT_PRODUCTS_DIR}/connectivity/connectivity.framework", + "${BUILT_PRODUCTS_DIR}/connectivity_plus/connectivity_plus.framework", "${BUILT_PRODUCTS_DIR}/file_picker/file_picker.framework", "${BUILT_PRODUCTS_DIR}/flutter_inappwebview_ios/flutter_inappwebview_ios.framework", "${BUILT_PRODUCTS_DIR}/flutter_keyboard_visibility/flutter_keyboard_visibility.framework", @@ -366,7 +364,7 @@ "${BUILT_PRODUCTS_DIR}/pointer_interceptor_ios/pointer_interceptor_ios.framework", "${BUILT_PRODUCTS_DIR}/shared_preferences_foundation/shared_preferences_foundation.framework", "${BUILT_PRODUCTS_DIR}/speech_to_text/speech_to_text.framework", - "${BUILT_PRODUCTS_DIR}/sqflite/sqflite.framework", + "${BUILT_PRODUCTS_DIR}/sqflite_darwin/sqflite_darwin.framework", "${BUILT_PRODUCTS_DIR}/url_launcher_ios/url_launcher_ios.framework", "${PODS_XCFRAMEWORKS_BUILD_DIR}/ZoomVideoSDK/CptShare/CptShare.framework/CptShare", "${PODS_XCFRAMEWORKS_BUILD_DIR}/ZoomVideoSDK/ZoomVideoSDK/ZoomVideoSDK.framework/ZoomVideoSDK", @@ -388,14 +386,12 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MTBBarcodeScanner.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OrderedSet.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBLPromises.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Reachability.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftProtobuf.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyGif.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Try.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/barcode_scan2.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/connectivity.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/connectivity_plus.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/file_picker.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_inappwebview_ios.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_keyboard_visibility.framework", @@ -407,7 +403,7 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/pointer_interceptor_ios.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences_foundation.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/speech_to_text.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/sqflite.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/sqflite_darwin.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher_ios.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CptShare.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZoomVideoSDK.framework", @@ -461,7 +457,6 @@ /* Begin XCBuildConfiguration section */ 249021D3217E4FDB00AE95B9 /* Profile */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; @@ -503,7 +498,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -540,6 +535,7 @@ MARKETING_VERSION = 1.4.19; PRODUCT_BUNDLE_IDENTIFIER = com.hmg.hmgDr; PRODUCT_NAME = Runner; + SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; @@ -548,7 +544,6 @@ }; 97C147031CF9000F007C117D /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; @@ -596,7 +591,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -606,7 +601,6 @@ }; 97C147041CF9000F007C117D /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; @@ -648,7 +642,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -723,6 +717,7 @@ MARKETING_VERSION = 1.4.19; PRODUCT_BUNDLE_IDENTIFIER = com.hmg.hmgDr; PRODUCT_NAME = Runner; + SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 498aa0d1..1a6f2553 100644 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -26,6 +26,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit" shouldUseLaunchSchemeArgsEnv = "YES"> diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift index 34cf8386..e577bcf4 100644 --- a/ios/Runner/AppDelegate.swift +++ b/ios/Runner/AppDelegate.swift @@ -32,22 +32,22 @@ import OpenTok private func openVideoChat(result: FlutterResult,kApiKey: String, kSessionId: String,kToken: String,appLang:String, vC_ID: Int,tokenID:String,generalId:String,doctorId:Int,baseUrl:String) { - let storyboard = UIStoryboard(name: "Main", bundle: nil) - let identifier = "ViewControllerNav" - let navVC = storyboard.instantiateViewController(withIdentifier: identifier) as! UINavigationController - let videoVC = navVC.viewControllers.first as! VideoCallViewController - videoVC.kApiKey=kApiKey - videoVC.kSessionId=kSessionId - videoVC.kToken=kToken - videoVC.VC_ID = vC_ID - videoVC.generalid = generalId - videoVC.TokenID = tokenID - videoVC.DoctorId = doctorId - videoVC.baseUrl = baseUrl - videoVC.callBack = self - videoVC.navigationController?.setNavigationBarHidden(true, animated: false) - navVC.modalPresentationStyle = .fullScreen - window.rootViewController?.present(navVC, animated: true, completion: nil) +// let storyboard = UIStoryboard(name: "Main", bundle: nil) +// let identifier = "ViewControllerNav" +// let navVC = storyboard.instantiateViewController(withIdentifier: identifier) as! UINavigationController +// let videoVC = navVC.viewControllers.first as! VideoCallViewController +// videoVC.kApiKey=kApiKey +// videoVC.kSessionId=kSessionId +// videoVC.kToken=kToken +// videoVC.VC_ID = vC_ID +// videoVC.generalid = generalId +// videoVC.TokenID = tokenID +// videoVC.DoctorId = doctorId +// videoVC.baseUrl = baseUrl +// videoVC.callBack = self +// videoVC.navigationController?.setNavigationBarHidden(true, animated: false) +// navVC.modalPresentationStyle = .fullScreen +// window.rootViewController?.present(navVC, animated: true, completion: nil) } } diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index 13ab8182..4a948542 100755 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -6,6 +6,7 @@ import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/core/service/NavigationService.dart'; +import 'package:doctor_app_flutter/core/service/hospitals/hospitals_service.dart'; import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart'; import 'package:doctor_app_flutter/utils/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; @@ -41,6 +42,8 @@ class BaseAppClient { bool callLog = true; try { Map? profile = await sharedPref.getObj(DOCTOR_PROFILE); + if (body?['MemberID'] == null) body?['MemberID'] = HospitalsService.memberId; // changed from null; because create update episode not working + String? token = await sharedPref.getString(TOKEN); if(!isCustomRequest) { if (profile != null) { @@ -125,7 +128,7 @@ class BaseAppClient { // body['ProjectID'] = 12; // body['DoctorID'] = 1002; //3844083 - // body['TokenID'] = "@dm!n"; + // body!['TokenID'] = "@dm!n"; // print("ProjectID :"); // print(body['ProjectID']); @@ -216,7 +219,7 @@ class BaseAppClient { String? token = await sharedPref.getString(TOKEN); Map? profile = await sharedPref.getObj(DOCTOR_PROFILE); - + if (body?['MemberID'] == null) body?['MemberID'] = HospitalsService.memberId; if (profile != null) { DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); if (body!['DoctorID'] == null) { @@ -273,6 +276,10 @@ class BaseAppClient { body['TokenID'] = body.containsKey('TokenID') ? body['TokenID'] ?? token : token; body['PatientID'] = body['PatientID'] != null ? body['PatientID'] : patient!.patientId ?? patient.patientMRN; + body['PatientMRN'] = body['PatientMRN'] != null ? body['PatientMRN'] : patient!.patientId ?? patient.patientMRN; + if (body['ProjectID'] == null) { + body['ProjectID'] = patient?.projectId.toString(); + } body['PatientOutSA'] = 0; //user['OutSA']; //TODO change it body['SessionID'] = SESSION_ID; //getSe diff --git a/lib/config/config.dart b/lib/config/config.dart index d9aa00ce..3352ff86 100755 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -9,9 +9,9 @@ const ONLY_DATE = "[0-9/]"; const DOCTOR_ROTATION = 'https://doctorrota.hmg.com/'; -const BASE_URL = 'https://hmgwebservices.com/'; +// const BASE_URL = 'https://hmgwebservices.com/'; // const BASE_URL = 'http://10.20.200.111:1010/'; -// const BASE_URL = 'https://uat.hmgwebservices.com/'; +const BASE_URL = 'https://uat.hmgwebservices.com/'; // const BASE_URL = 'https://hmgwebservices.com/'; @@ -217,6 +217,7 @@ const GET_SICK_LEAVE_PATIENT = "Services/Patients.svc/REST/GetPatientSickLeave"; const GET_MY_OUT_PATIENT = "Services/DoctorApplication.svc/REST/GetMyOutPatient"; const PATIENT_MEDICAL_REPORT_GET_LIST = "Services/Patients.svc/REST/DAPP_ListMedicalReport"; +const PATIENT_MEDICAL_REPORT_GET_LIST_VIDA_PLUS = "Services/Patients.svc/REST/DAPP_InsertMedicalReport_New"; const PATIENT_MEDICAL_REPORT_GET_TEMPLATE = "Services/Patients.svc/REST/DAPP_GetTemplateByID"; const PATIENT_MEDICAL_REPORT_INSERT = "Services/Patients.svc/REST/DAPP_InsertMedicalReport"; const PATIENT_MEDICAL_REPORT_VERIFIED = "Services/Patients.svc/REST/DAPP_VerifiedMedicalReport"; @@ -259,6 +260,7 @@ const GET_DIAGNOSIS_FOR_IN_PATIENT = "Services/DoctorApplication.svc/REST/Doctor const GET_DIABETIC_CHART_VALUES = "Services/DoctorApplication.svc/REST/DoctorApp_GetDiabeticChartValues"; const GET_PENDING_ORDERS = "Services/DoctorApplication.svc/REST/DoctorApp_GetPendingOrdersForInPatient"; +const GET_PENDING_ORDERS_VIDA_PLUS = "Services/DoctorApplication.svc/REST/DoctorApp_GetDoctorProgressNote"; const GET_ADMISSION_ORDERS = "/Services/DoctorApplication.svc/REST/DoctorApp_GetAdmissionOrders"; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index f30ad03a..4c97b284 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1253,5 +1253,6 @@ const Map> localizedValues = { "progressNoteCanNotBeEmpty": {"en": "Progress Note Can Not Be Empty", "ar":"تعذر تنفيذ الإجراء"}, "youHavePendingInterventions": {"en": "You Have Pending Interventions. That need your attention", "ar":"لديك تدخلات معلقة. التي تحتاج إلى اهتمامك"}, "open": {"en": "Open", "ar":"يفتح"}, - "chiefComplaintLengthErrorMsg":{"en": "The text is too short; minimum 26 characters required.", "ar":"النص قصير جدًا؛ الحد الأدنى المطلوب هو 26 حرفًا."} + "chiefComplaintLengthErrorMsg":{"en": "The text is too short; minimum 26 characters required.", "ar":"النص قصير جدًا؛ الحد الأدنى المطلوب هو 26 حرفًا."}, + "filterInPatient":{"en": "Select Dates", "ar":"حدد التواريخ."} }; diff --git a/lib/core/model/SOAP/chief_complaint/post_chief_complaint_request_model.dart b/lib/core/model/SOAP/chief_complaint/post_chief_complaint_request_model.dart index 56b97a92..cb70b6ac 100644 --- a/lib/core/model/SOAP/chief_complaint/post_chief_complaint_request_model.dart +++ b/lib/core/model/SOAP/chief_complaint/post_chief_complaint_request_model.dart @@ -1,6 +1,7 @@ class PostChiefComplaintRequestModel { int? appointmentNo; int? episodeID; + String? pomrId; int? patientMRN; int? admissionNo; String? chiefComplaint; @@ -24,7 +25,7 @@ class PostChiefComplaintRequestModel { this.doctorID, this.editedBy, this.numberOfWeeks, - this.admissionNo}); + this.admissionNo,this.pomrId}); PostChiefComplaintRequestModel.fromJson(Map json) { appointmentNo = json['AppointmentNo']; @@ -39,6 +40,7 @@ class PostChiefComplaintRequestModel { doctorID = json['DoctorID']; editedBy = json['EditedBy']; admissionNo = json['AdmissionNo']; + pomrId = json[' String? pomrId;']; } Map toJson() { @@ -58,6 +60,7 @@ class PostChiefComplaintRequestModel { data['isLactation'] = this.isLactation; data['numberOfWeeks'] = this.numberOfWeeks; data['DoctorID'] = this.doctorID; + data['pomrId'] = this.pomrId; if (editedBy != null) { data['EditedBy'] = this.editedBy; } diff --git a/lib/core/model/SOAP/in_patient/get_episode_for_inpatient_req_model.dart b/lib/core/model/SOAP/in_patient/get_episode_for_inpatient_req_model.dart index 4d5efc98..6f680214 100644 --- a/lib/core/model/SOAP/in_patient/get_episode_for_inpatient_req_model.dart +++ b/lib/core/model/SOAP/in_patient/get_episode_for_inpatient_req_model.dart @@ -1,7 +1,7 @@ class GetEpisodeForInpatientReqModel { int? patientID; int? patientTypeID; - int? admissionNo; + dynamic? admissionNo; GetEpisodeForInpatientReqModel( {this.patientID, this.patientTypeID, this.admissionNo}); diff --git a/lib/core/model/admisson_orders/admission_orders_request_model.dart b/lib/core/model/admisson_orders/admission_orders_request_model.dart index 4b6296e5..11fdb196 100644 --- a/lib/core/model/admisson_orders/admission_orders_request_model.dart +++ b/lib/core/model/admisson_orders/admission_orders_request_model.dart @@ -64,7 +64,9 @@ class AdmissionOrdersRequestModel { data['DeviceTypeID'] = this.deviceTypeID; data['TokenID'] = this.tokenID; data['PatientID'] = this.patientID; + data['PatientMRN'] = this.patientID; data['AdmissionNo'] = this.admissionNo; + data['AdmissionRequestNo'] = this.admissionNo; data['SessionID'] = this.sessionID; data['ProjectID'] = this.projectID; data['SetupID'] = this.setupID; diff --git a/lib/core/model/diagnosis/GetDiagnosisForInPatientResponseModel.dart b/lib/core/model/diagnosis/GetDiagnosisForInPatientResponseModel.dart index 491ac591..b684c180 100644 --- a/lib/core/model/diagnosis/GetDiagnosisForInPatientResponseModel.dart +++ b/lib/core/model/diagnosis/GetDiagnosisForInPatientResponseModel.dart @@ -50,4 +50,32 @@ class GetDiagnosisForInPatientResponseModel { data['EditedOn'] = this.editedOn; return data; } + /* + * + * String? iCDCode10ID; + int? diagnosisTypeID; + int? conditionID; + bool? complexDiagnosis; + String? asciiDesc; + int? createdBy; + String? createdOn; + int? editedBy; + String? editedOn; + String? createdByName; + String? editedByName; +*/ + + GetDiagnosisForInPatientResponseModel.fromJsonForVidaPlus(json) { + iCDCode10ID = json['selectedIcdCode']; + diagnosisTypeID = json['DiagnosisTypeID']; + conditionID = json['ConditionID']; + complexDiagnosis = json['ComplexDiagnosis']; + asciiDesc = json['selectedDisease']; + createdBy = json['CreatedBy']; + createdOn = json['createdOn']; + editedBy = json['EditedBy']; + editedOn = json['EditedOn']; + createdByName = json['createdBy']; + editedByName = json['EditedByName']; + } } diff --git a/lib/core/model/discharge_summary/GetDischargeSummaryReqModel.dart b/lib/core/model/discharge_summary/GetDischargeSummaryReqModel.dart index e5551ff0..af80aaca 100644 --- a/lib/core/model/discharge_summary/GetDischargeSummaryReqModel.dart +++ b/lib/core/model/discharge_summary/GetDischargeSummaryReqModel.dart @@ -3,11 +3,15 @@ class GetDischargeSummaryReqModel { int? admissionNo; int? patientType; int? patientTypeID; + int? clinicId; + int? doctorId; GetDischargeSummaryReqModel( {this.patientID, this.admissionNo, this.patientType = 1, + this.clinicId = null, + this.doctorId = null, this.patientTypeID = 1}); GetDischargeSummaryReqModel.fromJson(Map json) { @@ -15,14 +19,20 @@ class GetDischargeSummaryReqModel { admissionNo = json['AdmissionNo']; patientType = json['PatientType']; patientTypeID = json['PatientTypeID']; + clinicId = json['ClinicID']; } Map toJson() { final Map data = new Map(); + print("the clinic id is $clinicId"); + print("the doctorId id is $doctorId"); data['PatientID'] = this.patientID; + data['PatientMRN'] = this.patientID; data['AdmissionNo'] = this.admissionNo; data['PatientType'] = this.patientType; data['PatientTypeID'] = this.patientTypeID; + data['ClinicID'] = this.clinicId; + data['DoctorID'] = this.doctorId; data['isDentalAllowedBackend'] = false; return data; diff --git a/lib/core/model/insurance_approval_request_model.dart b/lib/core/model/insurance_approval_request_model.dart index 11f7804e..9efeab51 100644 --- a/lib/core/model/insurance_approval_request_model.dart +++ b/lib/core/model/insurance_approval_request_model.dart @@ -47,6 +47,7 @@ class InsuranceApprovalInPatientRequestModel { Map toJson() { final Map data = new Map(); data['PatientID'] = this.patientID; + data['PatientMRN'] = this.patientID; data['PatientTypeID'] = this.patientTypeID; data['EXuldAPPNO'] = this.eXuldAPPNO; data['ProjectID'] = this.projectID; diff --git a/lib/core/model/note/GetNursingProgressNoteRequestModel.dart b/lib/core/model/note/GetNursingProgressNoteRequestModel.dart index 1eaa4647..d88c8b3b 100644 --- a/lib/core/model/note/GetNursingProgressNoteRequestModel.dart +++ b/lib/core/model/note/GetNursingProgressNoteRequestModel.dart @@ -1,5 +1,6 @@ class GetNursingProgressNoteRequestModel { int? patientID; + int? patientMRN; int? admissionNo; int? patientTypeID; int? patientType; @@ -10,6 +11,7 @@ class GetNursingProgressNoteRequestModel { this.admissionNo, this.patientTypeID = 1, this.patientType = 1, + this.patientMRN, this.setupID}); GetNursingProgressNoteRequestModel.fromJson(Map json) { @@ -18,6 +20,7 @@ class GetNursingProgressNoteRequestModel { patientTypeID = json['PatientTypeID']; patientType = json['PatientType']; setupID = json['SetupID']; + patientMRN = json['PatientMRN']; } Map toJson() { @@ -27,6 +30,7 @@ class GetNursingProgressNoteRequestModel { data['PatientTypeID'] = this.patientTypeID; data['PatientType'] = this.patientType; data['SetupID'] = this.setupID; + data['PatientMRN'] = this.patientMRN; return data; } } diff --git a/lib/core/model/note/note_model.dart b/lib/core/model/note/note_model.dart index 268e814a..1d43f4e2 100644 --- a/lib/core/model/note/note_model.dart +++ b/lib/core/model/note/note_model.dart @@ -1,3 +1,5 @@ +import 'package:doctor_app_flutter/utils/extenstions_utils.dart'; + class NoteModel { String? setupID; int? projectID; @@ -73,6 +75,30 @@ class NoteModel { conditionDescription = json['ConditionDescription']; } + NoteModel.fromJsonForVidaPlusResponse(json){ + setupID = json['SetupID']; + projectID = json['ProjectID']; + patientID = json['PatientID']; + patientType = json['PatientType']; + admissionNo = json['AdmissionNo']; + lineItemNo = json['LineItemNo']; + visitType = json['VisitType']; + notes = json['progressNote']; + assessmentDate = json['AssessmentDate']; + visitTime = json['VisitTime']; + status = json['Status']; + nursingRemarks = json['NursingRemarks']; + createdOn = json['CreatedOn']; + editedOn = json['EditedOn']; + createdBy = json['CreatedBy']; + admissionClinicID = int.parse(json['speciality'].isEmpty == true?"-1":json['speciality']); + admissionClinicName = json['specialityName']; + doctorClinicName = json['DoctorClinicName']; + doctorName = json['userFullName']; + visitTypeDesc = json['VisitTypeDesc']; + condition = int.parse(json['patientCondition'].isEmpty == true?"-1":json['patientCondition']); + conditionDescription = json['patientConditionName'];} + Map toJson() { final Map data = new Map(); data['SetupID'] = this.setupID; diff --git a/lib/core/model/note/update_note_model.dart b/lib/core/model/note/update_note_model.dart index c662976a..e6c55757 100644 --- a/lib/core/model/note/update_note_model.dart +++ b/lib/core/model/note/update_note_model.dart @@ -17,6 +17,7 @@ class UpdateNoteReqModel { bool? patientOutSA; int? patientTypeID; int? conditionId; + String? patientMRN; UpdateNoteReqModel( @@ -37,7 +38,8 @@ class UpdateNoteReqModel { this.isLoginForDoctorApp, this.patientOutSA, this.patientTypeID, - this.conditionId}); + this.conditionId, + this.patientMRN}); UpdateNoteReqModel.fromJson(Map json) { projectID = json['ProjectID']; @@ -58,6 +60,7 @@ class UpdateNoteReqModel { patientOutSA = json['PatientOutSA']; patientTypeID = json['PatientTypeID']; conditionId = json['ConditionId']; + patientMRN = json['PatientMRN']; } Map toJson() { @@ -80,6 +83,7 @@ class UpdateNoteReqModel { data['PatientOutSA'] = this.patientOutSA; data['PatientTypeID'] = this.patientTypeID; data['ConditionId'] = this.conditionId; + data['PatientMRN'] = this.patientMRN; return data; } } diff --git a/lib/core/model/operation_report/get_reservations_request_model.dart b/lib/core/model/operation_report/get_reservations_request_model.dart index 8de0bbf3..06679ab2 100644 --- a/lib/core/model/operation_report/get_reservations_request_model.dart +++ b/lib/core/model/operation_report/get_reservations_request_model.dart @@ -12,6 +12,12 @@ class GetReservationsRequestModel { int? deviceTypeID; String? tokenID; String? sessionID; + int? patientMRN; + int? AdmissionRequestNo; + int? PatientTypeID; + int? ResultType; + int? AdmissionNo; + int? LoginDoctorID; GetReservationsRequestModel( {this.patientID, @@ -26,7 +32,14 @@ class GetReservationsRequestModel { this.patientOutSA, this.deviceTypeID, this.tokenID, - this.sessionID}); + this.patientMRN, + this.sessionID, + this.AdmissionRequestNo = 0, + this.PatientTypeID= 0, + this.ResultType = 0, + this.AdmissionNo = 0, + this.LoginDoctorID , + }); GetReservationsRequestModel.fromJson(Map json) { patientID = json['PatientID']; @@ -42,6 +55,7 @@ class GetReservationsRequestModel { deviceTypeID = json['DeviceTypeID']; tokenID = json['TokenID']; sessionID = json['SessionID']; + patientMRN = json['PatientMRN']; } Map toJson() { @@ -59,6 +73,12 @@ class GetReservationsRequestModel { data['DeviceTypeID'] = this.deviceTypeID; data['TokenID'] = this.tokenID; data['SessionID'] = this.sessionID; + data['PatientMRN'] = this.patientMRN; + data['AdmissionRequestNo'] = this.AdmissionRequestNo; + data['PatientTypeID'] = this.PatientTypeID; + data['ResultType'] = this.ResultType; + data['AdmissionNo'] = this.AdmissionNo; + data['LoginDoctorID'] = this.LoginDoctorID; return data; } } diff --git a/lib/core/model/operation_report/get_reservations_response_model.dart b/lib/core/model/operation_report/get_reservations_response_model.dart index afc26779..80779045 100644 --- a/lib/core/model/operation_report/get_reservations_response_model.dart +++ b/lib/core/model/operation_report/get_reservations_response_model.dart @@ -101,7 +101,7 @@ class GetReservationsResponseModel { editedOn = json['EditedOn']; patientName = json['PatientName']; patientNameN = json['PatientNameN']; - gender = json['Gender']; + gender = json['Gender']?.toString()??""; dateofBirth = json['DateofBirth']; mobileNumber = json['MobileNumber']; emailAddress = json['EmailAddress']; diff --git a/lib/core/model/patient/patiant_info_model.dart b/lib/core/model/patient/patiant_info_model.dart index 4fb49f80..7d914280 100644 --- a/lib/core/model/patient/patiant_info_model.dart +++ b/lib/core/model/patient/patiant_info_model.dart @@ -55,6 +55,7 @@ class PatiantInformtion { int? patientType; int? patientMRN; String? admissionNo; + int? admissionID; String? admissionDate; DateTime? admissionDateWithDateTimeForm; String? createdOn; @@ -80,6 +81,12 @@ class PatiantInformtion { int? vcId; String? voipToken; String? pomrId; + + int? rowId; + int? createdBy; + int? editedBy; + String? editedOn; + PatiantInformtion( {this.patientDetails, this.projectId, @@ -156,7 +163,8 @@ class PatiantInformtion { this.voipToken, this.admissionDateWithDateTimeForm, this.appointmentDateWithDateTimeForm, - this.pomrId + this.pomrId, + this.admissionID }); PatiantInformtion.fromJson(Map json) { @@ -264,7 +272,7 @@ class PatiantInformtion { consultationNotes = json['ConsultationNotes']; patientStatus = json['PatientStatus']; voipToken = json['VoipToken']; - pomrId = json['pomrId']; + pomrId = json['pomrId']??(json["PatientPomrID"]?.toString()); admissionDateWithDateTimeForm = json["AdmissionDate"] != null ? AppDateUtils.convertStringToDate(json["AdmissionDate"]) : json["admissionDate"] != null @@ -274,6 +282,10 @@ class PatiantInformtion { appointmentDateWithDateTimeForm = json["AppointmentDate"] != null ? AppDateUtils.convertStringToDate(json["AppointmentDate"]) : null; + rowId = json['RowID']; + createdBy = json['CreatedBy']; + editedBy = json['EditedBy']; + admissionID = json['AdmissionID']; } } diff --git a/lib/core/model/patient/progress_note_request.dart b/lib/core/model/patient/progress_note_request.dart index 2d25a061..89cc0806 100644 --- a/lib/core/model/patient/progress_note_request.dart +++ b/lib/core/model/patient/progress_note_request.dart @@ -56,6 +56,8 @@ class ProgressNoteRequest { data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp; data['PatientOutSA'] = this.patientOutSA; data['PatientTypeID'] = this.patientTypeID; + + return data; } } diff --git a/lib/core/model/patient_muse/PatientSearchRequestModel.dart b/lib/core/model/patient_muse/PatientSearchRequestModel.dart index afa0cda4..6f69c4c9 100644 --- a/lib/core/model/patient_muse/PatientSearchRequestModel.dart +++ b/lib/core/model/patient_muse/PatientSearchRequestModel.dart @@ -15,24 +15,30 @@ class PatientSearchRequestModel { int? nursingStationID; int? clinicID = 0; int? loginDoctorID; + int? pageIndex; + int? pageSize; PatientSearchRequestModel( {this.doctorID, - this.firstName = "0", - this.middleName = "0", - this.lastName = "0", - this.patientMobileNumber = "0", - this.patientIdentificationID = "0", + this.firstName = "", + this.middleName = "", + this.lastName = "", + this.patientMobileNumber = "", + this.patientIdentificationID = "", this.patientID = 0, this.searchType = 1, this.mobileNo = "", - this.identificationNo = "0", - this.from = "0", - this.to = "0", - this.clinicID, + this.identificationNo = "", + this.from = "", + this.to = "", + this.clinicID = 0, this.nursingStationID = 0, - this.projectID, this.loginDoctorID}); + this.projectID, + this.loginDoctorID, + this.pageIndex = 0 , + this.pageSize = 10 + }); PatientSearchRequestModel.fromJson(Map json) { doctorID = json['DoctorID']; @@ -51,11 +57,14 @@ class PatientSearchRequestModel { clinicID = json['ClinicID']; projectID = json['ProjectID']; loginDoctorID = json['LoginDoctorID']; + pageIndex = json['PageIndex']; + pageSize = json['PageSize']; } Map toJson() { final Map data = new Map(); data['DoctorID'] = this.doctorID; + data['MemberID'] = this.doctorID; data['FirstName'] = this.firstName; data['MiddleName'] = this.middleName; data['LastName'] = this.lastName; @@ -71,6 +80,8 @@ class PatientSearchRequestModel { data['ClinicID'] = this.clinicID; data['ProjectID'] = this.projectID; data['LoginDoctorID'] = this.loginDoctorID; + data['PageIndex'] = this.pageIndex; + data['PageSize'] = this.pageSize; return data; } } diff --git a/lib/core/model/pending_orders/pending_order_request_model.dart b/lib/core/model/pending_orders/pending_order_request_model.dart index 47577b16..154ad144 100644 --- a/lib/core/model/pending_orders/pending_order_request_model.dart +++ b/lib/core/model/pending_orders/pending_order_request_model.dart @@ -64,6 +64,7 @@ class PendingOrderRequestModel { data['DeviceTypeID'] = this.deviceTypeID; data['TokenID'] = this.tokenID; data['PatientID'] = this.patientID; + data['PatientMRN'] = this.patientID; data['AdmissionNo'] = this.admissionNo; data['SessionID'] = this.sessionID; data['ProjectID'] = this.projectID; diff --git a/lib/core/model/referral/ReferralRequest.dart b/lib/core/model/referral/ReferralRequest.dart index b3ad1e0e..a51b4e94 100644 --- a/lib/core/model/referral/ReferralRequest.dart +++ b/lib/core/model/referral/ReferralRequest.dart @@ -23,6 +23,10 @@ class ReferralRequest { String? sessionID; bool? isLoginForDoctorApp; bool? patientOutSA; + String? diseaseDescription; + String? diseaseCode; + + String? toDate; ReferralRequest( {this.roomID, @@ -103,6 +107,9 @@ class ReferralRequest { data['SessionID'] = this.sessionID; data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp; data['PatientOutSA'] = this.patientOutSA; + data['Diagnosis'] = this.diseaseDescription; + data['DiagnosisCode'] = this.diseaseCode; + data['ToDate'] = this.toDate; return data; } } diff --git a/lib/core/service/hospitals/hospitals_service.dart b/lib/core/service/hospitals/hospitals_service.dart index 6e7189b7..efed3e2c 100644 --- a/lib/core/service/hospitals/hospitals_service.dart +++ b/lib/core/service/hospitals/hospitals_service.dart @@ -5,11 +5,15 @@ import 'package:doctor_app_flutter/core/model/hospitals/get_hospitals_request_mo import 'package:doctor_app_flutter/core/model/hospitals/get_hospitals_response_model.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; + class HospitalsService extends BaseService { + static String memberId = ""; + List hospitals = []; List vidaPlusProjectListModel = []; Future getHospitals(GetHospitalsRequestModel getHospitalsRequestModel) async { + memberId = getHospitalsRequestModel.memberID??""; hasError = false; await baseAppClient.post( GET_PROJECTS, diff --git a/lib/core/service/patient/ReferralService.dart b/lib/core/service/patient/ReferralService.dart index dd066d03..73a9a334 100644 --- a/lib/core/service/patient/ReferralService.dart +++ b/lib/core/service/patient/ReferralService.dart @@ -3,6 +3,7 @@ import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/core/model/referral/ReferralRequest.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; +import 'package:doctor_app_flutter/utils/date-utils.dart'; class ReferralService extends BaseService { Future referralPatient( @@ -15,8 +16,11 @@ class ReferralService extends BaseService { int? priority, int? frequency, String? referringDoctorRemarks, - String? extension}) async { - // await getDoctorProfile(); + String? extension, + String? diagnosisCode, + String? diagnosisDescription}) async { + // await getDoctorProfile(); + print("the referralClinic is $referralClinic"); ReferralRequest referralRequest = ReferralRequest(); Map? profile = await sharedPref.getObj(DOCTOR_PROFILE); DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile!); @@ -35,6 +39,11 @@ class ReferralService extends BaseService { referralRequest.editedBy = doctorProfile!.doctorID; referralRequest.createdBy = doctorProfile!.doctorID; referralRequest.patientOutSA = false; + referralRequest.diseaseCode = diagnosisCode; + referralRequest.diseaseDescription = diagnosisDescription; + referralRequest.toDate = AppDateUtils.convertDateToServerFormat(DateTime.now()); + var json =referralRequest.toJson(); + json["Specialty"] = doctorProfile?.specialty?.first; await baseAppClient.post( REFER_TO_DOCTOR, @@ -43,7 +52,7 @@ class ReferralService extends BaseService { hasError = true; super.error = error; }, - body: referralRequest.toJson(), + body: json, ); } } diff --git a/lib/core/service/patient/patient-doctor-referral-service.dart b/lib/core/service/patient/patient-doctor-referral-service.dart index bd5c4040..996b1939 100644 --- a/lib/core/service/patient/patient-doctor-referral-service.dart +++ b/lib/core/service/patient/patient-doctor-referral-service.dart @@ -1,4 +1,5 @@ import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/core/model/hospitals/get_hospitals_request_model.dart'; import 'package:doctor_app_flutter/core/model/referral/MyReferralPatientModel.dart'; import 'package:doctor_app_flutter/lookups/hospital_lookup.dart'; import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; @@ -72,6 +73,7 @@ class PatientReferralService extends LookupService { await baseAppClient.post( PROJECT_GET_INFO, onSuccess: (dynamic response, int statusCode) { + print("the response is ${response['ProjectInfo'][0]['facilityGroupId']}"); setupID = response['ProjectInfo'][0]['facilityGroupId']; }, onFailure: (String error, int statusCode) { diff --git a/lib/core/service/patient/patientInPatientService.dart b/lib/core/service/patient/patientInPatientService.dart index b51fab3d..b6578885 100644 --- a/lib/core/service/patient/patientInPatientService.dart +++ b/lib/core/service/patient/patientInPatientService.dart @@ -2,12 +2,14 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; +import 'package:flutter/material.dart'; class PatientInPatientService extends BaseService { List inPatientList = []; List myInPatientList = []; - Future getInPatientList(PatientSearchRequestModel requestModel, bool isMyInpatient) async { + Future getInPatientList(PatientSearchRequestModel requestModel, bool isMyInpatient, + {bool isVidaPlusProject = false}) async { hasError = false; await getDoctorProfile(isGetProfile: true); requestModel.loginDoctorID = doctorProfile!.doctorID; diff --git a/lib/core/service/patient/patient_service.dart b/lib/core/service/patient/patient_service.dart index 27dcd080..0be3928c 100644 --- a/lib/core/service/patient/patient_service.dart +++ b/lib/core/service/patient/patient_service.dart @@ -1,6 +1,7 @@ import 'package:doctor_app_flutter/client/base_app_client.dart'; import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; +import 'package:doctor_app_flutter/core/model/SOAP/assessment/patient_previous_diagnosis.dart'; import 'package:doctor_app_flutter/core/model/diabetic_chart/GetDiabeticChartValuesRequestModel.dart'; import 'package:doctor_app_flutter/core/model/diabetic_chart/GetDiabeticChartValuesResponseModel.dart'; import 'package:doctor_app_flutter/core/model/diagnosis/GetDiagnosisForInPatientRequestModel.dart'; @@ -27,6 +28,7 @@ import 'package:doctor_app_flutter/core/model/patient/refer_to_doctor_request.da import 'package:doctor_app_flutter/core/model/patient/vital_sign/vital_sign_res_model.dart'; import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; +import 'package:flutter/material.dart'; class PatientService extends BaseService { List _patientVitalSignList = []; @@ -339,6 +341,29 @@ class PatientService extends BaseService { ); } + + Future getVidaPlusProgressNote(patient) async { + hasError = false; + + await baseAppClient.post( + GET_PROGRESS_NOTE, + onSuccess: (dynamic response, int statusCode) { + _patientProgressNoteList = []; + // _patientProgressNoteList = + response['ListProgressNote']['resultData'].forEach((v) { + v['data'].forEach((response) { + _patientProgressNoteList.add(new NoteModel.fromJsonForVidaPlusResponse(response)); + }); + }); + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + body: patient, + ); + } + Future updatePatientProgressNote(UpdateNoteReqModel req) async { hasError = false; @@ -524,6 +549,42 @@ class PatientService extends BaseService { ); } + + getDiagnosis(PatiantInformtion patient) async { + Map request = { + // "hospitalGroupId": 105, + // "hospitalId": 313, + // "patientId": 70023498, + // "patientPomrId": 9907, + // "startRow": 0, + // "endRow": 10, + // "isSelected": true, + // "ProjectID": 313 + "hospitalGroupId": await sharedPref.getString(DOCTOR_SETUP_ID), + "hospitalId": patient.projectId, + "patientId": patient.patientId, + "patientPomrId": patient.pomrId, + "startRow": 0, + "endRow": 1000000, + "ProjectID": patient.projectId + }; + List dynamicResponse = []; + hasError = false; + await baseAppClient.post(GET_LIST_OF_DIAGNOSIS, + onSuccess: (dynamic response, int statusCode) { + _diagnosisForInPatientList.clear(); + dynamicResponse = response['ListDiagnosisDetailsSearch']['resultData']; + + response['ListDiagnosisDetailsSearch']['resultData'].forEach((v) => + _diagnosisForInPatientList.add(GetDiagnosisForInPatientResponseModel.fromJsonForVidaPlus(v))); + }, onFailure: (String error, int statusCode) { + _diagnosisForInPatientList.clear(); + hasError = true; + super.error = error; + }, body: request); + return dynamicResponse; + } + Future getDiabeticChartValues(GetDiabeticChartValuesRequestModel getDiabeticChartValuesRequestModel) async { hasError = false; @@ -559,4 +620,38 @@ class PatientService extends BaseService { body: stpMasterListRequestModel.toJson(), ); } + + Future createProgressNote( + CreateNoteModel data, + PatiantInformtion patient, + ) async { + var profile = await getDoctorProfile(); + + Map request = { + "planNote": data.notes, + "PatientMRN": patient.patientMRN, + "EpisodeID": patient.pomrId, + "CreatedByName": patient.doctorName, + "CreatedBy": patient.doctorId, + "Speciality": patient.clinicId, + "ProgressNotesTypes": "DOCTOR_NOTE", + "PatientCondition": data.conditionId, + "ProjectID": patient.projectId + }; + var success = false; + await baseAppClient.post(CREATE_PROGRESS_NOTE, + onSuccess: (dynamic response, int statusCode) { + if (response['ListCreateProgressNote'] != null) { + // DrAppToastMsg.showSuccesToast( + // response['ListCreateProgressNote']['message']); + success = true; + } + }, onFailure: (String error, int statusCode) { + success = false; + hasError = true; + super.error = error; + }, body: request); + + return success; + } } diff --git a/lib/core/service/patient/profile/operation_report_servive.dart b/lib/core/service/patient/profile/operation_report_servive.dart index e3ea294e..26060d82 100644 --- a/lib/core/service/patient/profile/operation_report_servive.dart +++ b/lib/core/service/patient/profile/operation_report_servive.dart @@ -1,4 +1,5 @@ import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; import 'package:doctor_app_flutter/core/model/operation_report/create_update_operation_report_request_model.dart'; import 'package:doctor_app_flutter/core/model/operation_report/get_operation_details_request_modle.dart'; @@ -6,6 +7,8 @@ import 'package:doctor_app_flutter/core/model/operation_report/get_operation_det import 'package:doctor_app_flutter/core/model/operation_report/get_reservations_response_model.dart'; import 'package:doctor_app_flutter/core/model/operation_report/get_reservations_request_model.dart'; +import '../../../../config/shared_pref_kay.dart' show DOCTOR_PROFILE; + class OperationReportService extends BaseService { List _reservationList = []; @@ -18,9 +21,12 @@ class OperationReportService extends BaseService { Future getReservations( {GetReservationsRequestModel? getReservationsRequestModel, - int? patientId}) async { + int? patientId, int? patientMRN}) async { + Map? profile = await sharedPref.getObj(DOCTOR_PROFILE); + + DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile!); getReservationsRequestModel = - GetReservationsRequestModel(patientID: patientId); + GetReservationsRequestModel(patientID: patientId,patientMRN: patientMRN, LoginDoctorID: doctorProfile.doctorID); hasError = false; await baseAppClient.post(GET_RESERVATIONS, 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 1adaae95..86fadbad 100644 --- a/lib/core/service/patient_medical_file/medical_report/PatientMedicalReportService.dart +++ b/lib/core/service/patient_medical_file/medical_report/PatientMedicalReportService.dart @@ -9,14 +9,15 @@ class PatientMedicalReportService extends BaseService { List medicalReportList = []; List medicalReportTemplate = []; - Future getMedicalReportList(PatiantInformtion patient) async { + Future getMedicalReportList(PatiantInformtion patient, bool isVidaPlusProject) async { hasError = false; Map body = Map(); await getDoctorProfile(); - body['AdmissionNo'] = patient.admissionNo; + body['AdmissionNo'] = isVidaPlusProject ?patient.admissionID : patient.admissionNo; body['SetupID'] = doctorProfile!.setupID; - // body['ProjectID'] = doctorProfile!.projectID; + body['ProjectID'] = doctorProfile!.projectID; medicalReportList = []; + await baseAppClient.postPatient(PATIENT_MEDICAL_REPORT_GET_LIST, onSuccess: (dynamic response, int statusCode) { if (response['DAPP_ListMedicalReportList'] != null) { response['DAPP_ListMedicalReportList'].forEach((v) { @@ -33,8 +34,7 @@ class PatientMedicalReportService extends BaseService { Future getMedicalReportTemplate() async { hasError = false; Map body = Map(); - body['SetupID'] = "91877"; - body['TemplateID'] = 43; + await baseAppClient.post(PATIENT_MEDICAL_REPORT_GET_TEMPLATE, onSuccess: (dynamic response, int statusCode) { medicalReportTemplate.clear(); @@ -62,11 +62,11 @@ class PatientMedicalReportService extends BaseService { }, body: body, patient: patient); } - Future verifyMedicalReport(PatiantInformtion patient, MedicalReportModel medicalReport) async { + Future verifyMedicalReport(PatiantInformtion patient, MedicalReportModel medicalReport, bool? isVidaPlusProject,) async { hasError = false; Map body = Map(); body['SetupID'] = "91877"; - body['AdmissionNo'] = patient.admissionNo; + body['AdmissionNo'] = isVidaPlusProject == true? patient.admissionID : patient.admissionNo; body['InvoiceNo'] = medicalReport.invoiceNo; body['LineItemNo'] = medicalReport.lineItemNo; if (body['ProjectID'] == null) { @@ -80,7 +80,7 @@ class PatientMedicalReportService extends BaseService { }, body: body, patient: patient); } - Future addMedicalReport(PatiantInformtion patient, String htmlText) async { + Future addMedicalReport(PatiantInformtion patient, String htmlText, bool? isVidaPlusProject) async { hasError = false; Map body = Map(); body['SetupID'] = body.containsKey('SetupID') @@ -88,15 +88,21 @@ class PatientMedicalReportService extends BaseService { ? body['SetupID'] : SETUP_ID : SETUP_ID; - body['AdmissionNo'] = int.parse(patient.admissionNo!); + print("isVidaPlusProject $isVidaPlusProject"); + body['AdmissionNo'] = isVidaPlusProject == true? patient.admissionID ?? -1 :int.parse(patient.admissionNo!); + print('the admission no is ${body['AdmissionNo']}'); body['MedicalReportHTML'] = htmlText; body['ProjectID'] = patient.projectId; + body['PatientID'] = patient.patientId; body['DoctorID'] = patient.doctorId; + if(isVidaPlusProject == true) { + body['PatientType'] = patient.patientType; + } - await baseAppClient.postPatient(INSERT_MEDICAL_REPORT, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { + await baseAppClient.post(INSERT_MEDICAL_REPORT, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { hasError = true; super.error = error.toString(); - }, body: body, patient: patient); + }, body: body); } Future updateMedicalReport(PatiantInformtion patient, String htmlText, int limitNumber, String invoiceNumber) async { 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 c6749578..bf3a2cb6 100644 --- a/lib/core/service/patient_medical_file/prescription/prescription_service.dart +++ b/lib/core/service/patient_medical_file/prescription/prescription_service.dart @@ -359,11 +359,11 @@ class PrescriptionService extends LookupService { }, body: body); } - Future getMedicationForInPatient(PatiantInformtion patient) async { + Future getMedicationForInPatient(PatiantInformtion patient, {required bool isVidaPlusProject}) async { hasError = false; _getMedicationForInPatientRequestModel = GetMedicationForInPatientRequestModel( isDentalAllowedBackend: false, - admissionNo: int.parse(patient.admissionNo!), + admissionNo: isVidaPlusProject ? patient.admissionID : int.parse(patient.admissionNo!), projectID: patient.projectId, ); await baseAppClient.postPatient(GET_MEDICATION_FOR_IN_PATIENT, patient: patient, onSuccess: (dynamic response, int statusCode) { diff --git a/lib/core/service/pending_order_service.dart b/lib/core/service/pending_order_service.dart index 6572f24c..d8f2104c 100644 --- a/lib/core/service/pending_order_service.dart +++ b/lib/core/service/pending_order_service.dart @@ -37,6 +37,29 @@ class PendingOrderService extends BaseService { }, body: pendingOrderRequestModel.toJson()); } + Future getPendingOrdersForVidaPlus({PendingOrderRequestModel? pendingOrderRequestModel, int? patientId, int? admissionNo,}) async { + pendingOrderRequestModel = PendingOrderRequestModel( + patientID: patientId, + admissionNo: admissionNo, + patientTypeID: 1, + patientType: 1, + ); + + hasError = false; + await baseAppClient.post(GET_PENDING_ORDERS_VIDA_PLUS, onSuccess: (dynamic response, int statusCode) { + print("Success"); + _pendingOrderList.clear(); + response['List_DoctorProgressNote'].forEach( + (v) { + _pendingOrderList.add(PendingOrderModel.fromJson(v)); + }, + ); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: pendingOrderRequestModel.toJson()); + } + Future getAdmissionOrders({AdmissionOrdersRequestModel? admissionOrdersRequestModel, int? patientId, int? admissionNo}) async { admissionOrdersRequestModel = AdmissionOrdersRequestModel( patientID: patientId, diff --git a/lib/core/viewModel/PatientMedicalReportViewModel.dart b/lib/core/viewModel/PatientMedicalReportViewModel.dart index fe9ae6f3..8195fc17 100644 --- a/lib/core/viewModel/PatientMedicalReportViewModel.dart +++ b/lib/core/viewModel/PatientMedicalReportViewModel.dart @@ -15,9 +15,9 @@ class PatientMedicalReportViewModel extends BaseViewModel { List get medicalReportTemplate => _service.medicalReportTemplate; - Future getMedicalReportList(PatiantInformtion patient) async { + Future getMedicalReportList(PatiantInformtion patient,{bool isVidaPlusProject = false}) async { setState(ViewState.Busy); - await _service.getMedicalReportList(patient); + await _service.getMedicalReportList(patient, isVidaPlusProject); if (_service.hasError) { error = _service.error; setState(ViewState.ErrorLocal); // ViewState.Error @@ -46,41 +46,41 @@ class PatientMedicalReportViewModel extends BaseViewModel { } Future verifyMedicalReport( - PatiantInformtion patient, MedicalReportModel medicalReport) async { + PatiantInformtion patient, MedicalReportModel medicalReport, bool? isVidaPlusProject) async { setState(ViewState.Busy); - await _service.verifyMedicalReport(patient, medicalReport); + await _service.verifyMedicalReport(patient, medicalReport, isVidaPlusProject); if (_service.hasError) { error = _service.error; setState(ViewState.ErrorLocal); } else - await getMedicalReportList(patient); + await getMedicalReportList(patient, isVidaPlusProject: isVidaPlusProject == true); setState(ViewState.Idle); } - Future addMedicalReport(PatiantInformtion patient, String htmlText) async { + Future addMedicalReport(PatiantInformtion patient, String htmlText, bool? isVidaPlusProject) async { setState(ViewState.Busy); - await _service.addMedicalReport(patient, htmlText); + await _service.addMedicalReport(patient, htmlText, isVidaPlusProject); if (_service.hasError) { error = _service.error; - await getMedicalReportList(patient); + await getMedicalReportList(patient, isVidaPlusProject: isVidaPlusProject == true); setState(ViewState.ErrorLocal); } else { - await getMedicalReportList(patient); + await getMedicalReportList(patient,isVidaPlusProject: isVidaPlusProject == true); setState(ViewState.Idle); } } Future updateMedicalReport(PatiantInformtion patient, String htmlText, - int limitNumber, String invoiceNumber) async { + int limitNumber, String invoiceNumber, bool? isVidaPlusProject) async { setState(ViewState.Busy); await _service.updateMedicalReport( patient, htmlText, limitNumber, invoiceNumber); if (_service.hasError) { error = _service.error; - await getMedicalReportList(patient); + await getMedicalReportList(patient, isVidaPlusProject: isVidaPlusProject == true); setState(ViewState.ErrorLocal); } else { - await getMedicalReportList(patient); + await getMedicalReportList(patient,isVidaPlusProject: isVidaPlusProject == true); setState(ViewState.Idle); } } diff --git a/lib/core/viewModel/PatientSearchViewModel.dart b/lib/core/viewModel/PatientSearchViewModel.dart index 42e4f553..bc9ca991 100644 --- a/lib/core/viewModel/PatientSearchViewModel.dart +++ b/lib/core/viewModel/PatientSearchViewModel.dart @@ -8,6 +8,7 @@ import 'package:doctor_app_flutter/core/service/special_clinics/special_clinic_s import 'package:doctor_app_flutter/core/model/dashboard/get_special_clinical_care_mapping_List_Respose_Model.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; import '../../locator.dart'; import 'base_view_model.dart'; @@ -132,14 +133,14 @@ class PatientSearchViewModel extends BaseViewModel { List filteredInPatientItems = []; List filteredMyInPatientItems = []; - Future getInPatientList(PatientSearchRequestModel requestModel, {bool isMyInpatient = false, bool isLocalBusy = false}) async { + Future getInPatientList(PatientSearchRequestModel requestModel, {bool isMyInpatient = false, bool isLocalBusy = false, bool isVidaPlusProject = false, bool isForceFullRefresh = false}) async { await getDoctorProfile(); if (isLocalBusy) { setState(ViewState.BusyLocal); } else { setState(ViewState.Busy); } - if (inPatientList.length == 0) await _inPatientService.getInPatientList(requestModel, false); + if (inPatientList.length == 0 || isForceFullRefresh) await _inPatientService.getInPatientList(requestModel, false, isVidaPlusProject: isVidaPlusProject); if (_inPatientService.hasError) { error = _inPatientService.error; if (isLocalBusy) { @@ -342,4 +343,10 @@ class PatientSearchViewModel extends BaseViewModel { setState(ViewState.Idle); } } + + + flushSelectedDates(){ + selectedFromDate = null; + selectedToDate = null; + } } diff --git a/lib/core/viewModel/SOAP_view_model.dart b/lib/core/viewModel/SOAP_view_model.dart index aaf137ad..18386729 100644 --- a/lib/core/viewModel/SOAP_view_model.dart +++ b/lib/core/viewModel/SOAP_view_model.dart @@ -430,12 +430,14 @@ class SOAPViewModel extends BaseViewModel { setState(ViewState.Idle); } - Future getEpisodeForInpatient(PatiantInformtion patient) async { + Future getEpisodeForInpatient(PatiantInformtion patient, bool isVidaPlusProject ) async { setState(ViewState.BusyLocal); + var admissionNo = (isVidaPlusProject)? (patient.admissionID??"-1"):int.parse( (patient.admissionNo??"-1")) ; + GetEpisodeForInpatientReqModel getEpisodeForInpatientReqModel = GetEpisodeForInpatientReqModel( patientID: patient.patientId, - admissionNo: int.parse(patient.admissionNo!), + admissionNo: admissionNo, patientTypeID: 1); await _SOAPService.getEpisodeForInpatient(getEpisodeForInpatientReqModel); if (_SOAPService.hasError) { @@ -932,6 +934,7 @@ class SOAPViewModel extends BaseViewModel { isLactation: false, ispregnant: false, doctorID: '', + pomrId: patientInfo.pomrId, numberOfWeeks: 0); } diff --git a/lib/core/viewModel/patient-referral-viewmodel.dart b/lib/core/viewModel/patient-referral-viewmodel.dart index 34451000..13f71ba7 100644 --- a/lib/core/viewModel/patient-referral-viewmodel.dart +++ b/lib/core/viewModel/patient-referral-viewmodel.dart @@ -1,5 +1,7 @@ import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; import 'package:doctor_app_flutter/core/enum/view_state.dart'; +import 'package:doctor_app_flutter/core/model/diagnosis/GetDiagnosisForInPatientRequestModel.dart'; +import 'package:doctor_app_flutter/core/model/diagnosis/GetDiagnosisForInPatientResponseModel.dart'; import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/core/model/patient/my_referral/PendingReferral.dart'; import 'package:doctor_app_flutter/core/model/patient/my_referral/clinic-doctor.dart'; @@ -11,6 +13,7 @@ import 'package:doctor_app_flutter/core/service/patient/DischargedPatientService import 'package:doctor_app_flutter/core/service/patient/MyReferralPatientService.dart'; import 'package:doctor_app_flutter/core/service/patient/ReferralService.dart'; import 'package:doctor_app_flutter/core/service/patient/patient-doctor-referral-service.dart'; +import 'package:doctor_app_flutter/core/service/patient/patient_service.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; import 'package:flutter/cupertino.dart'; @@ -48,6 +51,31 @@ class PatientReferralViewModel extends BaseViewModel { List get patientArrivalList => _referralPatientService.patientArrivalList; + PatientService _patientService = locator(); + + List diagnosisForInPatientList = []; + + + + Future getDiagnosisForInPatient( + GetDiagnosisForInPatientRequestModel requestModel, bool isVidaPlusProject, PatiantInformtion patient) async { + await getDoctorProfile(); + setState(ViewState.Busy); + List response = []; + + if(isVidaPlusProject){ + response = await _patientService.getDiagnosis(patient); + } + + if (_patientService.hasError) { + error = _patientService.error; + setState(ViewState.ErrorLocal); + } else { + diagnosisForInPatientList = response; + setState(ViewState.Idle); + } + } + Future getPatientReferral(PatiantInformtion patient) async { setState(ViewState.Busy); await _referralPatientService.getPatientReferral(patient); @@ -222,7 +250,7 @@ class PatientReferralViewModel extends BaseViewModel { } } - Future makeInPatientReferral( + Future makeInPatientReferral(bool isVidaPlusProject, {PatiantInformtion? patient, int? projectID, int? clinicID, @@ -232,7 +260,8 @@ class PatientReferralViewModel extends BaseViewModel { String? referralDate, String? remarks, String? ext, - bool isLocalBusy = false}) async { + bool isLocalBusy = false, + dynamic? diagnosis}) async { if (isLocalBusy) setState(ViewState.BusyLocal); else @@ -241,12 +270,14 @@ class PatientReferralViewModel extends BaseViewModel { patientID: patient!.patientId, roomID: patient.roomId, referralClinic: clinicID, - admissionNo: int.parse(patient.admissionNo!), + admissionNo: isVidaPlusProject?patient.admissionID:int.parse(patient.admissionNo!), referralDoctor: doctorID, patientTypeID: patient.patientType, referringDoctorRemarks: remarks, priority: priority, frequency: frequencyCode, + diagnosisCode: diagnosis['selectedIcdCode'], + diagnosisDescription: diagnosis['selectedDisease'], extension: ext, ); if (_referralService.hasError) { diff --git a/lib/core/viewModel/patient_view_model.dart b/lib/core/viewModel/patient_view_model.dart index 7e62daee..143ff789 100644 --- a/lib/core/viewModel/patient_view_model.dart +++ b/lib/core/viewModel/patient_view_model.dart @@ -19,6 +19,7 @@ import 'package:doctor_app_flutter/core/model/patient/vital_sign/vital_sign_res_ import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart'; import 'package:doctor_app_flutter/core/service/patient/patient_service.dart'; +import '../../config/shared_pref_kay.dart'; import '../../locator.dart'; import '../model/note/stp_master_list_req_model.dart'; import '../model/note/stp_master_list_res_model.dart'; @@ -156,14 +157,27 @@ class PatientViewModel extends BaseViewModel { setState(ViewState.Idle); } - Future getPatientProgressNote(patient, {bool isLocalBusy = false}) async { + Future getPatientProgressNote(patientRequest,PatiantInformtion patient, + {bool isLocalBusy = false, bool isVidaPlus = false}) async { if (isLocalBusy) { setState(ViewState.BusyLocal); } else { setState(ViewState.Busy); } - - await _patientService.getPatientProgressNote(patient); + if (isVidaPlus) { + Map request = { + "hospitalGroupId": await sharedPref.getString(DOCTOR_SETUP_ID), + "hospitalId": patient.projectId, + "patientId": patient.patientId, + "patientPomrId": patient.pomrId, + "endRow": 10000, // because no information is provided for the end row + "startRow": 0, + "ProjectID": patient.projectId + }; + await _patientService.getVidaPlusProgressNote(request); + } else { + await _patientService.getPatientProgressNote(patientRequest); + } if (_patientService.hasError) { error = _patientService.error; if (isLocalBusy) { @@ -185,9 +199,14 @@ class PatientViewModel extends BaseViewModel { setState(ViewState.Idle); } - Future createPatientProgressNote(CreateNoteModel req) async { + Future createPatientProgressNote(CreateNoteModel req, PatiantInformtion patient, + {bool isVidaPlus = false}) async { setState(ViewState.BusyLocal); - await _patientService.createPatientProgressNote(req); + if (isVidaPlus) { + await _patientService.createProgressNote(req, patient); + } else { + await _patientService.createPatientProgressNote(req); + } if (_patientService.hasError) { error = _patientService.error; setState(ViewState.ErrorLocal); @@ -326,11 +345,16 @@ class PatientViewModel extends BaseViewModel { } Future getDiagnosisForInPatient( - GetDiagnosisForInPatientRequestModel requestModel) async { + GetDiagnosisForInPatientRequestModel requestModel, bool isVidaPlusProject, PatiantInformtion patient) async { await getDoctorProfile(); setState(ViewState.Busy); - await _patientService.getDiagnosisForInPatient(requestModel); + if(isVidaPlusProject){ + await _patientService.getDiagnosis(patient); + + }else { + await _patientService.getDiagnosisForInPatient(requestModel); + } if (_patientService.hasError) { error = _patientService.error; setState(ViewState.ErrorLocal); @@ -340,7 +364,7 @@ class PatientViewModel extends BaseViewModel { } Future getDiabeticChartValues(PatiantInformtion patient, int resultType, - {bool isLocalBusy = false}) async { + {bool isLocalBusy = false, bool isVidaPlusProject = false}) async { await getDoctorProfile(); if (isLocalBusy) setState(ViewState.BusyLocal); @@ -350,9 +374,8 @@ class PatientViewModel extends BaseViewModel { GetDiabeticChartValuesRequestModel requestModel = GetDiabeticChartValuesRequestModel( patientID: patient.patientId, - admissionNo: int.parse(patient.admissionNo!), + admissionNo:isVidaPlusProject? patient.admissionID ?? -1 : int.parse(patient.admissionNo!), patientTypeID: 1, - patientType: 1, resultType: resultType, ); await _patientService.getDiabeticChartValues(requestModel); diff --git a/lib/core/viewModel/pednding_orders_view_model.dart b/lib/core/viewModel/pednding_orders_view_model.dart index 4cfc4f4a..ae0275ff 100644 --- a/lib/core/viewModel/pednding_orders_view_model.dart +++ b/lib/core/viewModel/pednding_orders_view_model.dart @@ -15,11 +15,19 @@ class PendingOrdersViewModel extends BaseViewModel { List get admissionOrderList => _pendingOrderService.admissionOrderList; - Future getPendingOrders({required int patientId, required int admissionNo}) async { + Future getPendingOrders( + {required int patientId, + required int admissionNo, + required bool isVidaPlus}) async { hasError = false; setState(ViewState.Busy); - await _pendingOrderService.getPendingOrders( - patientId: patientId, admissionNo: admissionNo); + if (isVidaPlus) { + await _pendingOrderService.getPendingOrdersForVidaPlus( + patientId: patientId, admissionNo: admissionNo); + } else { + await _pendingOrderService.getPendingOrders( + patientId: patientId, admissionNo: admissionNo); + } if (_pendingOrderService.hasError) { error = _pendingOrderService.error; setState(ViewState.ErrorLocal); diff --git a/lib/core/viewModel/prescription/prescription_view_model.dart b/lib/core/viewModel/prescription/prescription_view_model.dart index 1e518fbc..1e036027 100644 --- a/lib/core/viewModel/prescription/prescription_view_model.dart +++ b/lib/core/viewModel/prescription/prescription_view_model.dart @@ -155,9 +155,9 @@ class PrescriptionViewModel extends BaseViewModel { } } - getMedicationForInPatient(PatiantInformtion patient) async { + getMedicationForInPatient(PatiantInformtion patient, bool isVidaPlusProject) async { setState(ViewState.Busy); - await _prescriptionService.getMedicationForInPatient(patient); + await _prescriptionService.getMedicationForInPatient(patient, isVidaPlusProject: isVidaPlusProject); if (_prescriptionService.hasError) { error = _prescriptionService.error!; setState(ViewState.Error); diff --git a/lib/core/viewModel/profile/discharge_summary_view_model.dart b/lib/core/viewModel/profile/discharge_summary_view_model.dart index 18f242f7..21f4c825 100644 --- a/lib/core/viewModel/profile/discharge_summary_view_model.dart +++ b/lib/core/viewModel/profile/discharge_summary_view_model.dart @@ -18,11 +18,14 @@ class DischargeSummaryViewModel extends BaseViewModel { Future getPendingDischargeSummary({ required int patientId, - required int admissionNo, + required int admissionNo, required int? clinicId, required int? doctorId, }) async { + + print("the clinic id is $clinicId"); + print("the doctorId id is $doctorId"); GetDischargeSummaryReqModel getDischargeSummaryReqModel = GetDischargeSummaryReqModel( - admissionNo: admissionNo, patientID: patientId); + admissionNo: admissionNo, patientID: patientId, clinicId: clinicId , doctorId:doctorId); hasError = false; setState(ViewState.Busy); await _dischargeSummaryService.getPendingDischargeSummary( diff --git a/lib/core/viewModel/profile/operation_report_view_model.dart b/lib/core/viewModel/profile/operation_report_view_model.dart index dab6b5fd..e75c18d5 100644 --- a/lib/core/viewModel/profile/operation_report_view_model.dart +++ b/lib/core/viewModel/profile/operation_report_view_model.dart @@ -21,7 +21,7 @@ class OperationReportViewModel extends BaseViewModel { Future getReservations(int patientId) async { hasError = false; setState(ViewState.Busy); - await _operationReportService.getReservations(patientId: patientId); + await _operationReportService.getReservations(patientId: patientId, patientMRN: patientId); if (_operationReportService.hasError) { error = _operationReportService.error; setState(ViewState.ErrorLocal); diff --git a/lib/screens/home/home_screen.dart b/lib/screens/home/home_screen.dart index 3317ec58..2e97f957 100644 --- a/lib/screens/home/home_screen.dart +++ b/lib/screens/home/home_screen.dart @@ -3,6 +3,7 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/view_state.dart'; import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart'; +import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart'; import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/dashboard_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; @@ -36,6 +37,7 @@ import 'package:flutter_zoom_videosdk/native/zoom_videosdk.dart'; import 'package:provider/provider.dart'; import 'package:sticky_headers/sticky_headers/widget.dart'; +import '../../locator.dart'; import '../../utils/notification_permission_utils.dart'; import '../video_call_zoom/zoom_video_call.dart'; import '../patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart'; @@ -418,14 +420,16 @@ class _HomeScreenState extends State { )); changeColorIndex(); - if (model.doctorProfile != null && !Utils.isVidaPlusInPatientProject(projectsProvider, model.doctorProfile!.projectID!)) { - patientCards.add(HomePatientCard( + if (model.doctorProfile != null) { + patientCards.add( + HomePatientCard( gradient: backgroundColors[colorIndex], backgroundIconColor: backgroundIconColors[colorIndex], cardIcon: DoctorApp.inpatient, textColor: textColors[colorIndex], text: TranslationBase.of(context).myInPatient, onTap: () { + locator().flushSelectedDates(); Navigator.push( context, FadePage( @@ -487,7 +491,7 @@ class _HomeScreenState extends State { text: TranslationBase.of(context).myOutPatient_2lines, onTap: () { String date = AppDateUtils.convertDateToFormat(DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day), 'yyyy-MM-dd'); - + locator().flushSelectedDates(); Navigator.push( context, MaterialPageRoute( diff --git a/lib/screens/patients/DischargedPatientPage.dart b/lib/screens/patients/DischargedPatientPage.dart index 5503261a..3a3e76d0 100644 --- a/lib/screens/patients/DischargedPatientPage.dart +++ b/lib/screens/patients/DischargedPatientPage.dart @@ -14,6 +14,9 @@ import '../../routes.dart'; import '../../widgets/shared/errors/error_message.dart'; class DischargedPatient extends StatefulWidget { + final bool isVidaPlusProject; + + const DischargedPatient({super.key, required this.isVidaPlusProject}); @override _DischargedPatientState createState() => _DischargedPatientState(); } diff --git a/lib/screens/patients/In_patient/filter_date_page.dart b/lib/screens/patients/In_patient/filter_date_page.dart new file mode 100644 index 00000000..903dafdf --- /dev/null +++ b/lib/screens/patients/In_patient/filter_date_page.dart @@ -0,0 +1,253 @@ +import 'package:doctor_app_flutter/core/enum/filter_type.dart'; +import 'package:doctor_app_flutter/core/enum/view_state.dart'; +import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart'; +import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart'; +import 'package:doctor_app_flutter/utils/date-utils.dart'; +import 'package:doctor_app_flutter/utils/utils.dart'; +import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; + +import '../../../config/config.dart'; + +class FilterDatePage extends StatefulWidget { + final PatientSearchViewModel patientSearchViewModel; + + const FilterDatePage({Key? key, required this.patientSearchViewModel}) + : super(key: key); + + @override + _FilterDatePageState createState() => _FilterDatePageState(); +} + +class _FilterDatePageState extends State { + @override + void initState() { + // TODO: implement initState + super.initState(); + } + + @override + Widget build(BuildContext context) { + var screenSize; + return AppScaffold( + isShowAppBar: false, + backgroundColor: Theme.of(context).scaffoldBackgroundColor, + body: SingleChildScrollView( + child: Container( + height: MediaQuery.of(context).size.height * 1.0, + child: Padding( + padding: EdgeInsets.all(0.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + BottomSheetTitle( + title: TranslationBase.of(context).filterInPatient, + ), + SizedBox( + height: 10.0, + ), + Center( + child: FractionallySizedBox( + widthFactor: 0.9, + child: Column( + children: [ + Container( + color: Colors.white, + child: InkWell( + onTap: () => selectDate(context, + firstDate: getFirstDate(), + lastDate: getLastDate()), + child: TextField( + decoration: textFieldSelectorDecoration( + TranslationBase.of(context).fromDate, + widget.patientSearchViewModel + .selectedFromDate != + null + ? "${AppDateUtils.convertStringToDateFormat(widget.patientSearchViewModel.selectedFromDate.toString(), "yyyy-MM-dd")}" + : "", + true, + suffixIcon: Icon( + Icons.calendar_today, + color: Colors.black, + )), + enabled: false, + ), + ), + ), + SizedBox( + height: 10, + ), + Container( + color: Colors.white, + child: InkWell( + onTap: () => selectDate(context, + isFromDate: false, + firstDate: getFirstDate(), + lastDate: getLastDate()), + child: TextField( + decoration: textFieldSelectorDecoration( + TranslationBase.of(context).toDate, + widget.patientSearchViewModel + .selectedToDate != + null + ? "${AppDateUtils.convertStringToDateFormat(widget.patientSearchViewModel.selectedToDate.toString(), "yyyy-MM-dd")}" + : "", + true, + suffixIcon: Icon( + Icons.calendar_today, + color: Colors.black, + )), + enabled: false, + ), + ), + ), + ], + ), + ), + ), + ], + ), + ), + ), + ), + bottomSheet: Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(0.0), + ), + border: Border.all(color: HexColor('#707070'), width: 0), + ), + height: MediaQuery.of(context).size.height * 0.1, + width: double.infinity, + child: Column( + children: [ + SizedBox( + height: 10, + ), + Container( + child: FractionallySizedBox( + widthFactor: .80, + child: Center( + child: AppButton( + title: TranslationBase.of(context).search, + padding: 10, + color: AppGlobal.appGreenColor, + onPressed: () async { + if (widget.patientSearchViewModel.selectedFromDate == + null || + widget.patientSearchViewModel.selectedToDate == + null) { + Utils.showErrorToast( + "Please Select All The date Fields "); + } else { + await widget.patientSearchViewModel.getInPatientList( + PatientSearchRequestModel( + from: + "${AppDateUtils.convertDateToFormat(widget.patientSearchViewModel.selectedFromDate!, "yyyy-MM-dd")} 00:00:00", + to: "${AppDateUtils.convertDateToFormat(widget.patientSearchViewModel.selectedToDate!, "yyyy-MM-dd")} 00:00:00", + searchType: null), + isForceFullRefresh: true); + Navigator.of(context).pop(); + } + }, + ), + ), + ), + ), + SizedBox( + height: 5, + ), + ], + ), + )); + } + + selectDate(BuildContext context, + {bool isFromDate = true, DateTime? firstDate, lastDate}) async { + Utils.hideKeyboard(context); + DateTime currentDate = DateTime.now(); + DateTime? selectedDate = isFromDate + ? this.widget.patientSearchViewModel.selectedFromDate ?? currentDate + : this.widget.patientSearchViewModel.selectedToDate ?? currentDate; + final DateTime? picked = await showDatePicker( + context: context, + initialDate: selectedDate, + firstDate: firstDate!, + lastDate: lastDate, + initialEntryMode: DatePickerEntryMode.calendar, + ); + if (picked != null) { + if (isFromDate) { + setState(() { + this.widget.patientSearchViewModel.selectedFromDate = picked; + var date = picked.add(Duration(days: 30)); + if (date.isBefore(lastDate)) { + this.widget.patientSearchViewModel.selectedToDate = date; + } else + this.widget.patientSearchViewModel.selectedToDate = lastDate; + }); + } else { + setState(() { + this.widget.patientSearchViewModel.selectedToDate = picked; + }); + } + } + } + + getFirstDate() { + DateTime dateTime = DateTime.now().subtract(Duration(days: 30 * 24)); + return DateTime(dateTime.year, dateTime.month, dateTime.day + 1); + } + + getLastDate() { + DateTime dateTime = DateTime.now().add(Duration(days: 30 * 24)); + return DateTime(dateTime.year, dateTime.month, dateTime.day); + } + + InputDecoration textFieldSelectorDecoration( + String hintText, String selectedText, bool isDropDown, + {Icon? suffixIcon}) { + return InputDecoration( + focusedBorder: OutlineInputBorder( + borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), + borderRadius: BorderRadius.circular(8), + ), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Color(0xFFEFEFEF), width: 2.0), + borderRadius: BorderRadius.circular(8), + ), + disabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Color(0xFFEFEFEF), width: 2.0), + borderRadius: BorderRadius.circular(8), + ), + hintText: selectedText != null ? selectedText : hintText, + suffixIcon: isDropDown + ? suffixIcon != null + ? suffixIcon + : Icon( + Icons.keyboard_arrow_down_sharp, + color: Color(0xff2E303A), + ) + : null, + hintStyle: TextStyle( + fontSize: 13, + color: Color(0xff2E303A), + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + ), + labelText: selectedText != null ? '$hintText\n$selectedText' : null, + labelStyle: TextStyle( + fontSize: 13, + color: Color(0xff2E303A), + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + ), + ); + } +} diff --git a/lib/screens/patients/In_patient/in_patient_list_page.dart b/lib/screens/patients/In_patient/in_patient_list_page.dart index bd336871..17d0b718 100644 --- a/lib/screens/patients/In_patient/in_patient_list_page.dart +++ b/lib/screens/patients/In_patient/in_patient_list_page.dart @@ -2,6 +2,7 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/view_state.dart'; import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; +import 'package:doctor_app_flutter/screens/patients/In_patient/filter_date_page.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; @@ -22,8 +23,9 @@ class InPatientListPage extends StatefulWidget { final bool showBottomSheet; final String? selectedClinicName; final Function? onChangeValue; + final bool isVidaPlusProject; - InPatientListPage({this.isMyInPatient = false, this.patientSearchViewModel, this.selectedClinicName, this.onChangeValue, this.isAllClinic = false, this.showBottomSheet = false}); + InPatientListPage({this.isMyInPatient = false, this.patientSearchViewModel, this.selectedClinicName, this.onChangeValue, this.isAllClinic = false, this.showBottomSheet = false, required this.isVidaPlusProject}); @override _InPatientListPageState createState() => _InPatientListPageState(); @@ -135,15 +137,32 @@ class _InPatientListPageState extends State { GifLoaderDialogUtils.hideDialog(context); }, ), + suffixIcon: (widget.isVidaPlusProject)?IconButton( + icon: Icon( + DoctorApp.filter_1, + color: Colors.black, + ), + iconSize: 20, + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (BuildContext context) => FilterDatePage( + patientSearchViewModel: widget.patientSearchViewModel!, + ), + settings: RouteSettings(name: 'FilterOutPatentDateScreen'), + )); + }, + ):null, onFieldSubmitted: () {}, ), widget.patientSearchViewModel!.state == ViewState.Idle ? (widget.isMyInPatient && widget.patientSearchViewModel!.myIinPatientList.length > 0) - ? ListOfMyInpatient(isAllClinic: widget.isAllClinic, hasQuery: hasQuery, patientSearchViewModel: widget.patientSearchViewModel!) + ? ListOfMyInpatient(isAllClinic: widget.isAllClinic, hasQuery: hasQuery, patientSearchViewModel: widget.patientSearchViewModel!, isVidaPlusProject: widget.isVidaPlusProject,) : widget.patientSearchViewModel!.filteredInPatientItems.length > 0 ? (widget.isMyInPatient && widget.patientSearchViewModel!.myIinPatientList.length == 0) ? NoData() - : ListOfAllInPatient(isAllClinic: widget.isAllClinic, hasQuery: hasQuery, patientSearchViewModel: widget.patientSearchViewModel!) + : ListOfAllInPatient(isAllClinic: widget.isAllClinic, hasQuery: hasQuery, patientSearchViewModel: widget.patientSearchViewModel!, isVidaPlusProject: widget.isVidaPlusProject,) : NoData() : Center( child: Container( diff --git a/lib/screens/patients/In_patient/in_patient_screen.dart b/lib/screens/patients/In_patient/in_patient_screen.dart index d8da44e1..0f628ed2 100644 --- a/lib/screens/patients/In_patient/in_patient_screen.dart +++ b/lib/screens/patients/In_patient/in_patient_screen.dart @@ -6,6 +6,7 @@ import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/In_patient/InPatientHeader.dart'; +import 'package:doctor_app_flutter/utils/date-utils.dart'; import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/utils/tab_utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; @@ -33,9 +34,10 @@ class InPatientScreen extends StatefulWidget { class _InPatientScreenState extends State with SingleTickerProviderStateMixin { late TabController _tabController; + ProjectViewModel? viewModel = null; int _activeTab = 0; int selectedMapId = 0; - + bool isVidaPlusProject = false; @override void initState() { super.initState(); @@ -60,11 +62,13 @@ class _InPatientScreenState extends State with SingleTickerProv @override Widget build(BuildContext context) { final screenSize = MediaQuery.of(context).size; + viewModel = Provider.of(context); PatientSearchRequestModel requestModel = PatientSearchRequestModel(); return BaseView( onModelReady: (model) async { model.clearPatientList(); + var doctorProfile = await model.getDoctorProfile(); if (widget.specialClinic != null && widget.specialClinic!.clinicID != null) { print(widget.specialClinic!.toJson()); await model.getSpecialClinicalCareMappingList(widget.specialClinic!.clinicID); @@ -72,7 +76,27 @@ class _InPatientScreenState extends State with SingleTickerProv // model.specialClinicalCareMappingList[0].nursingStationID; } requestModel.clinicID = 0; - await model.getInPatientList(requestModel); + isVidaPlusProject = + Utils.isVidaPlusProject(viewModel!, doctorProfile.projectID ?? -1); + if (isVidaPlusProject) { + DateTime dateTime = DateTime.now(); + String currentDate = AppDateUtils.convertDateToFormat( + dateTime, + 'yyyy-MM-dd'); + print("the current date is $currentDate"); + requestModel.from = "$currentDate 00:00:00"; + + dateTime = dateTime.add(Duration(days: 1)); + currentDate = AppDateUtils.convertDateToFormat( + dateTime, + 'yyyy-MM-dd'); + requestModel.to = "$currentDate 00:00:00"; + requestModel.pageSize = 10; + requestModel.pageIndex = 0; + requestModel.searchType = null; + } + await model.getInPatientList(requestModel, + isVidaPlusProject: isVidaPlusProject); }, builder: (_, model, w) => AppScaffold( baseViewModel: model, @@ -90,7 +114,11 @@ class _InPatientScreenState extends State with SingleTickerProv GifLoaderDialogUtils.showMyDialog(context); PatientSearchRequestModel requestModel = PatientSearchRequestModel(nursingStationID: selectedMapId, clinicID: 0); - await model.getInPatientList(requestModel, isLocalBusy: true); + await model.getInPatientList(requestModel, + isLocalBusy: true, + isVidaPlusProject: Utils.isVidaPlusProject( + Provider.of(context), + requestModel.projectID ?? -1)); GifLoaderDialogUtils.hideDialog(context); if (model.state == ViewState.ErrorLocal) { DrAppToastMsg.showErrorToast(model.error); @@ -161,15 +189,21 @@ class _InPatientScreenState extends State with SingleTickerProv isAllClinic: widget.isAllClinic, showBottomSheet: widget.showBottomSheet, selectedClinicName: widget.selectedClinicName, - onChangeValue: onChangeState), + onChangeValue: onChangeState, + isVidaPlusProject: isVidaPlusProject, + ), InPatientListPage( isMyInPatient: true, patientSearchViewModel: model, isAllClinic: widget.isAllClinic, showBottomSheet: widget.showBottomSheet, selectedClinicName: widget.selectedClinicName, - onChangeValue: onChangeState), - DischargedPatient(), + onChangeValue: onChangeState, + isVidaPlusProject: isVidaPlusProject, + ), + DischargedPatient( + isVidaPlusProject: isVidaPlusProject, + ), ], ), ), 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 3814a786..1458020a 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 @@ -12,11 +12,12 @@ class ListOfAllInPatient extends StatelessWidget { required this.isAllClinic, required this.hasQuery, required this.patientSearchViewModel, + required this.isVidaPlusProject, }) : super(key: key); final bool isAllClinic; final bool hasQuery; - + final bool isVidaPlusProject; final PatientSearchViewModel patientSearchViewModel; @override @@ -55,6 +56,7 @@ class ListOfAllInPatient extends StatelessWidget { "isInpatient": true, "arrivalType": "1", "isMyPatient": patientSearchViewModel.filteredInPatientItems[index].doctorId == patientSearchViewModel.doctorProfile!.doctorID, + "isVidaPlusProject": isVidaPlusProject, }); }); }, 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 2f646fc7..fe861da4 100644 --- a/lib/screens/patients/In_patient/list_of_my_inpatient.dart +++ b/lib/screens/patients/In_patient/list_of_my_inpatient.dart @@ -11,10 +11,12 @@ class ListOfMyInpatient extends StatelessWidget { required this.isAllClinic, required this.hasQuery, required this.patientSearchViewModel, + required this.isVidaPlusProject, }) : super(key: key); final bool isAllClinic; final bool hasQuery; + final bool isVidaPlusProject; final PatientSearchViewModel patientSearchViewModel; @override @@ -56,6 +58,7 @@ class ListOfMyInpatient extends StatelessWidget { "isInpatient": true, "arrivalType": "1", "isMyPatient": true, + "isVidaPlusProject": isVidaPlusProject, }); }, ); diff --git a/lib/screens/patients/insurance_approval_screen_patient.dart b/lib/screens/patients/insurance_approval_screen_patient.dart index b2673ef4..117fac59 100644 --- a/lib/screens/patients/insurance_approval_screen_patient.dart +++ b/lib/screens/patients/insurance_approval_screen_patient.dart @@ -94,7 +94,7 @@ class _InsuranceApprovalScreenNewState onTap: (){}, profileUrl: model .insuranceApprovalInPatient[index] - .doctorImage!, + .doctorImage??'', clinic: model .insuranceApprovalInPatient[index] .clinicName!, diff --git a/lib/screens/patients/insurance_approvals_details.dart b/lib/screens/patients/insurance_approvals_details.dart index 1b2e31e1..5066ace4 100644 --- a/lib/screens/patients/insurance_approvals_details.dart +++ b/lib/screens/patients/insurance_approvals_details.dart @@ -121,7 +121,7 @@ class _InsuranceApprovalsDetailsState extends State { child: ClipRRect( borderRadius: BorderRadius.circular(50), child: Image.network( - model.insuranceApprovalInPatient[indexInsurance].doctorImage!, + model.insuranceApprovalInPatient[indexInsurance].doctorImage??'', fit: BoxFit.fill, width: 700, ), diff --git a/lib/screens/patients/profile/admission-orders/admission_orders_screen.dart b/lib/screens/patients/profile/admission-orders/admission_orders_screen.dart index 409fade1..0f13951d 100644 --- a/lib/screens/patients/profile/admission-orders/admission_orders_screen.dart +++ b/lib/screens/patients/profile/admission-orders/admission_orders_screen.dart @@ -34,11 +34,12 @@ class _AdmissionOrdersScreenState extends State { final routeArgs = ModalRoute.of(context)!.settings.arguments as Map; PatiantInformtion patient = routeArgs['patient']; String arrivalType = routeArgs['arrivalType']; + bool isVidaPlusProject = routeArgs['isVidaPlusProject']; if (routeArgs.containsKey('isDischargedPatient')) isDischargedPatient = routeArgs['isDischargedPatient']; return BaseView( onModelReady: (model) => model.getAdmissionOrders( - admissionNo: int.parse(patient.admissionNo!), + admissionNo: isVidaPlusProject? patient.admissionID??-1 :int.parse(patient.admissionNo!), patientId: patient.patientMRN!), builder: (_, model, w) => AppScaffold( baseViewModel: model, diff --git a/lib/screens/patients/profile/diabetic_chart/diabetic_chart.dart b/lib/screens/patients/profile/diabetic_chart/diabetic_chart.dart index bb804d06..4b56f6ad 100644 --- a/lib/screens/patients/profile/diabetic_chart/diabetic_chart.dart +++ b/lib/screens/patients/profile/diabetic_chart/diabetic_chart.dart @@ -33,6 +33,7 @@ class _DiabeticChartState extends State { List timeSeriesData1 = []; List timeSeriesData2 = []; + bool isVidaPlusProject= false; List diabeticType = [ DiabeticType(nameAr: "Urine Glucose", nameEn: "Urine Glucose", value: 1), @@ -47,12 +48,13 @@ class _DiabeticChartState extends State { Widget build(BuildContext context) { final routeArgs = ModalRoute.of(context)!.settings.arguments as Map; PatiantInformtion patient = routeArgs['patient']; + isVidaPlusProject = routeArgs['isVidaPlusProject']; ProjectViewModel projectsProvider = Provider.of(context); return BaseView( onModelReady: (model) async { selectedDiabeticType = diabeticType[2]; - await model.getDiabeticChartValues(patient, selectedDiabeticType.value!, isLocalBusy: false); + await model.getDiabeticChartValues(patient, selectedDiabeticType.value!, isLocalBusy: false, isVidaPlusProject: isVidaPlusProject); generateData(model); }, builder: (_, model, w) => AppScaffold( @@ -178,6 +180,7 @@ class _DiabeticChartState extends State { if (model.diabeticChartValuesList.length > 0) { model.diabeticChartValuesList.toList().forEach( (element) { + if(element.dateChart == null ) return; DateTime elementDate = AppDateUtils.getDateTimeFromServerFormat(element.dateChart!); if (element.resultValue!.toInt() != 0) timeSeriesData1.add( @@ -206,7 +209,7 @@ class _DiabeticChartState extends State { timeSeriesData2.clear(); }); - await model.getDiabeticChartValues(patient, selectedDiabeticType.value!, isLocalBusy: true); + await model.getDiabeticChartValues(patient, selectedDiabeticType.value!, isLocalBusy: true, isVidaPlusProject: isVidaPlusProject); if (model.state == ViewState.ErrorLocal) { Utils.showErrorToast(model.error); } diff --git a/lib/screens/patients/profile/diagnosis/diagnosis_screen.dart b/lib/screens/patients/profile/diagnosis/diagnosis_screen.dart index eb994ff4..77d18c17 100644 --- a/lib/screens/patients/profile/diagnosis/diagnosis_screen.dart +++ b/lib/screens/patients/profile/diagnosis/diagnosis_screen.dart @@ -29,6 +29,7 @@ class _ProgressNoteState extends State { bool isDischargedPatient = false; AuthenticationViewModel authenticationViewModel = AuthenticationViewModel(); late ProjectViewModel projectViewModel; + bool isVidaPlusProject = false; getDiagnosisForInPatient(BuildContext context, PatientViewModel model, {bool isLocalBusy = false}) async { @@ -42,11 +43,11 @@ class _ProgressNoteState extends State { print(type); GetDiagnosisForInPatientRequestModel getDiagnosisForInPatientRequestModel = GetDiagnosisForInPatientRequestModel( - admissionNo: int.parse(patient.admissionNo!), + admissionNo: isVidaPlusProject? patient.admissionID : int.parse(patient.admissionNo!), patientTypeID: patient.patientType, patientID: patient.patientId, ); - model.getDiagnosisForInPatient(getDiagnosisForInPatientRequestModel); + model.getDiagnosisForInPatient(getDiagnosisForInPatientRequestModel,isVidaPlusProject,patient); } @override @@ -55,6 +56,7 @@ class _ProgressNoteState extends State { projectViewModel = Provider.of(context); final routeArgs = ModalRoute.of(context)!.settings.arguments as Map; PatiantInformtion patient = routeArgs['patient']; + isVidaPlusProject = routeArgs['isVidaPlusProject']; if (routeArgs.containsKey('isDischargedPatient')) isDischargedPatient = routeArgs['isDischargedPatient']; return BaseView( 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 9364def5..0f201f44 100644 --- a/lib/screens/patients/profile/discharge_summary/all_discharge_summary.dart +++ b/lib/screens/patients/profile/discharge_summary/all_discharge_summary.dart @@ -12,8 +12,9 @@ import 'discharge_Summary_widget.dart'; class AllDischargeSummary extends StatefulWidget { final Function? changeCurrentTab; final PatiantInformtion? patient; + final bool isVidaPlusProject; - const AllDischargeSummary({this.changeCurrentTab, this.patient}); + const AllDischargeSummary({this.changeCurrentTab, this.patient, this.isVidaPlusProject = false}); @override _AllDischargeSummaryState createState() => _AllDischargeSummaryState(); @@ -28,7 +29,8 @@ class _AllDischargeSummaryState extends State { onModelReady: (model) { model.getAllDischargeSummary( patientId: widget.patient!.patientId!, - admissionNo: int.parse(widget.patient!.admissionNo!), + admissionNo: widget.isVidaPlusProject? widget.patient?.admissionID ?? -1 :int.parse(widget.patient!.admissionNo!), + ); }, builder: (_, model, w) => AppScaffold( diff --git a/lib/screens/patients/profile/discharge_summary/discharge_summary.dart b/lib/screens/patients/profile/discharge_summary/discharge_summary.dart index d674ea93..2a7e3ef9 100644 --- a/lib/screens/patients/profile/discharge_summary/discharge_summary.dart +++ b/lib/screens/patients/profile/discharge_summary/discharge_summary.dart @@ -26,6 +26,7 @@ class _DoctorReplyScreenState extends State late TabController _tabController; int _activeTab = 0; int pageIndex = 1; + bool isVidaPlusProject = false; @override void initState() { @@ -51,6 +52,7 @@ class _DoctorReplyScreenState extends State final screenSize = MediaQuery.of(context).size; final routeArgs = ModalRoute.of(context)!.settings.arguments as Map; PatiantInformtion patient = routeArgs['patient']; + isVidaPlusProject = routeArgs['isVidaPlusProject']; return WillPopScope( onWillPop: () async { @@ -119,8 +121,9 @@ class _DoctorReplyScreenState extends State children: [ PendingDischargeSummary( patient: patient, + isVidaPlusProject: isVidaPlusProject, ), - AllDischargeSummary(patient: patient), + AllDischargeSummary(patient: patient, isVidaPlusProject: isVidaPlusProject,), ], ), ), diff --git a/lib/screens/patients/profile/discharge_summary/pending_discharge_summary.dart b/lib/screens/patients/profile/discharge_summary/pending_discharge_summary.dart index 185420d7..1ae819b7 100644 --- a/lib/screens/patients/profile/discharge_summary/pending_discharge_summary.dart +++ b/lib/screens/patients/profile/discharge_summary/pending_discharge_summary.dart @@ -12,8 +12,9 @@ import 'discharge_Summary_widget.dart'; class PendingDischargeSummary extends StatefulWidget { final Function? changeCurrentTab; final PatiantInformtion? patient; + final bool isVidaPlusProject; - const PendingDischargeSummary({Key? key, this.changeCurrentTab, this.patient}) + const PendingDischargeSummary({Key? key, this.changeCurrentTab, this.patient, this.isVidaPlusProject = false}) : super(key: key); @override @@ -30,7 +31,9 @@ class _PendingDischargeSummaryState extends State { onModelReady: (model) { model.getPendingDischargeSummary( patientId: widget.patient!.patientId!, - admissionNo: int.parse(widget.patient!.admissionNo!), + clinicId: widget.patient?.clinicId, + doctorId: widget.patient?.doctorId, + admissionNo: widget.isVidaPlusProject? widget.patient?.admissionID ?? -1 :int.parse(widget.patient!.admissionNo!), ); }, builder: (_, model, w) => AppScaffold( diff --git a/lib/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart b/lib/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart index fb3a89b1..a039bb00 100644 --- a/lib/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart +++ b/lib/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart @@ -23,8 +23,9 @@ class AddVerifyMedicalReport extends StatefulWidget { final PatientMedicalReportViewModel? model; final MedicalReportStatus? status; final String? medicalNote; + final bool? isVidaPlusProject; - const AddVerifyMedicalReport({Key? key, this.patient, this.patientType, this.arrivalType, this.medicalReport, this.model, this.status, this.medicalNote}) : super(key: key); + const AddVerifyMedicalReport({Key? key, this.patient, this.patientType, this.arrivalType, this.medicalReport, this.model, this.status, this.medicalNote, this.isVidaPlusProject}) : super(key: key); @override _AddVerifyMedicalReportState createState() => _AddVerifyMedicalReportState(); @@ -98,8 +99,8 @@ class _AddVerifyMedicalReportState extends State { GifLoaderDialogUtils.showMyDialog(context); widget.medicalReport != null ? await widget.model!.updateMedicalReport(widget.patient!, txtOfMedicalReport, widget.medicalReport != null ? widget.medicalReport!.lineItemNo! : 0, - widget.medicalReport != null ? widget.medicalReport!.invoiceNo! : "") - : await widget.model!.addMedicalReport(widget.patient!, txtOfMedicalReport); + widget.medicalReport != null ? widget.medicalReport!.invoiceNo! : "", widget.isVidaPlusProject) + : await widget.model!.addMedicalReport(widget.patient!, txtOfMedicalReport, widget.isVidaPlusProject); //model.getMedicalReportList(patient); Navigator.pop(context); @@ -127,7 +128,7 @@ class _AddVerifyMedicalReportState extends State { 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!, widget.isVidaPlusProject); GifLoaderDialogUtils.hideDialog(context); Navigator.pop(context); if (widget.model!.state == ViewState.ErrorLocal) { diff --git a/lib/screens/patients/profile/medical_report/MedicalReportPage.dart b/lib/screens/patients/profile/medical_report/MedicalReportPage.dart index 1e15da45..ef73a95c 100644 --- a/lib/screens/patients/profile/medical_report/MedicalReportPage.dart +++ b/lib/screens/patients/profile/medical_report/MedicalReportPage.dart @@ -33,18 +33,20 @@ class MedicalReportPage extends StatefulWidget { } class _MedicalReportPageState extends State { + bool isVidaPlusProject = false; @override Widget build(BuildContext context) { final routeArgs = ModalRoute.of(context)!.settings.arguments as Map; PatiantInformtion patient = routeArgs['patient']; String patientType = routeArgs['patientType']; String arrivalType = routeArgs['arrivalType']; + isVidaPlusProject = routeArgs['isVidaPlusProject']; ProjectViewModel projectViewModel = Provider.of(context); return BaseView( onModelReady: (model) async { await model.getDoctorProfile(isGetProfile: true); - await model.getMedicalReportList(patient); + await model.getMedicalReportList(patient, isVidaPlusProject: isVidaPlusProject); await model.getMedicalReportTemplate(); }, builder: (_, model, w) => AppScaffold( @@ -97,6 +99,7 @@ class _MedicalReportPageState extends State { arrivalType: arrivalType, model: model, status: MedicalReportStatus.ADD, + isVidaPlusProject: isVidaPlusProject ), settings: RouteSettings(name: 'AddVerifyMedicalReport'), ), 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 9ef3ac64..a7cd574b 100644 --- a/lib/screens/patients/profile/notes/note/progress_note_screen.dart +++ b/lib/screens/patients/profile/notes/note/progress_note_screen.dart @@ -31,6 +31,7 @@ DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); class ProgressNoteScreen extends StatefulWidget { final int visitType; + const ProgressNoteScreen({Key? key, required this.visitType}) : super(key: key); @override @@ -43,6 +44,7 @@ class _ProgressNoteState extends State { bool isDischargedPatient = false; late AuthenticationViewModel authenticationViewModel; late ProjectViewModel projectViewModel; + bool isVidaPlusProject = false; getProgressNoteList(BuildContext context, PatientViewModel model, {bool isLocalBusy = false}) async { final routeArgs = ModalRoute.of(context)!.settings.arguments as Map; @@ -54,12 +56,12 @@ class _ProgressNoteState extends State { ProgressNoteRequest progressNoteRequest = ProgressNoteRequest( visitType: widget.visitType, // if equal 5 then this will return progress note - admissionNo: int.parse(patient.admissionNo!), + admissionNo: (isVidaPlusProject)?patient.admissionID:int.parse(patient.admissionNo!), projectID: patient.projectId, tokenID: token, patientTypeID: patient.patientType, languageID: 2); - model.getPatientProgressNote(progressNoteRequest.toJson(), isLocalBusy: isLocalBusy).then((c) { + model.getPatientProgressNote(progressNoteRequest.toJson(),patient, isLocalBusy: isLocalBusy, isVidaPlus: isVidaPlusProject).then((c) { notesList = model.patientProgressNoteList; }); } @@ -71,9 +73,10 @@ class _ProgressNoteState extends State { final routeArgs = ModalRoute.of(context)!.settings.arguments as Map; PatiantInformtion patient = routeArgs['patient']; String arrivalType = routeArgs['arrivalType']; + isVidaPlusProject = routeArgs['isVidaPlusProject'] ?? false; if (routeArgs.containsKey('isDischargedPatient')) isDischargedPatient = routeArgs['isDischargedPatient']; return BaseView( - onModelReady: (model) => getProgressNoteList(context, model), + onModelReady: (model) => getProgressNoteList(context, model, ), builder: (_, model, w) => AppScaffold( baseViewModel: model, backgroundColor: Theme.of(context).scaffoldBackgroundColor, @@ -101,6 +104,7 @@ class _ProgressNoteState extends State { patient: patient, visitType: widget.visitType, isUpdate: false, + isVidaPlusProject:isVidaPlusProject ), settings: RouteSettings(name: 'UpdateNoteOrder'), ), @@ -219,7 +223,7 @@ class _ProgressNoteState extends State { patientOutSA: false, ); await model.updatePatientProgressNote(reqModel); - await getProgressNoteList(context, model, isLocalBusy: true); + await getProgressNoteList(context, model, isLocalBusy: true,); GifLoaderDialogUtils.hideDialog(context); }); }, @@ -274,7 +278,7 @@ class _ProgressNoteState extends State { patientOutSA: false, ); await model.updatePatientProgressNote(reqModel); - await getProgressNoteList(context, model, isLocalBusy: true); + await getProgressNoteList(context, model, isLocalBusy: true, ); GifLoaderDialogUtils.hideDialog(context); }); }, diff --git a/lib/screens/patients/profile/notes/note/update_note.dart b/lib/screens/patients/profile/notes/note/update_note.dart index 2090d766..622c3b32 100644 --- a/lib/screens/patients/profile/notes/note/update_note.dart +++ b/lib/screens/patients/profile/notes/note/update_note.dart @@ -36,10 +36,11 @@ class UpdateNoteOrder extends StatefulWidget { final PatiantInformtion patient; final int? visitType; final bool isUpdate; + final bool isVidaPlusProject; final List? elementList; final Function(dynamic)? okFunction; - const UpdateNoteOrder({Key? key, this.note, required this.patientModel, required this.patient, this.visitType, required this.isUpdate, this.elementList, this.okFunction}) : super(key: key); + const UpdateNoteOrder({Key? key, this.note, required this.patientModel, required this.patient, this.visitType, required this.isUpdate, this.elementList, this.okFunction, this.isVidaPlusProject = false}) : super(key: key); @override _UpdateNoteOrderState createState() => _UpdateNoteOrderState(); @@ -249,7 +250,7 @@ class _UpdateNoteOrderState extends State { await widget.patientModel.updatePatientProgressNote(reqModel); } else { CreateNoteModel reqModel = CreateNoteModel( - admissionNo: int.parse(widget.patient.admissionNo!), + admissionNo: (widget.isVidaPlusProject)?widget.patient.admissionID:int.parse(widget.patient.admissionNo!), createdBy: doctorProfile.doctorID, visitType: widget.visitType, patientID: widget.patient.patientId, @@ -259,7 +260,7 @@ class _UpdateNoteOrderState extends State { notes: progressNoteController.text, conditionId: selectValue['ParameterCode']); - await widget.patientModel.createPatientProgressNote(reqModel); + await widget.patientModel.createPatientProgressNote(reqModel, widget.patient, isVidaPlus: widget.isVidaPlusProject); } if (widget.patientModel.state == ViewState.ErrorLocal) { @@ -268,11 +269,11 @@ class _UpdateNoteOrderState extends State { ProgressNoteRequest progressNoteRequest = ProgressNoteRequest( visitType: widget.visitType, // if equal 5 then this will return progress note - admissionNo: int.parse(widget.patient.admissionNo!), + admissionNo: (widget.isVidaPlusProject)?widget.patient.admissionID:int.parse(widget.patient.admissionNo!), projectID: widget.patient.projectId, patientTypeID: widget.patient.patientType, languageID: 2); - await widget.patientModel.getPatientProgressNote(progressNoteRequest.toJson()); + await widget.patientModel.getPatientProgressNote(progressNoteRequest.toJson(), widget.patient, isVidaPlus: widget.isVidaPlusProject); } GifLoaderDialogUtils.hideDialog(context); DrAppToastMsg.showSuccesToast(TranslationBase.of(context).yourOrderAddedSuccessfully); diff --git a/lib/screens/patients/profile/notes/nursing_note/nursing_note_screen.dart b/lib/screens/patients/profile/notes/nursing_note/nursing_note_screen.dart index 0aa2c21d..4a17b06f 100644 --- a/lib/screens/patients/profile/notes/nursing_note/nursing_note_screen.dart +++ b/lib/screens/patients/profile/notes/nursing_note/nursing_note_screen.dart @@ -32,6 +32,7 @@ class _ProgressNoteState extends State { bool isDischargedPatient = false; AuthenticationViewModel authenticationViewModel = AuthenticationViewModel(); late ProjectViewModel projectViewModel; + bool isVidaPlusProject= false; getProgressNoteList(BuildContext context, PatientViewModel model, {bool isLocalBusy = false}) async { final routeArgs = ModalRoute.of(context)!.settings.arguments as Map; @@ -40,9 +41,10 @@ class _ProgressNoteState extends State { print(type); GetNursingProgressNoteRequestModel getNursingProgressNoteRequestModel = GetNursingProgressNoteRequestModel( - admissionNo: int.parse(patient.admissionNo!), + admissionNo: (isVidaPlusProject)? patient.admissionID :int.parse(patient.admissionNo!), patientTypeID: patient.patientType, patientID: patient.patientId, + patientMRN: patient.patientId, ); model.getNursingProgressNote(getNursingProgressNoteRequestModel); } @@ -53,6 +55,7 @@ class _ProgressNoteState extends State { projectViewModel = Provider.of(context); final routeArgs = ModalRoute.of(context)!.settings.arguments as Map; PatiantInformtion patient = routeArgs['patient']; + isVidaPlusProject = routeArgs['isVidaPlusProject']?? false; if (routeArgs.containsKey('isDischargedPatient')) isDischargedPatient = routeArgs['isDischargedPatient']; return BaseView( onModelReady: (model) => getProgressNoteList(context, model), 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 93c8bbf7..1241ff13 100644 --- a/lib/screens/patients/profile/pending_orders/pending_orders_screen.dart +++ b/lib/screens/patients/profile/pending_orders/pending_orders_screen.dart @@ -19,8 +19,10 @@ class PendingOrdersScreen extends StatelessWidget { patient = routeArgs['patient']; String patientType = routeArgs['patientType']; bool isInpatient = routeArgs['isInpatient']; + var isVidaPlus = routeArgs['isVidaPlusProject']; + return BaseView( - onModelReady: (model) => model.getPendingOrders(patientId: patient.patientMRN!, admissionNo: int.parse(patient.admissionNo!)), + onModelReady: (model) => model.getPendingOrders(patientId: patient.patientMRN!, admissionNo: isVidaPlus? patient.admissionID?? 0 :int.parse(patient.admissionNo!), isVidaPlus: isVidaPlus), builder: (BuildContext context, PendingOrdersViewModel model, Widget? child) => AppScaffold( appBar: PatientProfileAppBar( patient, diff --git a/lib/screens/patients/profile/profile_screen/patient_profile_card_model.dart b/lib/screens/patients/profile/profile_screen/patient_profile_card_model.dart index 235d5319..9ff457ec 100644 --- a/lib/screens/patients/profile/profile_screen/patient_profile_card_model.dart +++ b/lib/screens/patients/profile/profile_screen/patient_profile_card_model.dart @@ -14,6 +14,7 @@ class PatientProfileCardModel { final bool isDartIcon; final IconData? dartIcon; final Color? color; + final bool isVidaPlusProject; PatientProfileCardModel( this.nameLine1, @@ -29,5 +30,6 @@ class PatientProfileCardModel { this.isDartIcon = false, this.dartIcon, this.color, + this.isVidaPlusProject = false, }); } 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 2725ec19..7a632500 100644 --- a/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart +++ b/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart @@ -68,6 +68,7 @@ String noteValidation =""; TextEditingController noteController = TextEditingController(); late StreamController videoCallDurationStreamController; late Stream videoCallDurationStream; + bool isVidaPlusProject = false; @override void initState() { @@ -95,6 +96,7 @@ String noteValidation =""; arrivalType = routeArgs['arrivalType']; from = routeArgs['from']; to = routeArgs['to']; + isVidaPlusProject = routeArgs['isVidaPlusProject']?? false; isSigned = routeArgs['isSigned'] ?? false; if (routeArgs.containsKey("isSearch")) { isFromSearch = routeArgs['isSearch']; @@ -148,7 +150,7 @@ String noteValidation =""; @override Widget build(BuildContext context) { final screenSize = MediaQuery.of(context).size; - ProjectViewModel projectViewModel = Provider.of(context); + ProjectViewModel projectViewModel = Provider.of(context, listen: false); return BaseView( onModelReady: (model) async { if (isFromLiveCare && patient.patientStatus == 1) await model.addPatientToDoctorList(patient.vcId!); @@ -202,6 +204,7 @@ String noteValidation =""; to: to, isDischargedPatient: isDischargedPatient, isFromSearch: isFromSearch, + isVidaPlusProject: isVidaPlusProject ) : ProfileGridForOther( patient: patient, @@ -231,7 +234,7 @@ String noteValidation =""; onModelReady: (model) async { model.getDoctorProfile(); if (isInpatient) { - await model.getEpisodeForInpatient(patient); + await model.getEpisodeForInpatient(patient, isVidaPlusProject); } }, builder: (_, model, w) => Positioned( @@ -487,7 +490,7 @@ String noteValidation =""; ); GifLoaderDialogUtils.showMyDialog(context); if (patient.admissionNo != null && patient.admissionNo!.isNotEmpty) { - PostEpisodeForInpatientRequestModel postEpisodeReqModel = PostEpisodeForInpatientRequestModel(admissionNo: int.parse(patient.admissionNo!), patientID: patient.patientId); + PostEpisodeForInpatientRequestModel postEpisodeReqModel = PostEpisodeForInpatientRequestModel(admissionNo: isVidaPlusProject?patient.admissionID:int.parse(patient.admissionNo!), patientID: patient.patientId); await model.postEpisodeForInPatient(postEpisodeReqModel); } else { PostEpisodeReqModel postEpisodeReqModel = PostEpisodeReqModel(appointmentNo: int.parse(patient.appointmentNo.toString()), patientMRN: patient.patientMRN); @@ -501,7 +504,7 @@ String noteValidation =""; } else { patient.episodeNo = model.episodeID; if(Utils.isVidaPlusProject( - Provider.of(context), + Provider.of(context, listen: false), patient.projectId!, )){ Navigator.of(context).pushNamed( diff --git a/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart b/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart index bf166f25..d757133e 100644 --- a/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart +++ b/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart @@ -15,11 +15,12 @@ class ProfileGridForInPatient extends StatelessWidget { final bool isInpatient; final bool isDischargedPatient; final bool isFromSearch; + final bool isVidaPlusProject; String? from; String? to; ProfileGridForInPatient( - {Key? key, this.patient, this.patientType, this.arrivalType, this.height, this.isInpatient = false, this.from, this.to, this.isDischargedPatient = false, this.isFromSearch = false}) + {Key? key, this.patient, this.patientType, this.arrivalType, this.height, this.isInpatient = false, this.from, this.to, this.isDischargedPatient = false, this.isFromSearch = false, required this.isVidaPlusProject}) : super(key: key); @override @@ -31,6 +32,7 @@ class ProfileGridForInPatient extends StatelessWidget { VITAL_SIGN_DETAILS, 'assets/images/svgs/profile_screen/vital signs.svg', isInPatient: isInpatient, + isVidaPlusProject: isVidaPlusProject ), PatientProfileCardModel( TranslationBase.of(context).lab, @@ -38,6 +40,8 @@ class ProfileGridForInPatient extends StatelessWidget { LAB_RESULT, 'assets/images/svgs/profile_screen/lab results.svg', isInPatient: isInpatient, + isVidaPlusProject: isVidaPlusProject + ), PatientProfileCardModel( TranslationBase.of(context).lab, @@ -45,6 +49,7 @@ class ProfileGridForInPatient extends StatelessWidget { ALL_SPECIAL_LAB_RESULT, 'assets/images/svgs/profile_screen/lab results.svg', isInPatient: isInpatient, + isVidaPlusProject: isVidaPlusProject ), PatientProfileCardModel( TranslationBase.of(context).radiology, @@ -52,6 +57,7 @@ class ProfileGridForInPatient extends StatelessWidget { RADIOLOGY_PATIENT, 'assets/images/svgs/profile_screen/Radiology.svg', isInPatient: isInpatient, + isVidaPlusProject: isVidaPlusProject ), PatientProfileCardModel( TranslationBase.of(context).patient, @@ -59,6 +65,7 @@ class ProfileGridForInPatient extends StatelessWidget { ORDER_PRESCRIPTION_OLD, 'assets/images/svgs/profile_screen/order prescription.svg', isInPatient: isInpatient, + isVidaPlusProject: isVidaPlusProject ), PatientProfileCardModel( TranslationBase.of(context).patient, @@ -66,6 +73,7 @@ class ProfileGridForInPatient extends StatelessWidget { ORDER_PRESCRIPTION_NEW, 'assets/images/svgs/profile_screen/order prescription.svg', isInPatient: isInpatient, + isVidaPlusProject: isVidaPlusProject ), PatientProfileCardModel( TranslationBase.of(context).progress, @@ -74,6 +82,7 @@ class ProfileGridForInPatient extends StatelessWidget { 'assets/images/svgs/profile_screen/Progress notes.svg', isInPatient: isInpatient, isDischargedPatient: isDischargedPatient, + isVidaPlusProject: isVidaPlusProject ), PatientProfileCardModel( TranslationBase.of(context).order, @@ -82,6 +91,7 @@ class ProfileGridForInPatient extends StatelessWidget { 'assets/images/svgs/profile_screen/order sheets.svg', isInPatient: isInpatient, isDischargedPatient: isDischargedPatient, + isVidaPlusProject: isVidaPlusProject ), PatientProfileCardModel( TranslationBase.of(context).orders, @@ -90,6 +100,7 @@ class ProfileGridForInPatient extends StatelessWidget { 'assets/images/svgs/profile_screen/Order Procedures.svg', isInPatient: isInpatient, //onTap: () {}, + isVidaPlusProject: isVidaPlusProject ), PatientProfileCardModel( TranslationBase.of(context).health, @@ -97,6 +108,7 @@ class ProfileGridForInPatient extends StatelessWidget { HEALTH_SUMMARY, 'assets/images/svgs/profile_screen/health summary.svg', isInPatient: isInpatient, + isVidaPlusProject: isVidaPlusProject ), PatientProfileCardModel( TranslationBase.of(context).medical, @@ -105,6 +117,7 @@ class ProfileGridForInPatient extends StatelessWidget { 'assets/images/svgs/profile_screen/medical report.svg', isInPatient: isInpatient, isDisable: false, + isVidaPlusProject: isVidaPlusProject ), PatientProfileCardModel( TranslationBase.of(context).referral, @@ -113,6 +126,7 @@ class ProfileGridForInPatient extends StatelessWidget { 'assets/images/svgs/profile_screen/refer patient.svg', isInPatient: isInpatient, isDisable: isDischargedPatient || isFromSearch, + isVidaPlusProject: isVidaPlusProject ), PatientProfileCardModel( TranslationBase.of(context).insurance, @@ -121,6 +135,7 @@ class ProfileGridForInPatient extends StatelessWidget { 'assets/images/svgs/profile_screen/insurance approval.svg', isInPatient: isInpatient, //onTap: () {}, + isVidaPlusProject: isVidaPlusProject ), PatientProfileCardModel( TranslationBase.of(context).discharge, @@ -128,6 +143,7 @@ class ProfileGridForInPatient extends StatelessWidget { DISCHARGE_SUMMARY, 'assets/images/svgs/profile_screen/discharge summary.svg', isInPatient: isInpatient, + isVidaPlusProject: isVidaPlusProject ), PatientProfileCardModel( TranslationBase.of(context).patientSick, @@ -136,6 +152,7 @@ class ProfileGridForInPatient extends StatelessWidget { 'assets/images/svgs/profile_screen/patient sick leave.svg', isInPatient: isInpatient, //onTap: () {}, + isVidaPlusProject: isVidaPlusProject ), PatientProfileCardModel( TranslationBase.of(context).operation, @@ -143,6 +160,7 @@ class ProfileGridForInPatient extends StatelessWidget { GET_OPERATION_REPORT, 'assets/images/svgs/profile_screen/operating report.svg', isInPatient: isInpatient, + isVidaPlusProject: isVidaPlusProject, ), PatientProfileCardModel( TranslationBase.of(context).pending, @@ -150,6 +168,7 @@ class ProfileGridForInPatient extends StatelessWidget { PENDING_ORDERS, 'assets/images/svgs/profile_screen/pending orders.svg', isInPatient: isInpatient, + isVidaPlusProject: isVidaPlusProject ), PatientProfileCardModel( TranslationBase.of(context).admission, @@ -157,6 +176,7 @@ class ProfileGridForInPatient extends StatelessWidget { ADMISSION_ORDERS, 'assets/images/svgs/profile_screen/admission req.svg', isInPatient: isInpatient, + isVidaPlusProject: isVidaPlusProject ), PatientProfileCardModel( "Nursing", @@ -164,6 +184,7 @@ class ProfileGridForInPatient extends StatelessWidget { NURSING_PROGRESS_NOTE, 'assets/images/svgs/profile_screen/Progress notes.svg', isInPatient: isInpatient, + isVidaPlusProject: isVidaPlusProject ), PatientProfileCardModel( TranslationBase.of(context).diagnosis, @@ -171,6 +192,7 @@ class ProfileGridForInPatient extends StatelessWidget { DIAGNOSIS_FOR_IN_PATIENT, 'assets/images/svgs/profile_screen/diagnosis.svg', isInPatient: isInpatient, + isVidaPlusProject: isVidaPlusProject ), PatientProfileCardModel( TranslationBase.of(context).diabetic, @@ -178,6 +200,7 @@ class ProfileGridForInPatient extends StatelessWidget { DIABETIC_CHART_VALUES, 'assets/images/svgs/profile_screen/diabetic chart.svg', isInPatient: isInpatient, + isVidaPlusProject: isVidaPlusProject ), PatientProfileCardModel( "VTE", @@ -185,6 +208,7 @@ class ProfileGridForInPatient extends StatelessWidget { VTE_ASSESSMENT, 'assets/images/svgs/profile_screen/diabetic chart.svg', isInPatient: isInpatient, + isVidaPlusProject: isVidaPlusProject ), PatientProfileCardModel( TranslationBase.of(context).pharmacy, @@ -192,6 +216,7 @@ class ProfileGridForInPatient extends StatelessWidget { PHARMACY_INTERVENTION, 'assets/images/svgs/profile_screen/medical report.svg', isInPatient: isInpatient, + isVidaPlusProject: isVidaPlusProject ), ]; @@ -223,6 +248,7 @@ class ProfileGridForInPatient extends StatelessWidget { isDisable: item.isDisable, onTap: item.onTap, isLoading: item.isLoading, + isVidaPlusProject: item.isVidaPlusProject ); }).toList(), ), diff --git a/lib/screens/patients/profile/referral/refer_details/refer-patient-screen-in-patient.dart b/lib/screens/patients/profile/referral/refer_details/refer-patient-screen-in-patient.dart index cfc38b6a..0e9c1cb3 100644 --- a/lib/screens/patients/profile/referral/refer_details/refer-patient-screen-in-patient.dart +++ b/lib/screens/patients/profile/referral/refer_details/refer-patient-screen-in-patient.dart @@ -1,9 +1,12 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/view_state.dart'; +import 'package:doctor_app_flutter/core/model/diagnosis/GetDiagnosisForInPatientRequestModel.dart'; +import 'package:doctor_app_flutter/core/model/diagnosis/GetDiagnosisForInPatientResponseModel.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/core/provider/robot_provider.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart'; +import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart'; @@ -25,6 +28,9 @@ import 'package:permission_handler/permission_handler.dart'; import 'package:speech_to_text/speech_recognition_error.dart'; import 'package:speech_to_text/speech_to_text.dart' as stt; +import '../../../../../client/base_app_client.dart' show sharedPref; +import '../../../../../config/shared_pref_kay.dart' show SLECTED_PATIENT_TYPE; + class PatientMakeInPatientReferralScreen extends StatefulWidget { @override _PatientMakeInPatientReferralScreenState createState() => _PatientMakeInPatientReferralScreenState(); @@ -34,6 +40,7 @@ class _PatientMakeInPatientReferralScreenState extends State? referToList; dynamic _referTo; + dynamic? selectedDiagnosis; dynamic _selectedBranch; dynamic _selectedClinic; dynamic _selectedDoctor; @@ -53,6 +60,8 @@ class _PatientMakeInPatientReferralScreenState extends State( - onModelReady: (model) => model.getReferralFrequencyList(), + onModelReady: (model) { + model.getReferralFrequencyList(); + getDiagnosisForInPatient(context, model); + }, builder: (_, model, w) => AppScaffold( baseViewModel: model, appBarTitle: TranslationBase.of(context).referPatient, @@ -434,6 +466,47 @@ class _PatientMakeInPatientReferralScreenState extends State( onModelReady: (model) async { - await model.getPrescriptionListNew(mrn: patient.patientMRN, appNo: patient.appointmentNo == null ? 0 : int.parse(patient.appointmentNo.toString())); + // if(isVidaPlusProject) + // { + // model.getMedicationForInPatient(patient, isVidaPlusProject); + // }else { + await model.getPrescriptionListNew( + mrn: patient.patientMRN, + appNo: patient.appointmentNo == null + ? 0 + : int.parse(patient.appointmentNo.toString())); + // } await model.isPrincipalCovered(patient: patient); }, diff --git a/lib/screens/prescription/old_prescriptions_page.dart b/lib/screens/prescription/old_prescriptions_page.dart index 523f3549..6a76fbd0 100644 --- a/lib/screens/prescription/old_prescriptions_page.dart +++ b/lib/screens/prescription/old_prescriptions_page.dart @@ -27,9 +27,11 @@ class OldPrescriptionsPage extends StatelessWidget { String arrivalType = routeArgs['arrivalType']; bool isInpatient = routeArgs['isInpatient']; bool isFromLiveCare = routeArgs['isFromLiveCare']; + bool isVidaPlusProject = routeArgs['isVidaPlusProject']; + var admissionNumber = isVidaPlusProject ? patient.admissionID : patient.admissionNo; return BaseView( onModelReady: (model) async { - patient.admissionNo == null ? model.getPrescriptions(patient, patientType: patientType, isLocalBusy: false) : model.getMedicationForInPatient(patient); + admissionNumber == null ? model.getPrescriptions(patient, patientType: patientType, isLocalBusy: false) : model.getMedicationForInPatient(patient, isVidaPlusProject); }, builder: (_, model, w) => AppScaffold( baseViewModel: model, @@ -39,7 +41,7 @@ class OldPrescriptionsPage extends StatelessWidget { patient, isInpatient: isInpatient, ), - body: patient.admissionNo == null + body: admissionNumber == null ? FractionallySizedBox( widthFactor: 1.0, child: SingleChildScrollView( @@ -167,6 +169,7 @@ class OldPrescriptionsPage extends StatelessWidget { patient: patient, patientType: patientType, arrivalType: arrivalType, + isVidaPlusProject: isVidaPlusProject, startOn: AppDateUtils.getDateTimeFromServerFormat( model.medicationForInPatient[index].startDatetime!, ), diff --git a/lib/screens/prescription/prescriptions_items/prescription_items_in_patient.dart b/lib/screens/prescription/prescriptions_items/prescription_items_in_patient.dart index 57943e83..e0382289 100644 --- a/lib/screens/prescription/prescriptions_items/prescription_items_in_patient.dart +++ b/lib/screens/prescription/prescriptions_items/prescription_items_in_patient.dart @@ -21,6 +21,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget { final DateTime? startOn; final DateTime? stopOn; final int? prescriptionIndex; + final bool isVidaPlusProject; PrescriptionItemsInPatientPage( {Key? key, @@ -30,6 +31,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget { this.arrivalType, this.stopOn, this.startOn, + this.isVidaPlusProject = false, this.prescriptionIndex}); @override @@ -38,7 +40,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget { return BaseView( onModelReady: (model) async { if (model.medicationForInPatient.length == 0) { - await model.getMedicationForInPatient(patient!); + await model.getMedicationForInPatient(patient!,isVidaPlusProject); } }, builder: (_, model, widget) => AppScaffold( diff --git a/lib/utils/translations_delegate_base_utils.dart b/lib/utils/translations_delegate_base_utils.dart index d9df90fd..98748c9b 100644 --- a/lib/utils/translations_delegate_base_utils.dart +++ b/lib/utils/translations_delegate_base_utils.dart @@ -1996,6 +1996,7 @@ class TranslationBase { String get dateFromCanNotBeEmpty => localizedValues['dateFromCanNotBeEmpty']![locale.languageCode]!; String get open => localizedValues['open']![locale.languageCode]!; String get chiefComplaintLengthErrorMsg => localizedValues['chiefComplaintLengthErrorMsg']![locale.languageCode]!; + String get filterInPatient => localizedValues['filterInPatient']![locale.languageCode]!; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/patients/profile/PatientProfileButton.dart b/lib/widgets/patients/profile/PatientProfileButton.dart index f5a89f7b..dd581871 100644 --- a/lib/widgets/patients/profile/PatientProfileButton.dart +++ b/lib/widgets/patients/profile/PatientProfileButton.dart @@ -31,6 +31,7 @@ class PatientProfileButton extends StatelessWidget { final IconData? dartIcon; final bool isFromLiveCare; final Color? color; + final bool isVidaPlusProject; PatientProfileButton({ Key? key, @@ -53,6 +54,7 @@ class PatientProfileButton extends StatelessWidget { this.dartIcon, this.isFromLiveCare = false, this.color, + this.isVidaPlusProject = false }) : super(key: key); @override @@ -152,7 +154,8 @@ class PatientProfileButton extends StatelessWidget { 'isInpatient': isInPatient, 'isDischargedPatient': isDischargedPatient, 'isSelectInpatient': isSelectInpatient, - "isFromLiveCare": isFromLiveCare + "isFromLiveCare": isFromLiveCare, + "isVidaPlusProject": isVidaPlusProject }); } } diff --git a/lib/widgets/shared/app_scaffold_widget.dart b/lib/widgets/shared/app_scaffold_widget.dart index 09379b37..52949bb0 100644 --- a/lib/widgets/shared/app_scaffold_widget.dart +++ b/lib/widgets/shared/app_scaffold_widget.dart @@ -104,26 +104,28 @@ class AppScaffold extends StatelessWidget { ) : null, bottomSheet: bottomSheet, - body: projectProvider.isInternetConnection - ? baseViewModel != null + body: + // projectProvider.isInternetConnection + // ? + baseViewModel != null ? NetworkBaseView( baseViewModel: baseViewModel!, child: body!, ) : Stack(children: [body!, buildAppLoaderWidget(isLoading)]) - : Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Image.asset( - "assets/images/undraw_connected_world_wuay.png", - height: 250, - ), - AppText('No Internet Connection') - ], - ), - ), + // : Center( + // child: Column( + // mainAxisAlignment: MainAxisAlignment.center, + // crossAxisAlignment: CrossAxisAlignment.center, + // children: [ + // Image.asset( + // "assets/images/undraw_connected_world_wuay.png", + // height: 250, + // ), + // AppText('No Internet Connection') + // ], + // ), + // ), ), ); } diff --git a/lib/widgets/shared/dialogs/dailog-list-select.dart b/lib/widgets/shared/dialogs/dailog-list-select.dart index a89d5f6a..5916466f 100644 --- a/lib/widgets/shared/dialogs/dailog-list-select.dart +++ b/lib/widgets/shared/dialogs/dailog-list-select.dart @@ -6,6 +6,7 @@ import '../../../config/config.dart'; class ListSelectDialog extends StatefulWidget { final List list; + final String attributeName; final String attributeValueId; final okText; diff --git a/macos/Podfile b/macos/Podfile index c795730d..b52666a1 100644 --- a/macos/Podfile +++ b/macos/Podfile @@ -1,4 +1,4 @@ -platform :osx, '10.14' +platform :osx, '10.15' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index 5595a9da..b5fb56ba 100644 --- a/macos/Runner.xcodeproj/project.pbxproj +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -21,12 +21,14 @@ /* End PBXAggregateTarget section */ /* Begin PBXBuildFile section */ + 09A1AD8D4F8A8F8725B8D6FC /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AEE4DB06EF7EF7BB27A830F2 /* Pods_Runner.framework */; }; 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; }; 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; + 78C75CF1E9AAFBFC6E94EB08 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 78A3D7D2DFBA3A9BB18C0D2E /* Pods_RunnerTests.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -64,7 +66,7 @@ 331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; - 33CC10ED2044A3C60003C045 /* doctor_app_flutter.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "doctor_app_flutter.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 33CC10ED2044A3C60003C045 /* doctor_app_flutter.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = doctor_app_flutter.app; sourceTree = BUILT_PRODUCTS_DIR; }; 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; @@ -76,8 +78,16 @@ 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; + 4852FA391E6B47E9826C5326 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; + 717A2BECE9B10C5A295FDEEE /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; + 726FA86DB91B92DEF240189B /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; + 78A3D7D2DFBA3A9BB18C0D2E /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; + AEE4DB06EF7EF7BB27A830F2 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + CD86933CD327D3EB10869278 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + D6F092FFEFB869189B0E20FD /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + E6FB6A5552D457E82E6697A6 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -85,6 +95,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 78C75CF1E9AAFBFC6E94EB08 /* Pods_RunnerTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -92,6 +103,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 09A1AD8D4F8A8F8725B8D6FC /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -125,6 +137,7 @@ 331C80D6294CF71000263BE5 /* RunnerTests */, 33CC10EE2044A3C60003C045 /* Products */, D73912EC22F37F3D000D13A0 /* Frameworks */, + B89F1D6939BABE6A1607D6D9 /* Pods */, ); sourceTree = ""; }; @@ -172,9 +185,25 @@ path = Runner; sourceTree = ""; }; + B89F1D6939BABE6A1607D6D9 /* Pods */ = { + isa = PBXGroup; + children = ( + D6F092FFEFB869189B0E20FD /* Pods-Runner.debug.xcconfig */, + E6FB6A5552D457E82E6697A6 /* Pods-Runner.release.xcconfig */, + CD86933CD327D3EB10869278 /* Pods-Runner.profile.xcconfig */, + 717A2BECE9B10C5A295FDEEE /* Pods-RunnerTests.debug.xcconfig */, + 4852FA391E6B47E9826C5326 /* Pods-RunnerTests.release.xcconfig */, + 726FA86DB91B92DEF240189B /* Pods-RunnerTests.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; D73912EC22F37F3D000D13A0 /* Frameworks */ = { isa = PBXGroup; children = ( + AEE4DB06EF7EF7BB27A830F2 /* Pods_Runner.framework */, + 78A3D7D2DFBA3A9BB18C0D2E /* Pods_RunnerTests.framework */, ); name = Frameworks; sourceTree = ""; @@ -186,6 +215,7 @@ isa = PBXNativeTarget; buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; buildPhases = ( + 81DB0F2B4C82C315490E48DC /* [CP] Check Pods Manifest.lock */, 331C80D1294CF70F00263BE5 /* Sources */, 331C80D2294CF70F00263BE5 /* Frameworks */, 331C80D3294CF70F00263BE5 /* Resources */, @@ -204,11 +234,13 @@ isa = PBXNativeTarget; buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( + 12A3D9C72F0E9E29BE35DA27 /* [CP] Check Pods Manifest.lock */, 33CC10E92044A3C60003C045 /* Sources */, 33CC10EA2044A3C60003C045 /* Frameworks */, 33CC10EB2044A3C60003C045 /* Resources */, 33CC110E2044A8840003C045 /* Bundle Framework */, 3399D490228B24CF009A79C7 /* ShellScript */, + 9F21C32D96BAF43ECAB228AE /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -291,6 +323,28 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ + 12A3D9C72F0E9E29BE35DA27 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; 3399D490228B24CF009A79C7 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; @@ -329,6 +383,45 @@ shellPath = /bin/sh; shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; }; + 81DB0F2B4C82C315490E48DC /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 9F21C32D96BAF43ECAB228AE /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -380,6 +473,7 @@ /* Begin XCBuildConfiguration section */ 331C80DB294CF71000263BE5 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 717A2BECE9B10C5A295FDEEE /* Pods-RunnerTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CURRENT_PROJECT_VERSION = 1; @@ -394,6 +488,7 @@ }; 331C80DC294CF71000263BE5 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 4852FA391E6B47E9826C5326 /* Pods-RunnerTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CURRENT_PROJECT_VERSION = 1; @@ -408,6 +503,7 @@ }; 331C80DD294CF71000263BE5 /* Profile */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 726FA86DB91B92DEF240189B /* Pods-RunnerTests.profile.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CURRENT_PROJECT_VERSION = 1; @@ -461,7 +557,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.14; + MACOSX_DEPLOYMENT_TARGET = 10.15; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -543,7 +639,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.14; + MACOSX_DEPLOYMENT_TARGET = 10.15; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -593,7 +689,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.14; + MACOSX_DEPLOYMENT_TARGET = 10.15; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/macos/Runner.xcworkspace/contents.xcworkspacedata b/macos/Runner.xcworkspace/contents.xcworkspacedata index 1d526a16..21a3cc14 100644 --- a/macos/Runner.xcworkspace/contents.xcworkspacedata +++ b/macos/Runner.xcworkspace/contents.xcworkspacedata @@ -4,4 +4,7 @@ + + diff --git a/macos/Runner/AppDelegate.swift b/macos/Runner/AppDelegate.swift index d53ef643..b3c17614 100644 --- a/macos/Runner/AppDelegate.swift +++ b/macos/Runner/AppDelegate.swift @@ -1,9 +1,13 @@ import Cocoa import FlutterMacOS -@NSApplicationMain +@main class AppDelegate: FlutterAppDelegate { override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { return true } + + override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool { + return true + } } diff --git a/pubspec.lock b/pubspec.lock index 365f7329..2ddc7a71 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -125,10 +125,10 @@ packages: dependency: transitive description: name: build_modules - sha256: "0327cb2a9eefba197b63f71872c38bafe4c63b331797a43618d6c270516a6447" + sha256: "0126ba5111c4b8f5b1f557beb23eb0bd9266f9114199ff42d9270c29c997b1be" url: "https://pub.dev" source: hosted - version: "5.0.11" + version: "5.0.18" build_resolvers: dependency: transitive description: @@ -157,10 +157,10 @@ packages: dependency: "direct dev" description: name: build_web_compilers - sha256: "01cfac85e835d9fe8e87928958586ddbd477d98cfac5af2442cb2df6bbb42dff" + sha256: e93b5d5af529269f52b691f7542d859fba82982cadec23b19680c15c70f65378 url: "https://pub.dev" source: hosted - version: "4.1.1" + version: "4.3.0" built_collection: dependency: transitive description: @@ -205,10 +205,10 @@ packages: dependency: transitive description: name: characters - sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.4.0" charts_common: dependency: transitive description: @@ -237,10 +237,10 @@ packages: dependency: transitive description: name: clock - sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.1.2" code_builder: dependency: transitive description: @@ -253,10 +253,10 @@ packages: dependency: transitive description: name: collection - sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" url: "https://pub.dev" source: hosted - version: "1.19.0" + version: "1.19.1" connectivity_plus: dependency: "direct main" description: @@ -397,10 +397,10 @@ packages: dependency: transitive description: name: fake_async - sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.3" ffi: dependency: transitive description: @@ -945,26 +945,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" + sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" url: "https://pub.dev" source: hosted - version: "10.0.7" + version: "11.0.2" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" + sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" url: "https://pub.dev" source: hosted - version: "3.0.8" + version: "3.0.10" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" lints: dependency: transitive description: @@ -1049,10 +1049,10 @@ packages: dependency: transitive description: name: matcher - sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 url: "https://pub.dev" source: hosted - version: "0.12.16+1" + version: "0.12.17" material_color_utilities: dependency: transitive description: @@ -1065,10 +1065,10 @@ packages: dependency: transitive description: name: meta - sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c url: "https://pub.dev" source: hosted - version: "1.15.0" + version: "1.16.0" mime: dependency: transitive description: @@ -1121,10 +1121,10 @@ packages: dependency: transitive description: name: path - sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.9.1" path_parsing: dependency: transitive description: @@ -1134,21 +1134,21 @@ packages: source: hosted version: "1.0.1" path_provider: - dependency: transitive + dependency: "direct overridden" description: name: path_provider - sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.5" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: a248d8146ee5983446bf03ed5ea8f6533129a12b11f12057ad1b4a67a2b3b41d + sha256: e122c5ea805bb6773bb12ce667611265980940145be920cd09a4b0ec0285cb16 url: "https://pub.dev" source: hosted - version: "2.2.4" + version: "2.2.20" path_provider_foundation: dependency: transitive description: @@ -1534,10 +1534,10 @@ packages: dependency: transitive description: name: stack_trace - sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" url: "https://pub.dev" source: hosted - version: "1.12.0" + version: "1.12.1" sticky_headers: dependency: "direct main" description: @@ -1550,10 +1550,10 @@ packages: dependency: transitive description: name: stream_channel - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" stream_transform: dependency: transitive description: @@ -1590,10 +1590,10 @@ packages: dependency: transitive description: name: test_api - sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" + sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00" url: "https://pub.dev" source: hosted - version: "0.7.3" + version: "0.7.6" timing: dependency: transitive description: @@ -1630,18 +1630,18 @@ packages: dependency: "direct main" description: name: url_launcher - sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603" + sha256: f6a7e5c4835bb4e3026a04793a4199ca2d14c739ec378fdfe23fc8075d0439f8 url: "https://pub.dev" source: hosted - version: "6.3.1" + version: "6.3.2" url_launcher_android: - dependency: transitive + dependency: "direct main" description: name: url_launcher_android - sha256: "17cd5e205ea615e2c6ea7a77323a11712dffa0720a8a90540db57a01347f9ad9" + sha256: "5c8b6c2d89a78f5a1cca70a73d9d5f86c701b36b42f9c9dac7bad592113c28e9" url: "https://pub.dev" source: hosted - version: "6.3.2" + version: "6.3.24" url_launcher_ios: dependency: "direct main" description: @@ -1726,10 +1726,10 @@ packages: dependency: transitive description: name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.2.0" visibility_detector: dependency: transitive description: @@ -1803,5 +1803,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.6.0 <3.8.0-z" - flutter: ">=3.27.0" + dart: ">=3.9.0 <3.11.0-z" + flutter: ">=3.35.0" From c1f3506bae6693bd6a3327798ef40243c199a02c Mon Sep 17 00:00:00 2001 From: "taha.alam@cloudsolutions.com.sa" Date: Tue, 25 Nov 2025 10:38:12 +0300 Subject: [PATCH 2/3] navigate back if the date filter is selected --- lib/screens/patients/In_patient/filter_date_page.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/screens/patients/In_patient/filter_date_page.dart b/lib/screens/patients/In_patient/filter_date_page.dart index 903dafdf..c2ee565f 100644 --- a/lib/screens/patients/In_patient/filter_date_page.dart +++ b/lib/screens/patients/In_patient/filter_date_page.dart @@ -146,6 +146,7 @@ class _FilterDatePageState extends State { Utils.showErrorToast( "Please Select All The date Fields "); } else { + Navigator.pop(context); await widget.patientSearchViewModel.getInPatientList( PatientSearchRequestModel( from: From 2e299e101604a83f14adfad1c679f6007fc78ceb Mon Sep 17 00:00:00 2001 From: "taha.alam@cloudsolutions.com.sa" Date: Wed, 26 Nov 2025 14:31:44 +0300 Subject: [PATCH 3/3] pharmacy intervenention remarks added --- lib/config/localized_values.dart | 10 ++++- .../InterventionHistoryBottomSheet.dart | 6 ++- .../widgets/intervention_history_item.dart | 37 ++++++++++++++++--- .../translations_delegate_base_utils.dart | 2 + 4 files changed, 46 insertions(+), 9 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 4c97b284..52856a7e 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1254,5 +1254,13 @@ const Map> localizedValues = { "youHavePendingInterventions": {"en": "You Have Pending Interventions. That need your attention", "ar":"لديك تدخلات معلقة. التي تحتاج إلى اهتمامك"}, "open": {"en": "Open", "ar":"يفتح"}, "chiefComplaintLengthErrorMsg":{"en": "The text is too short; minimum 26 characters required.", "ar":"النص قصير جدًا؛ الحد الأدنى المطلوب هو 26 حرفًا."}, - "filterInPatient":{"en": "Select Dates", "ar":"حدد التواريخ."} + "filterInPatient":{"en": "Select Dates", "ar":"حدد التواريخ."}, + "remarksNotAdded": { + "en": "Remarks Not Added", + "ar": "لم تتم إضافة ملاحظات" + }, + "addDoctorRemarks": { + "en": " Doctor Remarks", + "ar": " ملاحظات الطبيب" + } }; diff --git a/lib/screens/pharmacy_intervention/widgets/InterventionHistoryBottomSheet.dart b/lib/screens/pharmacy_intervention/widgets/InterventionHistoryBottomSheet.dart index 873c2858..034d934d 100644 --- a/lib/screens/pharmacy_intervention/widgets/InterventionHistoryBottomSheet.dart +++ b/lib/screens/pharmacy_intervention/widgets/InterventionHistoryBottomSheet.dart @@ -54,8 +54,9 @@ class InterventionHistoryBottomSheet extends StatelessWidget { color: Colors.white, child: InterventionHistoryItem( interventionHistory: interventionList[index], - onAcceptClick: (intervention) { + onAcceptClick: (intervention, remarks) { model.updateInterventionDiseaseStatus( + remarks: remarks, isAccepted: true, interventionID: interventionList[index].interventionId.toString(), successMessage: TranslationBase.of(context).interventionAcceptedSuccessfully, @@ -63,8 +64,9 @@ class InterventionHistoryBottomSheet extends StatelessWidget { ); Navigator.pop(context); }, - onRejectClick: (intervention) { + onRejectClick: (intervention, remarks) { model.updateInterventionDiseaseStatus( + remarks: remarks, interventionID: interventionList[index].interventionId.toString(), successMessage: TranslationBase.of(context).interventionRejectedSuccessfully, errorMessage: TranslationBase.of(context).unableToPerformTheAction diff --git a/lib/screens/pharmacy_intervention/widgets/intervention_history_item.dart b/lib/screens/pharmacy_intervention/widgets/intervention_history_item.dart index 1b56d282..104a1f75 100644 --- a/lib/screens/pharmacy_intervention/widgets/intervention_history_item.dart +++ b/lib/screens/pharmacy_intervention/widgets/intervention_history_item.dart @@ -1,22 +1,26 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/model/pharmacy-intervention-model/intervention_history.dart'; +import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; import 'package:flutter/material.dart'; class InterventionHistoryItem extends StatelessWidget { final InterventionHistory interventionHistory; - final Function(InterventionHistory) onAcceptClick; + final Function(InterventionHistory, String) onAcceptClick; - // string is index here - final Function(InterventionHistory) onRejectClick; + final Function(InterventionHistory, String) onRejectClick; + final TextEditingController remarksController = TextEditingController(); - const InterventionHistoryItem({ + + InterventionHistoryItem({ super.key, required this.interventionHistory, required this.onAcceptClick, required this.onRejectClick, + }); @override @@ -56,6 +60,19 @@ class InterventionHistoryItem extends StatelessWidget { color: Color(0xFF2B353E), ), SizedBox(height: 8,), + + AppTextFieldCustom( + hintText: TranslationBase.of(context).addDoctorRemarks, + controller: remarksController, + maxLines: 48, + minLines: 2, + hasBorder: true, + inputType: TextInputType.multiline, + onClick: () {}, + onChanged: (value) {}, + onFieldSubmitted: () {}, + ), + SizedBox(height: 16,), Row(children: [ Expanded( child: SizedBox( @@ -69,7 +86,11 @@ class InterventionHistoryItem extends StatelessWidget { color: AppGlobal.appRedColor, fontColor: Colors.white, onPressed: () async { - onRejectClick(interventionHistory); + if(remarksController.text.isEmpty == true) { + DrAppToastMsg.showErrorToast(TranslationBase.of(context).remarksNotAdded); + return; + } + onRejectClick(interventionHistory, remarksController.text); }, ), ), @@ -89,7 +110,11 @@ class InterventionHistoryItem extends StatelessWidget { color: AppGlobal.appGreenColor, fontColor: Colors.white, onPressed: () async { - onAcceptClick(interventionHistory); + if(remarksController.text.isEmpty == true) { + DrAppToastMsg.showErrorToast(TranslationBase.of(context).remarksNotAdded); + return; + } + onAcceptClick(interventionHistory,remarksController.text); }, ), ), diff --git a/lib/utils/translations_delegate_base_utils.dart b/lib/utils/translations_delegate_base_utils.dart index 98748c9b..9dff29c9 100644 --- a/lib/utils/translations_delegate_base_utils.dart +++ b/lib/utils/translations_delegate_base_utils.dart @@ -1997,6 +1997,8 @@ class TranslationBase { String get open => localizedValues['open']![locale.languageCode]!; String get chiefComplaintLengthErrorMsg => localizedValues['chiefComplaintLengthErrorMsg']![locale.languageCode]!; String get filterInPatient => localizedValues['filterInPatient']![locale.languageCode]!; + String get remarksNotAdded => localizedValues['remarksNotAdded']![locale.languageCode]!; + String get addDoctorRemarks => localizedValues['addDoctorRemarks']![locale.languageCode]!; } class TranslationBaseDelegate extends LocalizationsDelegate {