diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 65ca07a7..4188c144 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1282,5 +1282,9 @@ const Map> localizedValues = { "en": "Duration cannot be greater than 365", "ar": "لا يمكن أن تكون المدة أكبر من 365" }, + "intendedLengthStay": { + "en": "Intended Length Of Stay", + "ar": "المدة المتوقعة للإقامة" + }, }; diff --git a/lib/core/model/admissionRequest/admission-request.dart b/lib/core/model/admissionRequest/admission-request.dart index 371bb110..2af6ae9f 100644 --- a/lib/core/model/admissionRequest/admission-request.dart +++ b/lib/core/model/admissionRequest/admission-request.dart @@ -7,7 +7,9 @@ class AdmissionRequest { int? noOfBabies; int? mrpDoctorID; String? admissionDate; + String? expectedadmissionDate; int? expectedDays; + int? intendedLengthOfStayId; int? admissionType; int? admissionLocationID; int? roomCategoryID; @@ -95,7 +97,9 @@ class AdmissionRequest { noOfBabies = json['noOfBabies']; mrpDoctorID = json['mrpDoctorID']; admissionDate = json['admissionDate']; + expectedadmissionDate = json['expectedAdmissionDate']; expectedDays = json['expectedDays']; + intendedLengthOfStayId = json['intendedLengthOfStayId']; admissionType = json['admissionType']; admissionLocationID = json['admissionLocationID']; roomCategoryID = json['roomCategoryID']; @@ -155,7 +159,9 @@ class AdmissionRequest { data['noOfBabies'] = this.noOfBabies; data['mrpDoctorID'] = this.mrpDoctorID; data['admissionDate'] = this.admissionDate; + data['expectedAdmissionDate'] = this.expectedadmissionDate; data['expectedDays'] = this.expectedDays; + data['intendedLengthOfStayId'] = this.intendedLengthOfStayId; data['admissionType'] = this.admissionType; data['admissionLocationID'] = this.admissionLocationID; data['roomCategoryID'] = this.roomCategoryID; diff --git a/lib/core/model/note/update_note_model.dart b/lib/core/model/note/update_note_model.dart index e6c55757..1eabf9d2 100644 --- a/lib/core/model/note/update_note_model.dart +++ b/lib/core/model/note/update_note_model.dart @@ -63,7 +63,9 @@ class UpdateNoteReqModel { patientMRN = json['PatientMRN']; } - Map toJson() { + Map toJson({ + bool isVidaPlusProject = false +}) { final Map data = new Map(); data['ProjectID'] = this.projectID; data['CreatedBy'] = this.createdBy; @@ -83,7 +85,9 @@ class UpdateNoteReqModel { data['PatientOutSA'] = this.patientOutSA; data['PatientTypeID'] = this.patientTypeID; data['ConditionId'] = this.conditionId; - data['PatientMRN'] = this.patientMRN; + if(isVidaPlusProject) { + data['PatientMRN'] = this.patientMRN; + } return data; } } diff --git a/lib/core/service/patient/patientInPatientService.dart b/lib/core/service/patient/patientInPatientService.dart index b6578885..b6047f5c 100644 --- a/lib/core/service/patient/patientInPatientService.dart +++ b/lib/core/service/patient/patientInPatientService.dart @@ -18,7 +18,11 @@ class PatientInPatientService extends BaseService { } else { requestModel.doctorID = 0; } - + if(isVidaPlusProject == false){ + requestModel.identificationNo = "0"; + requestModel.to = "0"; + requestModel.from = "0"; + } await baseAppClient.post( GET_PATIENT_IN_PATIENT_LIST, onSuccess: (dynamic response, int statusCode) { diff --git a/lib/core/service/patient/patient_service.dart b/lib/core/service/patient/patient_service.dart index b14c9669..0f02aee8 100644 --- a/lib/core/service/patient/patient_service.dart +++ b/lib/core/service/patient/patient_service.dart @@ -366,6 +366,8 @@ class PatientService extends BaseService { Future updatePatientProgressNote(UpdateNoteReqModel req) async { hasError = false; + var request = req.toJson(); + await baseAppClient.post( UPDATE_PROGRESS_NOTE_FOR_INPATIENT, diff --git a/lib/core/viewModel/patient_view_model.dart b/lib/core/viewModel/patient_view_model.dart index a24412bf..f5057970 100644 --- a/lib/core/viewModel/patient_view_model.dart +++ b/lib/core/viewModel/patient_view_model.dart @@ -18,6 +18,7 @@ import 'package:doctor_app_flutter/core/model/patient/radiology/radiology_res_mo import 'package:doctor_app_flutter/core/model/patient/vital_sign/vital_sign_res_model.dart'; import 'package:doctor_app_flutter/core/model/patient_muse/PatientSearchRequestModel.dart'; import 'package:doctor_app_flutter/core/service/patient/patient_service.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import '../../config/shared_pref_kay.dart'; import '../../locator.dart'; @@ -191,6 +192,7 @@ class PatientViewModel extends BaseViewModel { } Future updatePatientProgressNote(UpdateNoteReqModel req) async { + setState(ViewState.BusyLocal); await _patientService.updatePatientProgressNote(req); if (_patientService.hasError) { diff --git a/lib/screens/patients/profile/admission_request/admission_request_first_screen.dart b/lib/screens/patients/profile/admission_request/admission_request_first_screen.dart index 9efe8e75..a94cdeac 100644 --- a/lib/screens/patients/profile/admission_request/admission_request_first_screen.dart +++ b/lib/screens/patients/profile/admission_request/admission_request_first_screen.dart @@ -48,7 +48,7 @@ class _AdmissionRequestThirdScreenState extends State implements Ob Widget build(BuildContext context) { return BaseView( onModelReady: (model) async { + WidgetsBinding.instance.addPostFrameCallback((_) async { model.setObjectiveCallBack(this); mySelectedExamination.clear(); model.isAddExamInProgress = true; + await model.getPatientPhysicalExam(widget.patientInfo); if (model.patientPhysicalExamList.isNotEmpty) { if (model.physicalExaminationList.length == 0) { @@ -85,7 +87,7 @@ class _UpdateObjectivePageState extends State implements Ob mySelectedExamination.add(tempEam); }); } - widget.changeLoadingState(false); + widget.changeLoadingState(false);}); }, builder: (_, model, w) => AppScaffold( isShowAppBar: false, diff --git a/lib/utils/translations_delegate_base_utils.dart b/lib/utils/translations_delegate_base_utils.dart index 14e346e5..6f228007 100644 --- a/lib/utils/translations_delegate_base_utils.dart +++ b/lib/utils/translations_delegate_base_utils.dart @@ -2004,6 +2004,11 @@ class TranslationBase { String get reset => localizedValues['reset']![locale.languageCode]!; String get durationCannotBeNegative => localizedValues['durationCannotBeNegative']![locale.languageCode]!; String get durationCannotBeGreaterThan365 => localizedValues['durationCannotBeGreaterThan365']![locale.languageCode]!; + + String get intendedLengthStay => + localizedValues['intendedLengthStay']![locale.languageCode]!; + + } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/pubspec.lock b/pubspec.lock index aaf98ac8..cb832c0c 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -53,10 +53,10 @@ packages: dependency: transitive description: name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 url: "https://pub.dev" source: hosted - version: "2.11.0" + version: "2.12.0" autocomplete_textfield: dependency: "direct main" description: @@ -93,10 +93,10 @@ packages: dependency: transitive description: name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" build: dependency: transitive description: @@ -1073,10 +1073,10 @@ packages: dependency: transitive description: name: meta - sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.17.0" mime: dependency: transitive description: @@ -1153,10 +1153,10 @@ packages: dependency: transitive description: name: path_provider_android - sha256: e122c5ea805bb6773bb12ce667611265980940145be920cd09a4b0ec0285cb16 + sha256: "3b4c1fc3aa55ddc9cd4aa6759984330d5c8e66aa7702a6223c61540dc6380c37" url: "https://pub.dev" source: hosted - version: "2.2.20" + version: "2.2.19" path_provider_foundation: dependency: transitive description: @@ -1470,10 +1470,10 @@ packages: dependency: transitive description: name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.10.1" speech_to_text: dependency: "direct main" description: @@ -1574,10 +1574,10 @@ packages: dependency: transitive description: name: string_scanner - sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.4.1" synchronized: dependency: transitive description: @@ -1590,18 +1590,18 @@ packages: dependency: transitive description: name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.2.2" test_api: dependency: transitive description: name: test_api - sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00" + sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55 url: "https://pub.dev" source: hosted - version: "0.7.6" + version: "0.7.7" timezone: dependency: "direct main" description: @@ -1654,10 +1654,10 @@ packages: dependency: "direct main" description: name: url_launcher_android - sha256: "5c8b6c2d89a78f5a1cca70a73d9d5f86c701b36b42f9c9dac7bad592113c28e9" + sha256: "81777b08c498a292d93ff2feead633174c386291e35612f8da438d6e92c4447e" url: "https://pub.dev" source: hosted - version: "6.3.24" + version: "6.3.20" url_launcher_ios: dependency: "direct main" description: @@ -1758,10 +1758,10 @@ packages: dependency: transitive description: name: vm_service - sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b + sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14" url: "https://pub.dev" source: hosted - version: "14.3.0" + version: "14.3.1" watcher: dependency: transitive description: @@ -1819,5 +1819,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.9.0 <3.11.0-z" - flutter: ">=3.35.0" + dart: ">=3.8.0-0 <3.11.0-z" + flutter: ">=3.29.0"