From 128bd2ec5479859bfff2b845423ab8936117dd2d Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Sun, 16 Apr 2023 11:21:05 +0300 Subject: [PATCH 01/49] Inpatient services implementation --- assets/images/new/admission_notice.png | Bin 0 -> 1258 bytes assets/images/new/birth.png | Bin 0 -> 4408 bytes assets/images/new/consent.jpg | Bin 0 -> 4106 bytes assets/images/new/hospital.png | Bin 0 -> 13439 bytes assets/images/new/instructions.jpg | Bin 0 -> 17664 bytes assets/images/new/meal_plan.png | Bin 0 -> 3688 bytes assets/images/new/medical_instructions.png | Bin 0 -> 1916 bytes lib/config/localized_values.dart | 15 ++ .../InPatientServices/inpatient_home.dart | 146 ++++++++++++++++++ .../fragments/home_page_fragment2.dart | 112 +++++++++++--- lib/pages/landing/landing_page.dart | 42 ++--- lib/pages/landing/widgets/services_view.dart | 4 + lib/pages/login/login.dart | 7 +- .../authentication/auth_provider.dart | 3 +- lib/uitl/HMG_Geofence.dart | 2 +- lib/uitl/push-notification-handler.dart | 57 +++++++ lib/uitl/translations_delegate_base.dart | 15 ++ lib/widgets/in_app_browser/InAppBrowser.dart | 4 +- 18 files changed, 361 insertions(+), 46 deletions(-) create mode 100644 assets/images/new/admission_notice.png create mode 100644 assets/images/new/birth.png create mode 100644 assets/images/new/consent.jpg create mode 100644 assets/images/new/hospital.png create mode 100644 assets/images/new/instructions.jpg create mode 100644 assets/images/new/meal_plan.png create mode 100644 assets/images/new/medical_instructions.png create mode 100644 lib/pages/InPatientServices/inpatient_home.dart diff --git a/assets/images/new/admission_notice.png b/assets/images/new/admission_notice.png new file mode 100644 index 0000000000000000000000000000000000000000..50b5c1d5c155ba6d7b3fcc159d54a7daa3f16d34 GIT binary patch literal 1258 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSEX7WqAsj$Z!;#Vf4nJ zFmD85#;?t9J%NIfC9V-A!TD(=<%vb94CUqJdYO6I#mR{Use1WE>9gP2NC6E>_jGX# zshIQjuI~!5P?_T&-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pb;FGJfdK^pM1Rbu!hO!q?^S4yfqVV*goNjdDaC^eT3b@I*#5-&V&DaEvsW>) z;i@EFv$c8mBVeNfvZrlo^zPKdP$%KSO|^B5?oH9Ad~q#^9QQY&09Y{~!dFjGtg38& zgpivF{UTvK9q0wuJ{o0yhWT)1|729M#^+F(ATfcps`P!a&F+X*Kv3QbD);$pYU;-` zhK*r@2)bV}0BK!%jZ@$e|I;>>_@ehy6Q7nS7Syq-*4J2Dcxk6tBD*gHb;ri_h8$kq z;jI8MVjyYVaY*AYXOu-bR^WW!*|)yEd1^BUY`T-$c0k$#N#F2s4qOhH%-+qvrS`Qzndm`5fr50}p4FF(`totKa<&2x9ODC1P_nY$ xfQR0=$7#tJ;SvEu8yME+zyHaKiigwWYm9(;2Tj{{eL=sr&!{ literal 0 HcmV?d00001 diff --git a/assets/images/new/hospital.png b/assets/images/new/hospital.png new file mode 100644 index 0000000000000000000000000000000000000000..10c6a1f1b44a2959bc142d6b6cd626f777d94315 GIT binary patch literal 13439 zcmch-2V7In-z9t#K#*zy=|yQ$q}Lz*#1u>#c0AdwMu_dZJB z*#_nD=!G@p;o%`<=k(0g>d|v+A?FuQlUHssK@bOoyrX2`nX)|YkznxW%gMTrjfZJQhMJ@-{_CL@a{(Qg zEmx!x?8Y}bNJ7OJNu!GBMO}d8wqmjB+#MpU#01V}6ojp7=c?z#RYl zw2%o+1*>uUaoDjp%R*K9e0B**JmheN+pwmckxzu#fXLr0P~B%Gd=%zNBK502WmuCG zBZfzv$sR!lY2S!LeM&OALVObHqw=|f!DWN=$krJdkx2cruh|hDnZ$D_&rN=H%Gi&q z@WLjnm^BEByh?BtU7^`C`%xAqL&>Cml&PuB=mT$mz9kKe|`sV=Pi z(JFn#$lunf8~i*xzLo@!xg4hEl5=;|A>?jZ!)J5T8PTE{3DpsO%|+s-7m3+KO`kSr zdwwbii(_4P{uV~pZuR|URgb-xVG74!?`uSD)4iC!VVXJ^C6VJE&0}2H>-wkNkj-xG zn&y4HtNeHw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iceList = getInPatientServicesList(context); + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + showNewAppBarTitle: true, + showNewAppBar: true, + appBarTitle: TranslationBase.of(context).InPatientServicesHeader, + body: Container( + margin: EdgeInsets.all(20.0), + child: Column( + children: [ + Padding( + padding: EdgeInsets.only(left: 12, right: 12), + child: GridView.builder( + shrinkWrap: true, + primary: false, + physics: NeverScrollableScrollPhysics(), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12), + padding: EdgeInsets.zero, + itemCount: inPatientServiceList.length, + itemBuilder: (BuildContext context, int index) { + return inPatientServiceList[index]; + }, + ), + ), + ], + ), + ), + ); + } + + List getInPatientServicesList(BuildContext context) { + List serviceList = List(); + + serviceList.add( + InkWell( + onTap: () { + // Navigator.push(context, FadePage(page: AdvancePaymentPage())); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).admissionGeneral, + imagePath: 'assets/images/new/consent.jpg', + subTitle: TranslationBase.of(context).consent, + isPngImage: true, + width: 50.0, + height: 40.0, + ), + ), + ); + + serviceList.add( + InkWell( + onTap: () { + // Navigator.push(context, FadePage(page: AdvancePaymentPage())); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).generalInstructionsTitle, + imagePath: 'assets/images/new/instructions.jpg', + subTitle: TranslationBase.of(context).generalInstructionsSubTitle, + isPngImage: true, + width: 50.0, + height: 40.0, + ), + ), + ); + + serviceList.add( + InkWell( + onTap: () { + // Navigator.push(context, FadePage(page: AdvancePaymentPage())); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).medicalInstructionsTitle, + imagePath: 'assets/images/new/medical_instructions.png', + subTitle: TranslationBase.of(context).medicalInstructionsSubTitle, + isPngImage: true, + width: 50.0, + height: 40.0, + ), + ), + ); + + serviceList.add( + InkWell( + onTap: () { + // Navigator.push(context, FadePage(page: AdvancePaymentPage())); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).mealPlanTitle, + imagePath: 'assets/images/new/meal_plan.png', + subTitle: TranslationBase.of(context).mealPlanSubTitle, + isPngImage: true, + width: 50.0, + height: 40.0, + ), + ), + ); + + serviceList.add( + InkWell( + onTap: () { + // Navigator.push(context, FadePage(page: AdvancePaymentPage())); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).birthNotificationTitle, + imagePath: 'assets/images/new/birth.png', + subTitle: TranslationBase.of(context).birthNotificationSubTitle, + isPngImage: true, + width: 50.0, + height: 40.0, + ), + ), + ); + + serviceList.add( + InkWell( + onTap: () { + // Navigator.push(context, FadePage(page: AdvancePaymentPage())); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).admissionNoticeTitle, + imagePath: 'assets/images/new/admission_notice.png', + subTitle: TranslationBase.of(context).admissionNoticeSubTitle, + isPngImage: true, + width: 50.0, + height: 40.0, + ), + ), + ); + + return serviceList; + } +} diff --git a/lib/pages/landing/fragments/home_page_fragment2.dart b/lib/pages/landing/fragments/home_page_fragment2.dart index ee856487..535bd38e 100644 --- a/lib/pages/landing/fragments/home_page_fragment2.dart +++ b/lib/pages/landing/fragments/home_page_fragment2.dart @@ -41,13 +41,12 @@ class _HomePageFragment2State extends State { List appoList = []; ApplePayResponse applePayResponse; + bool isPatientAdmitted = true; + @override void initState() { // TODO: implement initState super.initState(); - - // getPatientAppointmentHistory1(); - // getFamilyFiles(); } initialiseHmgServices(bool isLogin) { @@ -63,10 +62,29 @@ class _HomePageFragment2State extends State { hmgServices.add(new HmgServices(8, TranslationBase.of(context).connectTitle, TranslationBase.of(context).connectSubtitle, "assets/images/new/reach_us.svg", isLogin)); } + initialiseInPatientHmgServices(bool isLogin) { + hmgServices.clear(); + // hmgServices.add(new HmgServices(0, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin)); + // hmgServices.add(new HmgServices(1, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/CoronaIcon.svg", isLogin)); + // hmgServices.add(new HmgServices(2, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin)); + hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin)); + hmgServices.add(new HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin)); + hmgServices.add(new HmgServices(5, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin)); + hmgServices.add(new HmgServices(6, TranslationBase.of(context).ereferralTitle, TranslationBase.of(context).ereferralSubtitle, "assets/images/new/E_Referral.svg", isLogin)); + hmgServices.add(new HmgServices(7, "H\u2082O", TranslationBase.of(context).dailyWater, "assets/images/new/h2o.svg", isLogin)); + hmgServices.add(new HmgServices(8, TranslationBase.of(context).connectTitle, TranslationBase.of(context).connectSubtitle, "assets/images/new/reach_us.svg", isLogin)); + } + @override Widget build(BuildContext context) { projectViewModel = Provider.of(context); - initialiseHmgServices(false); + + if (isPatientAdmitted) { + initialiseInPatientHmgServices(false); + } else { + initialiseHmgServices(false); + } + var appoCountProvider = Provider.of(context); var userProvider = Provider.of(context); List myMedicalList = Utils.myMedicalListHomePage(projectViewModel: projectViewModel, context: context, count: appoCountProvider.count, isLogin: projectViewModel.isLogin); @@ -257,23 +275,69 @@ class _HomePageFragment2State extends State { ], ), ), - Padding( - padding: const EdgeInsets.only( - left: 20, - right: 20, - top: 0, - ), - child: GridView.builder( - gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12), - physics: NeverScrollableScrollPhysics(), - shrinkWrap: true, - itemCount: hmgServices.length, - padding: EdgeInsets.zero, - itemBuilder: (BuildContext context, int index) { - return ServicesView(hmgServices[index], index); - }, - ), - ), + isPatientAdmitted + ? Column( + children: [ + Padding( + padding: const EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 12.0), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Expanded( + flex: 9, + child: Container( + margin: projectViewModel.isArabic ? EdgeInsets.only(left: 12.0) : EdgeInsets.only(right: 12.0), + child: AspectRatio( + aspectRatio: 2.15, + child: + ServicesView(new HmgServices(2, TranslationBase.of(context).InPatient, TranslationBase.of(context).inPatientServices, "assets/images/new/hospital.png", false), 23)), + ), + ), + Expanded( + flex: 4, + child: AspectRatio( + aspectRatio: 1.0, + child: ServicesView(new HmgServices(2, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", false), 2)), + ), + ], + ), + ), + Padding( + padding: const EdgeInsets.only( + left: 20, + right: 20, + top: 0, + ), + child: GridView.builder( + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12), + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemCount: hmgServices.length, + padding: EdgeInsets.zero, + itemBuilder: (BuildContext context, int index) { + return ServicesView(hmgServices[index], index); + }, + ), + ), + ], + ) + : Padding( + padding: const EdgeInsets.only( + left: 20, + right: 20, + top: 0, + ), + child: GridView.builder( + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12), + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemCount: hmgServices.length, + padding: EdgeInsets.zero, + itemBuilder: (BuildContext context, int index) { + return ServicesView(hmgServices[index], index); + }, + ), + ), ], ), mHeight(140), @@ -584,6 +648,12 @@ class _HomePageFragment2State extends State { ); } + Widget getInpatientButton() { + return Container( + height: 50.0, + ); + } + Widget showFloating(String icon) { return Container( width: MediaQuery.of(context).size.width * 0.06, diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index e9fbd62c..f7ccacee 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -320,6 +320,8 @@ class _LandingPageState extends State with WidgetsBindingObserver { } } }); + + // HMG_Geofencing(context).loadZones().then((instance) => instance.init()); } void setUserValues(value) async { @@ -337,25 +339,26 @@ class _LandingPageState extends State with WidgetsBindingObserver { } } - registerGeofences() async { - await locator().getAllGeoZones(GeoZonesRequestModel()); - - void doIt() { - getUserInformation().then((value) { - if (value != null) projectViewModel.platformBridge().registerHmgGeofences(); - }); - } - - if (await Permission.location.isGranted) { - doIt(); - } else { - [Permission.location].request().then((value) async { - if (await Permission.location.isGranted) { - doIt(); - } - }); - } - } + // registerGeofences() async { + // await locator().getAllGeoZones(GeoZonesRequestModel()); + // + // // void doIt() { + // // // getUserInformation().then((value) { + // // // if (value != null) + // // projectViewModel.platformBridge().registerHmgGeofences(); + // // // }); + // // } + // // + // // if (await Permission.location.isGranted) { + // // doIt(); + // // } else { + // // [Permission.location].request().then((value) async { + // // if (await Permission.location.isGranted) { + // // doIt(); + // // } + // // }); + // // } + // } login() async { var data = await sharedPref.getObject(IMEI_USER_DATA); @@ -661,6 +664,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { String voipToken = await sharedPref.getString(APNS_TOKEN); getOneSignalVOIPToken(voipToken); } + // registerGeofences(); } getOneSignalVOIPToken(String voipToken) { diff --git a/lib/pages/landing/widgets/services_view.dart b/lib/pages/landing/widgets/services_view.dart index 1a505e03..9cde947d 100644 --- a/lib/pages/landing/widgets/services_view.dart +++ b/lib/pages/landing/widgets/services_view.dart @@ -21,6 +21,7 @@ import 'package:diplomaticquarterapp/pages/ContactUs/contact_us_page.dart'; import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-location.dart'; import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart'; import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; +import 'package:diplomaticquarterapp/pages/InPatientServices/inpatient_home.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.dart'; @@ -176,6 +177,9 @@ class ServicesView extends StatelessWidget { ), ); locator().hmgServices.logServiceName('latest news'); + } else if (index == 23) { + Navigator.push(context, FadePage(page: InPatientServicesHome())); + locator().hmgServices.logServiceName('InPatient Services'); } }, child: Container( diff --git a/lib/pages/login/login.dart b/lib/pages/login/login.dart index 94747b37..c177a1f8 100644 --- a/lib/pages/login/login.dart +++ b/lib/pages/login/login.dart @@ -1,5 +1,7 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/geofencing/requests/GeoZonesRequestModel.dart'; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; +import 'package:diplomaticquarterapp/core/service/geofencing/GeofencingServices.dart'; import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; @@ -329,7 +331,7 @@ class _Login extends State { } this.authService.checkActivationCode(request, code).then((result) async { sharedPref.remove(FAMILY_FILE); - registerGeoZones(); + // registerGeoZones(); projectViewModel.setPrivilege(privilegeList: result); result = CheckActivationCode.fromJson(result); result.list.isFamily = false; @@ -389,7 +391,8 @@ class _Login extends State { }); } - void registerGeoZones() { + void registerGeoZones() async { + await locator().getAllGeoZones(GeoZonesRequestModel()); projectViewModel.platformBridge().registerHmgGeofences(); } diff --git a/lib/services/authentication/auth_provider.dart b/lib/services/authentication/auth_provider.dart index f833ad5d..964a7edd 100644 --- a/lib/services/authentication/auth_provider.dart +++ b/lib/services/authentication/auth_provider.dart @@ -212,7 +212,8 @@ class AuthProvider with ChangeNotifier { request.channel = CHANNEL; request.iPAdress = IP_ADDRESS; request.generalid = GENERAL_ID; - request.languageID = (languageID == 'ar' ? 1 : 2); + // request.languageID = (languageID == 'ar' ? 1 : 2); + request.languageID = 2; request.deviceTypeID = Platform.isIOS ? 1 : 2; request.patientOutSA = request.zipCode == '966' ? 0 : 1; request.isDentalAllowedBackend = false; diff --git a/lib/uitl/HMG_Geofence.dart b/lib/uitl/HMG_Geofence.dart index 751c4ba6..c2c1a3f9 100644 --- a/lib/uitl/HMG_Geofence.dart +++ b/lib/uitl/HMG_Geofence.dart @@ -18,7 +18,7 @@ // import 'package:geofencing/geofencing.dart'; // // class HMG_Geofencing { -// var _testTrigger = false; +// var _testTrigger = true; // static var _isolatePortName = "hmg_geofencing_send_port"; // // List _zones; diff --git a/lib/uitl/push-notification-handler.dart b/lib/uitl/push-notification-handler.dart index d8b59782..60ac504e 100644 --- a/lib/uitl/push-notification-handler.dart +++ b/lib/uitl/push-notification-handler.dart @@ -19,6 +19,10 @@ import 'package:firebase_messaging/firebase_messaging.dart' as fir; import 'package:flutter/cupertino.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +// import 'package:flutter_callkit_incoming/entities/android_params.dart'; +// import 'package:flutter_callkit_incoming/entities/call_kit_params.dart'; +// import 'package:flutter_callkit_incoming/entities/ios_params.dart'; +// import 'package:flutter_callkit_incoming/flutter_callkit_incoming.dart'; import 'package:flutter_ios_voip_kit/call_state_type.dart'; import 'package:flutter_ios_voip_kit/flutter_ios_voip_kit.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart'; @@ -40,6 +44,7 @@ Future backgroundMessageHandler(dynamic message) async { } if (message.data != null && (message.data['is_call'] == 'true' || message.data['is_call'] == true)) { + // showCallkitIncoming(message); _incomingCall(message.data); return; } else { @@ -102,6 +107,57 @@ callPage(String sessionID, String token) async { // } } +// Future showCallkitIncoming(Map message) async { +// // if (message['type'] == 'ReservationCallStart') { +// var params = CallKitParams( +// id: DateTime.now().millisecondsSinceEpoch.toString(), +// nameCaller: 'Dr Sulaiman Al Habib', +// appName: 'Dr Sulaiman Al Habib', +// avatar: 'https://play-lh.googleusercontent.com/FBNNpxb7m6eM6wtW7MV1Ffp6OXOGLI38q47zcvP29OCYA1yhYH5mZzl5itZi0TgOyZpG', +// handle: 'LiveCare Call', +// type: 1, +// duration: 60000, +// textAccept: 'Accept', +// textDecline: 'Decline', +// textMissedCall: 'Missed call', +// textCallback: 'Call back', +// extra: { +// // 'reservationID': message['id'], +// 'userId': '1a2b3c4d' +// }, +// headers: {'apiKey': 'Abc@123!', 'platform': 'flutter'}, +// android: AndroidParams( +// isCustomNotification: true, +// isShowLogo: false, +// isShowCallback: false, +// ringtonePath: 'system_ringtone_default', +// backgroundColor: '#424242FF', +// // 'backgroundUrl': 'https://i.pravatar.cc/500', +// actionColor: '#4CAF50', +// incomingCallNotificationChannelName: "Incoming Call", +// missedCallNotificationChannelName: "Missed Call", +// ), +// ios: IOSParams( +// iconName: 'CallKitLogo', +// handleType: '', +// supportsVideo: true, +// maximumCallGroups: 2, +// maximumCallsPerCallGroup: 1, +// audioSessionMode: 'default', +// audioSessionActive: true, +// audioSessionPreferredSampleRate: 44100.0, +// audioSessionPreferredIOBufferDuration: 0.005, +// supportsDTMF: true, +// supportsHolding: true, +// supportsGrouping: false, +// supportsUngrouping: false, +// ringtonePath: 'system_ringtone_default')); +// await FlutterCallkitIncoming.showCallkitIncoming(params); +// // } else if (message['type'] == 'ReservationCallFinished') { +// // await FlutterCallkitIncoming.endAllCalls(); +// // } +// } + _incomingCall(Map data) async { LandingPage.incomingCallData = IncomingCallData.fromJson(data); if (LandingPage.isOpenCallPage == false) { @@ -313,6 +369,7 @@ class PushNotificationHandler { } if (remoteMessage.data['is_call'] == 'true' || remoteMessage.data['is_call'] == true) { _incomingCall(remoteMessage.data); + // showCallkitIncoming(remoteMessage.data); } else { GetNotificationsResponseModel notification = new GetNotificationsResponseModel(); diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index dabe80ab..2eb7f976 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2891,6 +2891,21 @@ class TranslationBase { String get pharmaLiveCareMakePayment1 => localizedValues["pharmaLiveCareMakePayment1"][locale.languageCode]; String get pharmaLiveCareJoinConsultation => localizedValues["pharmaLiveCareJoinConsultation"][locale.languageCode]; String get pharmaLiveCareJoinConsultation1 => localizedValues["pharmaLiveCareJoinConsultation1"][locale.languageCode]; + String get InPatient => localizedValues["InPatient"][locale.languageCode]; + String get inPatientServices => localizedValues["InPatientServices"][locale.languageCode]; + String get InPatientServicesHeader => localizedValues["InPatientServicesHeader"][locale.languageCode]; + String get admissionGeneral => localizedValues["admissionGeneral"][locale.languageCode]; + String get consent => localizedValues["consent"][locale.languageCode]; + String get generalInstructionsTitle => localizedValues["generalInstructionsTitle"][locale.languageCode]; + String get generalInstructionsSubTitle => localizedValues["generalInstructionsSubTitle"][locale.languageCode]; + String get medicalInstructionsTitle => localizedValues["medicalInstructionsTitle"][locale.languageCode]; + String get medicalInstructionsSubTitle => localizedValues["medicalInstructionsSubTitle"][locale.languageCode]; + String get mealPlanTitle => localizedValues["mealPlanTitle"][locale.languageCode]; + String get mealPlanSubTitle => localizedValues["mealPlanSubTitle"][locale.languageCode]; + String get birthNotificationTitle => localizedValues["birthNotificationTitle"][locale.languageCode]; + String get birthNotificationSubTitle => localizedValues["birthNotificationSubTitle"][locale.languageCode]; + String get admissionNoticeTitle => localizedValues["admissionNoticeTitle"][locale.languageCode]; + String get admissionNoticeSubTitle => localizedValues["admissionNoticeSubTitle"][locale.languageCode]; } diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index f62248b8..e91990b4 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -37,9 +37,9 @@ class MyInAppBrowser extends InAppBrowser { // static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL LIVE static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT - static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT + // static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT - // static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE + static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE // static String SERVICE_URL = 'https://uat.hmgwebservices.com/payfortforvidaplus/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL UAT VIDA PLUS From 9a7d0af6ead10ab0a4de569f2c50b3ce2ac6fbe9 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 1 May 2023 15:47:39 +0300 Subject: [PATCH 02/49] InPatient API implemented --- lib/core/viewModels/project_view_model.dart | 6 +++++ .../fragments/home_page_fragment2.dart | 6 ++--- lib/pages/login/confirm-login.dart | 18 +++++++++++++ .../clinic_services/get_clinic_service.dart | 26 ++++++++++++------- 4 files changed, 43 insertions(+), 13 deletions(-) diff --git a/lib/core/viewModels/project_view_model.dart b/lib/core/viewModels/project_view_model.dart index a536d527..410a862a 100644 --- a/lib/core/viewModels/project_view_model.dart +++ b/lib/core/viewModels/project_view_model.dart @@ -34,6 +34,7 @@ class ProjectViewModel extends BaseViewModel { dynamic searchvalue; bool isLogin = false; int laserSelectionDuration; + bool isPatientAdmitted = false; double _latitude; double _longitude; @@ -110,6 +111,11 @@ class ProjectViewModel extends BaseViewModel { notifyListeners(); } + setIsPatientAdmitted(bool isAdmitted) { + this.isPatientAdmitted = isAdmitted; + notifyListeners(); + } + setPrivilegeModelList({List privilege}) { this.isLoginChild = isLoginChild; privilegeRootUser = privilege; diff --git a/lib/pages/landing/fragments/home_page_fragment2.dart b/lib/pages/landing/fragments/home_page_fragment2.dart index 535bd38e..41bd0f9b 100644 --- a/lib/pages/landing/fragments/home_page_fragment2.dart +++ b/lib/pages/landing/fragments/home_page_fragment2.dart @@ -41,7 +41,7 @@ class _HomePageFragment2State extends State { List appoList = []; ApplePayResponse applePayResponse; - bool isPatientAdmitted = true; + // bool isPatientAdmitted = true; @override void initState() { @@ -79,7 +79,7 @@ class _HomePageFragment2State extends State { Widget build(BuildContext context) { projectViewModel = Provider.of(context); - if (isPatientAdmitted) { + if (projectViewModel.isPatientAdmitted) { initialiseInPatientHmgServices(false); } else { initialiseHmgServices(false); @@ -275,7 +275,7 @@ class _HomePageFragment2State extends State { ], ), ), - isPatientAdmitted + projectViewModel.isPatientAdmitted ? Column( children: [ Padding( diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index 1fd3bbda..7d2632e7 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -660,10 +660,28 @@ class _ConfirmLogin extends State { if (result.isNeedUserAgreement == true) { //move to agreement page. } else { + checkIfIsInPatient(); goToHome(); } } + checkIfIsInPatient() { + ClinicListService service = new ClinicListService(); + service.checkIfInPatientAPI(context).then((res) { + if (res['MessageStatus'] == 1) { + if (res['List_PatientAdmissionInfo'].length != 0) { + print("INPATIENT!!!"); + projectViewModel.setIsPatientAdmitted(true); + } else { + print("OUTPATIENT!!!"); + projectViewModel.setIsPatientAdmitted(false); + } + } else {} + }).catchError((err) { + print(err); + }); + } + insertIMEI() { authService.insertDeviceImei(selectedOption).then((value) => {}).catchError((err) { print(err); diff --git a/lib/services/clinic_services/get_clinic_service.dart b/lib/services/clinic_services/get_clinic_service.dart index 5079fc9b..b7ed77bd 100644 --- a/lib/services/clinic_services/get_clinic_service.dart +++ b/lib/services/clinic_services/get_clinic_service.dart @@ -48,17 +48,7 @@ class ClinicListService extends BaseService { var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); Request req = appGlobal.getPublicRequest(); request = { - // "LanguageID": languageID == 'ar' ? 1 : 2, - // "IPAdress": "10.20.10.20", - // "VersionID": req.VersionID, - // "Channel": req.Channel, - // "generalid": 'Cs2020@2016\$2958', - // "PatientOutSA": user.outSA, "IsActiveAppointment": true, - // "DeviceTypeID": req.DeviceTypeID, - // "PatientType": user.patientType, - // "PatientTypeID": user.patientType, - // "SessionID": null }; dynamic localRes; @@ -71,6 +61,22 @@ class ClinicListService extends BaseService { return Future.value(localRes); } + Future checkIfInPatientAPI(context) async { + Map request; + request = { + "IsActiveAppointment": true, + }; + + dynamic localRes; + + await baseAppClient.post(CHECK_IF_INPATIENT, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + Future getProjectsList(context) async { Map request; var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); From e79454973c34aa7cf2b7b056aa855ead99c0fb4f Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 1 May 2023 15:48:10 +0300 Subject: [PATCH 03/49] InPatient API --- lib/config/config.dart | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index 74d43540..6c867ac1 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -20,8 +20,8 @@ var PACKAGES_ORDERS = '/api/orders'; var PACKAGES_ORDER_HISTORY = '/api/orders/items'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; // var BASE_URL = 'http://10.50.100.198:3334/'; -// var BASE_URL = 'https://uat.hmgwebservices.com/'; -var BASE_URL = 'https://hmgwebservices.com/'; + var BASE_URL = 'https://uat.hmgwebservices.com/'; +// var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; // Pharmacy UAT URLs @@ -590,6 +590,9 @@ var CANCEL_PHARMA_LIVECARE_REQUEST = 'https://vcallapi.hmg.com/api/PharmaLiveCar var INSERT_FREE_SLOTS_LOGS = 'Services/Doctors.svc/Rest/InsertDoctorFreeSlotsLogs'; +// Check If InPatient API +var CHECK_IF_INPATIENT = 'Services/Patients.svc/REST/GetInPatientAdmissionInfo'; + class AppGlobal { static var context; From 0e4e2859542f57dc308ef2b8a2be1651eb588ba6 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 9 May 2023 10:16:43 +0300 Subject: [PATCH 04/49] InPatient CR dev --- lib/pages/login/login.dart | 18 ++++++++++++++++++ lib/widgets/drawer/app_drawer_widget.dart | 1 + 2 files changed, 19 insertions(+) diff --git a/lib/pages/login/login.dart b/lib/pages/login/login.dart index c177a1f8..9fd1566f 100644 --- a/lib/pages/login/login.dart +++ b/lib/pages/login/login.dart @@ -350,6 +350,7 @@ class _Login extends State { appointmentRateViewModel .getIsLastAppointmentRatedList() .then((value) => { + checkIfIsInPatient(), getToDoCount(), GifLoaderDialogUtils.hideDialog(context), if (appointmentRateViewModel.isHaveAppointmentNotRate) @@ -391,6 +392,23 @@ class _Login extends State { }); } + checkIfIsInPatient() { + ClinicListService service = new ClinicListService(); + service.checkIfInPatientAPI(context).then((res) { + if (res['MessageStatus'] == 1) { + if (res['List_PatientAdmissionInfo'].length != 0) { + print("INPATIENT!!!"); + projectViewModel.setIsPatientAdmitted(true); + } else { + print("OUTPATIENT!!!"); + projectViewModel.setIsPatientAdmitted(false); + } + } else {} + }).catchError((err) { + print(err); + }); + } + void registerGeoZones() async { await locator().getAllGeoZones(GeoZonesRequestModel()); projectViewModel.platformBridge().registerHmgGeofences(); diff --git a/lib/widgets/drawer/app_drawer_widget.dart b/lib/widgets/drawer/app_drawer_widget.dart index debf1656..31ffa903 100644 --- a/lib/widgets/drawer/app_drawer_widget.dart +++ b/lib/widgets/drawer/app_drawer_widget.dart @@ -547,6 +547,7 @@ class _AppDrawerState extends State { _vitalSignService.weightKg = ""; await _privilegeService.getPrivilege(); projectProvider.setPrivilegeModelList(privilege: _privilegeService.privilegeModelList); + projectProvider.setIsPatientAdmitted(false); var appLanguage = await sharedPref.getString(APP_LANGUAGE); await sharedPref.clear(); await sharedPref.setString(APP_LANGUAGE, appLanguage); From 9d2df00d8706a9eddb98e4a82e55ca930e2c0d05 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 9 May 2023 14:14:28 +0300 Subject: [PATCH 05/49] Get General instructions implemented --- lib/config/config.dart | 3 + lib/core/viewModels/project_view_model.dart | 6 ++ ...t_general_instructions_response_model.dart | 52 +++++++++++ .../general_instructions.dart | 93 +++++++++++++++++++ .../InPatientServices/inpatient_home.dart | 27 +++++- lib/pages/login/confirm-login.dart | 1 + lib/pages/login/login.dart | 1 + .../clinic_services/get_clinic_service.dart | 16 ++++ lib/widgets/drawer/app_drawer_widget.dart | 1 + 9 files changed, 198 insertions(+), 2 deletions(-) create mode 100644 lib/models/InPatientServices/get_general_instructions_response_model.dart create mode 100644 lib/pages/InPatientServices/general_instructions.dart diff --git a/lib/config/config.dart b/lib/config/config.dart index 6c867ac1..5fc169de 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -593,6 +593,9 @@ var INSERT_FREE_SLOTS_LOGS = 'Services/Doctors.svc/Rest/InsertDoctorFreeSlotsLog // Check If InPatient API var CHECK_IF_INPATIENT = 'Services/Patients.svc/REST/GetInPatientAdmissionInfo'; +// Get General Instructions API +var GET_GENERAL_INSTRUCTIONS = 'Services/INPs.svc/REST/getGeneralInstructions'; + class AppGlobal { static var context; diff --git a/lib/core/viewModels/project_view_model.dart b/lib/core/viewModels/project_view_model.dart index 410a862a..0c438fb4 100644 --- a/lib/core/viewModels/project_view_model.dart +++ b/lib/core/viewModels/project_view_model.dart @@ -35,6 +35,7 @@ class ProjectViewModel extends BaseViewModel { bool isLogin = false; int laserSelectionDuration; bool isPatientAdmitted = false; + int inPatientProjectID = 0; double _latitude; double _longitude; @@ -116,6 +117,11 @@ class ProjectViewModel extends BaseViewModel { notifyListeners(); } + setInPatientProjectID(int projectID) { + this.inPatientProjectID = projectID; + notifyListeners(); + } + setPrivilegeModelList({List privilege}) { this.isLoginChild = isLoginChild; privilegeRootUser = privilege; diff --git a/lib/models/InPatientServices/get_general_instructions_response_model.dart b/lib/models/InPatientServices/get_general_instructions_response_model.dart new file mode 100644 index 00000000..e582782d --- /dev/null +++ b/lib/models/InPatientServices/get_general_instructions_response_model.dart @@ -0,0 +1,52 @@ +class GetGeneralInstructions { + int rowID; + int iD; + int projectID; + String text; + String textN; + bool isActive; + int createdBy; + String createdOn; + dynamic editedBy; + dynamic editedOn; + + GetGeneralInstructions( + {this.rowID, + this.iD, + this.projectID, + this.text, + this.textN, + this.isActive, + this.createdBy, + this.createdOn, + this.editedBy, + this.editedOn}); + + GetGeneralInstructions.fromJson(Map json) { + rowID = json['RowID']; + iD = json['ID']; + projectID = json['ProjectID']; + text = json['Text']; + textN = json['TextN']; + isActive = json['IsActive']; + createdBy = json['CreatedBy']; + createdOn = json['CreatedOn']; + editedBy = json['EditedBy']; + editedOn = json['EditedOn']; + } + + Map toJson() { + final Map data = new Map(); + data['RowID'] = this.rowID; + data['ID'] = this.iD; + data['ProjectID'] = this.projectID; + data['Text'] = this.text; + data['TextN'] = this.textN; + data['IsActive'] = this.isActive; + data['CreatedBy'] = this.createdBy; + data['CreatedOn'] = this.createdOn; + data['EditedBy'] = this.editedBy; + data['EditedOn'] = this.editedOn; + return data; + } +} diff --git a/lib/pages/InPatientServices/general_instructions.dart b/lib/pages/InPatientServices/general_instructions.dart new file mode 100644 index 00000000..88f9797d --- /dev/null +++ b/lib/pages/InPatientServices/general_instructions.dart @@ -0,0 +1,93 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_general_instructions_response_model.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +class GeneralInstructions extends StatelessWidget { + List getGeneralInstructionsList; + ProjectViewModel projectViewModel; + + GeneralInstructions({@required this.getGeneralInstructionsList}); + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + showNewAppBarTitle: true, + showNewAppBar: true, + appBarTitle: TranslationBase.of(context).InPatientServicesHeader, + body: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text("General Instructions", + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + )), + ), + Expanded( + child: Container( + width: MediaQuery.of(context).size.width, + child: Card( + elevation: 0.0, + margin: EdgeInsets.all(16), + color: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10), + side: BorderSide(color: Colors.transparent, width: 0.0), + ), + child: Padding( + padding: EdgeInsets.all(16.0), + child: Container( + child: ListView.separated( + itemCount: getGeneralInstructionsList.length, + itemBuilder: (BuildContext context, int index) { + return Container( + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: SvgPicture.asset("assets/images/new-design/ionic-ios-checkmark-circle.svg"), + ), + Container( + width: MediaQuery.of(context).size.width * 0.75, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text(projectViewModel.isArabic ? getGeneralInstructionsList[index].textN : getGeneralInstructionsList[index].text, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + )), + ), + ], + )); + }, + separatorBuilder: (BuildContext context, int index) { + return Padding( + padding: const EdgeInsets.only(left: 14, right: 14), + child: mHeight(16.0), + ); + }, + )), + ), + ), + ), + ) + ], + )); + } +} diff --git a/lib/pages/InPatientServices/inpatient_home.dart b/lib/pages/InPatientServices/inpatient_home.dart index 25c84c35..ea5e0e1d 100644 --- a/lib/pages/InPatientServices/inpatient_home.dart +++ b/lib/pages/InPatientServices/inpatient_home.dart @@ -1,7 +1,12 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_general_instructions_response_model.dart'; +import 'package:diplomaticquarterapp/pages/InPatientServices/general_instructions.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -64,7 +69,7 @@ class InPatientServicesHome extends StatelessWidget { serviceList.add( InkWell( onTap: () { - // Navigator.push(context, FadePage(page: AdvancePaymentPage())); + openGeneralInstructions(context); }, child: MedicalProfileItem( title: TranslationBase.of(context).generalInstructionsTitle, @@ -140,7 +145,25 @@ class InPatientServicesHome extends StatelessWidget { ), ), ); - return serviceList; } + + void openGeneralInstructions(BuildContext context) { + ClinicListService service = new ClinicListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getGeneralInstructions(projectViewModel.inPatientProjectID, context).then((res) { + List getGeneralInstructionsList = []; + + res['generalInstructions'].forEach((v) { + getGeneralInstructionsList.add(new GetGeneralInstructions.fromJson(v)); + }); + + GifLoaderDialogUtils.hideDialog(context); + + print(res['generalInstructions']); + Navigator.push(context, FadePage(page: GeneralInstructions(getGeneralInstructionsList: getGeneralInstructionsList))); + }).catchError((err) { + print(err); + }); + } } diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index 7d2632e7..ac92c2db 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -672,6 +672,7 @@ class _ConfirmLogin extends State { if (res['List_PatientAdmissionInfo'].length != 0) { print("INPATIENT!!!"); projectViewModel.setIsPatientAdmitted(true); + projectViewModel.setInPatientProjectID(res['List_PatientAdmissionInfo'][0]['ProjectID']); } else { print("OUTPATIENT!!!"); projectViewModel.setIsPatientAdmitted(false); diff --git a/lib/pages/login/login.dart b/lib/pages/login/login.dart index 9fd1566f..7507382b 100644 --- a/lib/pages/login/login.dart +++ b/lib/pages/login/login.dart @@ -399,6 +399,7 @@ class _Login extends State { if (res['List_PatientAdmissionInfo'].length != 0) { print("INPATIENT!!!"); projectViewModel.setIsPatientAdmitted(true); + projectViewModel.setInPatientProjectID(res['List_PatientAdmissionInfo'][0]['ProjectID']); } else { print("OUTPATIENT!!!"); projectViewModel.setIsPatientAdmitted(false); diff --git a/lib/services/clinic_services/get_clinic_service.dart b/lib/services/clinic_services/get_clinic_service.dart index b7ed77bd..0ebebfa2 100644 --- a/lib/services/clinic_services/get_clinic_service.dart +++ b/lib/services/clinic_services/get_clinic_service.dart @@ -77,6 +77,22 @@ class ClinicListService extends BaseService { return Future.value(localRes); } + Future getGeneralInstructions(int projectID, context) async { + Map request; + request = { + "ProjectID": projectID + }; + + dynamic localRes; + + await baseAppClient.post(GET_GENERAL_INSTRUCTIONS, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isAllowAny: true); + return Future.value(localRes); + } + Future getProjectsList(context) async { Map request; var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); diff --git a/lib/widgets/drawer/app_drawer_widget.dart b/lib/widgets/drawer/app_drawer_widget.dart index 31ffa903..a4d323b5 100644 --- a/lib/widgets/drawer/app_drawer_widget.dart +++ b/lib/widgets/drawer/app_drawer_widget.dart @@ -548,6 +548,7 @@ class _AppDrawerState extends State { await _privilegeService.getPrivilege(); projectProvider.setPrivilegeModelList(privilege: _privilegeService.privilegeModelList); projectProvider.setIsPatientAdmitted(false); + projectProvider.setInPatientProjectID(0); var appLanguage = await sharedPref.getString(APP_LANGUAGE); await sharedPref.clear(); await sharedPref.setString(APP_LANGUAGE, appLanguage); From 906fd5fd6a7120086b747c8adc2ab5bf77537b71 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 23 May 2023 17:49:54 +0300 Subject: [PATCH 06/49] Inpatient services in dev --- lib/config/config.dart | 4 +- .../inpatient_advance_payment.dart | 65 +++++++++++++ .../InPatientServices/inpatient_home.dart | 77 ++++++++++++--- lib/pages/InPatientServices/meal_plan.dart | 95 +++++++++++++++++++ .../fragments/home_page_fragment2.dart | 6 +- lib/pages/landing/widgets/services_view.dart | 4 + .../medical/medical_profile_item.dart | 5 +- .../others/app_expandable_notifier.dart | 49 +++++----- pubspec.yaml | 1 + 9 files changed, 264 insertions(+), 42 deletions(-) create mode 100644 lib/pages/InPatientServices/inpatient_advance_payment.dart create mode 100644 lib/pages/InPatientServices/meal_plan.dart diff --git a/lib/config/config.dart b/lib/config/config.dart index 1c0caeb9..28d0f6bf 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -20,8 +20,8 @@ var PACKAGES_ORDERS = '/api/orders'; var PACKAGES_ORDER_HISTORY = '/api/orders/items'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; // var BASE_URL = 'http://10.50.100.198:3334/'; -// var BASE_URL = 'https://uat.hmgwebservices.com/'; -var BASE_URL = 'https://hmgwebservices.com/'; + var BASE_URL = 'https://uat.hmgwebservices.com/'; +// var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; diff --git a/lib/pages/InPatientServices/inpatient_advance_payment.dart b/lib/pages/InPatientServices/inpatient_advance_payment.dart new file mode 100644 index 00000000..6ab415a0 --- /dev/null +++ b/lib/pages/InPatientServices/inpatient_advance_payment.dart @@ -0,0 +1,65 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class InPatientAdvancePayment extends StatefulWidget { + const InPatientAdvancePayment({Key key}) : super(key: key); + + @override + State createState() => _InPatientAdvancePaymentState(); +} + +class _InPatientAdvancePaymentState extends State with SingleTickerProviderStateMixin { + TabController _tabController; + ProjectViewModel projectViewModel; + + @override + void initState() { + _tabController = TabController(length: 2, vsync: this); + super.initState(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + showNewAppBarTitle: true, + showNewAppBar: true, + appBarTitle: TranslationBase.of(context).advancePayment, + body: Column( + children: [ + TabBar( + controller: _tabController, + indicatorWeight: 3.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Color(0xff2B353E), + unselectedLabelColor: Color(0xff575757), + labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20), + labelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + unselectedLabelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + tabs: [Text(TranslationBase.of(context).pending), Text(TranslationBase.of(context).close)], + onTap: (index) { + if (index == 1) { + // getOBGyneOrdersList(); + } + }, + ), + ], + ), + ); + } +} diff --git a/lib/pages/InPatientServices/inpatient_home.dart b/lib/pages/InPatientServices/inpatient_home.dart index ea5e0e1d..fbd4bc57 100644 --- a/lib/pages/InPatientServices/inpatient_home.dart +++ b/lib/pages/InPatientServices/inpatient_home.dart @@ -1,6 +1,8 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/InPatientServices/get_general_instructions_response_model.dart'; import 'package:diplomaticquarterapp/pages/InPatientServices/general_instructions.dart'; +import 'package:diplomaticquarterapp/pages/InPatientServices/inpatient_advance_payment.dart'; +import 'package:diplomaticquarterapp/pages/InPatientServices/meal_plan.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; @@ -57,11 +59,11 @@ class InPatientServicesHome extends StatelessWidget { }, child: MedicalProfileItem( title: TranslationBase.of(context).admissionGeneral, - imagePath: 'assets/images/new/consent.jpg', + imagePath: 'admission.svg', subTitle: TranslationBase.of(context).consent, - isPngImage: true, width: 50.0, height: 40.0, + isInPatient: true, ), ), ); @@ -73,11 +75,11 @@ class InPatientServicesHome extends StatelessWidget { }, child: MedicalProfileItem( title: TranslationBase.of(context).generalInstructionsTitle, - imagePath: 'assets/images/new/instructions.jpg', + imagePath: 'general_instructions.svg', subTitle: TranslationBase.of(context).generalInstructionsSubTitle, - isPngImage: true, width: 50.0, height: 40.0, + isInPatient: true, ), ), ); @@ -89,11 +91,11 @@ class InPatientServicesHome extends StatelessWidget { }, child: MedicalProfileItem( title: TranslationBase.of(context).medicalInstructionsTitle, - imagePath: 'assets/images/new/medical_instructions.png', + imagePath: 'medical_instructions.svg', subTitle: TranslationBase.of(context).medicalInstructionsSubTitle, - isPngImage: true, width: 50.0, height: 40.0, + isInPatient: true, ), ), ); @@ -101,15 +103,15 @@ class InPatientServicesHome extends StatelessWidget { serviceList.add( InkWell( onTap: () { - // Navigator.push(context, FadePage(page: AdvancePaymentPage())); + Navigator.push(context, FadePage(page: MealPlanPage())); }, child: MedicalProfileItem( title: TranslationBase.of(context).mealPlanTitle, - imagePath: 'assets/images/new/meal_plan.png', + imagePath: 'meal_plan.svg', subTitle: TranslationBase.of(context).mealPlanSubTitle, - isPngImage: true, width: 50.0, height: 40.0, + isInPatient: true, ), ), ); @@ -121,11 +123,11 @@ class InPatientServicesHome extends StatelessWidget { }, child: MedicalProfileItem( title: TranslationBase.of(context).birthNotificationTitle, - imagePath: 'assets/images/new/birth.png', + imagePath: 'birth_notification.svg', subTitle: TranslationBase.of(context).birthNotificationSubTitle, - isPngImage: true, width: 50.0, height: 40.0, + isInPatient: true, ), ), ); @@ -137,14 +139,63 @@ class InPatientServicesHome extends StatelessWidget { }, child: MedicalProfileItem( title: TranslationBase.of(context).admissionNoticeTitle, - imagePath: 'assets/images/new/admission_notice.png', + imagePath: 'admission_notice.svg', subTitle: TranslationBase.of(context).admissionNoticeSubTitle, - isPngImage: true, width: 50.0, height: 40.0, + isInPatient: true, ), ), ); + + serviceList.add( + InkWell( + onTap: () { + Navigator.push(context, FadePage(page: InPatientAdvancePayment())); + }, + child: MedicalProfileItem( + title: "Advance", + imagePath: 'advance_payment.svg', + subTitle: TranslationBase.of(context).payment, + width: 50.0, + height: 40.0, + isInPatient: true, + ), + ), + ); + + serviceList.add( + InkWell( + onTap: () { + // Navigator.push(context, FadePage(page: AdvancePaymentPage())); + }, + child: MedicalProfileItem( + title: "Receive", + imagePath: 'receive_prescription.svg', + subTitle: TranslationBase.of(context).prescriptions, + width: 50.0, + height: 40.0, + isInPatient: true, + ), + ), + ); + + serviceList.add( + InkWell( + onTap: () { + // Navigator.push(context, FadePage(page: AdvancePaymentPage())); + }, + child: MedicalProfileItem( + title: "Help", + imagePath: 'help_pro.svg', + subTitle: "PRO", + width: 50.0, + height: 40.0, + isInPatient: true, + ), + ), + ); + return serviceList; } diff --git a/lib/pages/InPatientServices/meal_plan.dart b/lib/pages/InPatientServices/meal_plan.dart new file mode 100644 index 00000000..883d3c65 --- /dev/null +++ b/lib/pages/InPatientServices/meal_plan.dart @@ -0,0 +1,95 @@ +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; + +class MealPlanPage extends StatefulWidget { + const MealPlanPage({Key key}) : super(key: key); + + @override + State createState() => _MealPlanPageState(); +} + +class _MealPlanPageState extends State { + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + showNewAppBarTitle: true, + showNewAppBar: true, + appBarTitle: TranslationBase.of(context).mealPlanTitle, + body: SingleChildScrollView( + child: Padding( + padding: EdgeInsets.all(21.0), + child: Column( + children: [ + Container( + decoration: containerRadius(Colors.white, 12), + child: AppExpandableNotifier( + title: "Breakfast TAT: 10:00 AM", + isTitleSingleLine: false, + widgetColor: Colors.transparent, + bodyWidget: Column( + children: [ + getDivider(), + Container( + height: 200.0, + ), + ], + ), + ), + ), + mHeight(21), + Container( + decoration: containerRadius(Colors.white, 12), + child: AppExpandableNotifier( + title: "Lunch TAT: 04:00 PM", + isTitleSingleLine: false, + widgetColor: Colors.transparent, + bodyWidget: Column( + children: [ + getDivider(), + Container( + height: 200.0, + ), + ], + ), + ), + ), + mHeight(21), + Container( + decoration: containerRadius(Colors.white, 12), + child: AppExpandableNotifier( + title: "Dinner TAT: 12:00 AM", + isTitleSingleLine: false, + widgetColor: Colors.transparent, + bodyWidget: Column( + children: [ + getDivider(), + Container( + height: 200.0, + ), + ], + ), + ), + ), + ], + ), + ), + ), + ); + } + + Widget getDivider() { + return Padding( + padding: EdgeInsets.only(left: 15, right: 15), + child: Divider( + height: 1.5, + thickness: 2.0, + color: Colors.black, + ), + ); + } +} diff --git a/lib/pages/landing/fragments/home_page_fragment2.dart b/lib/pages/landing/fragments/home_page_fragment2.dart index 487dac82..24c2c4a0 100644 --- a/lib/pages/landing/fragments/home_page_fragment2.dart +++ b/lib/pages/landing/fragments/home_page_fragment2.dart @@ -70,7 +70,7 @@ class _HomePageFragment2State extends State { // hmgServices.add(new HmgServices(2, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin)); hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin)); hmgServices.add(new HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin)); - hmgServices.add(new HmgServices(5, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin)); + hmgServices.add(new HmgServices(2, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin)); hmgServices.add(new HmgServices(6, TranslationBase.of(context).ereferralTitle, TranslationBase.of(context).ereferralSubtitle, "assets/images/new/E_Referral.svg", isLogin)); hmgServices.add(new HmgServices(7, "H\u2082O", TranslationBase.of(context).dailyWater, "assets/images/new/h2o.svg", isLogin)); hmgServices.add(new HmgServices(8, TranslationBase.of(context).connectTitle, TranslationBase.of(context).connectSubtitle, "assets/images/new/reach_us.svg", isLogin)); @@ -291,7 +291,7 @@ class _HomePageFragment2State extends State { child: AspectRatio( aspectRatio: 2.15, child: ServicesView( - new HmgServices(2, TranslationBase.of(context).InPatient, TranslationBase.of(context).inPatientServices, "assets/images/new/hospital.png", false), 23, true)), + new HmgServices(23, TranslationBase.of(context).InPatient, TranslationBase.of(context).inPatientServices, "assets/images/new/InPatient.svg", false), 23, true)), ), ), Expanded( @@ -299,7 +299,7 @@ class _HomePageFragment2State extends State { child: AspectRatio( aspectRatio: 1.0, child: ServicesView( - new HmgServices(2, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", false), 2, true)), + new HmgServices(5, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", false), 2, true)), ), ], ), diff --git a/lib/pages/landing/widgets/services_view.dart b/lib/pages/landing/widgets/services_view.dart index f1753f3c..9a76e331 100644 --- a/lib/pages/landing/widgets/services_view.dart +++ b/lib/pages/landing/widgets/services_view.dart @@ -21,6 +21,7 @@ import 'package:diplomaticquarterapp/pages/ContactUs/contact_us_page.dart'; import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-location.dart'; import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart'; import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; +import 'package:diplomaticquarterapp/pages/InPatientServices/inpatient_home.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; @@ -190,6 +191,9 @@ class ServicesView extends StatelessWidget { } else if (hmgServices.action == 8) { Navigator.push(context, FadePage(page: ContactUsPage())); locator().hmgServices.logServiceName('find us reach us'); + } else if (hmgServices.action == 23) { + Navigator.push(context, FadePage(page: InPatientServicesHome())); + locator().hmgServices.logServiceName('find us reach us'); } } diff --git a/lib/widgets/data_display/medical/medical_profile_item.dart b/lib/widgets/data_display/medical/medical_profile_item.dart index cfe7f59f..90662299 100644 --- a/lib/widgets/data_display/medical/medical_profile_item.dart +++ b/lib/widgets/data_display/medical/medical_profile_item.dart @@ -10,12 +10,13 @@ class MedicalProfileItem extends StatelessWidget { final String subTitle; final bool hasBadge = false; final bool isPngImage; + final bool isInPatient; bool isEnable; Color imgColor; final width; final height; - MedicalProfileItem({@required this.imagePath, @required this.title, @required this.subTitle, hasBadge, this.isEnable = true, this.imgColor, this.isPngImage = false, this.width, this.height}); + MedicalProfileItem({@required this.imagePath, @required this.title, @required this.subTitle, hasBadge, this.isEnable = true, this.imgColor, this.isPngImage = false, this.width, this.height, this.isInPatient = false}); @override Widget build(BuildContext context) { @@ -50,7 +51,7 @@ class MedicalProfileItem extends StatelessWidget { color: imgColor, ) : SvgPicture.asset( - "assets/images/new/services/$imagePath", + isInPatient ? "assets/images/new/inpatient/$imagePath" : "assets/images/new/services/$imagePath", height: SizeConfig.widthMultiplier * 7, width: SizeConfig.widthMultiplier * 7, color: imgColor, diff --git a/lib/widgets/others/app_expandable_notifier.dart b/lib/widgets/others/app_expandable_notifier.dart index ece72712..0c30b7cd 100644 --- a/lib/widgets/others/app_expandable_notifier.dart +++ b/lib/widgets/others/app_expandable_notifier.dart @@ -20,10 +20,12 @@ class AppExpandableNotifier extends StatefulWidget { bool expandFlag = false; bool hasCounter = false; String counter = "0"; + Color widgetColor = Colors.white; var controller = new ExpandableController(); bool isTitleSingleLine; - AppExpandableNotifier({this.headerWidget, this.bodyWidget, this.title, this.collapsed, this.isExpand = false, this.isTitleSingleLine = true, this.hasCounter = false, this.counter = "0"}); + AppExpandableNotifier( + {this.headerWidget, this.bodyWidget, this.title, this.collapsed, this.isExpand = false, this.isTitleSingleLine = true, this.hasCounter = false, this.counter = "0", this.widgetColor}); _AppExpandableNotifier createState() => _AppExpandableNotifier(); } @@ -60,7 +62,7 @@ class _AppExpandableNotifier extends State { } return ExpandableNotifier( child: Container( - color: Colors.white, + color: widget.widgetColor != null ? widget.widgetColor : Colors.white, child: Column( children: [ SizedBox( @@ -93,27 +95,30 @@ class _AppExpandableNotifier extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ if (_mainTitle.isNotEmpty && widget.isTitleSingleLine) - !widget.hasCounter ? - Text( - _mainTitle, - style: TextStyle(fontSize: 20, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.72, height: 1), - ) : Row( - children: [ - Text( - _mainTitle, - style: TextStyle(fontSize: 20, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.72, height: 1), - ), - SizedBox(width: 10.0,), - CircleAvatar( - backgroundColor: CustomColors.accentColor, - radius: 12.0, - child: Text( - widget.counter, - style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.72), + !widget.hasCounter + ? Text( + _mainTitle, + style: TextStyle(fontSize: 20, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.72, height: 1), + ) + : Row( + children: [ + Text( + _mainTitle, + style: TextStyle(fontSize: 20, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.72, height: 1), + ), + SizedBox( + width: 10.0, + ), + CircleAvatar( + backgroundColor: CustomColors.accentColor, + radius: 12.0, + child: Text( + widget.counter, + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.72), + ), + ) + ], ), - ) - ], - ), if (_title.isNotEmpty && !widget.isTitleSingleLine) Text( _title, diff --git a/pubspec.yaml b/pubspec.yaml index 39370e58..7fa86972 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -253,6 +253,7 @@ flutter: - assets/payment_options/ - assets/images/new/ + - assets/images/new/inpatient/ - assets/images/new/mass/ - assets/images/new/bottom_nav/ - assets/images/new/services/ From b64ba9211e7a7d9c4564905326b363ecde992028 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 24 May 2023 11:22:08 +0300 Subject: [PATCH 07/49] Inpatient services in dev --- .../general_instructions.dart | 2 +- lib/pages/InPatientServices/help_PRO.dart | 135 ++++++++++++++++++ .../inpatient_advance_payment.dart | 17 ++- .../InPatientServices/inpatient_home.dart | 21 ++- 4 files changed, 164 insertions(+), 11 deletions(-) create mode 100644 lib/pages/InPatientServices/help_PRO.dart diff --git a/lib/pages/InPatientServices/general_instructions.dart b/lib/pages/InPatientServices/general_instructions.dart index 88f9797d..ead96e42 100644 --- a/lib/pages/InPatientServices/general_instructions.dart +++ b/lib/pages/InPatientServices/general_instructions.dart @@ -27,7 +27,7 @@ class GeneralInstructions extends StatelessWidget { mainAxisSize: MainAxisSize.min, children: [ Padding( - padding: const EdgeInsets.all(8.0), + padding: const EdgeInsets.all(21.0), child: Text("General Instructions", overflow: TextOverflow.clip, style: TextStyle( diff --git a/lib/pages/InPatientServices/help_PRO.dart b/lib/pages/InPatientServices/help_PRO.dart new file mode 100644 index 00000000..954550ef --- /dev/null +++ b/lib/pages/InPatientServices/help_PRO.dart @@ -0,0 +1,135 @@ +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; + +class HelpPRO extends StatefulWidget { + const HelpPRO({Key key}) : super(key: key); + + @override + State createState() => _HelpPROState(); +} + +class _HelpPROState extends State { + + TextEditingController assistText = new TextEditingController(); + + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + showNewAppBarTitle: true, + showNewAppBar: true, + appBarTitle: "Patient Relation Officer", + body: SingleChildScrollView( + child: Container( + width: MediaQuery.of(context).size.width, + decoration: containerRadius(Colors.white, 12), + margin: EdgeInsets.all(21.0), + padding: const EdgeInsets.all(21.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "How we may assist you?", + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + mHeight(16), + inputWidget(TranslationBase.of(context).enterDetails, "", assistText), + ], + ), + ), + ), + ); + } + + Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String prefix, bool isEnable = true, bool hasSelection = false}) { + return Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: hasSelection ? () {} : null, + child: Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _labelText, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + TextField( + enabled: isEnable, + scrollPadding: EdgeInsets.zero, + keyboardType: TextInputType.name, + controller: _controller, + onChanged: (value) => {}, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + decoration: InputDecoration( + isDense: true, + hintText: _hintText, + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + prefixIconConstraints: BoxConstraints(minWidth: 50), + prefixIcon: prefix == null + ? null + : Text( + "+" + prefix, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w500, + color: Color(0xff2E303A), + letterSpacing: -0.56, + ), + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined), + ], + ), + ), + ); + } + +} diff --git a/lib/pages/InPatientServices/inpatient_advance_payment.dart b/lib/pages/InPatientServices/inpatient_advance_payment.dart index 6ab415a0..85965b73 100644 --- a/lib/pages/InPatientServices/inpatient_advance_payment.dart +++ b/lib/pages/InPatientServices/inpatient_advance_payment.dart @@ -51,13 +51,18 @@ class _InPatientAdvancePaymentState extends State with fontWeight: FontWeight.w600, letterSpacing: -0.48, ), - tabs: [Text(TranslationBase.of(context).pending), Text(TranslationBase.of(context).close)], - onTap: (index) { - if (index == 1) { - // getOBGyneOrdersList(); - } - }, + tabs: [Text(TranslationBase.of(context).pending), Text(TranslationBase.of(context).paid)], ), + Expanded( + child: TabBarView( + physics: BouncingScrollPhysics(), + controller: _tabController, + children: [ + Container(), + Container(), + ], + ), + ) ], ), ); diff --git a/lib/pages/InPatientServices/inpatient_home.dart b/lib/pages/InPatientServices/inpatient_home.dart index fbd4bc57..3e82e872 100644 --- a/lib/pages/InPatientServices/inpatient_home.dart +++ b/lib/pages/InPatientServices/inpatient_home.dart @@ -1,12 +1,14 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/InPatientServices/get_general_instructions_response_model.dart'; import 'package:diplomaticquarterapp/pages/InPatientServices/general_instructions.dart'; +import 'package:diplomaticquarterapp/pages/InPatientServices/help_PRO.dart'; import 'package:diplomaticquarterapp/pages/InPatientServices/inpatient_advance_payment.dart'; import 'package:diplomaticquarterapp/pages/InPatientServices/meal_plan.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; @@ -168,6 +170,7 @@ class InPatientServicesHome extends StatelessWidget { InkWell( onTap: () { // Navigator.push(context, FadePage(page: AdvancePaymentPage())); + receivePrescriptionAPI(context); }, child: MedicalProfileItem( title: "Receive", @@ -183,7 +186,7 @@ class InPatientServicesHome extends StatelessWidget { serviceList.add( InkWell( onTap: () { - // Navigator.push(context, FadePage(page: AdvancePaymentPage())); + Navigator.push(context, FadePage(page: HelpPRO())); }, child: MedicalProfileItem( title: "Help", @@ -199,18 +202,28 @@ class InPatientServicesHome extends StatelessWidget { return serviceList; } + void receivePrescriptionAPI(BuildContext context) { + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: TranslationBase.of(context).successSendReport, + okText: TranslationBase.of(context).ok, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: () { + Navigator.of(context).pop(); + }, + cancelFunction: () => {}); + dialog.showAlertDialog(context); + } + void openGeneralInstructions(BuildContext context) { ClinicListService service = new ClinicListService(); GifLoaderDialogUtils.showMyDialog(context); service.getGeneralInstructions(projectViewModel.inPatientProjectID, context).then((res) { List getGeneralInstructionsList = []; - res['generalInstructions'].forEach((v) { getGeneralInstructionsList.add(new GetGeneralInstructions.fromJson(v)); }); - GifLoaderDialogUtils.hideDialog(context); - print(res['generalInstructions']); Navigator.push(context, FadePage(page: GeneralInstructions(getGeneralInstructionsList: getGeneralInstructionsList))); }).catchError((err) { From 7280e2a1d7e86276c2cc7835e7a0c262b2eab3aa Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Thu, 25 May 2023 12:45:02 +0300 Subject: [PATCH 08/49] Birth Notification UI Implemented --- lib/config/localized_values.dart | 70 +++-- .../InPatientServices/birth_notification.dart | 273 ++++++++++++++++++ .../InPatientServices/inpatient_home.dart | 3 +- .../AttachInsuranceCardImageDialog.dart | 43 +-- lib/uitl/translations_delegate_base.dart | 9 + lib/widgets/bottom_options/BottomSheet.dart | 2 +- 6 files changed, 355 insertions(+), 45 deletions(-) create mode 100644 lib/pages/InPatientServices/birth_notification.dart diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 5580da41..a81a5320 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1844,39 +1844,51 @@ const Map localizedValues = { "privacyPolicy": {"en": "Privacy Policy", "ar": "سياسة الخصوصية"}, "termsConditions": {"en": "Terms & Conditions", "ar": "الأحكام والشروط"}, "prescriptionDeliveryError": {"en": "This clinic does not support refill & delivery.", "ar": "هذه العيادة لا تدعم إعادة التعبئة والتسليم."}, - "liveCarePermissions": {"en": "LiveCare requires Camera, Microphone & Location permissions to enable virtual consultation between patient & doctor, Please allow these to proceed.", "ar": "يتطلب لايف كير أذونات الكاميرا والميكروفون والموقع، يرجى السماح لها بالمتابعة."}, - "lakumUnhold": { "en": "The account has already been activated", "ar": "لقد تم تفعيل الحساب من قبل" }, - "lakumDiscontinue": { "en": "The account is closed", "ar": "الحساب مغلق" }, - "lakumSuccess": { "en": "The account has been activated successfully", "ar": "تم تفعيل الحساب بنجاح" }, - "deleteAccount": { "en": "Deactivate Account", "ar": "ايقاف الحساب مؤقتاً" }, - "deactivateAccount": { "en": "Are you sure you want to deactivate your account?", "ar": "هل أنت متأكد أنك تريد ايقاف الحساب مؤقتاً حسابك؟" }, - "accountDeactivated": { "en": "Your account has been deactivated successfully", "ar": "تم ايقاف الحساب مؤقتاً بنجاح." }, - "accountDeactivatedMsg": { "en": "Your account has been deactivated. Would you like to reactivate it?", "ar": "حسابك معطل. هل ترغب في إعادة تنشيطه مرة أخرى؟" }, - "updateInsuranceManually": { "en": "Update Insurance Manually", "ar": "تحديث التأمين يدويا" }, - "or": { "en": "Update Insurance Manually", "ar": "تحديث التأمين يدويا" }, - "enterInsuranceDetails": { "en": "Please enter your insurance card details below:", "ar": "الرجاء إدخال تفاصيل بطاقة التأمين الخاصة بك أدناه:" }, - "cardHolderName": { "en": "Card Holder Name", "ar": "إسم صاحب البطاقة" }, - "membershipNo": { "en": "Membership No.", "ar": "رقم العضوية" }, - "policyNo": { "en": "Policy No.", "ar": "رقم وثيقة التأمين" }, - "paymentOnly": { "en": "Payment", "ar": "معلقة" }, - "pendingOnly": { "en": "Pending", "ar": "مدفوعات" }, - "insuranceClassName": { "en": "Insurance Class", "ar": "فئة التأمين" }, - "insuranceRequestSubmit": { "en": "Your insurance update request has been submitted successfully.", "ar": "تم تقديم طلب تحديث التأمين الخاص بك بنجاح." }, - "NFCNotSupported": { "en": "Your device does not support NFC. Please visit reception to Check-In", "ar": "جهازك لا يدعم NFC. يرجى زيارة مكتب الاستقبال لتسجيل الوصول" }, + "liveCarePermissions": { + "en": "LiveCare requires Camera, Microphone & Location permissions to enable virtual consultation between patient & doctor, Please allow these to proceed.", + "ar": "يتطلب لايف كير أذونات الكاميرا والميكروفون والموقع، يرجى السماح لها بالمتابعة." + }, + "lakumUnhold": {"en": "The account has already been activated", "ar": "لقد تم تفعيل الحساب من قبل"}, + "lakumDiscontinue": {"en": "The account is closed", "ar": "الحساب مغلق"}, + "lakumSuccess": {"en": "The account has been activated successfully", "ar": "تم تفعيل الحساب بنجاح"}, + "deleteAccount": {"en": "Deactivate Account", "ar": "ايقاف الحساب مؤقتاً"}, + "deactivateAccount": {"en": "Are you sure you want to deactivate your account?", "ar": "هل أنت متأكد أنك تريد ايقاف الحساب مؤقتاً حسابك؟"}, + "accountDeactivated": {"en": "Your account has been deactivated successfully", "ar": "تم ايقاف الحساب مؤقتاً بنجاح."}, + "accountDeactivatedMsg": {"en": "Your account has been deactivated. Would you like to reactivate it?", "ar": "حسابك معطل. هل ترغب في إعادة تنشيطه مرة أخرى؟"}, + "updateInsuranceManually": {"en": "Update Insurance Manually", "ar": "تحديث التأمين يدويا"}, + "or": {"en": "Update Insurance Manually", "ar": "تحديث التأمين يدويا"}, + "enterInsuranceDetails": {"en": "Please enter your insurance card details below:", "ar": "الرجاء إدخال تفاصيل بطاقة التأمين الخاصة بك أدناه:"}, + "cardHolderName": {"en": "Card Holder Name", "ar": "إسم صاحب البطاقة"}, + "membershipNo": {"en": "Membership No.", "ar": "رقم العضوية"}, + "policyNo": {"en": "Policy No.", "ar": "رقم وثيقة التأمين"}, + "paymentOnly": {"en": "Payment", "ar": "معلقة"}, + "pendingOnly": {"en": "Pending", "ar": "مدفوعات"}, + "insuranceClassName": {"en": "Insurance Class", "ar": "فئة التأمين"}, + "insuranceRequestSubmit": {"en": "Your insurance update request has been submitted successfully.", "ar": "تم تقديم طلب تحديث التأمين الخاص بك بنجاح."}, + "NFCNotSupported": {"en": "Your device does not support NFC. Please visit reception to Check-In", "ar": "جهازك لا يدعم NFC. يرجى زيارة مكتب الاستقبال لتسجيل الوصول"}, "enter-workplace-name": {"en": "Please enter your workplace name:", "ar": "رجاء إدخال مكان العمل:"}, "workplaceName": {"en": "Workplace name:", "ar": "مكان العمل:"}, "callLiveCareSupport": {"en": "Call LiveCare Support", "ar": "اتصل بدعم اللايف كير"}, - "needApproval": {"en": "Your sick leave is under process in medical administration, you will be notified once approved.", "ar": "جازتك المرضية تحت الإجراء في الإدارة الطبية ، سوف يتم إشعارك فور الموافقه عليها."}, + "needApproval": { + "en": "Your sick leave is under process in medical administration, you will be notified once approved.", + "ar": "جازتك المرضية تحت الإجراء في الإدارة الطبية ، سوف يتم إشعارك فور الموافقه عليها." + }, "pendingActivation": {"en": "Pending Activation", "ar": "في انتظار التنشيط"}, "awaitingApproval": {"en": "Awaiting Approval", "ar": "انتظر القبول"}, "liveCareSupportContact": {"en": "LiveCare Support Contact: ", "ar": "اتصل لايف كير: "}, "pharmaLiveCare": {"en": "Pharma LiveCare", "ar": "لايف كير الصيدلية"}, "pharmaLiveCare1": {"en": "What is Pharma LiveCare?", "ar": "ما هولايف كير الصيدلية؟"}, - "pharmaLiveCareDesc1": {"en": "Pharma LiveCare allows you to get consultation from your doctor virtually being in HMG Pharmacy booth.", "ar": "تتيح لك خدمة لايف كير الصيدلية الحصول على استشارة من طبيبك المتواجد فعليًا في كشك صيدلية د.سليمان الحبيب."}, + "pharmaLiveCareDesc1": { + "en": "Pharma LiveCare allows you to get consultation from your doctor virtually being in HMG Pharmacy booth.", + "ar": "تتيح لك خدمة لايف كير الصيدلية الحصول على استشارة من طبيبك المتواجد فعليًا في كشك صيدلية د.سليمان الحبيب." + }, "wherePharmaLiveCare": {"en": "Where can i find Pharma LiveCare?", "ar": "أين يمكنني أن أجد لايف كير الصيدلية؟"}, "pharmaLiveCareDesc2": {"en": "You can find the booth in HMG Pharmacies.", "ar": "يمكنك العثور على الكشك في صيدليات مستشفى د.سليمان الحبيب."}, "howPharmaLiveCare": {"en": "How can i use Pharma LiveCare?", "ar": "كيف يمكنني استخدام لايف كير الصيدلية؟"}, - "pharmaLiveCareDesc3": {"en": "Following the below steps you can easily benefit from the virtual consultation service:", "ar": "باتباع الخطوات التالية يمكنك الاستفادة بسهولة من خدمة الاستشارة الافتراضية:"}, + "pharmaLiveCareDesc3": { + "en": "Following the below steps you can easily benefit from the virtual consultation service:", + "ar": "باتباع الخطوات التالية يمكنك الاستفادة بسهولة من خدمة الاستشارة الافتراضية:" + }, "pharmaLiveCareScanQR": {"en": "Scan QR Code", "ar": "مسح رمز الاستجابة السريعة"}, "pharmaLiveCareScanQR1": {"en": "Scan the QR Code in the booth to make the connection", "ar": "امسح رمز الاستجابة السريعة في المقصورة لإجراء الاتصال"}, "pharmaLiveCareMakePayment": {"en": "Make Payment Online", "ar": "قم بالدفع عبر الإنترنت"}, @@ -1898,4 +1910,16 @@ const Map localizedValues = { "birthNotificationSubTitle": {"en": "Notification", "ar": "تبليغ الولادة"}, "admissionNoticeTitle": {"en": "Admission", "ar": "إشعار"}, "admissionNoticeSubTitle": {"en": "Notice", "ar": "تنويم"}, -}; \ No newline at end of file + "mothersMRN": {"en": "Mother's MRN", "ar": "رقم ملف الأم"}, + "mothersName": {"en": "Mother's Name", "ar": "اسم الأم"}, + "fathersName": {"en": "Father's Name", "ar": "اسم الاب"}, + "babysName": {"en": "Baby's Name", "ar": "اسم المولود"}, + "contactNumber": {"en": "Contact Number", "ar": "رقم الاتصال"}, + "scanID": {"en": "Scan ID", "ar": "معرف المسح"}, + "birthNotificationNotes1": { + "en": "For Saudis: Provide copy of the identification card for both couples. If the wife doesn't have identification card, The family card must be provided.", + "ar": "للسعوديين : إرفاق صورة من بطاقة الأحوال لكلا الزوجين وفي حال عدم توفر بطاقة الزوجة ترفق عنها بطاقة العائلة" + }, + "birthNotificationNotes2": {"en": "Non Saudis: Provide copy of iqama or copy of the passport.", "ar": ".لغير السعوديين : إرفاق صورة الإقامة آأو جواز السفر"}, + "birthNotificationNotes3": {"en": "For Residents without identification card: Provide marriage contract", "ar": "للمواطنين الغير حاملين لبطاقة الأحوال : إرفاق صورة من عقد الزواج برقم الحاسب"}, +}; diff --git a/lib/pages/InPatientServices/birth_notification.dart b/lib/pages/InPatientServices/birth_notification.dart new file mode 100644 index 00000000..4125261a --- /dev/null +++ b/lib/pages/InPatientServices/birth_notification.dart @@ -0,0 +1,273 @@ +import 'dart:convert'; + +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/insurance/AttachInsuranceCardImageDialog.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class BirthNotification extends StatefulWidget { + const BirthNotification({Key key}) : super(key: key); + + @override + State createState() => _BirthNotificationState(); +} + +class _BirthNotificationState extends State { + TextEditingController motherMRN = new TextEditingController(); + TextEditingController motherName = new TextEditingController(); + TextEditingController fatherName = new TextEditingController(); + TextEditingController babyName = new TextEditingController(); + TextEditingController contactNumber = new TextEditingController(); + + ProjectViewModel projectViewModel; + + List images = []; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + motherMRN.text = projectViewModel.user.patientID.toString(); + motherName.text = projectViewModel.user.firstName + " " + projectViewModel.user.lastName; + contactNumber.text = projectViewModel.user.mobileNumber; + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + showNewAppBarTitle: true, + showNewAppBar: true, + appBarTitle: TranslationBase.of(context).birthNotificationTitle + " " + TranslationBase.of(context).birthNotificationSubTitle, + body: SingleChildScrollView( + child: Container( + width: MediaQuery.of(context).size.width, + decoration: containerRadius(Colors.white, 12), + margin: EdgeInsets.all(21.0), + padding: const EdgeInsets.all(21.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).enterDetailBelow + " :", + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + mHeight(16), + inputWidget(TranslationBase.of(context).mothersMRN, "", motherMRN, isEnable: false), + mHeight(16), + inputWidget(TranslationBase.of(context).mothersName, "", motherName, isEnable: false), + mHeight(16), + inputWidget(TranslationBase.of(context).fathersName, "", fatherName), + mHeight(16), + inputWidget(TranslationBase.of(context).babysName, "", babyName), + mHeight(16), + inputWidget(TranslationBase.of(context).contactNumber, "", contactNumber), + mHeight(16), + DefaultButton( + TranslationBase.of(context).scanID, + () { + confirmAttachInsuranceCardImageDialogDialog( + context: context, name: projectViewModel.user.firstName + " " + projectViewModel.user.lastName, fileNo: projectViewModel.user.patientID.toString()); + }, + color: CustomColors.accentColor, + disabledColor: CustomColors.grey2, + ), + if (images.isNotEmpty) mHeight(16), + if (images.isNotEmpty) + Padding( + padding: const EdgeInsets.only(top: 16.0, bottom: 16.0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Image.memory( + base64Decode(images[0]), + width: 80.0, + height: 80.0, + fit: BoxFit.cover, + ), + Text( + "image 1.png", + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + InkWell( + onTap: () { + setState(() { + images.clear(); + }); + }, + child: Icon( + Icons.delete_sharp, + color: Colors.red[300], + ), + ) + ], + ), + ), + mHeight(16), + Text( + "● " + TranslationBase.of(context).birthNotificationNotes1, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + mHeight(16), + Text( + "● " + TranslationBase.of(context).birthNotificationNotes2, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + mHeight(16), + Text( + "● " + TranslationBase.of(context).birthNotificationNotes3, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + mHeight(16.0), + DefaultButton( + TranslationBase.of(context).submit, + () {}, + color: CustomColors.accentColor, + disabledColor: CustomColors.grey2, + ), + ], + ), + ), + ), + ); + } + + void confirmAttachInsuranceCardImageDialogDialog({BuildContext context, String name, String fileNo}) { + showDialog( + context: context, + builder: (cxt) => AttachInsuranceCardImageDialog( + fileNo: fileNo, + name: name, + image: (file, image) async { + images.clear(); + images.add(image); + setState(() {}); + // GifLoaderDialogUtils.showMyDialog(context); + // await model.uploadInsuranceCard(context, patientIdentificationID: patientIdentificationID, patientID: patientID, image: image); + // GifLoaderDialogUtils.hideDialog(context); + // if (model.state == ViewState.ErrorLocal || model.state == ViewState.Error) { + // AppToast.showErrorToast(message: model.error); + // } else { + // AppToast.showSuccessToast(message: TranslationBase.of(context).requestSent); + // } + // Navigator.pop(context); + }, + isBirthNotification: true, + ), + ); + } + + Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String prefix, bool isEnable = true, bool hasSelection = false}) { + return Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: hasSelection ? () {} : null, + child: Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _labelText, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + TextField( + enabled: isEnable, + scrollPadding: EdgeInsets.zero, + keyboardType: TextInputType.name, + controller: _controller, + onChanged: (value) => {}, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + decoration: InputDecoration( + isDense: true, + hintText: _hintText, + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + prefixIconConstraints: BoxConstraints(minWidth: 50), + prefixIcon: prefix == null + ? null + : Text( + "+" + prefix, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w500, + color: Color(0xff2E303A), + letterSpacing: -0.56, + ), + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined), + ], + ), + ), + ); + } +} diff --git a/lib/pages/InPatientServices/inpatient_home.dart b/lib/pages/InPatientServices/inpatient_home.dart index 3e82e872..eeba37ab 100644 --- a/lib/pages/InPatientServices/inpatient_home.dart +++ b/lib/pages/InPatientServices/inpatient_home.dart @@ -1,5 +1,6 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/InPatientServices/get_general_instructions_response_model.dart'; +import 'package:diplomaticquarterapp/pages/InPatientServices/birth_notification.dart'; import 'package:diplomaticquarterapp/pages/InPatientServices/general_instructions.dart'; import 'package:diplomaticquarterapp/pages/InPatientServices/help_PRO.dart'; import 'package:diplomaticquarterapp/pages/InPatientServices/inpatient_advance_payment.dart'; @@ -121,7 +122,7 @@ class InPatientServicesHome extends StatelessWidget { serviceList.add( InkWell( onTap: () { - // Navigator.push(context, FadePage(page: AdvancePaymentPage())); + Navigator.push(context, FadePage(page: BirthNotification())); }, child: MedicalProfileItem( title: TranslationBase.of(context).birthNotificationTitle, diff --git a/lib/pages/insurance/AttachInsuranceCardImageDialog.dart b/lib/pages/insurance/AttachInsuranceCardImageDialog.dart index e7d57363..e0936c30 100644 --- a/lib/pages/insurance/AttachInsuranceCardImageDialog.dart +++ b/lib/pages/insurance/AttachInsuranceCardImageDialog.dart @@ -14,8 +14,9 @@ class AttachInsuranceCardImageDialog extends StatefulWidget { final String name; final String fileNo; final Function(File file, String image) image; + final bool isBirthNotification; - const AttachInsuranceCardImageDialog({Key key, this.name, this.fileNo, this.image}) : super(key: key); + const AttachInsuranceCardImageDialog({Key key, this.name, this.fileNo, this.image, this.isBirthNotification = false}) : super(key: key); @override _AttachInsuranceCardImageDialogState createState() => _AttachInsuranceCardImageDialogState(); @@ -38,7 +39,7 @@ class _AttachInsuranceCardImageDialogState extends State localizedValues["birthNotificationSubTitle"][locale.languageCode]; String get admissionNoticeTitle => localizedValues["admissionNoticeTitle"][locale.languageCode]; String get admissionNoticeSubTitle => localizedValues["admissionNoticeSubTitle"][locale.languageCode]; + String get mothersMRN => localizedValues["mothersMRN"][locale.languageCode]; + String get mothersName => localizedValues["mothersName"][locale.languageCode]; + String get fathersName => localizedValues["fathersName"][locale.languageCode]; + String get babysName => localizedValues["babysName"][locale.languageCode]; + String get contactNumber => localizedValues["contactNumber"][locale.languageCode]; + String get scanID => localizedValues["scanID"][locale.languageCode]; + String get birthNotificationNotes1 => localizedValues["birthNotificationNotes1"][locale.languageCode]; + String get birthNotificationNotes2 => localizedValues["birthNotificationNotes2"][locale.languageCode]; + String get birthNotificationNotes3 => localizedValues["birthNotificationNotes3"][locale.languageCode]; } diff --git a/lib/widgets/bottom_options/BottomSheet.dart b/lib/widgets/bottom_options/BottomSheet.dart index 5399a4c3..72349e82 100644 --- a/lib/widgets/bottom_options/BottomSheet.dart +++ b/lib/widgets/bottom_options/BottomSheet.dart @@ -70,7 +70,7 @@ class ImageOptions { } galleryImageAndroid(Function(String, File) image) async { - if(await PermissionService.isExternalStorageEnabled()) { + if (await PermissionService.isExternalStorageEnabled()) { File _image = File((await ImagePicker.platform.pickImage(source: ImageSource.gallery, imageQuality: 20)).path); String fileName = _image.path; final bytes = File(fileName).readAsBytesSync(); From e098705374b3d70e2c018080b3f2d728e238aa5c Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Thu, 25 May 2023 15:29:48 +0300 Subject: [PATCH 09/49] localized strings --- lib/config/localized_values.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index a81a5320..530da395 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1920,6 +1920,6 @@ const Map localizedValues = { "en": "For Saudis: Provide copy of the identification card for both couples. If the wife doesn't have identification card, The family card must be provided.", "ar": "للسعوديين : إرفاق صورة من بطاقة الأحوال لكلا الزوجين وفي حال عدم توفر بطاقة الزوجة ترفق عنها بطاقة العائلة" }, - "birthNotificationNotes2": {"en": "Non Saudis: Provide copy of iqama or copy of the passport.", "ar": ".لغير السعوديين : إرفاق صورة الإقامة آأو جواز السفر"}, - "birthNotificationNotes3": {"en": "For Residents without identification card: Provide marriage contract", "ar": "للمواطنين الغير حاملين لبطاقة الأحوال : إرفاق صورة من عقد الزواج برقم الحاسب"}, + "birthNotificationNotes2": {"en": "Non Saudis: Provide copy of iqama or copy of the passport.", "ar": "لغير السعوديين : إرفاق صورة الإقامة آأو جواز السفر"}, + "birthNotificationNotes3": {"en": "For Residents without identification card: Provide marriage contract.", "ar": "للمواطنين الغير حاملين لبطاقة الأحوال : إرفاق صورة من عقد الزواج برقم الحاسب"}, }; From 078482c21d77c395a04cb2a7dfda07d2fa1e24df Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 6 Jun 2023 11:31:37 +0300 Subject: [PATCH 10/49] updates --- lib/config/config.dart | 3 + lib/core/viewModels/project_view_model.dart | 32 ++++++---- .../get_admission_info_response_model.dart | 60 +++++++++++++++++++ lib/pages/InPatientServices/help_PRO.dart | 49 +++++++++++---- .../InPatientServices/inpatient_home.dart | 14 +++++ lib/pages/login/confirm-login.dart | 4 ++ lib/pages/login/login.dart | 4 ++ .../clinic_services/get_clinic_service.dart | 48 +++++++++++---- 8 files changed, 181 insertions(+), 33 deletions(-) create mode 100644 lib/models/InPatientServices/get_admission_info_response_model.dart diff --git a/lib/config/config.dart b/lib/config/config.dart index 28d0f6bf..1047ec66 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -599,6 +599,9 @@ var CHECK_IF_INPATIENT = 'Services/Patients.svc/REST/GetInPatientAdmissionInfo'; // Get General Instructions API var GET_GENERAL_INSTRUCTIONS = 'Services/INPs.svc/REST/getGeneralInstructions'; + +var INSERT_INPATIENT_ORDER = 'Services/INPs.svc/REST/Inpcp_insertOrder'; + class AppGlobal { static var context; diff --git a/lib/core/viewModels/project_view_model.dart b/lib/core/viewModels/project_view_model.dart index f5e3f802..6c78da7f 100644 --- a/lib/core/viewModels/project_view_model.dart +++ b/lib/core/viewModels/project_view_model.dart @@ -9,14 +9,15 @@ import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/models/Appointments/laser_body_parts.dart'; import 'package:diplomaticquarterapp/models/Authentication/register_info_response.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_info_response_model.dart'; import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter_datetime_picker/flutter_datetime_picker.dart'; var isAppArabic = false; -class ProjectViewModel extends BaseViewModel { +class ProjectViewModel extends BaseViewModel { GAnalytics get analytics => locator(); // Platform Bridge @@ -37,14 +38,19 @@ class ProjectViewModel extends BaseViewModel { int laserSelectionDuration; bool isPatientAdmitted = false; int inPatientProjectID = 0; + GetAdmissionInfoResponseModel getAdmissionInfoResponseModel; double _latitude; double _longitude; - RegisterInfoResponse _registerInfo =RegisterInfoResponse(); + RegisterInfoResponse _registerInfo = RegisterInfoResponse(); + double get latitude => _latitude; + double get longitude => _longitude; - RegisterInfoResponse get registerInfo=> _registerInfo; + + RegisterInfoResponse get registerInfo => _registerInfo; + dynamic get searchValue => searchvalue; Locale get appLocal => _appLocale; @@ -57,8 +63,7 @@ class ProjectViewModel extends BaseViewModel { List privilegeRootUser = List(); List privilegeChildUser = List(); - List get privileges => - isLoginChild ? privilegeChildUser : privilegeChildUser; + List get privileges => isLoginChild ? privilegeChildUser : privilegeChildUser; List selectedBodyPartList = []; @@ -66,9 +71,7 @@ class ProjectViewModel extends BaseViewModel { ProjectViewModel() { loadSharedPrefLanguage(); - subscription = Connectivity() - .onConnectivityChanged - .listen((ConnectivityResult result) { + subscription = Connectivity().onConnectivityChanged.listen((ConnectivityResult result) { switch (result) { case ConnectivityResult.wifi: isInternetConnection = true; @@ -91,8 +94,7 @@ class ProjectViewModel extends BaseViewModel { } Future loadSharedPrefLanguage() async { - currentLanguage = - await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); + currentLanguage = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); _appLocale = Locale(currentLanguage); isAppArabic = _isArabic = currentLanguage == 'ar'; notifyListeners(); @@ -124,6 +126,11 @@ class ProjectViewModel extends BaseViewModel { notifyListeners(); } + setInPatientAdmissionInfo(GetAdmissionInfoResponseModel _getAdmissionInfoResponseModel) { + this.getAdmissionInfoResponseModel = _getAdmissionInfoResponseModel; + notifyListeners(); + } + setPrivilegeModelList({List privilege}) { this.isLoginChild = isLoginChild; privilegeRootUser = privilege; @@ -178,8 +185,9 @@ class ProjectViewModel extends BaseViewModel { searchvalue = data; notifyListeners(); } - setRegisterData(RegisterInfoResponse data){ - _registerInfo =data; + + setRegisterData(RegisterInfoResponse data) { + _registerInfo = data; notifyListeners(); } } diff --git a/lib/models/InPatientServices/get_admission_info_response_model.dart b/lib/models/InPatientServices/get_admission_info_response_model.dart new file mode 100644 index 00000000..118f8737 --- /dev/null +++ b/lib/models/InPatientServices/get_admission_info_response_model.dart @@ -0,0 +1,60 @@ +class GetAdmissionInfoResponseModel { + int admissionNo; + String admissionDate; + String infotainmentIBMSLink; + String infotainmentIBMSLinkAr; + int projectID; + String roomID; + String bedID; + int clinicID; + int doctorID; + int patientID; + String bMIUrl; + String mOPUrl; + + GetAdmissionInfoResponseModel( + {this.admissionNo, + this.admissionDate, + this.infotainmentIBMSLink, + this.infotainmentIBMSLinkAr, + this.projectID, + this.roomID, + this.bedID, + this.clinicID, + this.doctorID, + this.patientID, + this.bMIUrl, + this.mOPUrl}); + + GetAdmissionInfoResponseModel.fromJson(Map json) { + admissionNo = json['AdmissionNo']; + admissionDate = json['AdmissionDate']; + infotainmentIBMSLink = json['InfotainmentIBMSLink']; + infotainmentIBMSLinkAr = json['InfotainmentIBMSLinkAr']; + projectID = json['ProjectID']; + roomID = json['RoomID']; + bedID = json['BedID']; + clinicID = json['ClinicID']; + doctorID = json['DoctorID']; + patientID = json['PatientID']; + bMIUrl = json['BMIUrl']; + mOPUrl = json['MOPUrl']; + } + + Map toJson() { + final Map data = new Map(); + data['AdmissionNo'] = this.admissionNo; + data['AdmissionDate'] = this.admissionDate; + data['InfotainmentIBMSLink'] = this.infotainmentIBMSLink; + data['InfotainmentIBMSLinkAr'] = this.infotainmentIBMSLinkAr; + data['ProjectID'] = this.projectID; + data['RoomID'] = this.roomID; + data['BedID'] = this.bedID; + data['ClinicID'] = this.clinicID; + data['DoctorID'] = this.doctorID; + data['PatientID'] = this.patientID; + data['BMIUrl'] = this.bMIUrl; + data['MOPUrl'] = this.mOPUrl; + return data; + } +} diff --git a/lib/pages/InPatientServices/help_PRO.dart b/lib/pages/InPatientServices/help_PRO.dart index 954550ef..a9d192a7 100644 --- a/lib/pages/InPatientServices/help_PRO.dart +++ b/lib/pages/InPatientServices/help_PRO.dart @@ -1,7 +1,13 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; class HelpPRO extends StatefulWidget { const HelpPRO({Key key}) : super(key: key); @@ -11,11 +17,12 @@ class HelpPRO extends StatefulWidget { } class _HelpPROState extends State { - TextEditingController assistText = new TextEditingController(); + ProjectViewModel projectViewModel; @override Widget build(BuildContext context) { + projectViewModel = Provider.of(context); return AppScaffold( isShowAppBar: true, isShowDecPage: false, @@ -43,6 +50,17 @@ class _HelpPROState extends State { ), mHeight(16), inputWidget(TranslationBase.of(context).enterDetails, "", assistText), + mHeight(16), + DefaultButton( + TranslationBase.of(context).send, + () { + if (assistText.text.isNotEmpty) { + callReceivePrescriptionAPI(context); + } else { + Utils.showErrorToast(TranslationBase.of(context).emptyMessage); + } + }, + ), ], ), ), @@ -107,15 +125,15 @@ class _HelpPROState extends State { prefixIcon: prefix == null ? null : Text( - "+" + prefix, - style: TextStyle( - fontSize: 14, - height: 21 / 14, - fontWeight: FontWeight.w500, - color: Color(0xff2E303A), - letterSpacing: -0.56, - ), - ), + "+" + prefix, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w500, + color: Color(0xff2E303A), + letterSpacing: -0.56, + ), + ), contentPadding: EdgeInsets.zero, border: InputBorder.none, focusedBorder: InputBorder.none, @@ -132,4 +150,15 @@ class _HelpPROState extends State { ); } + void callReceivePrescriptionAPI(BuildContext context) { + ClinicListService service = new ClinicListService(); + GifLoaderDialogUtils.showMyDialog(context); + service + .insertInPatientOrder(projectViewModel.getAdmissionInfoResponseModel, 1, (projectViewModel.user.firstName + " " + projectViewModel.user.lastName), + (projectViewModel.user.firstNameN + " " + projectViewModel.user.lastNameN), projectViewModel.user.mobileNumber, assistText.text, context) + .then((res) {}) + .catchError((err) { + print(err); + }); + } } diff --git a/lib/pages/InPatientServices/inpatient_home.dart b/lib/pages/InPatientServices/inpatient_home.dart index eeba37ab..2098d350 100644 --- a/lib/pages/InPatientServices/inpatient_home.dart +++ b/lib/pages/InPatientServices/inpatient_home.dart @@ -216,6 +216,20 @@ class InPatientServicesHome extends StatelessWidget { dialog.showAlertDialog(context); } + void callReceivePrescriptionAPI(BuildContext context) { + ClinicListService service = new ClinicListService(); + GifLoaderDialogUtils.showMyDialog(context); + service + .insertInPatientOrder(projectViewModel.getAdmissionInfoResponseModel, 2, (projectViewModel.user.firstName + " " + projectViewModel.user.lastName), + (projectViewModel.user.firstNameN + " " + projectViewModel.user.lastNameN), projectViewModel.user.mobileNumber, "I need my medicines", context) + .then((res) { + GifLoaderDialogUtils.hideDialog(context); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + void openGeneralInstructions(BuildContext context) { ClinicListService service = new ClinicListService(); GifLoaderDialogUtils.showMyDialog(context); diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index e45cc333..ef3378bb 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -13,6 +13,7 @@ import 'package:diplomaticquarterapp/models/Authentication/check_activation_code import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart'; import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart'; import 'package:diplomaticquarterapp/models/Authentication/send_activation_request.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_info_response_model.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/login/register_new.dart'; import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart'; @@ -671,13 +672,16 @@ class _ConfirmLogin extends State { } checkIfIsInPatient() { + GetAdmissionInfoResponseModel getAdmissionInfoResponseModel; ClinicListService service = new ClinicListService(); service.checkIfInPatientAPI(context).then((res) { if (res['MessageStatus'] == 1) { if (res['List_PatientAdmissionInfo'].length != 0) { print("INPATIENT!!!"); + getAdmissionInfoResponseModel = GetAdmissionInfoResponseModel.fromJson(res['List_PatientAdmissionInfo'][0]); projectViewModel.setIsPatientAdmitted(true); projectViewModel.setInPatientProjectID(res['List_PatientAdmissionInfo'][0]['ProjectID']); + projectViewModel.setInPatientAdmissionInfo(getAdmissionInfoResponseModel); } else { print("OUTPATIENT!!!"); projectViewModel.setIsPatientAdmitted(false); diff --git a/lib/pages/login/login.dart b/lib/pages/login/login.dart index 7507382b..fefce667 100644 --- a/lib/pages/login/login.dart +++ b/lib/pages/login/login.dart @@ -9,6 +9,7 @@ import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_info_response_model.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/login/confirm-login.dart'; import 'package:diplomaticquarterapp/pages/login/login-type.dart'; @@ -393,13 +394,16 @@ class _Login extends State { } checkIfIsInPatient() { + GetAdmissionInfoResponseModel getAdmissionInfoResponseModel; ClinicListService service = new ClinicListService(); service.checkIfInPatientAPI(context).then((res) { if (res['MessageStatus'] == 1) { if (res['List_PatientAdmissionInfo'].length != 0) { print("INPATIENT!!!"); + getAdmissionInfoResponseModel = GetAdmissionInfoResponseModel.fromJson(res['List_PatientAdmissionInfo'][0]); projectViewModel.setIsPatientAdmitted(true); projectViewModel.setInPatientProjectID(res['List_PatientAdmissionInfo'][0]['ProjectID']); + projectViewModel.setInPatientAdmissionInfo(getAdmissionInfoResponseModel); } else { print("OUTPATIENT!!!"); projectViewModel.setIsPatientAdmitted(false); diff --git a/lib/services/clinic_services/get_clinic_service.dart b/lib/services/clinic_services/get_clinic_service.dart index 6d22a472..d4a4f8ed 100644 --- a/lib/services/clinic_services/get_clinic_service.dart +++ b/lib/services/clinic_services/get_clinic_service.dart @@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_info_response_model.dart'; import 'package:diplomaticquarterapp/models/Request.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; @@ -79,9 +80,7 @@ class ClinicListService extends BaseService { Future getGeneralInstructions(int projectID, context) async { Map request; - request = { - "ProjectID": projectID - }; + request = {"ProjectID": projectID}; dynamic localRes; @@ -199,14 +198,41 @@ class ClinicListService extends BaseService { }, body: request); return Future.value(localRes); } + Future getCountries() async { - Map request ={}; + Map request = {}; dynamic localRes; - await baseAppClient.post(GET_NATIONALITY, onSuccess: (response, statusCode) async { - localRes = response; - }, onFailure: (String error, int statusCode) { - throw error; - }, body: request); - return Future.value(localRes); -} + await baseAppClient.post(GET_NATIONALITY, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future insertInPatientOrder( + GetAdmissionInfoResponseModel getAdmissionInfoResponseModel, int typeID, String patientName, String patientNameAR, String patientMobileNo, String comments, context) async { + Map request; + request = { + "ProjectID": getAdmissionInfoResponseModel.projectID, + "TypeID": typeID, + "RoomNo": getAdmissionInfoResponseModel.roomID, + "GenderId": 2, + "AdmissionNo": getAdmissionInfoResponseModel.admissionNo, + "prescriptionNo": 250420, + "patientName": patientName, + "patientNameN": patientNameAR, + "PatientMobileNumber": patientMobileNo, + "comments": comments + }; + + dynamic localRes; + + await baseAppClient.post(INSERT_INPATIENT_ORDER, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isAllowAny: true); + return Future.value(localRes); + } } From 60d5ba4a9edbb937216bdb537fd676249d3972e8 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Thu, 8 Jun 2023 14:46:36 +0300 Subject: [PATCH 11/49] Birth Notification implemented --- lib/config/config.dart | 4 ++ lib/config/localized_values.dart | 12 +++--- lib/core/service/client/base_app_client.dart | 2 +- .../InPatientServices/birth_notification.dart | 42 +++++++++++++++++-- .../InPatientServices/inpatient_home.dart | 14 ++++++- .../clinic_services/get_clinic_service.dart | 39 +++++++++++++++++ lib/uitl/translations_delegate_base.dart | 6 ++- lib/widgets/buttons/defaultButton.dart | 1 + 8 files changed, 108 insertions(+), 12 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index 1047ec66..96e03819 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -602,6 +602,10 @@ var GET_GENERAL_INSTRUCTIONS = 'Services/INPs.svc/REST/getGeneralInstructions'; var INSERT_INPATIENT_ORDER = 'Services/INPs.svc/REST/Inpcp_insertOrder'; +var GET_BIRTH_NOTIFICATION = 'Services/INPs.svc/REST/getBirthNotification_bymothermrn'; + +var SAVE_BIRTH_NOTIFICATION = 'Services/INPs.svc/REST/SaveBirthNotification'; + class AppGlobal { static var context; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 76a758f6..65b2f90b 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1911,11 +1911,13 @@ const Map localizedValues = { "birthNotificationSubTitle": {"en": "Notification", "ar": "تبليغ الولادة"}, "admissionNoticeTitle": {"en": "Admission", "ar": "إشعار"}, "admissionNoticeSubTitle": {"en": "Notice", "ar": "تنويم"}, - "mothersMRN": {"en": "Mother's MRN", "ar": "رقم ملف الأم"}, - "mothersName": {"en": "Mother's Name", "ar": "اسم الأم"}, - "fathersName": {"en": "Father's Name", "ar": "اسم الاب"}, - "babysName": {"en": "Baby's Name", "ar": "اسم المولود"}, - "contactNumber": {"en": "Contact Number", "ar": "رقم الاتصال"}, + "mothersMRN": {"en": "Mother's MRN *", "ar": "رقم ملف الأم"}, + "mothersName": {"en": "Mother's name *", "ar": "اسم الأم"}, + "fathersNameEN": {"en": "Father's name english *", "ar": "اسم الاب انجليزي"}, + "fathersNameAR": {"en": "Father's name arabic *", "ar": "اسم الاب عربي"}, + "babysNameEN": {"en": "Baby's name english *", "ar": "اسم المولود انجليزي"}, + "babysNameAR": {"en": "Baby's name arabic *", "ar": "اسم المولود عربي"}, + "contactNumber": {"en": "Contact number *", "ar": "رقم الاتصال"}, "scanID": {"en": "Scan ID", "ar": "معرف المسح"}, "birthNotificationNotes1": { "en": "For Saudis: Provide copy of the identification card for both couples. If the wife doesn't have identification card, The family card must be provided.", diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 9cb81a41..3151bb41 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -149,7 +149,7 @@ class BaseAppClient { // body['IdentificationNo'] = 1023854217; // body['MobileNo'] = "531940021"; - // body['PatientID'] = 2001273; //3844083 + // body['PatientID'] = 3649542; //3844083 // body['TokenID'] = "@dm!n"; // Patient ID: 3027574 diff --git a/lib/pages/InPatientServices/birth_notification.dart b/lib/pages/InPatientServices/birth_notification.dart index 4125261a..3c4d43f9 100644 --- a/lib/pages/InPatientServices/birth_notification.dart +++ b/lib/pages/InPatientServices/birth_notification.dart @@ -2,7 +2,10 @@ import 'dart:convert'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/insurance/AttachInsuranceCardImageDialog.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; @@ -21,7 +24,9 @@ class _BirthNotificationState extends State { TextEditingController motherMRN = new TextEditingController(); TextEditingController motherName = new TextEditingController(); TextEditingController fatherName = new TextEditingController(); + TextEditingController fatherNameAR = new TextEditingController(); TextEditingController babyName = new TextEditingController(); + TextEditingController babyNameAR = new TextEditingController(); TextEditingController contactNumber = new TextEditingController(); ProjectViewModel projectViewModel; @@ -64,9 +69,13 @@ class _BirthNotificationState extends State { mHeight(16), inputWidget(TranslationBase.of(context).mothersName, "", motherName, isEnable: false), mHeight(16), - inputWidget(TranslationBase.of(context).fathersName, "", fatherName), + inputWidget(TranslationBase.of(context).fathersNameEN, "", fatherName), mHeight(16), - inputWidget(TranslationBase.of(context).babysName, "", babyName), + inputWidget(TranslationBase.of(context).fathersNameAR, "", fatherNameAR), + mHeight(16), + inputWidget(TranslationBase.of(context).babysNameEN, "", babyName), + mHeight(16), + inputWidget(TranslationBase.of(context).babysNameAR, "", babyNameAR), mHeight(16), inputWidget(TranslationBase.of(context).contactNumber, "", contactNumber), mHeight(16), @@ -151,9 +160,21 @@ class _BirthNotificationState extends State { ), ), mHeight(16.0), + // DefaultButton( + // TranslationBase.of(context).submit, + // (fatherNameAR.text.isEmpty || fatherName.text.isEmpty || babyNameAR.text.isEmpty || babyName.text.isEmpty) ? null : () { + // submitBirthNotification(); + // }, + // color: CustomColors.accentColor, + // disabledColor: CustomColors.grey2, + // ), DefaultButton( TranslationBase.of(context).submit, - () {}, + (fatherNameAR.text.isEmpty || fatherName.text.isEmpty || babyNameAR.text.isEmpty || babyName.text.isEmpty || images.isEmpty) + ? null + : () { + submitBirthNotification(); + }, color: CustomColors.accentColor, disabledColor: CustomColors.grey2, ), @@ -164,6 +185,21 @@ class _BirthNotificationState extends State { ); } + void submitBirthNotification() { + ClinicListService service = new ClinicListService(); + GifLoaderDialogUtils.showMyDialog(context); + service + .submitBirthNotification( + projectViewModel.user.patientID, projectViewModel.inPatientProjectID, fatherNameAR.text, fatherName.text, babyNameAR.text, babyName.text, contactNumber.text, images[0], context) + .then((res) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showSuccessToast(message: TranslationBase.of(context).processDoneSuccessfully); + Navigator.of(context).pop(); + }).catchError((err) { + print(err); + }); + } + void confirmAttachInsuranceCardImageDialogDialog({BuildContext context, String name, String fileNo}) { showDialog( context: context, diff --git a/lib/pages/InPatientServices/inpatient_home.dart b/lib/pages/InPatientServices/inpatient_home.dart index 2098d350..3311a088 100644 --- a/lib/pages/InPatientServices/inpatient_home.dart +++ b/lib/pages/InPatientServices/inpatient_home.dart @@ -122,7 +122,7 @@ class InPatientServicesHome extends StatelessWidget { serviceList.add( InkWell( onTap: () { - Navigator.push(context, FadePage(page: BirthNotification())); + openBirthNotificationsPage(context); }, child: MedicalProfileItem( title: TranslationBase.of(context).birthNotificationTitle, @@ -230,6 +230,18 @@ class InPatientServicesHome extends StatelessWidget { }); } + void openBirthNotificationsPage(BuildContext context) { + ClinicListService service = new ClinicListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getBirthNotification(projectViewModel.user.patientID, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + print(res['birthNotification']); + Navigator.push(context, FadePage(page: BirthNotification())); + }).catchError((err) { + print(err); + }); + } + void openGeneralInstructions(BuildContext context) { ClinicListService service = new ClinicListService(); GifLoaderDialogUtils.showMyDialog(context); diff --git a/lib/services/clinic_services/get_clinic_service.dart b/lib/services/clinic_services/get_clinic_service.dart index d4a4f8ed..276c66eb 100644 --- a/lib/services/clinic_services/get_clinic_service.dart +++ b/lib/services/clinic_services/get_clinic_service.dart @@ -235,4 +235,43 @@ class ClinicListService extends BaseService { }, body: request, isAllowAny: true); return Future.value(localRes); } + + Future getBirthNotification(num motherMRN, context) async { + Map request; + request = { + "mothermrn": motherMRN, + }; + + dynamic localRes; + + await baseAppClient.post(GET_BIRTH_NOTIFICATION, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isAllowAny: true); + return Future.value(localRes); + } + + Future submitBirthNotification(num motherMRN, int projectID, String fatherNameAR, String fatherNameEN, String babyNameAR, String babyNameEN, String contactNum, String idImage, context) async { + Map request; + request = { + "ProjectID": projectID, + "mothermrn": motherMRN, + "fatherName": fatherNameEN, + "fatherNameAr": fatherNameAR, + "babyName": babyNameEN, + "babyNameAr": babyNameEN, + "contactNumber": contactNum, + "iDImage": idImage, + }; + + dynamic localRes; + + await baseAppClient.post(SAVE_BIRTH_NOTIFICATION, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isAllowAny: true); + return Future.value(localRes); + } } diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 49eeb8da..4264bbf2 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2909,8 +2909,10 @@ class TranslationBase { String get admissionNoticeSubTitle => localizedValues["admissionNoticeSubTitle"][locale.languageCode]; String get mothersMRN => localizedValues["mothersMRN"][locale.languageCode]; String get mothersName => localizedValues["mothersName"][locale.languageCode]; - String get fathersName => localizedValues["fathersName"][locale.languageCode]; - String get babysName => localizedValues["babysName"][locale.languageCode]; + String get fathersNameEN => localizedValues["fathersNameEN"][locale.languageCode]; + String get fathersNameAR => localizedValues["fathersNameAR"][locale.languageCode]; + String get babysNameEN => localizedValues["babysNameEN"][locale.languageCode]; + String get babysNameAR => localizedValues["babysNameAR"][locale.languageCode]; String get contactNumber => localizedValues["contactNumber"][locale.languageCode]; String get scanID => localizedValues["scanID"][locale.languageCode]; String get birthNotificationNotes1 => localizedValues["birthNotificationNotes1"][locale.languageCode]; diff --git a/lib/widgets/buttons/defaultButton.dart b/lib/widgets/buttons/defaultButton.dart index f7283d1c..4d7417d6 100644 --- a/lib/widgets/buttons/defaultButton.dart +++ b/lib/widgets/buttons/defaultButton.dart @@ -73,6 +73,7 @@ class DefaultButton extends StatelessWidget { style: TextButton.styleFrom( backgroundColor: color ?? const Color(0xffD02127), disabledForegroundColor: disabledColor, + disabledBackgroundColor: disabledColor, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(6), ), From 9f44b25353bc49ef1006013fe103011e8e064063 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 4 Jul 2023 12:27:59 +0300 Subject: [PATCH 12/49] Meal Plan API integration in progress --- lib/config/config.dart | 3 +++ lib/pages/InPatientServices/meal_plan.dart | 24 +++++++++++++++++++ .../clinic_services/get_clinic_service.dart | 22 +++++++++++++++++ 3 files changed, 49 insertions(+) diff --git a/lib/config/config.dart b/lib/config/config.dart index 96e03819..57376060 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -606,6 +606,9 @@ var GET_BIRTH_NOTIFICATION = 'Services/INPs.svc/REST/getBirthNotification_bymoth var SAVE_BIRTH_NOTIFICATION = 'Services/INPs.svc/REST/SaveBirthNotification'; +//Meal Plan APIs +var GET_ADMITTED_PATIENTS = 'Services/MOP.svc/REST/GetAdmittedPatients'; + class AppGlobal { static var context; diff --git a/lib/pages/InPatientServices/meal_plan.dart b/lib/pages/InPatientServices/meal_plan.dart index 883d3c65..b38eddc5 100644 --- a/lib/pages/InPatientServices/meal_plan.dart +++ b/lib/pages/InPatientServices/meal_plan.dart @@ -1,8 +1,12 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; class MealPlanPage extends StatefulWidget { const MealPlanPage({Key key}) : super(key: key); @@ -12,8 +16,16 @@ class MealPlanPage extends StatefulWidget { } class _MealPlanPageState extends State { + ProjectViewModel projectViewModel; + + @override + void initState() { + super.initState(); + } + @override Widget build(BuildContext context) { + projectViewModel = Provider.of(context); return AppScaffold( isShowAppBar: true, isShowDecPage: false, @@ -92,4 +104,16 @@ class _MealPlanPageState extends State { ), ); } + + void getAdmittedPatientDetails() { + ClinicListService service = new ClinicListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getAdmittedPatientDetails(projectViewModel.user.patientID, projectViewModel.inPatientProjectID, projectViewModel.getAdmissionInfoResponseModel.admissionNo, 0, 0, 0, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + // AppToast.showSuccessToast(message: TranslationBase.of(context).processDoneSuccessfully); + Navigator.of(context).pop(); + }).catchError((err) { + print(err); + }); + } } diff --git a/lib/services/clinic_services/get_clinic_service.dart b/lib/services/clinic_services/get_clinic_service.dart index 276c66eb..4e685a06 100644 --- a/lib/services/clinic_services/get_clinic_service.dart +++ b/lib/services/clinic_services/get_clinic_service.dart @@ -274,4 +274,26 @@ class ClinicListService extends BaseService { }, body: request, isAllowAny: true); return Future.value(localRes); } + + Future getAdmittedPatientDetails(int patientID, int projectID, int admissionNo, int buildingID, int floorID, int nursingStationID, context) async { + Map request; + request = { + "ProjectID": projectID, + "PatientID" : patientID, + "AdmissionNo": admissionNo, + "BuildingID" : buildingID, + "FloorID" : floorID, + "NursingStationID": nursingStationID + }; + + dynamic localRes; + + await baseAppClient.post(GET_ADMITTED_PATIENTS, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isAllowAny: true); + return Future.value(localRes); + } + } From 710e6274db02deb64064a8fb058f8abdb947d9b8 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Sun, 9 Jul 2023 17:17:40 +0300 Subject: [PATCH 13/49] mealplan updates --- .../get_admitted_patient_response_model.dart | 220 ++++++++++++++++++ lib/pages/InPatientServices/meal_plan.dart | 10 +- .../clinic_services/get_clinic_service.dart | 4 +- 3 files changed, 231 insertions(+), 3 deletions(-) create mode 100644 lib/models/InPatientServices/get_admitted_patient_response_model.dart diff --git a/lib/models/InPatientServices/get_admitted_patient_response_model.dart b/lib/models/InPatientServices/get_admitted_patient_response_model.dart new file mode 100644 index 00000000..17836ed1 --- /dev/null +++ b/lib/models/InPatientServices/get_admitted_patient_response_model.dart @@ -0,0 +1,220 @@ +class GetAdmittedPatientsResponseModel { + String setupID; + int projectID; + int admissionNo; + String admissionDate; + int patientType; + int patientID; + int clinicID; + int doctorID; + String roomID; + String bedID; + int status; + int admissionStatus; + String createdOn; + String firstName; + String middleName; + String lastName; + String firstNameN; + String middleNameN; + String lastNameN; + int gender; + String dateofBirth; + dynamic companionFirstName; + dynamic companionMiddleName; + dynamic companionLastName; + dynamic companionFirstNameN; + dynamic companionMiddleNameN; + dynamic companionLastNameN; + dynamic companionID; + dynamic companionGender; + bool isHasCompanion; + int buildingID; + int floorID; + int nursingStationID; + int dietType; + String dietTypeDateCahnged; + String dietTypeDescription; + String dietTypeDescriptionN; + dynamic allergyDiseaseDateCahnged; + dynamic allergyDiseaseChecked; + dynamic doctorRemarks; + dynamic allergyRemarks; + String age; + dynamic allergies; + String companionFullName; + bool dietTypeChanged; + String dietTypeDateCahngedDate; + String genderDescription; + dynamic genderImageUrl; + bool hasAllergy; + bool isNewAdmitted; + String patientFullName; + dynamic allergyRemark; + + GetAdmittedPatientsResponseModel( + {this.setupID, + this.projectID, + this.admissionNo, + this.admissionDate, + this.patientType, + this.patientID, + this.clinicID, + this.doctorID, + this.roomID, + this.bedID, + this.status, + this.admissionStatus, + this.createdOn, + this.firstName, + this.middleName, + this.lastName, + this.firstNameN, + this.middleNameN, + this.lastNameN, + this.gender, + this.dateofBirth, + this.companionFirstName, + this.companionMiddleName, + this.companionLastName, + this.companionFirstNameN, + this.companionMiddleNameN, + this.companionLastNameN, + this.companionID, + this.companionGender, + this.isHasCompanion, + this.buildingID, + this.floorID, + this.nursingStationID, + this.dietType, + this.dietTypeDateCahnged, + this.dietTypeDescription, + this.dietTypeDescriptionN, + this.allergyDiseaseDateCahnged, + this.allergyDiseaseChecked, + this.doctorRemarks, + this.allergyRemarks, + this.age, + this.allergies, + this.companionFullName, + this.dietTypeChanged, + this.dietTypeDateCahngedDate, + this.genderDescription, + this.genderImageUrl, + this.hasAllergy, + this.isNewAdmitted, + this.patientFullName, + this.allergyRemark}); + + GetAdmittedPatientsResponseModel.fromJson(Map json) { + setupID = json['SetupID']; + projectID = json['ProjectID']; + admissionNo = json['AdmissionNo']; + admissionDate = json['AdmissionDate']; + patientType = json['PatientType']; + patientID = json['PatientID']; + clinicID = json['ClinicID']; + doctorID = json['DoctorID']; + roomID = json['RoomID']; + bedID = json['BedID']; + status = json['Status']; + admissionStatus = json['AdmissionStatus']; + createdOn = json['CreatedOn']; + firstName = json['FirstName']; + middleName = json['MiddleName']; + lastName = json['LastName']; + firstNameN = json['FirstNameN']; + middleNameN = json['MiddleNameN']; + lastNameN = json['LastNameN']; + gender = json['Gender']; + dateofBirth = json['DateofBirth']; + companionFirstName = json['CompanionFirstName']; + companionMiddleName = json['CompanionMiddleName']; + companionLastName = json['CompanionLastName']; + companionFirstNameN = json['CompanionFirstNameN']; + companionMiddleNameN = json['CompanionMiddleNameN']; + companionLastNameN = json['CompanionLastNameN']; + companionID = json['CompanionID']; + companionGender = json['CompanionGender']; + isHasCompanion = json['IsHasCompanion']; + buildingID = json['BuildingID']; + floorID = json['FloorID']; + nursingStationID = json['NursingStationID']; + dietType = json['DietType']; + dietTypeDateCahnged = json['DietTypeDateCahnged']; + dietTypeDescription = json['DietTypeDescription']; + dietTypeDescriptionN = json['DietTypeDescriptionN']; + allergyDiseaseDateCahnged = json['AllergyDiseaseDateCahnged']; + allergyDiseaseChecked = json['AllergyDiseaseChecked']; + doctorRemarks = json['DoctorRemarks']; + allergyRemarks = json['AllergyRemarks']; + age = json['Age']; + allergies = json['Allergies']; + companionFullName = json['CompanionFullName']; + dietTypeChanged = json['DietTypeChanged']; + dietTypeDateCahngedDate = json['DietTypeDateCahnged_Date']; + genderDescription = json['GenderDescription']; + genderImageUrl = json['GenderImageUrl']; + hasAllergy = json['HasAllergy']; + isNewAdmitted = json['IsNewAdmitted']; + patientFullName = json['PatientFullName']; + allergyRemark = json['allergyRemark']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['AdmissionNo'] = this.admissionNo; + data['AdmissionDate'] = this.admissionDate; + data['PatientType'] = this.patientType; + data['PatientID'] = this.patientID; + data['ClinicID'] = this.clinicID; + data['DoctorID'] = this.doctorID; + data['RoomID'] = this.roomID; + data['BedID'] = this.bedID; + data['Status'] = this.status; + data['AdmissionStatus'] = this.admissionStatus; + data['CreatedOn'] = this.createdOn; + data['FirstName'] = this.firstName; + data['MiddleName'] = this.middleName; + data['LastName'] = this.lastName; + data['FirstNameN'] = this.firstNameN; + data['MiddleNameN'] = this.middleNameN; + data['LastNameN'] = this.lastNameN; + data['Gender'] = this.gender; + data['DateofBirth'] = this.dateofBirth; + data['CompanionFirstName'] = this.companionFirstName; + data['CompanionMiddleName'] = this.companionMiddleName; + data['CompanionLastName'] = this.companionLastName; + data['CompanionFirstNameN'] = this.companionFirstNameN; + data['CompanionMiddleNameN'] = this.companionMiddleNameN; + data['CompanionLastNameN'] = this.companionLastNameN; + data['CompanionID'] = this.companionID; + data['CompanionGender'] = this.companionGender; + data['IsHasCompanion'] = this.isHasCompanion; + data['BuildingID'] = this.buildingID; + data['FloorID'] = this.floorID; + data['NursingStationID'] = this.nursingStationID; + data['DietType'] = this.dietType; + data['DietTypeDateCahnged'] = this.dietTypeDateCahnged; + data['DietTypeDescription'] = this.dietTypeDescription; + data['DietTypeDescriptionN'] = this.dietTypeDescriptionN; + data['AllergyDiseaseDateCahnged'] = this.allergyDiseaseDateCahnged; + data['AllergyDiseaseChecked'] = this.allergyDiseaseChecked; + data['DoctorRemarks'] = this.doctorRemarks; + data['AllergyRemarks'] = this.allergyRemarks; + data['Age'] = this.age; + data['Allergies'] = this.allergies; + data['CompanionFullName'] = this.companionFullName; + data['DietTypeChanged'] = this.dietTypeChanged; + data['DietTypeDateCahnged_Date'] = this.dietTypeDateCahngedDate; + data['GenderDescription'] = this.genderDescription; + data['GenderImageUrl'] = this.genderImageUrl; + data['HasAllergy'] = this.hasAllergy; + data['IsNewAdmitted'] = this.isNewAdmitted; + data['PatientFullName'] = this.patientFullName; + data['allergyRemark'] = this.allergyRemark; + return data; + } +} diff --git a/lib/pages/InPatientServices/meal_plan.dart b/lib/pages/InPatientServices/meal_plan.dart index b38eddc5..2a2c3565 100644 --- a/lib/pages/InPatientServices/meal_plan.dart +++ b/lib/pages/InPatientServices/meal_plan.dart @@ -1,4 +1,5 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_admitted_patient_response_model.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; @@ -17,10 +18,14 @@ class MealPlanPage extends StatefulWidget { class _MealPlanPageState extends State { ProjectViewModel projectViewModel; + GetAdmittedPatientsResponseModel getAdmittedPatientsResponseModel; @override void initState() { super.initState(); + WidgetsBinding.instance.addPostFrameCallback((_) { + getAdmittedPatientDetails(); + }); } @override @@ -110,8 +115,11 @@ class _MealPlanPageState extends State { GifLoaderDialogUtils.showMyDialog(context); service.getAdmittedPatientDetails(projectViewModel.user.patientID, projectViewModel.inPatientProjectID, projectViewModel.getAdmissionInfoResponseModel.admissionNo, 0, 0, 0, context).then((res) { GifLoaderDialogUtils.hideDialog(context); + print(res["List_MOP_AdmittedPatients"]); + getAdmittedPatientsResponseModel = new GetAdmittedPatientsResponseModel.fromJson(res["List_MOP_AdmittedPatients"][0]); + print(getAdmittedPatientsResponseModel.admissionNo); // AppToast.showSuccessToast(message: TranslationBase.of(context).processDoneSuccessfully); - Navigator.of(context).pop(); + // Navigator.of(context).pop(); }).catchError((err) { print(err); }); diff --git a/lib/services/clinic_services/get_clinic_service.dart b/lib/services/clinic_services/get_clinic_service.dart index 4e685a06..d08ecfd1 100644 --- a/lib/services/clinic_services/get_clinic_service.dart +++ b/lib/services/clinic_services/get_clinic_service.dart @@ -279,8 +279,8 @@ class ClinicListService extends BaseService { Map request; request = { "ProjectID": projectID, - "PatientID" : patientID, - "AdmissionNo": admissionNo, + "PatientID" : 3649733, + "AdmissionNo": 2023000035, "BuildingID" : buildingID, "FloorID" : floorID, "NursingStationID": nursingStationID From 77ab9373f895e3f55e4dbd7c369fe96682375a32 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 11 Jul 2023 14:09:00 +0300 Subject: [PATCH 14/49] Meal Plan APIs implementation continued --- lib/config/config.dart | 2 + .../get_meals_schedule_response_model.dart | 42 +++++++++++++++ lib/pages/InPatientServices/meal_plan.dart | 53 +++++++++++++++++-- .../clinic_services/get_clinic_service.dart | 37 ++++++++++++- 4 files changed, 127 insertions(+), 7 deletions(-) create mode 100644 lib/models/InPatientServices/get_meals_schedule_response_model.dart diff --git a/lib/config/config.dart b/lib/config/config.dart index 57376060..f3ededbd 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -608,6 +608,8 @@ var SAVE_BIRTH_NOTIFICATION = 'Services/INPs.svc/REST/SaveBirthNotification'; //Meal Plan APIs var GET_ADMITTED_PATIENTS = 'Services/MOP.svc/REST/GetAdmittedPatients'; +var GET_CURRENT_WEEKID_WEEKDAY = 'Services/MOP.svc/REST/GetCurrentWeekAndDayHMGMP'; +var GET_MEALS_OF_SCHEDULE_ID = 'Services/MOP.svc/REST/GetMealsOfScheduleID'; class AppGlobal { static var context; diff --git a/lib/models/InPatientServices/get_meals_schedule_response_model.dart b/lib/models/InPatientServices/get_meals_schedule_response_model.dart new file mode 100644 index 00000000..599534a4 --- /dev/null +++ b/lib/models/InPatientServices/get_meals_schedule_response_model.dart @@ -0,0 +1,42 @@ +class GetMealsScheduleResponseModel { + int scheduleID; + int mealID; + String description; + String descriptionN; + int weekID; + String weekDescription; + String weekDescriptionN; + String tAT; + int dietTypeID; + int dayID; + + GetMealsScheduleResponseModel({this.scheduleID, this.mealID, this.description, this.descriptionN, this.weekID, this.weekDescription, this.weekDescriptionN, this.tAT, this.dietTypeID, this.dayID}); + + GetMealsScheduleResponseModel.fromJson(Map json) { + scheduleID = json['ScheduleID']; + mealID = json['MealID']; + description = json['Description']; + descriptionN = json['DescriptionN']; + weekID = json['WeekID']; + weekDescription = json['WeekDescription']; + weekDescriptionN = json['WeekDescriptionN']; + tAT = json['TAT']; + dietTypeID = json['DietTypeID']; + dayID = json['DayID']; + } + + Map toJson() { + final Map data = new Map(); + data['ScheduleID'] = this.scheduleID; + data['MealID'] = this.mealID; + data['Description'] = this.description; + data['DescriptionN'] = this.descriptionN; + data['WeekID'] = this.weekID; + data['WeekDescription'] = this.weekDescription; + data['WeekDescriptionN'] = this.weekDescriptionN; + data['TAT'] = this.tAT; + data['DietTypeID'] = this.dietTypeID; + data['DayID'] = this.dayID; + return data; + } +} diff --git a/lib/pages/InPatientServices/meal_plan.dart b/lib/pages/InPatientServices/meal_plan.dart index 2a2c3565..4411b660 100644 --- a/lib/pages/InPatientServices/meal_plan.dart +++ b/lib/pages/InPatientServices/meal_plan.dart @@ -1,6 +1,8 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/InPatientServices/get_admitted_patient_response_model.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_meals_schedule_response_model.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; @@ -19,6 +21,10 @@ class MealPlanPage extends StatefulWidget { class _MealPlanPageState extends State { ProjectViewModel projectViewModel; GetAdmittedPatientsResponseModel getAdmittedPatientsResponseModel; + List getMealsScheduleResponseModelList = []; + + int currentDay = 0; + int currentWeek = 0; @override void initState() { @@ -115,12 +121,49 @@ class _MealPlanPageState extends State { GifLoaderDialogUtils.showMyDialog(context); service.getAdmittedPatientDetails(projectViewModel.user.patientID, projectViewModel.inPatientProjectID, projectViewModel.getAdmissionInfoResponseModel.admissionNo, 0, 0, 0, context).then((res) { GifLoaderDialogUtils.hideDialog(context); - print(res["List_MOP_AdmittedPatients"]); - getAdmittedPatientsResponseModel = new GetAdmittedPatientsResponseModel.fromJson(res["List_MOP_AdmittedPatients"][0]); - print(getAdmittedPatientsResponseModel.admissionNo); - // AppToast.showSuccessToast(message: TranslationBase.of(context).processDoneSuccessfully); - // Navigator.of(context).pop(); + if (res["List_MOP_AdmittedPatients"] != null && res["List_MOP_AdmittedPatients"].length != 0) { + print(res["List_MOP_AdmittedPatients"]); + getAdmittedPatientsResponseModel = new GetAdmittedPatientsResponseModel.fromJson(res["List_MOP_AdmittedPatients"][0]); + print(getAdmittedPatientsResponseModel.dietType); + getCurrentWeekIDAndDay(getAdmittedPatientsResponseModel.dietType); + } else { + AppToast.showErrorToast(message: "No data found for admitted patient"); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + void getCurrentWeekIDAndDay(int dietType) { + ClinicListService service = new ClinicListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getCurrentWeekIDAndDay(context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + currentDay = res["CurrentDay"]; + currentWeek = res["CurrentWeek"]; + getMealsOfScheduleID(dietType); }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + void getMealsOfScheduleID(int dietType) { + ClinicListService service = new ClinicListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getMealsOfScheduleID(projectViewModel.inPatientProjectID, projectViewModel.getAdmissionInfoResponseModel.admissionNo, dietType, currentWeek, currentDay, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res["List_MOP_MealsOfScheduleID"] != null && res["List_MOP_MealsOfScheduleID"].length != 0) { + res['List_MOP_MealsOfScheduleID'].forEach((cOC) { + getMealsScheduleResponseModelList.add(GetMealsScheduleResponseModel.fromJson(res["List_MOP_MealsOfScheduleID"])); + }); + print(getMealsScheduleResponseModelList.length); + } else { + AppToast.showErrorToast(message: "No meal schedule found for admitted patient"); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); print(err); }); } diff --git a/lib/services/clinic_services/get_clinic_service.dart b/lib/services/clinic_services/get_clinic_service.dart index d08ecfd1..2ae7bbcf 100644 --- a/lib/services/clinic_services/get_clinic_service.dart +++ b/lib/services/clinic_services/get_clinic_service.dart @@ -279,8 +279,8 @@ class ClinicListService extends BaseService { Map request; request = { "ProjectID": projectID, - "PatientID" : 3649733, - "AdmissionNo": 2023000035, + "PatientID" : 3649746, + "AdmissionNo": 2023000036, "BuildingID" : buildingID, "FloorID" : floorID, "NursingStationID": nursingStationID @@ -296,4 +296,37 @@ class ClinicListService extends BaseService { return Future.value(localRes); } + Future getCurrentWeekIDAndDay(BuildContext context) async { + dynamic localRes; + await baseAppClient.get(GET_CURRENT_WEEKID_WEEKDAY, isExternal: true, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }); + return localRes; + } + + Future getMealsOfScheduleID(int projectID, int admissionNo, int dietType, int weekID, int weekDay, context) async { + Map request; + request = { + "ProjectID": projectID, + "AdmissionNo": admissionNo, + "BuildingID" : 0, + "FloorID" : 0, + "NursingStationID": 0, + "DietType": dietType, + "WeekID": weekID, + "WeekDay": weekDay, + }; + + dynamic localRes; + + await baseAppClient.post(GET_MEALS_OF_SCHEDULE_ID, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isAllowAny: true); + return Future.value(localRes); + } + } From d073eb9d5f9cef037672058aed190cf5a524fb27 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 11 Jul 2023 14:46:43 +0300 Subject: [PATCH 15/49] MealPlan implementation continued --- lib/config/config.dart | 1 + ...et_meal_items_schedule_response_model.dart | 60 +++++++++++++++++++ lib/pages/InPatientServices/meal_plan.dart | 45 +++++++++++++- .../clinic_services/get_clinic_service.dart | 19 +++++- 4 files changed, 121 insertions(+), 4 deletions(-) create mode 100644 lib/models/InPatientServices/get_meal_items_schedule_response_model.dart diff --git a/lib/config/config.dart b/lib/config/config.dart index f3ededbd..85e57b6c 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -610,6 +610,7 @@ var SAVE_BIRTH_NOTIFICATION = 'Services/INPs.svc/REST/SaveBirthNotification'; var GET_ADMITTED_PATIENTS = 'Services/MOP.svc/REST/GetAdmittedPatients'; var GET_CURRENT_WEEKID_WEEKDAY = 'Services/MOP.svc/REST/GetCurrentWeekAndDayHMGMP'; var GET_MEALS_OF_SCHEDULE_ID = 'Services/MOP.svc/REST/GetMealsOfScheduleID'; +var GET_MEAL_ITEMS_OF_SCHEDULE_ID = 'Services/MOP.svc/REST/GetDefaultItemsOfScheduleID'; class AppGlobal { static var context; diff --git a/lib/models/InPatientServices/get_meal_items_schedule_response_model.dart b/lib/models/InPatientServices/get_meal_items_schedule_response_model.dart new file mode 100644 index 00000000..3d8cfc30 --- /dev/null +++ b/lib/models/InPatientServices/get_meal_items_schedule_response_model.dart @@ -0,0 +1,60 @@ +class GetMealItemsScheduleResponseModel { + int itemID; + String description; + String descriptionN; + dynamic comment; + dynamic commentN; + String imageURL; + bool isDefault; + int categoryID; + String categoryDescription; + String categoryDescriptionN; + int scheduleID; + int cal; + + GetMealItemsScheduleResponseModel( + {this.itemID, + this.description, + this.descriptionN, + this.comment, + this.commentN, + this.imageURL, + this.isDefault, + this.categoryID, + this.categoryDescription, + this.categoryDescriptionN, + this.scheduleID, + this.cal}); + + GetMealItemsScheduleResponseModel.fromJson(Map json) { + itemID = json['ItemID']; + description = json['Description']; + descriptionN = json['DescriptionN']; + comment = json['Comment']; + commentN = json['CommentN']; + imageURL = json['ImageURL']; + isDefault = json['IsDefault']; + categoryID = json['CategoryID']; + categoryDescription = json['CategoryDescription']; + categoryDescriptionN = json['CategoryDescriptionN']; + scheduleID = json['ScheduleID']; + cal = json['cal']; + } + + Map toJson() { + final Map data = new Map(); + data['ItemID'] = this.itemID; + data['Description'] = this.description; + data['DescriptionN'] = this.descriptionN; + data['Comment'] = this.comment; + data['CommentN'] = this.commentN; + data['ImageURL'] = this.imageURL; + data['IsDefault'] = this.isDefault; + data['CategoryID'] = this.categoryID; + data['CategoryDescription'] = this.categoryDescription; + data['CategoryDescriptionN'] = this.categoryDescriptionN; + data['ScheduleID'] = this.scheduleID; + data['cal'] = this.cal; + return data; + } +} diff --git a/lib/pages/InPatientServices/meal_plan.dart b/lib/pages/InPatientServices/meal_plan.dart index 4411b660..0c16ad88 100644 --- a/lib/pages/InPatientServices/meal_plan.dart +++ b/lib/pages/InPatientServices/meal_plan.dart @@ -1,5 +1,6 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/InPatientServices/get_admitted_patient_response_model.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_meal_items_schedule_response_model.dart'; import 'package:diplomaticquarterapp/models/InPatientServices/get_meals_schedule_response_model.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; @@ -23,6 +24,10 @@ class _MealPlanPageState extends State { GetAdmittedPatientsResponseModel getAdmittedPatientsResponseModel; List getMealsScheduleResponseModelList = []; + List getMealItemsScheduleResponseModelBreakfast = []; + List getMealItemsScheduleResponseModelLunch = []; + List getMealItemsScheduleResponseModelDinner = []; + int currentDay = 0; int currentWeek = 0; @@ -128,6 +133,8 @@ class _MealPlanPageState extends State { getCurrentWeekIDAndDay(getAdmittedPatientsResponseModel.dietType); } else { AppToast.showErrorToast(message: "No data found for admitted patient"); + + getCurrentWeekIDAndDay(1); } }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); @@ -155,10 +162,12 @@ class _MealPlanPageState extends State { service.getMealsOfScheduleID(projectViewModel.inPatientProjectID, projectViewModel.getAdmissionInfoResponseModel.admissionNo, dietType, currentWeek, currentDay, context).then((res) { GifLoaderDialogUtils.hideDialog(context); if (res["List_MOP_MealsOfScheduleID"] != null && res["List_MOP_MealsOfScheduleID"].length != 0) { - res['List_MOP_MealsOfScheduleID'].forEach((cOC) { - getMealsScheduleResponseModelList.add(GetMealsScheduleResponseModel.fromJson(res["List_MOP_MealsOfScheduleID"])); + res['List_MOP_MealsOfScheduleID'].forEach((scheduleItem) { + getMealsScheduleResponseModelList.add(GetMealsScheduleResponseModel.fromJson(scheduleItem)); }); - print(getMealsScheduleResponseModelList.length); + getDefaultItemsOfScheduleID(getMealsScheduleResponseModelList[0].scheduleID, 1); + getDefaultItemsOfScheduleID(getMealsScheduleResponseModelList[1].scheduleID, 2); + getDefaultItemsOfScheduleID(getMealsScheduleResponseModelList[2].scheduleID, 3); } else { AppToast.showErrorToast(message: "No meal schedule found for admitted patient"); } @@ -167,4 +176,34 @@ class _MealPlanPageState extends State { print(err); }); } + + void getDefaultItemsOfScheduleID(int scheduleID, int mealType) { + ClinicListService service = new ClinicListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getDefaultItemsOfScheduleID(projectViewModel.inPatientProjectID, scheduleID, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res["List_MOP_DefaultItemsOfMealModel"] != null && res["List_MOP_DefaultItemsOfMealModel"].length != 0) { + if (mealType == 1) { + res['List_MOP_DefaultItemsOfMealModel'].forEach((scheduleItem) { + getMealItemsScheduleResponseModelBreakfast.add(GetMealItemsScheduleResponseModel.fromJson(scheduleItem)); + }); + } + if (mealType == 2) { + res['List_MOP_DefaultItemsOfMealModel'].forEach((scheduleItem) { + getMealItemsScheduleResponseModelLunch.add(GetMealItemsScheduleResponseModel.fromJson(scheduleItem)); + }); + } + if (mealType == 3) { + res['List_MOP_DefaultItemsOfMealModel'].forEach((scheduleItem) { + getMealItemsScheduleResponseModelDinner.add(GetMealItemsScheduleResponseModel.fromJson(scheduleItem)); + }); + } + } else { + AppToast.showErrorToast(message: "No meal items found for admitted patient"); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } } diff --git a/lib/services/clinic_services/get_clinic_service.dart b/lib/services/clinic_services/get_clinic_service.dart index 2ae7bbcf..be556ea2 100644 --- a/lib/services/clinic_services/get_clinic_service.dart +++ b/lib/services/clinic_services/get_clinic_service.dart @@ -298,7 +298,7 @@ class ClinicListService extends BaseService { Future getCurrentWeekIDAndDay(BuildContext context) async { dynamic localRes; - await baseAppClient.get(GET_CURRENT_WEEKID_WEEKDAY, isExternal: true, onSuccess: (response, statusCode) async { + await baseAppClient.get(GET_CURRENT_WEEKID_WEEKDAY, isExternal: false, isRCService: false, onSuccess: (response, statusCode) async { localRes = response; }, onFailure: (String error, int statusCode) { throw error; @@ -329,4 +329,21 @@ class ClinicListService extends BaseService { return Future.value(localRes); } + Future getDefaultItemsOfScheduleID(int projectID, int scheduleID, context) async { + Map request; + request = { + "ProjectID": projectID, + "MealScheduleID": scheduleID, + }; + + dynamic localRes; + + await baseAppClient.post(GET_MEAL_ITEMS_OF_SCHEDULE_ID, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isAllowAny: true); + return Future.value(localRes); + } + } From 38648df89791dfc1ecc47b3289b7928e906ee6ec Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 11 Jul 2023 18:11:20 +0300 Subject: [PATCH 16/49] Meal Plan development continued --- lib/config/config.dart | 2 +- lib/core/service/client/base_app_client.dart | 4 + ...et_meal_items_schedule_response_model.dart | 9 ++ .../get_meals_schedule_response_model.dart | 20 +++- lib/pages/InPatientServices/meal_plan.dart | 113 ++++++++++++++++-- lib/pages/MyAppointments/MyAppointments.dart | 4 +- .../clinic_services/get_clinic_service.dart | 4 +- lib/uitl/date_uitl.dart | 12 ++ lib/widgets/avatar/large_avatar.dart | 1 - 9 files changed, 154 insertions(+), 15 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index 85e57b6c..5c02d229 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -609,7 +609,7 @@ var SAVE_BIRTH_NOTIFICATION = 'Services/INPs.svc/REST/SaveBirthNotification'; //Meal Plan APIs var GET_ADMITTED_PATIENTS = 'Services/MOP.svc/REST/GetAdmittedPatients'; var GET_CURRENT_WEEKID_WEEKDAY = 'Services/MOP.svc/REST/GetCurrentWeekAndDayHMGMP'; -var GET_MEALS_OF_SCHEDULE_ID = 'Services/MOP.svc/REST/GetMealsOfScheduleID'; +var GET_MEALS_OF_SCHEDULE_ID = 'Services/MOP.svc/REST/GetMealsOfScheduleID_Mobile'; var GET_MEAL_ITEMS_OF_SCHEDULE_ID = 'Services/MOP.svc/REST/GetDefaultItemsOfScheduleID'; class AppGlobal { diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 3151bb41..69a55ddf 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -152,6 +152,10 @@ class BaseAppClient { // body['PatientID'] = 3649542; //3844083 // body['TokenID'] = "@dm!n"; + body['PatientID'] = 3649238; //3844083 + body['AdmissionNo'] = 2023000038; //3844083 + body['TokenID'] = "@dm!n"; + // Patient ID: 3027574 // Mobile no.: 0502303285 // ID: 119116817 diff --git a/lib/models/InPatientServices/get_meal_items_schedule_response_model.dart b/lib/models/InPatientServices/get_meal_items_schedule_response_model.dart index 3d8cfc30..57ba4cb8 100644 --- a/lib/models/InPatientServices/get_meal_items_schedule_response_model.dart +++ b/lib/models/InPatientServices/get_meal_items_schedule_response_model.dart @@ -58,3 +58,12 @@ class GetMealItemsScheduleResponseModel { return data; } } + +class GetMealItemsScheduleResponseModelList { + String filterName = ""; + List getMealItemsScheduleResponseModelList = []; + + GetMealItemsScheduleResponseModelList({this.filterName, GetMealItemsScheduleResponseModel getMealItemsScheduleResponseModel}) { + getMealItemsScheduleResponseModelList.add(getMealItemsScheduleResponseModel); + } +} diff --git a/lib/models/InPatientServices/get_meals_schedule_response_model.dart b/lib/models/InPatientServices/get_meals_schedule_response_model.dart index 599534a4..178ba426 100644 --- a/lib/models/InPatientServices/get_meals_schedule_response_model.dart +++ b/lib/models/InPatientServices/get_meals_schedule_response_model.dart @@ -9,8 +9,22 @@ class GetMealsScheduleResponseModel { String tAT; int dietTypeID; int dayID; + bool isShow; + String tATTime; - GetMealsScheduleResponseModel({this.scheduleID, this.mealID, this.description, this.descriptionN, this.weekID, this.weekDescription, this.weekDescriptionN, this.tAT, this.dietTypeID, this.dayID}); + GetMealsScheduleResponseModel( + {this.scheduleID, + this.mealID, + this.description, + this.descriptionN, + this.weekID, + this.weekDescription, + this.weekDescriptionN, + this.tAT, + this.dietTypeID, + this.dayID, + this.isShow, + this.tATTime}); GetMealsScheduleResponseModel.fromJson(Map json) { scheduleID = json['ScheduleID']; @@ -23,6 +37,8 @@ class GetMealsScheduleResponseModel { tAT = json['TAT']; dietTypeID = json['DietTypeID']; dayID = json['DayID']; + isShow = json['IsShow']; + tATTime = json['TATTime']; } Map toJson() { @@ -37,6 +53,8 @@ class GetMealsScheduleResponseModel { data['TAT'] = this.tAT; data['DietTypeID'] = this.dietTypeID; data['DayID'] = this.dayID; + data['IsShow'] = this.isShow; + data['TATTime'] = this.tATTime; return data; } } diff --git a/lib/pages/InPatientServices/meal_plan.dart b/lib/pages/InPatientServices/meal_plan.dart index 0c16ad88..0f9e5b90 100644 --- a/lib/pages/InPatientServices/meal_plan.dart +++ b/lib/pages/InPatientServices/meal_plan.dart @@ -4,9 +4,12 @@ import 'package:diplomaticquarterapp/models/InPatientServices/get_meal_items_sch import 'package:diplomaticquarterapp/models/InPatientServices/get_meals_schedule_response_model.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; +import 'package:diplomaticquarterapp/widgets/my_rich_text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; @@ -28,6 +31,10 @@ class _MealPlanPageState extends State { List getMealItemsScheduleResponseModelLunch = []; List getMealItemsScheduleResponseModelDinner = []; + List _getMealItemsScheduleResponseModelBreakfast = []; + List _getMealItemsScheduleResponseModelLunch = []; + List _getMealItemsScheduleResponseModelDinner = []; + int currentDay = 0; int currentWeek = 0; @@ -56,15 +63,64 @@ class _MealPlanPageState extends State { Container( decoration: containerRadius(Colors.white, 12), child: AppExpandableNotifier( - title: "Breakfast TAT: 10:00 AM", + title: "Breakfast TAT: " + DateUtil.convertTime(getMealsScheduleResponseModelList[0].tATTime), isTitleSingleLine: false, widgetColor: Colors.transparent, bodyWidget: Column( children: [ getDivider(), - Container( - height: 200.0, - ), + ListView.separated( + physics: BouncingScrollPhysics(), + padding: EdgeInsets.only(top: 12), + shrinkWrap: true, + itemBuilder: (context, index) { + return Container( + padding: EdgeInsets.all(21.0), + child: Row( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + LargeAvatar( + name: getMealItemsScheduleResponseModelBreakfast[index].description, + url: "https://www.pumpkinnspice.com/wp-content/uploads/2016/03/easy-breakfast-quesadillas-11-683x1024.jpg", + width: 60, + height: 60, + ), + SizedBox(width: 11), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + MyRichText( + "", + projectViewModel.isArabic ? _getMealItemsScheduleResponseModelBreakfast[index].filterName : _getMealItemsScheduleResponseModelBreakfast[index].filterName, + projectViewModel.isArabic), + // MyRichText( + // "", + // projectViewModel.isArabic + // ? getMealItemsScheduleResponseModelBreakfast[index].categoryDescriptionN + // : getMealItemsScheduleResponseModelBreakfast[index].categoryDescription ?? "", + // projectViewModel.isArabic), + ], + ), + ), + ], + ), + ); + }, + separatorBuilder: (context, index) { + return Padding( + padding: EdgeInsets.only(left: 15, right: 15), + child: Divider( + height: 1.5, + thickness: 1.0, + color: Colors.grey.shade200, + ), + ); + }, + itemCount: _getMealItemsScheduleResponseModelBreakfast.length), ], ), ), @@ -73,7 +129,7 @@ class _MealPlanPageState extends State { Container( decoration: containerRadius(Colors.white, 12), child: AppExpandableNotifier( - title: "Lunch TAT: 04:00 PM", + title: "Lunch TAT: " + DateUtil.convertTime(getMealsScheduleResponseModelList[1].tATTime), isTitleSingleLine: false, widgetColor: Colors.transparent, bodyWidget: Column( @@ -90,7 +146,7 @@ class _MealPlanPageState extends State { Container( decoration: containerRadius(Colors.white, 12), child: AppExpandableNotifier( - title: "Dinner TAT: 12:00 AM", + title: "Dinner TAT: " + DateUtil.convertTime(getMealsScheduleResponseModelList[2].tATTime), isTitleSingleLine: false, widgetColor: Colors.transparent, bodyWidget: Column( @@ -133,7 +189,6 @@ class _MealPlanPageState extends State { getCurrentWeekIDAndDay(getAdmittedPatientsResponseModel.dietType); } else { AppToast.showErrorToast(message: "No data found for admitted patient"); - getCurrentWeekIDAndDay(1); } }).catchError((err) { @@ -161,8 +216,8 @@ class _MealPlanPageState extends State { GifLoaderDialogUtils.showMyDialog(context); service.getMealsOfScheduleID(projectViewModel.inPatientProjectID, projectViewModel.getAdmissionInfoResponseModel.admissionNo, dietType, currentWeek, currentDay, context).then((res) { GifLoaderDialogUtils.hideDialog(context); - if (res["List_MOP_MealsOfScheduleID"] != null && res["List_MOP_MealsOfScheduleID"].length != 0) { - res['List_MOP_MealsOfScheduleID'].forEach((scheduleItem) { + if (res["List_MOP_MealsOfScheduleID_Mobile"] != null && res["List_MOP_MealsOfScheduleID_Mobile"].length != 0) { + res['List_MOP_MealsOfScheduleID_Mobile'].forEach((scheduleItem) { getMealsScheduleResponseModelList.add(GetMealsScheduleResponseModel.fromJson(scheduleItem)); }); getDefaultItemsOfScheduleID(getMealsScheduleResponseModelList[0].scheduleID, 1); @@ -187,23 +242,63 @@ class _MealPlanPageState extends State { res['List_MOP_DefaultItemsOfMealModel'].forEach((scheduleItem) { getMealItemsScheduleResponseModelBreakfast.add(GetMealItemsScheduleResponseModel.fromJson(scheduleItem)); }); + sortMealsByCategoryBreakfast(); } if (mealType == 2) { res['List_MOP_DefaultItemsOfMealModel'].forEach((scheduleItem) { getMealItemsScheduleResponseModelLunch.add(GetMealItemsScheduleResponseModel.fromJson(scheduleItem)); }); + sortMealsByCategoryLunch(); } if (mealType == 3) { res['List_MOP_DefaultItemsOfMealModel'].forEach((scheduleItem) { getMealItemsScheduleResponseModelDinner.add(GetMealItemsScheduleResponseModel.fromJson(scheduleItem)); }); + sortMealsByCategoryDinner(); } } else { AppToast.showErrorToast(message: "No meal items found for admitted patient"); } + setState(() {}); }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); print(err); }); } + + void sortMealsByCategoryBreakfast() { + getMealItemsScheduleResponseModelBreakfast.forEach((element) { + List breakfastMealItems = + _getMealItemsScheduleResponseModelBreakfast.where((elementClinic) => elementClinic.filterName == element.categoryDescription).toList(); + if (breakfastMealItems.length != 0) { + _getMealItemsScheduleResponseModelBreakfast[_getMealItemsScheduleResponseModelBreakfast.indexOf(breakfastMealItems[0])].getMealItemsScheduleResponseModelList.add(element); + } else { + _getMealItemsScheduleResponseModelBreakfast.add(GetMealItemsScheduleResponseModelList(filterName: element.categoryDescription, getMealItemsScheduleResponseModel: element)); + } + }); + } + + void sortMealsByCategoryLunch() { + getMealItemsScheduleResponseModelLunch.forEach((element) { + List breakfastMealItems = + _getMealItemsScheduleResponseModelLunch.where((elementClinic) => elementClinic.filterName == element.categoryDescription).toList(); + if (breakfastMealItems.length != 0) { + _getMealItemsScheduleResponseModelLunch[_getMealItemsScheduleResponseModelLunch.indexOf(breakfastMealItems[0])].getMealItemsScheduleResponseModelList.add(element); + } else { + _getMealItemsScheduleResponseModelLunch.add(GetMealItemsScheduleResponseModelList(filterName: element.categoryDescription, getMealItemsScheduleResponseModel: element)); + } + }); + } + + void sortMealsByCategoryDinner() { + getMealItemsScheduleResponseModelDinner.forEach((element) { + List breakfastMealItems = + _getMealItemsScheduleResponseModelDinner.where((elementClinic) => elementClinic.filterName == element.categoryDescription).toList(); + if (breakfastMealItems.length != 0) { + _getMealItemsScheduleResponseModelDinner[_getMealItemsScheduleResponseModelDinner.indexOf(breakfastMealItems[0])].getMealItemsScheduleResponseModelList.add(element); + } else { + _getMealItemsScheduleResponseModelDinner.add(GetMealItemsScheduleResponseModelList(filterName: element.categoryDescription, getMealItemsScheduleResponseModel: element)); + } + }); + } } diff --git a/lib/pages/MyAppointments/MyAppointments.dart b/lib/pages/MyAppointments/MyAppointments.dart index cccff881..61bb1f56 100644 --- a/lib/pages/MyAppointments/MyAppointments.dart +++ b/lib/pages/MyAppointments/MyAppointments.dart @@ -378,7 +378,9 @@ class _MyAppointmentsState extends State with SingleTickerProvid date: DateUtil.convertStringToDate(_appointmentResult.appointmentDate), isSortByClinic: _isSortByClinic, rating: _appointmentResult.actualDoctorRate + 0.0, - appointmentTime: _appointmentResult.isLiveCareAppointment ? DateUtil.convertStringToDate(_appointmentResult.appointmentDate).toString().split(" ")[1].substring(0, 5) : _appointmentResult.startTime.substring(0, 5), + appointmentTime: _appointmentResult.isLiveCareAppointment + ? DateUtil.convertStringToDate(_appointmentResult.appointmentDate).toString().split(" ")[1].substring(0, 5) + : _appointmentResult.startTime.substring(0, 5), // appointmentTime: _appointmentResult.startTime.substring(0, 5), remainingTimeInMinutes: (_appointmentResult.patientStatusType == AppointmentType.BOOKED || _appointmentResult.patientStatusType == AppointmentType.CONFIRMED) ? _appointmentResult.remaniningHoursTocanPay diff --git a/lib/services/clinic_services/get_clinic_service.dart b/lib/services/clinic_services/get_clinic_service.dart index be556ea2..5339662a 100644 --- a/lib/services/clinic_services/get_clinic_service.dart +++ b/lib/services/clinic_services/get_clinic_service.dart @@ -279,8 +279,8 @@ class ClinicListService extends BaseService { Map request; request = { "ProjectID": projectID, - "PatientID" : 3649746, - "AdmissionNo": 2023000036, + "PatientID" : patientID, + "AdmissionNo": admissionNo, "BuildingID" : buildingID, "FloorID" : floorID, "NursingStationID": nursingStationID diff --git a/lib/uitl/date_uitl.dart b/lib/uitl/date_uitl.dart index cac6a07d..064ad274 100644 --- a/lib/uitl/date_uitl.dart +++ b/lib/uitl/date_uitl.dart @@ -1,4 +1,5 @@ import 'package:device_calendar/device_calendar.dart'; +import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; class DateUtil { @@ -90,6 +91,17 @@ class DateUtil { return start + "$milliseconds" + end; } + static String convertTime(String timeStr) { + TimeOfDay time = TimeOfDay(hour: num.parse(timeStr.split(":")[0]), minute: num.parse(timeStr.split(":")[1])); // 24-hour format time + + int hour = time.hourOfPeriod; // get hour in 12-hour format + String meridiem = time.period == DayPeriod.am ? "AM" : "PM"; // get AM/PM + + String convertedTime = '$hour:${time.minute == 0 ? "00" : time.minute} $meridiem'; // create the new time string + + return convertedTime; + } + static String formatDateToDate(DateTime date, bool isArabic) { return DateFormat('dd MMM yyy', isArabic ? "ar_SA" : "en_US").format(date); } diff --git a/lib/widgets/avatar/large_avatar.dart b/lib/widgets/avatar/large_avatar.dart index 131a2820..39a341bf 100644 --- a/lib/widgets/avatar/large_avatar.dart +++ b/lib/widgets/avatar/large_avatar.dart @@ -64,7 +64,6 @@ class LargeAvatar extends StatelessWidget { onTap: disableProfileView ? null : isAppointmentAvatar ? onTap : () { - print("ssssss " + url.trim()); showZoomImageDialog(context, url.trim() ?? ""); }, child: Container( From 94296cec0d62eb843e5d576ef8c01c5294ddc066 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 12 Jul 2023 12:42:28 +0300 Subject: [PATCH 17/49] meal plan continued --- lib/pages/InPatientServices/meal_plan.dart | 107 +++++++++++++-------- 1 file changed, 69 insertions(+), 38 deletions(-) diff --git a/lib/pages/InPatientServices/meal_plan.dart b/lib/pages/InPatientServices/meal_plan.dart index 0f9e5b90..98a50700 100644 --- a/lib/pages/InPatientServices/meal_plan.dart +++ b/lib/pages/InPatientServices/meal_plan.dart @@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/models/InPatientServices/get_admitted_patie import 'package:diplomaticquarterapp/models/InPatientServices/get_meal_items_schedule_response_model.dart'; import 'package:diplomaticquarterapp/models/InPatientServices/get_meals_schedule_response_model.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; @@ -71,41 +72,65 @@ class _MealPlanPageState extends State { getDivider(), ListView.separated( physics: BouncingScrollPhysics(), - padding: EdgeInsets.only(top: 12), shrinkWrap: true, itemBuilder: (context, index) { return Container( padding: EdgeInsets.all(21.0), - child: Row( - mainAxisSize: MainAxisSize.min, + child: Column( crossAxisAlignment: CrossAxisAlignment.start, - children: [ - LargeAvatar( - name: getMealItemsScheduleResponseModelBreakfast[index].description, - url: "https://www.pumpkinnspice.com/wp-content/uploads/2016/03/easy-breakfast-quesadillas-11-683x1024.jpg", - width: 60, - height: 60, - ), - SizedBox(width: 11), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - MyRichText( - "", - projectViewModel.isArabic ? _getMealItemsScheduleResponseModelBreakfast[index].filterName : _getMealItemsScheduleResponseModelBreakfast[index].filterName, - projectViewModel.isArabic), - // MyRichText( - // "", - // projectViewModel.isArabic - // ? getMealItemsScheduleResponseModelBreakfast[index].categoryDescriptionN - // : getMealItemsScheduleResponseModelBreakfast[index].categoryDescription ?? "", - // projectViewModel.isArabic), - ], - ), + children: [ + Text(_getMealItemsScheduleResponseModelBreakfast[index].filterName, + style: TextStyle(fontWeight: FontWeight.w600, fontSize: 18.0, letterSpacing: -0.64, color: CustomColors.darkGrey)), + SizedBox( + height: 12.0, ), + ListView.separated( + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemBuilder: (context, index2) { + return Container( + child: Row( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + LargeAvatar( + name: _getMealItemsScheduleResponseModelBreakfast[index].getMealItemsScheduleResponseModelList[index2].description, + url: "https://www.pumpkinnspice.com/wp-content/uploads/2016/03/easy-breakfast-quesadillas-11-683x1024.jpg", + width: 60, + height: 60, + radius: 5, + disableProfileView: true, + ), + SizedBox(width: 11), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + MyRichText( + "", + projectViewModel.isArabic + ? _getMealItemsScheduleResponseModelBreakfast[index].getMealItemsScheduleResponseModelList[index2].descriptionN + : _getMealItemsScheduleResponseModelBreakfast[index].getMealItemsScheduleResponseModelList[index2].description, + projectViewModel.isArabic), + ], + ), + ), + ], + ), + ); + }, + separatorBuilder: (context, index) { + return Padding( + padding: EdgeInsets.all(16.0), + child: Divider( + height: 1.5, + thickness: 1.0, + color: Colors.grey.shade200, + ), + ); + }, + itemCount: _getMealItemsScheduleResponseModelBreakfast[index].getMealItemsScheduleResponseModelList.length), ], ), ); @@ -268,36 +293,42 @@ class _MealPlanPageState extends State { void sortMealsByCategoryBreakfast() { getMealItemsScheduleResponseModelBreakfast.forEach((element) { - List breakfastMealItems = - _getMealItemsScheduleResponseModelBreakfast.where((elementClinic) => elementClinic.filterName == element.categoryDescription).toList(); + List breakfastMealItems = _getMealItemsScheduleResponseModelBreakfast + .where((elementClinic) => elementClinic.filterName == (projectViewModel.isArabic ? element.categoryDescriptionN : element.categoryDescription)) + .toList(); if (breakfastMealItems.length != 0) { _getMealItemsScheduleResponseModelBreakfast[_getMealItemsScheduleResponseModelBreakfast.indexOf(breakfastMealItems[0])].getMealItemsScheduleResponseModelList.add(element); } else { - _getMealItemsScheduleResponseModelBreakfast.add(GetMealItemsScheduleResponseModelList(filterName: element.categoryDescription, getMealItemsScheduleResponseModel: element)); + _getMealItemsScheduleResponseModelBreakfast + .add(GetMealItemsScheduleResponseModelList(filterName: projectViewModel.isArabic ? element.categoryDescriptionN : element.categoryDescription, getMealItemsScheduleResponseModel: element)); } }); } void sortMealsByCategoryLunch() { getMealItemsScheduleResponseModelLunch.forEach((element) { - List breakfastMealItems = - _getMealItemsScheduleResponseModelLunch.where((elementClinic) => elementClinic.filterName == element.categoryDescription).toList(); + List breakfastMealItems = _getMealItemsScheduleResponseModelLunch + .where((elementClinic) => elementClinic.filterName == (projectViewModel.isArabic ? element.categoryDescriptionN : element.categoryDescription)) + .toList(); if (breakfastMealItems.length != 0) { _getMealItemsScheduleResponseModelLunch[_getMealItemsScheduleResponseModelLunch.indexOf(breakfastMealItems[0])].getMealItemsScheduleResponseModelList.add(element); } else { - _getMealItemsScheduleResponseModelLunch.add(GetMealItemsScheduleResponseModelList(filterName: element.categoryDescription, getMealItemsScheduleResponseModel: element)); + _getMealItemsScheduleResponseModelLunch + .add(GetMealItemsScheduleResponseModelList(filterName: projectViewModel.isArabic ? element.categoryDescriptionN : element.categoryDescription, getMealItemsScheduleResponseModel: element)); } }); } void sortMealsByCategoryDinner() { getMealItemsScheduleResponseModelDinner.forEach((element) { - List breakfastMealItems = - _getMealItemsScheduleResponseModelDinner.where((elementClinic) => elementClinic.filterName == element.categoryDescription).toList(); + List breakfastMealItems = _getMealItemsScheduleResponseModelDinner + .where((elementClinic) => elementClinic.filterName == (projectViewModel.isArabic ? element.categoryDescriptionN : element.categoryDescription)) + .toList(); if (breakfastMealItems.length != 0) { _getMealItemsScheduleResponseModelDinner[_getMealItemsScheduleResponseModelDinner.indexOf(breakfastMealItems[0])].getMealItemsScheduleResponseModelList.add(element); } else { - _getMealItemsScheduleResponseModelDinner.add(GetMealItemsScheduleResponseModelList(filterName: element.categoryDescription, getMealItemsScheduleResponseModel: element)); + _getMealItemsScheduleResponseModelDinner + .add(GetMealItemsScheduleResponseModelList(filterName: projectViewModel.isArabic ? element.categoryDescriptionN : element.categoryDescription, getMealItemsScheduleResponseModel: element)); } }); } From 96f948a8c85dac3e27b748fb5ac72af79aaeaaf2 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 12 Jul 2023 13:21:31 +0300 Subject: [PATCH 18/49] updates --- lib/pages/InPatientServices/meal_plan.dart | 167 +++++++++++++++++- .../others/app_expandable_notifier.dart | 21 ++- 2 files changed, 174 insertions(+), 14 deletions(-) diff --git a/lib/pages/InPatientServices/meal_plan.dart b/lib/pages/InPatientServices/meal_plan.dart index 98a50700..b9673bd6 100644 --- a/lib/pages/InPatientServices/meal_plan.dart +++ b/lib/pages/InPatientServices/meal_plan.dart @@ -62,11 +62,12 @@ class _MealPlanPageState extends State { child: Column( children: [ Container( - decoration: containerRadius(Colors.white, 12), + decoration: containerRadius(getMealsScheduleResponseModelList[0].isShow ? Colors.white : Colors.grey[300], 12), child: AppExpandableNotifier( title: "Breakfast TAT: " + DateUtil.convertTime(getMealsScheduleResponseModelList[0].tATTime), isTitleSingleLine: false, widgetColor: Colors.transparent, + isDisabled: !getMealsScheduleResponseModelList[0].isShow, bodyWidget: Column( children: [ getDivider(), @@ -152,34 +153,182 @@ class _MealPlanPageState extends State { ), mHeight(21), Container( - decoration: containerRadius(Colors.white, 12), + decoration: containerRadius(getMealsScheduleResponseModelList[1].isShow ? Colors.white : Colors.grey[300], 12), child: AppExpandableNotifier( title: "Lunch TAT: " + DateUtil.convertTime(getMealsScheduleResponseModelList[1].tATTime), isTitleSingleLine: false, widgetColor: Colors.transparent, + isDisabled: !getMealsScheduleResponseModelList[1].isShow, bodyWidget: Column( children: [ getDivider(), - Container( - height: 200.0, - ), + ListView.separated( + physics: BouncingScrollPhysics(), + shrinkWrap: true, + itemBuilder: (context, index) { + return Container( + padding: EdgeInsets.all(21.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(_getMealItemsScheduleResponseModelLunch[index].filterName, + style: TextStyle(fontWeight: FontWeight.w600, fontSize: 18.0, letterSpacing: -0.64, color: CustomColors.darkGrey)), + SizedBox( + height: 12.0, + ), + ListView.separated( + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemBuilder: (context, index2) { + return Container( + child: Row( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + LargeAvatar( + name: _getMealItemsScheduleResponseModelLunch[index].getMealItemsScheduleResponseModelList[index2].description, + url: "https://www.pumpkinnspice.com/wp-content/uploads/2016/03/easy-breakfast-quesadillas-11-683x1024.jpg", + width: 60, + height: 60, + radius: 5, + disableProfileView: true, + ), + SizedBox(width: 11), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + MyRichText( + "", + projectViewModel.isArabic + ? _getMealItemsScheduleResponseModelLunch[index].getMealItemsScheduleResponseModelList[index2].descriptionN + : _getMealItemsScheduleResponseModelLunch[index].getMealItemsScheduleResponseModelList[index2].description, + projectViewModel.isArabic), + ], + ), + ), + ], + ), + ); + }, + separatorBuilder: (context, index) { + return Padding( + padding: EdgeInsets.all(16.0), + child: Divider( + height: 1.5, + thickness: 1.0, + color: Colors.grey.shade200, + ), + ); + }, + itemCount: _getMealItemsScheduleResponseModelLunch[index].getMealItemsScheduleResponseModelList.length), + ], + ), + ); + }, + separatorBuilder: (context, index) { + return Padding( + padding: EdgeInsets.only(left: 15, right: 15), + child: Divider( + height: 1.5, + thickness: 1.0, + color: Colors.grey.shade200, + ), + ); + }, + itemCount: _getMealItemsScheduleResponseModelLunch.length), ], ), ), ), mHeight(21), Container( - decoration: containerRadius(Colors.white, 12), + decoration: containerRadius(getMealsScheduleResponseModelList[2].isShow ? Colors.white : Colors.grey[300], 12), child: AppExpandableNotifier( title: "Dinner TAT: " + DateUtil.convertTime(getMealsScheduleResponseModelList[2].tATTime), isTitleSingleLine: false, widgetColor: Colors.transparent, + isDisabled: !getMealsScheduleResponseModelList[2].isShow, bodyWidget: Column( children: [ getDivider(), - Container( - height: 200.0, - ), + ListView.separated( + physics: BouncingScrollPhysics(), + shrinkWrap: true, + itemBuilder: (context, index) { + return Container( + padding: EdgeInsets.all(21.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(_getMealItemsScheduleResponseModelDinner[index].filterName, + style: TextStyle(fontWeight: FontWeight.w600, fontSize: 18.0, letterSpacing: -0.64, color: CustomColors.darkGrey)), + SizedBox( + height: 12.0, + ), + ListView.separated( + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemBuilder: (context, index2) { + return Container( + child: Row( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + LargeAvatar( + name: _getMealItemsScheduleResponseModelDinner[index].getMealItemsScheduleResponseModelList[index2].description, + url: "https://www.pumpkinnspice.com/wp-content/uploads/2016/03/easy-breakfast-quesadillas-11-683x1024.jpg", + width: 60, + height: 60, + radius: 5, + disableProfileView: true, + ), + SizedBox(width: 11), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + MyRichText( + "", + projectViewModel.isArabic + ? _getMealItemsScheduleResponseModelDinner[index].getMealItemsScheduleResponseModelList[index2].descriptionN + : _getMealItemsScheduleResponseModelDinner[index].getMealItemsScheduleResponseModelList[index2].description, + projectViewModel.isArabic), + ], + ), + ), + ], + ), + ); + }, + separatorBuilder: (context, index) { + return Padding( + padding: EdgeInsets.all(16.0), + child: Divider( + height: 1.5, + thickness: 1.0, + color: Colors.grey.shade200, + ), + ); + }, + itemCount: _getMealItemsScheduleResponseModelDinner[index].getMealItemsScheduleResponseModelList.length), + ], + ), + ); + }, + separatorBuilder: (context, index) { + return Padding( + padding: EdgeInsets.only(left: 15, right: 15), + child: Divider( + height: 1.5, + thickness: 1.0, + color: Colors.grey.shade200, + ), + ); + }, + itemCount: _getMealItemsScheduleResponseModelDinner.length), ], ), ), diff --git a/lib/widgets/others/app_expandable_notifier.dart b/lib/widgets/others/app_expandable_notifier.dart index 0c30b7cd..3f9d0b91 100644 --- a/lib/widgets/others/app_expandable_notifier.dart +++ b/lib/widgets/others/app_expandable_notifier.dart @@ -23,9 +23,19 @@ class AppExpandableNotifier extends StatefulWidget { Color widgetColor = Colors.white; var controller = new ExpandableController(); bool isTitleSingleLine; + bool isDisabled = false; AppExpandableNotifier( - {this.headerWidget, this.bodyWidget, this.title, this.collapsed, this.isExpand = false, this.isTitleSingleLine = true, this.hasCounter = false, this.counter = "0", this.widgetColor}); + {this.headerWidget, + this.bodyWidget, + this.title, + this.collapsed, + this.isExpand = false, + this.isTitleSingleLine = true, + this.hasCounter = false, + this.counter = "0", + this.widgetColor, + this.isDisabled = false}); _AppExpandableNotifier createState() => _AppExpandableNotifier(); } @@ -81,10 +91,11 @@ class _AppExpandableNotifier extends State { padding: const EdgeInsets.only(top: 20, bottom: 20, left: 21, right: 21), child: InkWell( onTap: () { - setState(() { - widget.expandFlag = !widget.expandFlag; - widget.controller.expanded = widget.expandFlag; - }); + if (!widget.isDisabled) + setState(() { + widget.expandFlag = !widget.expandFlag; + widget.controller.expanded = widget.expandFlag; + }); }, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, From bc27121c4e79ec7e8e63e88f976f92c81dcd6912 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Thu, 13 Jul 2023 10:20:55 +0300 Subject: [PATCH 19/49] meal plan updates --- lib/config/config.dart | 4 ++-- lib/core/service/client/base_app_client.dart | 8 ++++---- lib/pages/InPatientServices/meal_plan.dart | 17 ++++++++++++++--- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index 5c02d229..cb4bb903 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -20,8 +20,8 @@ var PACKAGES_ORDERS = '/api/orders'; var PACKAGES_ORDER_HISTORY = '/api/orders/items'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; // var BASE_URL = 'http://10.50.100.198:3334/'; - var BASE_URL = 'https://uat.hmgwebservices.com/'; -// var BASE_URL = 'https://hmgwebservices.com/'; +// var BASE_URL = 'https://uat.hmgwebservices.com/'; +var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 69a55ddf..08cb2b36 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -149,12 +149,12 @@ class BaseAppClient { // body['IdentificationNo'] = 1023854217; // body['MobileNo'] = "531940021"; - // body['PatientID'] = 3649542; //3844083 + // body['PatientID'] = 2480363; //3844083 // body['TokenID'] = "@dm!n"; - body['PatientID'] = 3649238; //3844083 - body['AdmissionNo'] = 2023000038; //3844083 - body['TokenID'] = "@dm!n"; + // body['PatientID'] = 3649238; //3844083 + // body['AdmissionNo'] = 2023000038; //3844083 + // body['TokenID'] = "@dm!n"; // Patient ID: 3027574 // Mobile no.: 0502303285 diff --git a/lib/pages/InPatientServices/meal_plan.dart b/lib/pages/InPatientServices/meal_plan.dart index b9673bd6..2af39b61 100644 --- a/lib/pages/InPatientServices/meal_plan.dart +++ b/lib/pages/InPatientServices/meal_plan.dart @@ -276,6 +276,17 @@ class _MealPlanPageState extends State { mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ + Radio( + value: index, + groupValue: _getMealItemsScheduleResponseModelDinner[index].filterName, + activeColor: Colors.red[800], + onChanged: (value) { + // setState(() { + // selected = value; + // parameterCode = model.askDoctorReqTypes[index].parameterCode; + // }); + }, + ), LargeAvatar( name: _getMealItemsScheduleResponseModelDinner[index].getMealItemsScheduleResponseModelList[index2].description, url: "https://www.pumpkinnspice.com/wp-content/uploads/2016/03/easy-breakfast-quesadillas-11-683x1024.jpg", @@ -394,9 +405,9 @@ class _MealPlanPageState extends State { res['List_MOP_MealsOfScheduleID_Mobile'].forEach((scheduleItem) { getMealsScheduleResponseModelList.add(GetMealsScheduleResponseModel.fromJson(scheduleItem)); }); - getDefaultItemsOfScheduleID(getMealsScheduleResponseModelList[0].scheduleID, 1); - getDefaultItemsOfScheduleID(getMealsScheduleResponseModelList[1].scheduleID, 2); - getDefaultItemsOfScheduleID(getMealsScheduleResponseModelList[2].scheduleID, 3); + if (getMealsScheduleResponseModelList[0].isShow) getDefaultItemsOfScheduleID(getMealsScheduleResponseModelList[0].scheduleID, 1); + if (getMealsScheduleResponseModelList[1].isShow) getDefaultItemsOfScheduleID(getMealsScheduleResponseModelList[1].scheduleID, 2); + if (getMealsScheduleResponseModelList[2].isShow) getDefaultItemsOfScheduleID(getMealsScheduleResponseModelList[2].scheduleID, 3); } else { AppToast.showErrorToast(message: "No meal schedule found for admitted patient"); } From 0e054429ef65ae682360353363015db65615f8bd Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Thu, 13 Jul 2023 16:26:35 +0300 Subject: [PATCH 20/49] Meal Plan implementation completed --- lib/config/config.dart | 5 +- lib/config/localized_values.dart | 2 + lib/core/service/client/base_app_client.dart | 4 +- ...et_meal_items_schedule_response_model.dart | 5 + .../InPatientServices/birth_notification.dart | 34 +- lib/pages/InPatientServices/meal_plan.dart | 697 +++++++++++------- .../clinic_services/get_clinic_service.dart | 45 +- lib/uitl/translations_delegate_base.dart | 2 + lib/uitl/utils_new.dart | 102 +-- 9 files changed, 519 insertions(+), 377 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index cb4bb903..f5c991ab 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -20,8 +20,8 @@ var PACKAGES_ORDERS = '/api/orders'; var PACKAGES_ORDER_HISTORY = '/api/orders/items'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; // var BASE_URL = 'http://10.50.100.198:3334/'; -// var BASE_URL = 'https://uat.hmgwebservices.com/'; -var BASE_URL = 'https://hmgwebservices.com/'; + var BASE_URL = 'https://uat.hmgwebservices.com/'; +// var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; @@ -611,6 +611,7 @@ var GET_ADMITTED_PATIENTS = 'Services/MOP.svc/REST/GetAdmittedPatients'; var GET_CURRENT_WEEKID_WEEKDAY = 'Services/MOP.svc/REST/GetCurrentWeekAndDayHMGMP'; var GET_MEALS_OF_SCHEDULE_ID = 'Services/MOP.svc/REST/GetMealsOfScheduleID_Mobile'; var GET_MEAL_ITEMS_OF_SCHEDULE_ID = 'Services/MOP.svc/REST/GetDefaultItemsOfScheduleID'; +var PLACE_MEAL_PLAN_ORDER = 'Services/MOP.svc/REST/UpdateOrMakeNewOrder'; class AppGlobal { static var context; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 65b2f90b..510dd4a4 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1925,4 +1925,6 @@ const Map localizedValues = { }, "birthNotificationNotes2": {"en": "Non Saudis: Provide copy of iqama or copy of the passport.", "ar": "لغير السعوديين : إرفاق صورة الإقامة آأو جواز السفر"}, "birthNotificationNotes3": {"en": "For Residents without identification card: Provide marriage contract.", "ar": "للمواطنين الغير حاملين لبطاقة الأحوال : إرفاق صورة من عقد الزواج برقم الحاسب"}, + "placeOrder": {"en": "Place Order", "ar": "مكان الامر"}, + "isFasting": {"en": "Are you fasting?", "ar": "هل أنت صائم؟"}, }; \ No newline at end of file diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 08cb2b36..7b8874d3 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -152,8 +152,8 @@ class BaseAppClient { // body['PatientID'] = 2480363; //3844083 // body['TokenID'] = "@dm!n"; - // body['PatientID'] = 3649238; //3844083 - // body['AdmissionNo'] = 2023000038; //3844083 + // body['PatientID'] = 3649689; //3844083 + // body['AdmissionNo'] = 2023000040; //3844083 // body['TokenID'] = "@dm!n"; // Patient ID: 3027574 diff --git a/lib/models/InPatientServices/get_meal_items_schedule_response_model.dart b/lib/models/InPatientServices/get_meal_items_schedule_response_model.dart index 57ba4cb8..c55d716d 100644 --- a/lib/models/InPatientServices/get_meal_items_schedule_response_model.dart +++ b/lib/models/InPatientServices/get_meal_items_schedule_response_model.dart @@ -1,3 +1,5 @@ +import 'package:flutter/material.dart'; + class GetMealItemsScheduleResponseModel { int itemID; String description; @@ -63,6 +65,9 @@ class GetMealItemsScheduleResponseModelList { String filterName = ""; List getMealItemsScheduleResponseModelList = []; + // int selectedItemID = 0; + final ValueNotifier selectedItemID = ValueNotifier(0); + GetMealItemsScheduleResponseModelList({this.filterName, GetMealItemsScheduleResponseModel getMealItemsScheduleResponseModel}) { getMealItemsScheduleResponseModelList.add(getMealItemsScheduleResponseModel); } diff --git a/lib/pages/InPatientServices/birth_notification.dart b/lib/pages/InPatientServices/birth_notification.dart index 3c4d43f9..c5f78af9 100644 --- a/lib/pages/InPatientServices/birth_notification.dart +++ b/lib/pages/InPatientServices/birth_notification.dart @@ -168,20 +168,25 @@ class _BirthNotificationState extends State { // color: CustomColors.accentColor, // disabledColor: CustomColors.grey2, // ), - DefaultButton( - TranslationBase.of(context).submit, - (fatherNameAR.text.isEmpty || fatherName.text.isEmpty || babyNameAR.text.isEmpty || babyName.text.isEmpty || images.isEmpty) - ? null - : () { - submitBirthNotification(); - }, - color: CustomColors.accentColor, - disabledColor: CustomColors.grey2, - ), ], ), ), ), + bottomSheet: Container( + color: Colors.white, + width: double.infinity, + padding: EdgeInsets.all(20), + child: DefaultButton( + TranslationBase.of(context).submit, + (fatherNameAR.text.isEmpty || fatherName.text.isEmpty || babyNameAR.text.isEmpty || babyName.text.isEmpty || images.isEmpty) + ? null + : () { + submitBirthNotification(); + }, + color: CustomColors.accentColor, + disabledColor: CustomColors.grey2, + ), + ), ); } @@ -210,15 +215,6 @@ class _BirthNotificationState extends State { images.clear(); images.add(image); setState(() {}); - // GifLoaderDialogUtils.showMyDialog(context); - // await model.uploadInsuranceCard(context, patientIdentificationID: patientIdentificationID, patientID: patientID, image: image); - // GifLoaderDialogUtils.hideDialog(context); - // if (model.state == ViewState.ErrorLocal || model.state == ViewState.Error) { - // AppToast.showErrorToast(message: model.error); - // } else { - // AppToast.showSuccessToast(message: TranslationBase.of(context).requestSent); - // } - // Navigator.pop(context); }, isBirthNotification: true, ), diff --git a/lib/pages/InPatientServices/meal_plan.dart b/lib/pages/InPatientServices/meal_plan.dart index 2af39b61..d69e1149 100644 --- a/lib/pages/InPatientServices/meal_plan.dart +++ b/lib/pages/InPatientServices/meal_plan.dart @@ -10,6 +10,7 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/my_rich_text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -39,6 +40,11 @@ class _MealPlanPageState extends State { int currentDay = 0; int currentWeek = 0; + int selectedMealScheduleID = 0; + + final ValueNotifier isFasting = ValueNotifier(false); + bool isFastingVal = false; + @override void initState() { super.initState(); @@ -59,298 +65,405 @@ class _MealPlanPageState extends State { body: SingleChildScrollView( child: Padding( padding: EdgeInsets.all(21.0), - child: Column( - children: [ - Container( - decoration: containerRadius(getMealsScheduleResponseModelList[0].isShow ? Colors.white : Colors.grey[300], 12), - child: AppExpandableNotifier( - title: "Breakfast TAT: " + DateUtil.convertTime(getMealsScheduleResponseModelList[0].tATTime), - isTitleSingleLine: false, - widgetColor: Colors.transparent, - isDisabled: !getMealsScheduleResponseModelList[0].isShow, - bodyWidget: Column( - children: [ - getDivider(), - ListView.separated( - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, index) { - return Container( - padding: EdgeInsets.all(21.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text(_getMealItemsScheduleResponseModelBreakfast[index].filterName, - style: TextStyle(fontWeight: FontWeight.w600, fontSize: 18.0, letterSpacing: -0.64, color: CustomColors.darkGrey)), - SizedBox( - height: 12.0, - ), - ListView.separated( - physics: NeverScrollableScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, index2) { - return Container( - child: Row( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - LargeAvatar( - name: _getMealItemsScheduleResponseModelBreakfast[index].getMealItemsScheduleResponseModelList[index2].description, - url: "https://www.pumpkinnspice.com/wp-content/uploads/2016/03/easy-breakfast-quesadillas-11-683x1024.jpg", - width: 60, - height: 60, - radius: 5, - disableProfileView: true, - ), - SizedBox(width: 11), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + child: getMealsScheduleResponseModelList.length != 0 + ? Column( + children: [ + Container( + decoration: containerRadius((getMealsScheduleResponseModelList[0].isShow) ? Colors.white : Colors.grey[300], 12), + child: AppExpandableNotifier( + title: "Breakfast TAT: " + DateUtil.convertTime(getMealsScheduleResponseModelList[0].tATTime), + isTitleSingleLine: false, + widgetColor: Colors.transparent, + isExpand: getMealsScheduleResponseModelList[0].isShow, + isDisabled: !getMealsScheduleResponseModelList[0].isShow, + bodyWidget: Column( + children: [ + getDivider(), + ListView.separated( + physics: BouncingScrollPhysics(), + shrinkWrap: true, + itemBuilder: (context, index) { + return Container( + padding: EdgeInsets.all(21.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(_getMealItemsScheduleResponseModelBreakfast[index].filterName, + style: TextStyle(fontWeight: FontWeight.w600, fontSize: 18.0, letterSpacing: -0.64, color: CustomColors.darkGrey)), + SizedBox( + height: 12.0, + ), + ListView.separated( + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemBuilder: (context, index2) { + return Container( + child: Row( mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - MyRichText( - "", - projectViewModel.isArabic - ? _getMealItemsScheduleResponseModelBreakfast[index].getMealItemsScheduleResponseModelList[index2].descriptionN - : _getMealItemsScheduleResponseModelBreakfast[index].getMealItemsScheduleResponseModelList[index2].description, - projectViewModel.isArabic), + ValueListenableBuilder( + valueListenable: _getMealItemsScheduleResponseModelBreakfast[index].selectedItemID, + builder: (context, val, child) { + return Radio( + value: _getMealItemsScheduleResponseModelBreakfast[index].getMealItemsScheduleResponseModelList[index2].itemID, + groupValue: _getMealItemsScheduleResponseModelBreakfast[index].selectedItemID.value, + activeColor: Colors.red[800], + onChanged: (value) { + _getMealItemsScheduleResponseModelBreakfast[index].selectedItemID.value = value; + }, + ); + }), + LargeAvatar( + name: _getMealItemsScheduleResponseModelBreakfast[index].getMealItemsScheduleResponseModelList[index2].description, + url: "https://www.pumpkinnspice.com/wp-content/uploads/2016/03/easy-breakfast-quesadillas-11-683x1024.jpg", + width: 60, + height: 60, + radius: 5, + disableProfileView: true, + ), + SizedBox(width: 11), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + MyRichText( + "", + projectViewModel.isArabic + ? _getMealItemsScheduleResponseModelBreakfast[index].getMealItemsScheduleResponseModelList[index2].descriptionN + : _getMealItemsScheduleResponseModelBreakfast[index].getMealItemsScheduleResponseModelList[index2].description, + projectViewModel.isArabic), + ], + ), + ), ], ), - ), - ], - ), - ); - }, - separatorBuilder: (context, index) { - return Padding( - padding: EdgeInsets.all(16.0), - child: Divider( - height: 1.5, - thickness: 1.0, - color: Colors.grey.shade200, - ), - ); - }, - itemCount: _getMealItemsScheduleResponseModelBreakfast[index].getMealItemsScheduleResponseModelList.length), - ], - ), - ); - }, - separatorBuilder: (context, index) { - return Padding( - padding: EdgeInsets.only(left: 15, right: 15), - child: Divider( - height: 1.5, - thickness: 1.0, - color: Colors.grey.shade200, - ), - ); - }, - itemCount: _getMealItemsScheduleResponseModelBreakfast.length), - ], - ), - ), - ), - mHeight(21), - Container( - decoration: containerRadius(getMealsScheduleResponseModelList[1].isShow ? Colors.white : Colors.grey[300], 12), - child: AppExpandableNotifier( - title: "Lunch TAT: " + DateUtil.convertTime(getMealsScheduleResponseModelList[1].tATTime), - isTitleSingleLine: false, - widgetColor: Colors.transparent, - isDisabled: !getMealsScheduleResponseModelList[1].isShow, - bodyWidget: Column( - children: [ - getDivider(), - ListView.separated( - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, index) { - return Container( - padding: EdgeInsets.all(21.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text(_getMealItemsScheduleResponseModelLunch[index].filterName, - style: TextStyle(fontWeight: FontWeight.w600, fontSize: 18.0, letterSpacing: -0.64, color: CustomColors.darkGrey)), - SizedBox( - height: 12.0, - ), - ListView.separated( - physics: NeverScrollableScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, index2) { - return Container( - child: Row( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - LargeAvatar( - name: _getMealItemsScheduleResponseModelLunch[index].getMealItemsScheduleResponseModelList[index2].description, - url: "https://www.pumpkinnspice.com/wp-content/uploads/2016/03/easy-breakfast-quesadillas-11-683x1024.jpg", - width: 60, - height: 60, - radius: 5, - disableProfileView: true, - ), - SizedBox(width: 11), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + ); + }, + separatorBuilder: (context, index) { + return Padding( + padding: EdgeInsets.all(16.0), + child: Divider( + height: 1.5, + thickness: 1.0, + color: Colors.grey.shade200, + ), + ); + }, + itemCount: _getMealItemsScheduleResponseModelBreakfast[index].getMealItemsScheduleResponseModelList.length), + ], + ), + ); + }, + separatorBuilder: (context, index) { + return Padding( + padding: EdgeInsets.only(left: 15, right: 15), + child: Divider( + height: 1.5, + thickness: 1.0, + color: Colors.grey.shade200, + ), + ); + }, + itemCount: _getMealItemsScheduleResponseModelBreakfast.length), + ], + ), + ), + ), + mHeight(21), + Container( + decoration: containerRadius(getMealsScheduleResponseModelList[1].isShow ? Colors.white : Colors.grey[300], 12), + child: AppExpandableNotifier( + title: "Lunch TAT: " + DateUtil.convertTime(getMealsScheduleResponseModelList[1].tATTime), + isTitleSingleLine: false, + widgetColor: Colors.transparent, + isExpand: getMealsScheduleResponseModelList[1].isShow, + isDisabled: !getMealsScheduleResponseModelList[1].isShow, + bodyWidget: Column( + children: [ + getDivider(), + ListView.separated( + physics: BouncingScrollPhysics(), + shrinkWrap: true, + itemBuilder: (context, index) { + return Container( + padding: EdgeInsets.all(21.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(_getMealItemsScheduleResponseModelLunch[index].filterName, + style: TextStyle(fontWeight: FontWeight.w600, fontSize: 18.0, letterSpacing: -0.64, color: CustomColors.darkGrey)), + SizedBox( + height: 12.0, + ), + ListView.separated( + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemBuilder: (context, index2) { + return Container( + child: Row( mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - MyRichText( - "", - projectViewModel.isArabic - ? _getMealItemsScheduleResponseModelLunch[index].getMealItemsScheduleResponseModelList[index2].descriptionN - : _getMealItemsScheduleResponseModelLunch[index].getMealItemsScheduleResponseModelList[index2].description, - projectViewModel.isArabic), + ValueListenableBuilder( + valueListenable: _getMealItemsScheduleResponseModelLunch[index].selectedItemID, + builder: (context, val, child) { + return Radio( + value: _getMealItemsScheduleResponseModelLunch[index].getMealItemsScheduleResponseModelList[index2].itemID, + groupValue: _getMealItemsScheduleResponseModelLunch[index].selectedItemID.value, + activeColor: Colors.red[800], + onChanged: (value) { + _getMealItemsScheduleResponseModelLunch[index].selectedItemID.value = value; + }, + ); + }), + LargeAvatar( + name: _getMealItemsScheduleResponseModelLunch[index].getMealItemsScheduleResponseModelList[index2].description, + url: "https://www.pumpkinnspice.com/wp-content/uploads/2016/03/easy-breakfast-quesadillas-11-683x1024.jpg", + width: 60, + height: 60, + radius: 5, + disableProfileView: true, + ), + SizedBox(width: 11), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + MyRichText( + "", + projectViewModel.isArabic + ? _getMealItemsScheduleResponseModelLunch[index].getMealItemsScheduleResponseModelList[index2].descriptionN + : _getMealItemsScheduleResponseModelLunch[index].getMealItemsScheduleResponseModelList[index2].description, + projectViewModel.isArabic), + ], + ), + ), ], ), - ), - ], - ), - ); - }, - separatorBuilder: (context, index) { - return Padding( - padding: EdgeInsets.all(16.0), - child: Divider( - height: 1.5, - thickness: 1.0, - color: Colors.grey.shade200, - ), - ); - }, - itemCount: _getMealItemsScheduleResponseModelLunch[index].getMealItemsScheduleResponseModelList.length), - ], - ), - ); - }, - separatorBuilder: (context, index) { - return Padding( - padding: EdgeInsets.only(left: 15, right: 15), - child: Divider( - height: 1.5, - thickness: 1.0, - color: Colors.grey.shade200, - ), - ); - }, - itemCount: _getMealItemsScheduleResponseModelLunch.length), - ], - ), - ), - ), - mHeight(21), - Container( - decoration: containerRadius(getMealsScheduleResponseModelList[2].isShow ? Colors.white : Colors.grey[300], 12), - child: AppExpandableNotifier( - title: "Dinner TAT: " + DateUtil.convertTime(getMealsScheduleResponseModelList[2].tATTime), - isTitleSingleLine: false, - widgetColor: Colors.transparent, - isDisabled: !getMealsScheduleResponseModelList[2].isShow, - bodyWidget: Column( - children: [ - getDivider(), - ListView.separated( - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, index) { - return Container( - padding: EdgeInsets.all(21.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text(_getMealItemsScheduleResponseModelDinner[index].filterName, - style: TextStyle(fontWeight: FontWeight.w600, fontSize: 18.0, letterSpacing: -0.64, color: CustomColors.darkGrey)), - SizedBox( - height: 12.0, - ), - ListView.separated( - physics: NeverScrollableScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, index2) { - return Container( - child: Row( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Radio( - value: index, - groupValue: _getMealItemsScheduleResponseModelDinner[index].filterName, - activeColor: Colors.red[800], - onChanged: (value) { - // setState(() { - // selected = value; - // parameterCode = model.askDoctorReqTypes[index].parameterCode; - // }); - }, - ), - LargeAvatar( - name: _getMealItemsScheduleResponseModelDinner[index].getMealItemsScheduleResponseModelList[index2].description, - url: "https://www.pumpkinnspice.com/wp-content/uploads/2016/03/easy-breakfast-quesadillas-11-683x1024.jpg", - width: 60, - height: 60, - radius: 5, - disableProfileView: true, - ), - SizedBox(width: 11), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + ); + }, + separatorBuilder: (context, index) { + return Padding( + padding: EdgeInsets.all(16.0), + child: Divider( + height: 1.5, + thickness: 1.0, + color: Colors.grey.shade200, + ), + ); + }, + itemCount: _getMealItemsScheduleResponseModelLunch[index].getMealItemsScheduleResponseModelList.length), + ], + ), + ); + }, + separatorBuilder: (context, index) { + return Padding( + padding: EdgeInsets.only(left: 15, right: 15), + child: Divider( + height: 1.5, + thickness: 1.0, + color: Colors.grey.shade200, + ), + ); + }, + itemCount: _getMealItemsScheduleResponseModelLunch.length), + ], + ), + ), + ), + mHeight(21), + Container( + decoration: containerRadius(getMealsScheduleResponseModelList[2].isShow ? Colors.white : Colors.grey[300], 12), + child: AppExpandableNotifier( + title: "Dinner TAT: " + DateUtil.convertTime(getMealsScheduleResponseModelList[2].tATTime), + isTitleSingleLine: false, + widgetColor: Colors.transparent, + isExpand: getMealsScheduleResponseModelList[2].isShow, + isDisabled: !getMealsScheduleResponseModelList[2].isShow, + bodyWidget: Column( + children: [ + getDivider(), + ListView.separated( + physics: BouncingScrollPhysics(), + shrinkWrap: true, + itemBuilder: (context, index) { + return Container( + padding: EdgeInsets.all(21.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(_getMealItemsScheduleResponseModelDinner[index].filterName, + style: TextStyle(fontWeight: FontWeight.w600, fontSize: 18.0, letterSpacing: -0.64, color: CustomColors.darkGrey)), + SizedBox( + height: 12.0, + ), + ListView.separated( + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemBuilder: (context, index2) { + return Container( + child: Row( mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - MyRichText( - "", - projectViewModel.isArabic - ? _getMealItemsScheduleResponseModelDinner[index].getMealItemsScheduleResponseModelList[index2].descriptionN - : _getMealItemsScheduleResponseModelDinner[index].getMealItemsScheduleResponseModelList[index2].description, - projectViewModel.isArabic), + ValueListenableBuilder( + valueListenable: _getMealItemsScheduleResponseModelDinner[index].selectedItemID, + builder: (context, val, child) { + return Radio( + value: _getMealItemsScheduleResponseModelDinner[index].getMealItemsScheduleResponseModelList[index2].itemID, + groupValue: _getMealItemsScheduleResponseModelDinner[index].selectedItemID.value, + activeColor: Colors.red[800], + onChanged: (value) { + _getMealItemsScheduleResponseModelDinner[index].selectedItemID.value = value; + }, + ); + }), + LargeAvatar( + name: _getMealItemsScheduleResponseModelDinner[index].getMealItemsScheduleResponseModelList[index2].description, + url: "https://www.pumpkinnspice.com/wp-content/uploads/2016/03/easy-breakfast-quesadillas-11-683x1024.jpg", + width: 60, + height: 60, + radius: 5, + disableProfileView: true, + ), + SizedBox(width: 11), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + MyRichText( + "", + projectViewModel.isArabic + ? _getMealItemsScheduleResponseModelDinner[index].getMealItemsScheduleResponseModelList[index2].descriptionN + : _getMealItemsScheduleResponseModelDinner[index].getMealItemsScheduleResponseModelList[index2].description, + projectViewModel.isArabic), + ], + ), + ), ], ), - ), - ], - ), - ); - }, - separatorBuilder: (context, index) { - return Padding( - padding: EdgeInsets.all(16.0), - child: Divider( - height: 1.5, - thickness: 1.0, - color: Colors.grey.shade200, - ), - ); - }, - itemCount: _getMealItemsScheduleResponseModelDinner[index].getMealItemsScheduleResponseModelList.length), - ], - ), - ); - }, - separatorBuilder: (context, index) { - return Padding( - padding: EdgeInsets.only(left: 15, right: 15), - child: Divider( - height: 1.5, - thickness: 1.0, - color: Colors.grey.shade200, - ), - ); - }, - itemCount: _getMealItemsScheduleResponseModelDinner.length), - ], + ); + }, + separatorBuilder: (context, index) { + return Padding( + padding: EdgeInsets.all(16.0), + child: Divider( + height: 1.5, + thickness: 1.0, + color: Colors.grey.shade200, + ), + ); + }, + itemCount: _getMealItemsScheduleResponseModelDinner[index].getMealItemsScheduleResponseModelList.length), + ], + ), + ); + }, + separatorBuilder: (context, index) { + return Padding( + padding: EdgeInsets.only(left: 15, right: 15), + child: Divider( + height: 1.5, + thickness: 1.0, + color: Colors.grey.shade200, + ), + ); + }, + itemCount: _getMealItemsScheduleResponseModelDinner.length), + ], + ), + ), + ), + ], + ) + : Container(), + ), + ), + bottomSheet: Container( + color: Colors.white, + width: double.infinity, + padding: EdgeInsets.all(20), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + ValueListenableBuilder( + valueListenable: isFasting, + builder: (context, val, child) { + return Checkbox( + onChanged: (bool value) { + isFasting.value = value; + isFastingVal = value; + }, + value: isFastingVal, + activeColor: Color(0xFFc5272d), + ); + }), + Text( + TranslationBase.of(context).isFasting, + style: TextStyle( + fontSize: 14, + letterSpacing: -0.48, ), ), - ), - ], - ), + ], + ), + mHeight(12), + DefaultButton( + TranslationBase.of(context).placeOrder, + () { + placeOrder(); + }, + color: Color(0xff359846), + disabledColor: Colors.grey, + ), + ], ), ), ); } + void placeOrder() { + List selectedItemIDs = []; + + if (_getMealItemsScheduleResponseModelBreakfast.isNotEmpty) { + _getMealItemsScheduleResponseModelBreakfast.forEach((element) { + selectedItemIDs.add(element.selectedItemID.value.toString()); + }); + } + + if (_getMealItemsScheduleResponseModelLunch.isNotEmpty) { + _getMealItemsScheduleResponseModelLunch.forEach((element) { + selectedItemIDs.add(element.selectedItemID.value.toString()); + }); + } + + if (_getMealItemsScheduleResponseModelDinner.isNotEmpty) { + _getMealItemsScheduleResponseModelDinner.forEach((element) { + selectedItemIDs.add(element.selectedItemID.value.toString()); + }); + } + ClinicListService service = new ClinicListService(); + GifLoaderDialogUtils.showMyDialog(context); + service + .placeMealPlanOrder(getAdmittedPatientsResponseModel.projectID, selectedMealScheduleID, selectedItemIDs.join(","), projectViewModel.user.patientID, + getAdmittedPatientsResponseModel.admissionNo, getAdmittedPatientsResponseModel.isHasCompanion, isFastingVal, context) + .then((res) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showSuccessToast(message: "Your meal order has been received successfully"); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + Widget getDivider() { return Padding( padding: EdgeInsets.only(left: 15, right: 15), @@ -405,9 +518,18 @@ class _MealPlanPageState extends State { res['List_MOP_MealsOfScheduleID_Mobile'].forEach((scheduleItem) { getMealsScheduleResponseModelList.add(GetMealsScheduleResponseModel.fromJson(scheduleItem)); }); - if (getMealsScheduleResponseModelList[0].isShow) getDefaultItemsOfScheduleID(getMealsScheduleResponseModelList[0].scheduleID, 1); - if (getMealsScheduleResponseModelList[1].isShow) getDefaultItemsOfScheduleID(getMealsScheduleResponseModelList[1].scheduleID, 2); - if (getMealsScheduleResponseModelList[2].isShow) getDefaultItemsOfScheduleID(getMealsScheduleResponseModelList[2].scheduleID, 3); + if (getMealsScheduleResponseModelList[0].isShow) { + selectedMealScheduleID = getMealsScheduleResponseModelList[0].scheduleID; + getDefaultItemsOfScheduleID(getMealsScheduleResponseModelList[0].scheduleID, 1); + } + if (getMealsScheduleResponseModelList[1].isShow) { + selectedMealScheduleID = getMealsScheduleResponseModelList[1].scheduleID; + getDefaultItemsOfScheduleID(getMealsScheduleResponseModelList[1].scheduleID, 2); + } + if (getMealsScheduleResponseModelList[2].isShow) { + selectedMealScheduleID = getMealsScheduleResponseModelList[2].scheduleID; + getDefaultItemsOfScheduleID(getMealsScheduleResponseModelList[2].scheduleID, 3); + } } else { AppToast.showErrorToast(message: "No meal schedule found for admitted patient"); } @@ -463,6 +585,14 @@ class _MealPlanPageState extends State { .add(GetMealItemsScheduleResponseModelList(filterName: projectViewModel.isArabic ? element.categoryDescriptionN : element.categoryDescription, getMealItemsScheduleResponseModel: element)); } }); + + _getMealItemsScheduleResponseModelBreakfast.forEach((element) { + element.getMealItemsScheduleResponseModelList.forEach((elementInner) { + if (elementInner.isDefault) { + element.selectedItemID.value = elementInner.itemID; + } + }); + }); } void sortMealsByCategoryLunch() { @@ -477,6 +607,14 @@ class _MealPlanPageState extends State { .add(GetMealItemsScheduleResponseModelList(filterName: projectViewModel.isArabic ? element.categoryDescriptionN : element.categoryDescription, getMealItemsScheduleResponseModel: element)); } }); + + _getMealItemsScheduleResponseModelLunch.forEach((element) { + element.getMealItemsScheduleResponseModelList.forEach((elementInner) { + if (elementInner.isDefault) { + element.selectedItemID.value = elementInner.itemID; + } + }); + }); } void sortMealsByCategoryDinner() { @@ -491,5 +629,12 @@ class _MealPlanPageState extends State { .add(GetMealItemsScheduleResponseModelList(filterName: projectViewModel.isArabic ? element.categoryDescriptionN : element.categoryDescription, getMealItemsScheduleResponseModel: element)); } }); + _getMealItemsScheduleResponseModelDinner.forEach((element) { + element.getMealItemsScheduleResponseModelList.forEach((elementInner) { + if (elementInner.isDefault) { + element.selectedItemID.value = elementInner.itemID; + } + }); + }); } } diff --git a/lib/services/clinic_services/get_clinic_service.dart b/lib/services/clinic_services/get_clinic_service.dart index 5339662a..69e99e53 100644 --- a/lib/services/clinic_services/get_clinic_service.dart +++ b/lib/services/clinic_services/get_clinic_service.dart @@ -6,6 +6,7 @@ import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_info import 'package:diplomaticquarterapp/models/Request.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:flutter/material.dart'; class ClinicListService extends BaseService { @@ -277,14 +278,7 @@ class ClinicListService extends BaseService { Future getAdmittedPatientDetails(int patientID, int projectID, int admissionNo, int buildingID, int floorID, int nursingStationID, context) async { Map request; - request = { - "ProjectID": projectID, - "PatientID" : patientID, - "AdmissionNo": admissionNo, - "BuildingID" : buildingID, - "FloorID" : floorID, - "NursingStationID": nursingStationID - }; + request = {"ProjectID": projectID, "PatientID": patientID, "AdmissionNo": admissionNo, "BuildingID": buildingID, "FloorID": floorID, "NursingStationID": nursingStationID}; dynamic localRes; @@ -311,8 +305,8 @@ class ClinicListService extends BaseService { request = { "ProjectID": projectID, "AdmissionNo": admissionNo, - "BuildingID" : 0, - "FloorID" : 0, + "BuildingID": 0, + "FloorID": 0, "NursingStationID": 0, "DietType": dietType, "WeekID": weekID, @@ -346,4 +340,35 @@ class ClinicListService extends BaseService { return Future.value(localRes); } + Future placeMealPlanOrder(int projectID, int scheduleID, String itemIDList, int patientID, int admissionNo, bool isCompanion, bool isFasting, context) async { + Map request; + request = { + "ProjectID": projectID, + "ItemIDList": itemIDList, + "IsActive": true, + "OrderDate": DateUtil.getISODateFormat(DateTime.now()).replaceAll("T", " "), + "PatientID": patientID, + "AdmissionNo": admissionNo, + "IsCompanion": isCompanion, + "IsFasting": isFasting, + "CreatedBy": patientID, + "EditedBy": patientID, + "MealScheduleID": scheduleID, + "MealStatus": 1, + "ItemStatus": 0, + "ConfirmedBy": patientID, + "Remarks": "", + "IsVIP": false, + "IsFixedRemarks": false + }; + + dynamic localRes; + + await baseAppClient.post(PLACE_MEAL_PLAN_ORDER, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isAllowAny: true); + return Future.value(localRes); + } } diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 4264bbf2..3d665c84 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2918,6 +2918,8 @@ class TranslationBase { String get birthNotificationNotes1 => localizedValues["birthNotificationNotes1"][locale.languageCode]; String get birthNotificationNotes2 => localizedValues["birthNotificationNotes2"][locale.languageCode]; String get birthNotificationNotes3 => localizedValues["birthNotificationNotes3"][locale.languageCode]; + String get placeOrder => localizedValues["placeOrder"][locale.languageCode]; + String get isFasting => localizedValues["isFasting"][locale.languageCode]; } diff --git a/lib/uitl/utils_new.dart b/lib/uitl/utils_new.dart index 822137cd..b8a488c8 100644 --- a/lib/uitl/utils_new.dart +++ b/lib/uitl/utils_new.dart @@ -31,16 +31,11 @@ Widget getPaymentMethods() { mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Image.asset("assets/images/new/payment/Mada.png", - width: 40, height: 40), - Image.asset("assets/images/new/payment/tamara_en.png", - width: 40, height: 40), - Image.asset("assets/images/new/payment/visa.png", - width: 40, height: 40), - Image.asset("assets/images/new/payment/Mastercard.png", - width: 50, height: 40), - Image.asset("assets/images/new/payment/Apple_Pay.png", - width: 40, height: 40), + Image.asset("assets/images/new/payment/Mada.png", width: 40, height: 40), + Image.asset("assets/images/new/payment/tamara_en.png", width: 40, height: 40), + Image.asset("assets/images/new/payment/visa.png", width: 40, height: 40), + Image.asset("assets/images/new/payment/Mastercard.png", width: 50, height: 40), + Image.asset("assets/images/new/payment/Apple_Pay.png", width: 40, height: 40), ], ), ); @@ -52,15 +47,8 @@ Widget getNoDataWidget(BuildContext context) { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - SvgPicture.asset('assets/images/new/not_found.svg', - width: 110.0, height: 110.0), - Container( - margin: EdgeInsets.only(top: 15.0), - child: Text(TranslationBase.of(context).noResultFound, - style: TextStyle( - fontSize: 14, - fontWeight: FontWeight.w600, - color: Color(0xFFBABABA)))), + SvgPicture.asset('assets/images/new/not_found.svg', width: 110.0, height: 110.0), + Container(margin: EdgeInsets.only(top: 15.0), child: Text(TranslationBase.of(context).noResultFound, style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xFFBABABA)))), ], ), ), @@ -88,8 +76,7 @@ spacer() { } Future navigateTo(context, page) async { - return await Navigator.push( - context, MaterialPageRoute(builder: (context) => page)); + return await Navigator.push(context, MaterialPageRoute(builder: (context) => page)); } // Future navigateToReplace(context, page) async { @@ -147,11 +134,7 @@ Widget circularAviator( child: Container( width: s, height: s, - decoration: containerColorRadiusBorderWidth( - bcColor == null ? Colors.grey[200] : bcColor, - 2000, - brColor == null ? Colors.blueGrey[800] : brColor, - borderWidth == null ? 2 : borderWidth), + decoration: containerColorRadiusBorderWidth(bcColor == null ? Colors.grey[200] : bcColor, 2000, brColor == null ? Colors.blueGrey[800] : brColor, borderWidth == null ? 2 : borderWidth), child: Icon( icon == null ? Icons.person : icon, size: s / 1.7, @@ -233,8 +216,7 @@ RoundedRectangleBorder buttonShape() { ); } -Decoration containerRadiusWithGradient(double radius, - {Color color1, Color color2}) { +Decoration containerRadiusWithGradient(double radius, {Color color1, Color color2}) { return BoxDecoration( borderRadius: BorderRadius.circular(radius), gradient: LinearGradient( @@ -248,8 +230,7 @@ Decoration containerRadiusWithGradient(double radius, ); } -Decoration containerBottomRightRadiusWithGradient(double radius, - {Color darkColor, Color lightColor}) { +Decoration containerBottomRightRadiusWithGradient(double radius, {Color darkColor, Color lightColor}) { return BoxDecoration( borderRadius: BorderRadius.only(bottomRight: Radius.circular(radius)), gradient: LinearGradient( @@ -263,8 +244,7 @@ Decoration containerBottomRightRadiusWithGradient(double radius, ); } -Decoration containerBottomRightRadiusWithGradientForAr(double radius, - {Color darkColor, Color lightColor}) { +Decoration containerBottomRightRadiusWithGradientForAr(double radius, {Color darkColor, Color lightColor}) { return BoxDecoration( borderRadius: BorderRadius.only(bottomLeft: Radius.circular(radius)), gradient: LinearGradient( @@ -307,11 +287,7 @@ Decoration containerRadiusWithGradientServices( ); } -Decoration containerBottomRightRadiusWithGradientBorder(double radius, - {Color darkColor, - Color lightColor, - Color borderColor = Colors.transparent, - double w = 0}) { +Decoration containerBottomRightRadiusWithGradientBorder(double radius, {Color darkColor, Color lightColor, Color borderColor = Colors.transparent, double w = 0}) { return BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(radius)), border: Border.all( @@ -332,6 +308,13 @@ Decoration containerBottomRightRadiusWithGradientBorder(double radius, Decoration containerRadius(Color background, double radius) { return BoxDecoration( color: background, + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], border: Border.all( width: 1, // color: background // <--- border width here @@ -340,8 +323,7 @@ Decoration containerRadius(Color background, double radius) { ); } -Decoration containerColorRadiusBorder( - Color background, double radius, Color color) { +Decoration containerColorRadiusBorder(Color background, double radius, Color color) { return BoxDecoration( color: background, border: Border.all( @@ -352,8 +334,7 @@ Decoration containerColorRadiusBorder( ); } -Decoration containerColorRadiusBorderWidth( - Color background, double radius, Color color, double w) { +Decoration containerColorRadiusBorderWidth(Color background, double radius, Color color, double w) { return BoxDecoration( color: background, border: Border.all( @@ -364,8 +345,7 @@ Decoration containerColorRadiusBorderWidth( ); } -Decoration containerColorRadiusBorderWidthCircular( - Color background, double radius, Color color, double w) { +Decoration containerColorRadiusBorderWidthCircular(Color background, double radius, Color color, double w) { return BoxDecoration( color: background, border: Border.all( @@ -380,36 +360,29 @@ Decoration containerColorRadiusBorderWidthCircular( Decoration containerColorRadiusRight(Color background, double radius) { return BoxDecoration( color: background, - borderRadius: BorderRadius.only( - topRight: Radius.circular(radius), - bottomRight: Radius.circular(radius)), + borderRadius: BorderRadius.only(topRight: Radius.circular(radius), bottomRight: Radius.circular(radius)), ); } Decoration containerColorRadiusLeft(Color background, double radius) { return BoxDecoration( color: background, - borderRadius: BorderRadius.only( - topLeft: Radius.circular(radius), bottomLeft: Radius.circular(radius)), + borderRadius: BorderRadius.only(topLeft: Radius.circular(radius), bottomLeft: Radius.circular(radius)), ); } -Decoration containerColorRadiusRightBorder( - Color background, double radius, double w) { +Decoration containerColorRadiusRightBorder(Color background, double radius, double w) { return BoxDecoration( color: background, border: Border.all( width: w, // color: Colors.white // <--- border width here ), - borderRadius: BorderRadius.only( - topRight: Radius.circular(radius), - bottomRight: Radius.circular(radius)), + borderRadius: BorderRadius.only(topRight: Radius.circular(radius), bottomRight: Radius.circular(radius)), ); } -Decoration containerColorRadiusRightBorderc( - Color background, double radius, double w, Color borderColor) { +Decoration containerColorRadiusRightBorderc(Color background, double radius, double w, Color borderColor) { return BoxDecoration( color: background, border: Border.all( @@ -440,16 +413,14 @@ Decoration containerColorRadiusBottom(Color color, double radius) { ); } -Decoration containerColorRadiusLeftBorder( - Color background, double radius, double w) { +Decoration containerColorRadiusLeftBorder(Color background, double radius, double w) { return BoxDecoration( color: background, border: Border.all( width: w, // color: Colors.white // <--- border width here ), - borderRadius: BorderRadius.only( - topLeft: Radius.circular(radius), bottomLeft: Radius.circular(radius)), + borderRadius: BorderRadius.only(topLeft: Radius.circular(radius), bottomLeft: Radius.circular(radius)), ); } @@ -481,23 +452,19 @@ ShapeBorder cardRadiusNew(double radius) { ShapeBorder cardRadiusTop(double radius) { return RoundedRectangleBorder( side: BorderSide(color: Colors.transparent, width: 0), - borderRadius: BorderRadius.only( - topLeft: Radius.circular(radius), topRight: Radius.circular(radius)), + borderRadius: BorderRadius.only(topLeft: Radius.circular(radius), topRight: Radius.circular(radius)), ); } ShapeBorder cardRadiusTop2(double radius) { return RoundedRectangleBorder( - borderRadius: BorderRadius.only( - topLeft: Radius.circular(radius), topRight: Radius.circular(radius)), + borderRadius: BorderRadius.only(topLeft: Radius.circular(radius), topRight: Radius.circular(radius)), ); } ShapeBorder cardRadiusBottom(double radius) { return RoundedRectangleBorder( - borderRadius: BorderRadius.only( - bottomLeft: Radius.circular(radius), - bottomRight: Radius.circular(radius)), + borderRadius: BorderRadius.only(bottomLeft: Radius.circular(radius), bottomRight: Radius.circular(radius)), ); } @@ -620,8 +587,7 @@ FontStyle getFontStyle(String fontStyle) { bool timeCalculator(int startHour, int startMint, int endHour, int endMint) { DateTime now = DateTime.now(); - DateTime startDate = - DateTime(now.year, now.month, now.day, startHour, startHour); + DateTime startDate = DateTime(now.year, now.month, now.day, startHour, startHour); DateTime endDate = DateTime(now.year, now.month, now.day, endHour, endMint); if (startDate.isBefore(now) && endDate.isAfter(now)) return true; From 20572f463a5aaa4884d8a0134f7213921def3247 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Sun, 16 Jul 2023 11:51:59 +0300 Subject: [PATCH 21/49] meal plan dev completed --- lib/pages/InPatientServices/meal_plan.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/pages/InPatientServices/meal_plan.dart b/lib/pages/InPatientServices/meal_plan.dart index d69e1149..053ea6e3 100644 --- a/lib/pages/InPatientServices/meal_plan.dart +++ b/lib/pages/InPatientServices/meal_plan.dart @@ -458,6 +458,7 @@ class _MealPlanPageState extends State { .then((res) { GifLoaderDialogUtils.hideDialog(context); AppToast.showSuccessToast(message: "Your meal order has been received successfully"); + Navigator.pop(context); }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); print(err); From fe606b7823ce91fbc980b71da3a71f10f1ba7f9a Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 18 Jul 2023 15:34:41 +0300 Subject: [PATCH 22/49] InPatient Advance Payment --- .../inpatient_paid_advance_payment.dart | 15 +++++++++++++++ .../inpatient_pending_advance_payment.dart | 15 +++++++++++++++ .../inpatient_advance_payment.dart | 3 ++- 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 lib/pages/InPatientServices/components/inpatient_paid_advance_payment.dart create mode 100644 lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart diff --git a/lib/pages/InPatientServices/components/inpatient_paid_advance_payment.dart b/lib/pages/InPatientServices/components/inpatient_paid_advance_payment.dart new file mode 100644 index 00000000..76a44f75 --- /dev/null +++ b/lib/pages/InPatientServices/components/inpatient_paid_advance_payment.dart @@ -0,0 +1,15 @@ +import 'package:flutter/material.dart'; + +class InPatientPaidAdvancePayment extends StatefulWidget { + const InPatientPaidAdvancePayment({Key key}) : super(key: key); + + @override + State createState() => _InPatientPaidAdvancePaymentState(); +} + +class _InPatientPaidAdvancePaymentState extends State { + @override + Widget build(BuildContext context) { + return const Placeholder(); + } +} diff --git a/lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart b/lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart new file mode 100644 index 00000000..0db5bb17 --- /dev/null +++ b/lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart @@ -0,0 +1,15 @@ +import 'package:flutter/material.dart'; + +class InPatientPendingAdvancePayment extends StatefulWidget { + const InPatientPendingAdvancePayment({Key key}) : super(key: key); + + @override + State createState() => _InPatientPendingAdvancePaymentState(); +} + +class _InPatientPendingAdvancePaymentState extends State { + @override + Widget build(BuildContext context) { + return Container(); + } +} diff --git a/lib/pages/InPatientServices/inpatient_advance_payment.dart b/lib/pages/InPatientServices/inpatient_advance_payment.dart index 85965b73..3aed7934 100644 --- a/lib/pages/InPatientServices/inpatient_advance_payment.dart +++ b/lib/pages/InPatientServices/inpatient_advance_payment.dart @@ -1,4 +1,5 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/InPatientServices/components/inpatient_pending_advance_payment.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; @@ -58,7 +59,7 @@ class _InPatientAdvancePaymentState extends State with physics: BouncingScrollPhysics(), controller: _tabController, children: [ - Container(), + InPatientPendingAdvancePayment(), Container(), ], ), From d261557cd7faee2d396c8b1b8ff5a635c42d4a6b Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 8 Aug 2023 17:53:24 +0300 Subject: [PATCH 23/49] Admitted patient API changed --- lib/config/config.dart | 2 + .../get_admission_info_response_model.dart | 98 ++++++++++++------- lib/pages/login/confirm-login.dart | 11 ++- lib/pages/login/login.dart | 11 ++- .../clinic_services/get_clinic_service.dart | 4 +- 5 files changed, 81 insertions(+), 45 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index 00fadf62..5c88e3da 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -606,6 +606,8 @@ var PAYFORT_PROD_URL = 'https://paymentservices.payfort.com/FortAPI/paymentApi'; // Check If InPatient API var CHECK_IF_INPATIENT = 'Services/Patients.svc/REST/GetInPatientAdmissionInfo'; +var CHECK_IF_PATIENT_ADMITTED = 'Services/Inps.svc/REST/chekIsPatientAdmitted'; + // Get General Instructions API var GET_GENERAL_INSTRUCTIONS = 'Services/INPs.svc/REST/getGeneralInstructions'; diff --git a/lib/models/InPatientServices/get_admission_info_response_model.dart b/lib/models/InPatientServices/get_admission_info_response_model.dart index 118f8737..25d87884 100644 --- a/lib/models/InPatientServices/get_admission_info_response_model.dart +++ b/lib/models/InPatientServices/get_admission_info_response_model.dart @@ -1,60 +1,92 @@ class GetAdmissionInfoResponseModel { + String setupID; + int projectID; int admissionNo; String admissionDate; - String infotainmentIBMSLink; - String infotainmentIBMSLinkAr; - int projectID; - String roomID; - String bedID; + int admissionRequestNo; + int admissionType; + int patientType; + int patientID; int clinicID; int doctorID; - int patientID; - String bMIUrl; - String mOPUrl; + int admittingClinicID; + int admittingDoctorID; + int categoryID; + String roomID; + String bedID; + dynamic dischargeDate; + int approvalNo; + int status; + String statusDesc; + String statusDescN; GetAdmissionInfoResponseModel( - {this.admissionNo, - this.admissionDate, - this.infotainmentIBMSLink, - this.infotainmentIBMSLinkAr, + {this.setupID, this.projectID, - this.roomID, - this.bedID, + this.admissionNo, + this.admissionDate, + this.admissionRequestNo, + this.admissionType, + this.patientType, + this.patientID, this.clinicID, this.doctorID, - this.patientID, - this.bMIUrl, - this.mOPUrl}); + this.admittingClinicID, + this.admittingDoctorID, + this.categoryID, + this.roomID, + this.bedID, + this.dischargeDate, + this.approvalNo, + this.status, + this.statusDesc, + this.statusDescN}); GetAdmissionInfoResponseModel.fromJson(Map json) { + setupID = json['SetupID']; + projectID = json['ProjectID']; admissionNo = json['AdmissionNo']; admissionDate = json['AdmissionDate']; - infotainmentIBMSLink = json['InfotainmentIBMSLink']; - infotainmentIBMSLinkAr = json['InfotainmentIBMSLinkAr']; - projectID = json['ProjectID']; - roomID = json['RoomID']; - bedID = json['BedID']; + admissionRequestNo = json['AdmissionRequestNo']; + admissionType = json['AdmissionType']; + patientType = json['PatientType']; + patientID = json['PatientID']; clinicID = json['ClinicID']; doctorID = json['DoctorID']; - patientID = json['PatientID']; - bMIUrl = json['BMIUrl']; - mOPUrl = json['MOPUrl']; + admittingClinicID = json['AdmittingClinicID']; + admittingDoctorID = json['AdmittingDoctorID']; + categoryID = json['CategoryID']; + roomID = json['RoomID']; + bedID = json['BedID']; + dischargeDate = json['DischargeDate']; + approvalNo = json['ApprovalNo']; + status = json['Status']; + statusDesc = json['StatusDesc']; + statusDescN = json['StatusDescN']; } Map toJson() { final Map data = new Map(); + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; data['AdmissionNo'] = this.admissionNo; data['AdmissionDate'] = this.admissionDate; - data['InfotainmentIBMSLink'] = this.infotainmentIBMSLink; - data['InfotainmentIBMSLinkAr'] = this.infotainmentIBMSLinkAr; - data['ProjectID'] = this.projectID; - data['RoomID'] = this.roomID; - data['BedID'] = this.bedID; + data['AdmissionRequestNo'] = this.admissionRequestNo; + data['AdmissionType'] = this.admissionType; + data['PatientType'] = this.patientType; + data['PatientID'] = this.patientID; data['ClinicID'] = this.clinicID; data['DoctorID'] = this.doctorID; - data['PatientID'] = this.patientID; - data['BMIUrl'] = this.bMIUrl; - data['MOPUrl'] = this.mOPUrl; + data['AdmittingClinicID'] = this.admittingClinicID; + data['AdmittingDoctorID'] = this.admittingDoctorID; + data['CategoryID'] = this.categoryID; + data['RoomID'] = this.roomID; + data['BedID'] = this.bedID; + data['DischargeDate'] = this.dischargeDate; + data['ApprovalNo'] = this.approvalNo; + data['Status'] = this.status; + data['StatusDesc'] = this.statusDesc; + data['StatusDescN'] = this.statusDescN; return data; } } diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index ef3378bb..baf5a5a5 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -672,23 +672,24 @@ class _ConfirmLogin extends State { } checkIfIsInPatient() { + bool isAdmitted = false; GetAdmissionInfoResponseModel getAdmissionInfoResponseModel; ClinicListService service = new ClinicListService(); service.checkIfInPatientAPI(context).then((res) { if (res['MessageStatus'] == 1) { - if (res['List_PatientAdmissionInfo'].length != 0) { + isAdmitted = res['isAdmitted']; + print("IS ADMITTED: $isAdmitted"); + if (res['PatientAdmittedInformation'].length != 0) { print("INPATIENT!!!"); - getAdmissionInfoResponseModel = GetAdmissionInfoResponseModel.fromJson(res['List_PatientAdmissionInfo'][0]); + getAdmissionInfoResponseModel = GetAdmissionInfoResponseModel.fromJson(res['PatientAdmittedInformation'][0]); projectViewModel.setIsPatientAdmitted(true); - projectViewModel.setInPatientProjectID(res['List_PatientAdmissionInfo'][0]['ProjectID']); + projectViewModel.setInPatientProjectID(res['PatientAdmittedInformation'][0]['ProjectID']); projectViewModel.setInPatientAdmissionInfo(getAdmissionInfoResponseModel); } else { print("OUTPATIENT!!!"); projectViewModel.setIsPatientAdmitted(false); } } else {} - }).catchError((err) { - print(err); }); } diff --git a/lib/pages/login/login.dart b/lib/pages/login/login.dart index fefce667..856a5bc3 100644 --- a/lib/pages/login/login.dart +++ b/lib/pages/login/login.dart @@ -394,23 +394,24 @@ class _Login extends State { } checkIfIsInPatient() { + bool isAdmitted = false; GetAdmissionInfoResponseModel getAdmissionInfoResponseModel; ClinicListService service = new ClinicListService(); service.checkIfInPatientAPI(context).then((res) { if (res['MessageStatus'] == 1) { - if (res['List_PatientAdmissionInfo'].length != 0) { + isAdmitted = res['isAdmitted']; + print("IS ADMITTED: $isAdmitted"); + if (res['PatientAdmittedInformation'].length != 0) { print("INPATIENT!!!"); - getAdmissionInfoResponseModel = GetAdmissionInfoResponseModel.fromJson(res['List_PatientAdmissionInfo'][0]); + getAdmissionInfoResponseModel = GetAdmissionInfoResponseModel.fromJson(res['PatientAdmittedInformation'][0]); projectViewModel.setIsPatientAdmitted(true); - projectViewModel.setInPatientProjectID(res['List_PatientAdmissionInfo'][0]['ProjectID']); + projectViewModel.setInPatientProjectID(res['PatientAdmittedInformation'][0]['ProjectID']); projectViewModel.setInPatientAdmissionInfo(getAdmissionInfoResponseModel); } else { print("OUTPATIENT!!!"); projectViewModel.setIsPatientAdmitted(false); } } else {} - }).catchError((err) { - print(err); }); } diff --git a/lib/services/clinic_services/get_clinic_service.dart b/lib/services/clinic_services/get_clinic_service.dart index 69e99e53..6bea9aa4 100644 --- a/lib/services/clinic_services/get_clinic_service.dart +++ b/lib/services/clinic_services/get_clinic_service.dart @@ -66,12 +66,12 @@ class ClinicListService extends BaseService { Future checkIfInPatientAPI(context) async { Map request; request = { - "IsActiveAppointment": true, + "IsActiveAppointment": false, }; dynamic localRes; - await baseAppClient.post(CHECK_IF_INPATIENT, onSuccess: (response, statusCode) async { + await baseAppClient.post(CHECK_IF_PATIENT_ADMITTED, onSuccess: (response, statusCode) async { localRes = response; }, onFailure: (String error, int statusCode) { throw error; From da0a164b0e57be3cb8744b96a87dc0bb36d5356f Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 9 Aug 2023 17:01:16 +0300 Subject: [PATCH 24/49] updates --- lib/config/config.dart | 4 ++-- lib/pages/BookAppointment/BookSuccess.dart | 5 +++-- lib/widgets/in_app_browser/InAppBrowser.dart | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index 5c88e3da..5b08cb1d 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -20,10 +20,10 @@ var PACKAGES_ORDERS = '/api/orders'; var PACKAGES_ORDER_HISTORY = '/api/orders/items'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; // var BASE_URL = 'http://10.50.100.198:2018/'; - var BASE_URL = 'https://uat.hmgwebservices.com/'; + // var BASE_URL = 'https://uat.hmgwebservices.com/'; // var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; -// var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; +var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; // Pharmacy UAT URLs // var BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; diff --git a/lib/pages/BookAppointment/BookSuccess.dart b/lib/pages/BookAppointment/BookSuccess.dart index 890b96d8..1574cfaa 100644 --- a/lib/pages/BookAppointment/BookSuccess.dart +++ b/lib/pages/BookAppointment/BookSuccess.dart @@ -46,6 +46,7 @@ class BookSuccess extends StatefulWidget { class _BookSuccessState extends State { AppSharedPreferences sharedPref = AppSharedPreferences(); + // AuthenticatedUser authUser; ProjectViewModel projectViewModel; @@ -156,6 +157,7 @@ class _BookSuccessState extends State { return Container( alignment: Alignment.bottomCenter, height: MediaQuery.of(context).size.height * 0.18, + margin: EdgeInsets.only(bottom: 24), child: Column( mainAxisAlignment: MainAxisAlignment.end, children: [ @@ -166,10 +168,9 @@ class _BookSuccessState extends State { minWidth: MediaQuery.of(context).size.width * 0.7, height: 45.0, child: CustomTextButton( - backgroundColor: Color(0xFF60686b), + backgroundColor: CustomColors.green, elevation: 0, onPressed: () { -// navigateToQR(context); getAppoQR(context); }, child: Text(TranslationBase.of(context).viewQR.toUpperCase(), style: TextStyle(fontSize: 18.0, color: Colors.white)), diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index f38ad57c..73069b22 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -37,9 +37,9 @@ class MyInAppBrowser extends InAppBrowser { // static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT - static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE + // static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE - // static String SERVICE_URL = 'https://uat.hmgwebservices.com/payfortforvidaplus/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL UAT VIDA PLUS + static String SERVICE_URL = 'https://uat.hmgwebservices.com/payfortforvidaplus/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL UAT VIDA PLUS // static String PRESCRIPTION_PAYMENT_WITH_ORDERID = // 'https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID='; From 786dd76f57ae7aa241f021074c61acc5cb530680 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 14 Aug 2023 11:32:14 +0300 Subject: [PATCH 25/49] updates --- .../InPatientServices/inpatient_home.dart | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/lib/pages/InPatientServices/inpatient_home.dart b/lib/pages/InPatientServices/inpatient_home.dart index 3311a088..19ae5b3d 100644 --- a/lib/pages/InPatientServices/inpatient_home.dart +++ b/lib/pages/InPatientServices/inpatient_home.dart @@ -55,21 +55,21 @@ class InPatientServicesHome extends StatelessWidget { List getInPatientServicesList(BuildContext context) { List serviceList = List(); - serviceList.add( - InkWell( - onTap: () { - // Navigator.push(context, FadePage(page: AdvancePaymentPage())); - }, - child: MedicalProfileItem( - title: TranslationBase.of(context).admissionGeneral, - imagePath: 'admission.svg', - subTitle: TranslationBase.of(context).consent, - width: 50.0, - height: 40.0, - isInPatient: true, - ), - ), - ); + // serviceList.add( + // InkWell( + // onTap: () { + // // Navigator.push(context, FadePage(page: AdvancePaymentPage())); + // }, + // child: MedicalProfileItem( + // title: TranslationBase.of(context).admissionGeneral, + // imagePath: 'admission.svg', + // subTitle: TranslationBase.of(context).consent, + // width: 50.0, + // height: 40.0, + // isInPatient: true, + // ), + // ), + // ); serviceList.add( InkWell( @@ -135,21 +135,21 @@ class InPatientServicesHome extends StatelessWidget { ), ); - serviceList.add( - InkWell( - onTap: () { - // Navigator.push(context, FadePage(page: AdvancePaymentPage())); - }, - child: MedicalProfileItem( - title: TranslationBase.of(context).admissionNoticeTitle, - imagePath: 'admission_notice.svg', - subTitle: TranslationBase.of(context).admissionNoticeSubTitle, - width: 50.0, - height: 40.0, - isInPatient: true, - ), - ), - ); + // serviceList.add( + // InkWell( + // onTap: () { + // // Navigator.push(context, FadePage(page: AdvancePaymentPage())); + // }, + // child: MedicalProfileItem( + // title: TranslationBase.of(context).admissionNoticeTitle, + // imagePath: 'admission_notice.svg', + // subTitle: TranslationBase.of(context).admissionNoticeSubTitle, + // width: 50.0, + // height: 40.0, + // isInPatient: true, + // ), + // ), + // ); serviceList.add( InkWell( From d251ca0e1c3a8a0997cc9c6caeac7cd19b2c23cc Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 14 Aug 2023 13:33:23 +0300 Subject: [PATCH 26/49] Inpatient medical instructions implemented --- lib/config/config.dart | 6 +- ...t_medical_instructions_response_model.dart | 85 +++++++++++++++ .../InPatientServices/inpatient_home.dart | 21 +++- .../medical_instructions.dart | 100 ++++++++++++++++++ lib/pages/login/confirm-login.dart | 23 ++-- lib/pages/login/login.dart | 12 ++- .../clinic_services/get_clinic_service.dart | 14 +++ 7 files changed, 245 insertions(+), 16 deletions(-) create mode 100644 lib/models/InPatientServices/get_medical_instructions_response_model.dart create mode 100644 lib/pages/InPatientServices/medical_instructions.dart diff --git a/lib/config/config.dart b/lib/config/config.dart index 5b08cb1d..59773264 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -20,10 +20,10 @@ var PACKAGES_ORDERS = '/api/orders'; var PACKAGES_ORDER_HISTORY = '/api/orders/items'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; // var BASE_URL = 'http://10.50.100.198:2018/'; - // var BASE_URL = 'https://uat.hmgwebservices.com/'; + var BASE_URL = 'https://uat.hmgwebservices.com/'; // var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; -var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; +// var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; // Pharmacy UAT URLs // var BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; @@ -611,6 +611,8 @@ var CHECK_IF_PATIENT_ADMITTED = 'Services/Inps.svc/REST/chekIsPatientAdmitted'; // Get General Instructions API var GET_GENERAL_INSTRUCTIONS = 'Services/INPs.svc/REST/getGeneralInstructions'; +// Get General Instructions API +var GET_MEDICAL_INSTRUCTIONS = 'Services/INPs.svc/REST/getPatientAdmissionRequest'; var INSERT_INPATIENT_ORDER = 'Services/INPs.svc/REST/Inpcp_insertOrder'; diff --git a/lib/models/InPatientServices/get_medical_instructions_response_model.dart b/lib/models/InPatientServices/get_medical_instructions_response_model.dart new file mode 100644 index 00000000..2bbe1e83 --- /dev/null +++ b/lib/models/InPatientServices/get_medical_instructions_response_model.dart @@ -0,0 +1,85 @@ +class GetMedicalInstructions { + dynamic propertyChanged; + int admissionRequestNoField; + String clinicNameField; + String doctorNameField; + String expectedAdmissionDateField; + List medicaLInstructionsField; + dynamic medicalInstructionsXMLField; + String medicalRemarksField; + int projectIdField; + String projectNameField; + String setupIdField; + + GetMedicalInstructions( + {this.propertyChanged, + this.admissionRequestNoField, + this.clinicNameField, + this.doctorNameField, + this.expectedAdmissionDateField, + this.medicaLInstructionsField, + this.medicalInstructionsXMLField, + this.medicalRemarksField, + this.projectIdField, + this.projectNameField, + this.setupIdField}); + + GetMedicalInstructions.fromJson(Map json) { + propertyChanged = json['PropertyChanged']; + admissionRequestNoField = json['admissionRequestNoField']; + clinicNameField = json['clinicNameField']; + doctorNameField = json['doctorNameField']; + expectedAdmissionDateField = json['expectedAdmissionDateField']; + if (json['medicaLInstructionsField'] != null) { + medicaLInstructionsField = []; + json['medicaLInstructionsField'].forEach((v) { + medicaLInstructionsField.add(new MedicaLInstructionsField.fromJson(v)); + }); + } + medicalInstructionsXMLField = json['medicalInstructionsXMLField']; + medicalRemarksField = json['medicalRemarksField']; + projectIdField = json['projectIdField']; + projectNameField = json['projectNameField']; + setupIdField = json['setupIdField']; + } + + Map toJson() { + final Map data = new Map(); + data['PropertyChanged'] = this.propertyChanged; + data['admissionRequestNoField'] = this.admissionRequestNoField; + data['clinicNameField'] = this.clinicNameField; + data['doctorNameField'] = this.doctorNameField; + data['expectedAdmissionDateField'] = this.expectedAdmissionDateField; + if (this.medicaLInstructionsField != null) { + data['medicaLInstructionsField'] = this.medicaLInstructionsField.map((v) => v.toJson()).toList(); + } + data['medicalInstructionsXMLField'] = this.medicalInstructionsXMLField; + data['medicalRemarksField'] = this.medicalRemarksField; + data['projectIdField'] = this.projectIdField; + data['projectNameField'] = this.projectNameField; + data['setupIdField'] = this.setupIdField; + return data; + } +} + +class MedicaLInstructionsField { + Null propertyChanged; + String descriptionField; + int parameterCodeField; + + MedicaLInstructionsField({this.propertyChanged, this.descriptionField, this.parameterCodeField}); + + MedicaLInstructionsField.fromJson(Map json) { + propertyChanged = json['PropertyChanged']; + descriptionField = json['descriptionField']; + parameterCodeField = json['parameterCodeField']; + } + + Map toJson() { + final Map data = new Map(); + data['PropertyChanged'] = this.propertyChanged; + data['descriptionField'] = this.descriptionField; + data['parameterCodeField'] = this.parameterCodeField; + return data; + } +} diff --git a/lib/pages/InPatientServices/inpatient_home.dart b/lib/pages/InPatientServices/inpatient_home.dart index 19ae5b3d..013bd2d0 100644 --- a/lib/pages/InPatientServices/inpatient_home.dart +++ b/lib/pages/InPatientServices/inpatient_home.dart @@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/pages/InPatientServices/general_instruction import 'package:diplomaticquarterapp/pages/InPatientServices/help_PRO.dart'; import 'package:diplomaticquarterapp/pages/InPatientServices/inpatient_advance_payment.dart'; import 'package:diplomaticquarterapp/pages/InPatientServices/meal_plan.dart'; +import 'package:diplomaticquarterapp/pages/InPatientServices/medical_instructions.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; @@ -15,6 +16,8 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; +import '../../models/InPatientServices/get_medical_instructions_response_model.dart'; + class InPatientServicesHome extends StatelessWidget { ProjectViewModel projectViewModel; @@ -90,7 +93,7 @@ class InPatientServicesHome extends StatelessWidget { serviceList.add( InkWell( onTap: () { - // Navigator.push(context, FadePage(page: AdvancePaymentPage())); + openMedicalInstructions(context); }, child: MedicalProfileItem( title: TranslationBase.of(context).medicalInstructionsTitle, @@ -257,4 +260,20 @@ class InPatientServicesHome extends StatelessWidget { print(err); }); } + + void openMedicalInstructions(BuildContext context) { + ClinicListService service = new ClinicListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getMedicalInstructions(projectViewModel.inPatientProjectID, context).then((res) { + List getMedicalInstructionsList = []; + res['MedicalInstruction'].forEach((v) { + getMedicalInstructionsList.add(new GetMedicalInstructions.fromJson(v)); + }); + GifLoaderDialogUtils.hideDialog(context); + print(res['MedicalInstruction']); + Navigator.push(context, FadePage(page: MedicalInstructionsPage(getMedicalInstructionsList: getMedicalInstructionsList))); + }).catchError((err) { + print(err); + }); + } } diff --git a/lib/pages/InPatientServices/medical_instructions.dart b/lib/pages/InPatientServices/medical_instructions.dart new file mode 100644 index 00000000..b5062b9b --- /dev/null +++ b/lib/pages/InPatientServices/medical_instructions.dart @@ -0,0 +1,100 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +import '../../models/InPatientServices/get_medical_instructions_response_model.dart'; + +class MedicalInstructionsPage extends StatefulWidget { + List getMedicalInstructionsList; + + MedicalInstructionsPage({@required this.getMedicalInstructionsList}); + + @override + State createState() => _MedicalInstructionsPageState(); +} + +class _MedicalInstructionsPageState extends State { + ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + showNewAppBarTitle: true, + showNewAppBar: true, + appBarTitle: TranslationBase.of(context).InPatientServicesHeader, + body: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Padding( + padding: const EdgeInsets.all(21.0), + child: Text("Medical Instructions", + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 21.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + )), + ), + Expanded( + child: Container( + width: MediaQuery.of(context).size.width, + child: Card( + elevation: 0.0, + margin: EdgeInsets.all(16), + color: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10), + side: BorderSide(color: Colors.transparent, width: 0.0), + ), + child: Padding( + padding: EdgeInsets.all(16.0), + child: Container( + child: ListView.separated( + itemCount: widget.getMedicalInstructionsList[0].medicaLInstructionsField.length, + itemBuilder: (BuildContext context, int index) { + return Container( + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: SvgPicture.asset("assets/images/new-design/ionic-ios-checkmark-circle.svg"), + ), + Container( + width: MediaQuery.of(context).size.width * 0.75, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text(widget.getMedicalInstructionsList[0].medicaLInstructionsField[index].descriptionField, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + )), + ), + ], + )); + }, + separatorBuilder: (BuildContext context, int index) { + return Padding( + padding: const EdgeInsets.only(left: 14, right: 14), + child: mHeight(16.0), + ); + }, + )), + ), + ), + ), + ) + ], + )); + } +} diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index baf5a5a5..1e80ec3e 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -43,8 +43,9 @@ import 'package:provider/provider.dart'; class ConfirmLogin extends StatefulWidget { final Function changePageViewIndex; final fromRegistration; - final bool isDubai; - const ConfirmLogin({Key key, this.changePageViewIndex, this.fromRegistration = false, this.isDubai =false}) : super(key: key); + final bool isDubai; + + const ConfirmLogin({Key key, this.changePageViewIndex, this.fromRegistration = false, this.isDubai = false}) : super(key: key); @override _ConfirmLogin createState() => _ConfirmLogin(); @@ -387,9 +388,9 @@ class _ConfirmLogin extends State { request.sMSSignature = await SMSOTP.getSignature(); GifLoaderDialogUtils.showMyDialog(context); if (healthId != null || widget.isDubai) { - if(!widget.isDubai){ - request.dob = dob; //isHijri == 1 ? dob : dateFormat2.format(dateFormat.parse(dob)); - } + if (!widget.isDubai) { + request.dob = dob; //isHijri == 1 ? dob : dateFormat2.format(dateFormat.parse(dob)); + } request.healthId = healthId; request.isHijri = isHijri; await this.authService.sendActivationCodeRegister(request).then((result) { @@ -569,7 +570,7 @@ class _ConfirmLogin extends State { var request = this.getCommonRequest().toJson(); dynamic res; if (healthId != null || widget.isDubai) { - if(!widget.isDubai) { + if (!widget.isDubai) { request['DOB'] = dob; } request['HealthId'] = healthId; @@ -584,7 +585,7 @@ class _ConfirmLogin extends State { result = CheckActivationCode.fromJson(result), if (this.registerd_data != null && this.registerd_data.isRegister == true) { - // if(widget.isDubai ==false){ + // if(widget.isDubai ==false){ widget.changePageViewIndex(1), Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: RegisterNew)), } @@ -679,11 +680,15 @@ class _ConfirmLogin extends State { if (res['MessageStatus'] == 1) { isAdmitted = res['isAdmitted']; print("IS ADMITTED: $isAdmitted"); - if (res['PatientAdmittedInformation'].length != 0) { + if (res['isAdmitted'] == true) { print("INPATIENT!!!"); getAdmissionInfoResponseModel = GetAdmissionInfoResponseModel.fromJson(res['PatientAdmittedInformation'][0]); projectViewModel.setIsPatientAdmitted(true); - projectViewModel.setInPatientProjectID(res['PatientAdmittedInformation'][0]['ProjectID']); + if (res['PatientAdmittedInformation'].length != 0) { + projectViewModel.setInPatientProjectID(res['PatientAdmittedInformation'][0]['ProjectID']); + } else { + projectViewModel.setInPatientProjectID(15); + } projectViewModel.setInPatientAdmissionInfo(getAdmissionInfoResponseModel); } else { print("OUTPATIENT!!!"); diff --git a/lib/pages/login/login.dart b/lib/pages/login/login.dart index 856a5bc3..ab715836 100644 --- a/lib/pages/login/login.dart +++ b/lib/pages/login/login.dart @@ -401,12 +401,16 @@ class _Login extends State { if (res['MessageStatus'] == 1) { isAdmitted = res['isAdmitted']; print("IS ADMITTED: $isAdmitted"); - if (res['PatientAdmittedInformation'].length != 0) { + if (res['isAdmitted'] == true) { print("INPATIENT!!!"); - getAdmissionInfoResponseModel = GetAdmissionInfoResponseModel.fromJson(res['PatientAdmittedInformation'][0]); projectViewModel.setIsPatientAdmitted(true); - projectViewModel.setInPatientProjectID(res['PatientAdmittedInformation'][0]['ProjectID']); - projectViewModel.setInPatientAdmissionInfo(getAdmissionInfoResponseModel); + if (res['PatientAdmittedInformation'].length != 0) { + getAdmissionInfoResponseModel = GetAdmissionInfoResponseModel.fromJson(res['PatientAdmittedInformation'][0]); + projectViewModel.setInPatientProjectID(res['PatientAdmittedInformation'][0]['ProjectID']); + projectViewModel.setInPatientAdmissionInfo(getAdmissionInfoResponseModel); + } else { + projectViewModel.setInPatientProjectID(15); + } } else { print("OUTPATIENT!!!"); projectViewModel.setIsPatientAdmitted(false); diff --git a/lib/services/clinic_services/get_clinic_service.dart b/lib/services/clinic_services/get_clinic_service.dart index 6bea9aa4..73103aea 100644 --- a/lib/services/clinic_services/get_clinic_service.dart +++ b/lib/services/clinic_services/get_clinic_service.dart @@ -93,6 +93,20 @@ class ClinicListService extends BaseService { return Future.value(localRes); } + Future getMedicalInstructions(int projectID, context) async { + Map request; + request = {"ProjectID": projectID}; + + dynamic localRes; + + await baseAppClient.post(GET_MEDICAL_INSTRUCTIONS, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isAllowAny: true); + return Future.value(localRes); + } + Future getProjectsList(context) async { Map request; var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); From 4afdf5545ed28e7a0763255caccab118adb70abf Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 14 Aug 2023 14:05:45 +0300 Subject: [PATCH 27/49] Translations added --- lib/config/localized_values.dart | 5 +++ .../general_instructions.dart | 6 +-- .../InPatientServices/inpatient_home.dart | 45 ++++++++++++------- .../medical_instructions.dart | 4 +- lib/uitl/translations_delegate_base.dart | 4 ++ 5 files changed, 43 insertions(+), 21 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 0dabcd4b..7e7d6767 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1921,4 +1921,9 @@ const Map localizedValues = { "birthNotificationNotes3": {"en": "For Residents without identification card: Provide marriage contract.", "ar": "للمواطنين الغير حاملين لبطاقة الأحوال : إرفاق صورة من عقد الزواج برقم الحاسب"}, "placeOrder": {"en": "Place Order", "ar": "مكان الامر"}, "isFasting": {"en": "Are you fasting?", "ar": "هل أنت صائم؟"}, + "noGeneralInstructions": {"en": "You do not have any general instructions right now.", "ar": "ليس لديك أي تعليمات عامة في الوقت الحالي."}, + "noMedicalInstructions": {"en": "You do not have any medical instructions right now.", "ar": "ليس لديك أي تعليمات طبية في الوقت الحالي."}, + + "medicalInstructions": {"en": "Medical Instructions:", "ar": "تعليمات طبية:"}, + "generalInstructions": {"en": "General Instructions:", "ar": "تعليمات عامة:"}, }; \ No newline at end of file diff --git a/lib/pages/InPatientServices/general_instructions.dart b/lib/pages/InPatientServices/general_instructions.dart index ead96e42..6a923120 100644 --- a/lib/pages/InPatientServices/general_instructions.dart +++ b/lib/pages/InPatientServices/general_instructions.dart @@ -28,10 +28,10 @@ class GeneralInstructions extends StatelessWidget { children: [ Padding( padding: const EdgeInsets.all(21.0), - child: Text("General Instructions", + child: Text(TranslationBase.of(context).generalInstructions, overflow: TextOverflow.clip, style: TextStyle( - fontSize: 14.0, + fontSize: 21.0, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, @@ -42,7 +42,7 @@ class GeneralInstructions extends StatelessWidget { width: MediaQuery.of(context).size.width, child: Card( elevation: 0.0, - margin: EdgeInsets.all(16), + margin: EdgeInsets.only(left: 16.0, right: 16.0, bottom: 16.0), color: Colors.white, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(10), diff --git a/lib/pages/InPatientServices/inpatient_home.dart b/lib/pages/InPatientServices/inpatient_home.dart index 013bd2d0..711a45df 100644 --- a/lib/pages/InPatientServices/inpatient_home.dart +++ b/lib/pages/InPatientServices/inpatient_home.dart @@ -7,6 +7,7 @@ import 'package:diplomaticquarterapp/pages/InPatientServices/inpatient_advance_p import 'package:diplomaticquarterapp/pages/InPatientServices/meal_plan.dart'; import 'package:diplomaticquarterapp/pages/InPatientServices/medical_instructions.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; @@ -238,8 +239,12 @@ class InPatientServicesHome extends StatelessWidget { GifLoaderDialogUtils.showMyDialog(context); service.getBirthNotification(projectViewModel.user.patientID, context).then((res) { GifLoaderDialogUtils.hideDialog(context); - print(res['birthNotification']); - Navigator.push(context, FadePage(page: BirthNotification())); + if(res["MessageStatus"] == 1) { + print(res['birthNotification']); + Navigator.push(context, FadePage(page: BirthNotification())); + } else { + AppToast.showErrorToast(message: res["endUserMessage"]); + } }).catchError((err) { print(err); }); @@ -249,13 +254,17 @@ class InPatientServicesHome extends StatelessWidget { ClinicListService service = new ClinicListService(); GifLoaderDialogUtils.showMyDialog(context); service.getGeneralInstructions(projectViewModel.inPatientProjectID, context).then((res) { - List getGeneralInstructionsList = []; - res['generalInstructions'].forEach((v) { - getGeneralInstructionsList.add(new GetGeneralInstructions.fromJson(v)); - }); - GifLoaderDialogUtils.hideDialog(context); - print(res['generalInstructions']); - Navigator.push(context, FadePage(page: GeneralInstructions(getGeneralInstructionsList: getGeneralInstructionsList))); + if (res['generalInstructions'].length != 0) { + List getGeneralInstructionsList = []; + res['generalInstructions'].forEach((v) { + getGeneralInstructionsList.add(new GetGeneralInstructions.fromJson(v)); + }); + GifLoaderDialogUtils.hideDialog(context); + print(res['generalInstructions']); + Navigator.push(context, FadePage(page: GeneralInstructions(getGeneralInstructionsList: getGeneralInstructionsList))); + } else { + AppToast.showErrorToast(message: TranslationBase.of(context).noGeneralInstructions); + } }).catchError((err) { print(err); }); @@ -265,13 +274,17 @@ class InPatientServicesHome extends StatelessWidget { ClinicListService service = new ClinicListService(); GifLoaderDialogUtils.showMyDialog(context); service.getMedicalInstructions(projectViewModel.inPatientProjectID, context).then((res) { - List getMedicalInstructionsList = []; - res['MedicalInstruction'].forEach((v) { - getMedicalInstructionsList.add(new GetMedicalInstructions.fromJson(v)); - }); - GifLoaderDialogUtils.hideDialog(context); - print(res['MedicalInstruction']); - Navigator.push(context, FadePage(page: MedicalInstructionsPage(getMedicalInstructionsList: getMedicalInstructionsList))); + if (res['MedicalInstruction'].length != 0) { + List getMedicalInstructionsList = []; + res['MedicalInstruction'].forEach((v) { + getMedicalInstructionsList.add(new GetMedicalInstructions.fromJson(v)); + }); + GifLoaderDialogUtils.hideDialog(context); + print(res['MedicalInstruction']); + Navigator.push(context, FadePage(page: MedicalInstructionsPage(getMedicalInstructionsList: getMedicalInstructionsList))); + } else { + AppToast.showErrorToast(message: TranslationBase.of(context).noMedicalInstructions); + } }).catchError((err) { print(err); }); diff --git a/lib/pages/InPatientServices/medical_instructions.dart b/lib/pages/InPatientServices/medical_instructions.dart index b5062b9b..099c5558 100644 --- a/lib/pages/InPatientServices/medical_instructions.dart +++ b/lib/pages/InPatientServices/medical_instructions.dart @@ -35,7 +35,7 @@ class _MedicalInstructionsPageState extends State { children: [ Padding( padding: const EdgeInsets.all(21.0), - child: Text("Medical Instructions", + child: Text(TranslationBase.of(context).medicalInstructions, overflow: TextOverflow.clip, style: TextStyle( fontSize: 21.0, @@ -49,7 +49,7 @@ class _MedicalInstructionsPageState extends State { width: MediaQuery.of(context).size.width, child: Card( elevation: 0.0, - margin: EdgeInsets.all(16), + margin: EdgeInsets.only(left: 16.0, right: 16.0, bottom: 16.0), color: Colors.white, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(10), diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 25a41d16..a9b9f334 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2926,6 +2926,10 @@ class TranslationBase { String get birthNotificationNotes3 => localizedValues["birthNotificationNotes3"][locale.languageCode]; String get placeOrder => localizedValues["placeOrder"][locale.languageCode]; String get isFasting => localizedValues["isFasting"][locale.languageCode]; + String get noGeneralInstructions => localizedValues["noGeneralInstructions"][locale.languageCode]; + String get noMedicalInstructions => localizedValues["noMedicalInstructions"][locale.languageCode]; + String get medicalInstructions => localizedValues["medicalInstructions"][locale.languageCode]; + String get generalInstructions => localizedValues["generalInstructions"][locale.languageCode]; } From dd79b1dfca1aa453faafc64bf0f538df19ed5887 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 15 Aug 2023 09:39:56 +0300 Subject: [PATCH 28/49] InPatient pending advance payment done --- lib/config/config.dart | 4 +- lib/config/localized_values.dart | 6 +- lib/core/service/client/base_app_client.dart | 2 +- ...tient_advance_requests_response_model.dart | 71 ++++++ .../inpatient_pending_advance_payment.dart | 212 +++++++++++++++++- .../inpatient_advance_payment.dart | 10 +- .../InPatientServices/inpatient_home.dart | 26 ++- .../clinic_services/get_clinic_service.dart | 14 ++ lib/uitl/translations_delegate_base.dart | 3 + 9 files changed, 338 insertions(+), 10 deletions(-) create mode 100644 lib/models/InPatientServices/get_inpatient_advance_requests_response_model.dart diff --git a/lib/config/config.dart b/lib/config/config.dart index 59773264..da9781e8 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -611,9 +611,11 @@ var CHECK_IF_PATIENT_ADMITTED = 'Services/Inps.svc/REST/chekIsPatientAdmitted'; // Get General Instructions API var GET_GENERAL_INSTRUCTIONS = 'Services/INPs.svc/REST/getGeneralInstructions'; -// Get General Instructions API +// Get Medical Instructions API var GET_MEDICAL_INSTRUCTIONS = 'Services/INPs.svc/REST/getPatientAdmissionRequest'; +var GET_INPATIENT_ADVANCE_PAYMENT_REQUESTS = 'Services/INPs.svc/REST/getInpatientAdvancePendingPayment'; + var INSERT_INPATIENT_ORDER = 'Services/INPs.svc/REST/Inpcp_insertOrder'; var GET_BIRTH_NOTIFICATION = 'Services/INPs.svc/REST/getBirthNotification_bymothermrn'; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 7e7d6767..95ee02e4 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -175,7 +175,7 @@ const Map localizedValues = { "reminderCancelSuccess": {"en": "The reminder has been cancelled successfully", "ar": "تم إلغاء التذكير بنجاح"}, "patientShareToDo": {"en": "Amount before tax: ", "ar": "المبلغ قبل الضريبة:"}, "patientTaxToDo": {"en": "Tax amount: ", "ar": "قيمة الضريبة:"}, - "patientShareTotalToDo": {"en": "Total amount Due: ", "ar": "المبلغ الإجمالي المستحق:"}, + "patientShareTotalToDo": {"en": "Total amount due: ", "ar": "المبلغ الإجمالي المستحق:"}, 'paymentMethod': {'en': 'Payment Method', 'ar': 'طريقة الدفع او السداد'}, 'noNeedToWaitInLine': {'en': 'No need to stand in line.', 'ar': 'لا داعي للوقوف في الطابور.'}, 'useQRAppoAttend': {'en': 'Use the QR code to register the appointment attendance.', 'ar': 'استخدم الكود لتسجيل الحضور في المستشفى.'}, @@ -1923,7 +1923,9 @@ const Map localizedValues = { "isFasting": {"en": "Are you fasting?", "ar": "هل أنت صائم؟"}, "noGeneralInstructions": {"en": "You do not have any general instructions right now.", "ar": "ليس لديك أي تعليمات عامة في الوقت الحالي."}, "noMedicalInstructions": {"en": "You do not have any medical instructions right now.", "ar": "ليس لديك أي تعليمات طبية في الوقت الحالي."}, - "medicalInstructions": {"en": "Medical Instructions:", "ar": "تعليمات طبية:"}, "generalInstructions": {"en": "General Instructions:", "ar": "تعليمات عامة:"}, + "copyLink": {"en": "COPY LINK", "ar": "نسخ الوصلة:"}, + "paymentLinkCopied": {"en": "Payment link copied to your clipboard!'", "ar": "تم نسخ رابط الدفع إلى الحافظة الخاصة بك!"}, + "copyLinkTxt": {"en": "Or you can copy the payment link from below & send it to someone who can pay on your behalf: ", "ar": "أو يمكنك نسخ رابط الدفع من الأسفل وإرساله إلى شخص يمكنه الدفع نيابة عنك:"}, }; \ No newline at end of file diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 7b8874d3..bd53bcf2 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -152,7 +152,7 @@ class BaseAppClient { // body['PatientID'] = 2480363; //3844083 // body['TokenID'] = "@dm!n"; - // body['PatientID'] = 3649689; //3844083 + // body['PatientID'] = 4767347; //3844083 // body['AdmissionNo'] = 2023000040; //3844083 // body['TokenID'] = "@dm!n"; diff --git a/lib/models/InPatientServices/get_inpatient_advance_requests_response_model.dart b/lib/models/InPatientServices/get_inpatient_advance_requests_response_model.dart new file mode 100644 index 00000000..a78f116b --- /dev/null +++ b/lib/models/InPatientServices/get_inpatient_advance_requests_response_model.dart @@ -0,0 +1,71 @@ +class InPatientAdvanceResponseModel { + int advanceNumber; + Null errorCode; + String message; + List responseInpatientAdvanceInfo; + int statusCode; + + InPatientAdvanceResponseModel({this.advanceNumber, this.errorCode, this.message, this.responseInpatientAdvanceInfo, this.statusCode}); + + InPatientAdvanceResponseModel.fromJson(Map json) { + advanceNumber = json['advanceNumber']; + errorCode = json['errorCode']; + message = json['message']; + if (json['responseInpatientAdvanceInfo'] != null) { + responseInpatientAdvanceInfo = []; + json['responseInpatientAdvanceInfo'].forEach((v) { + responseInpatientAdvanceInfo.add(new ResponseInpatientAdvanceInfo.fromJson(v)); + }); + } + statusCode = json['statusCode']; + } + + Map toJson() { + final Map data = new Map(); + data['advanceNumber'] = this.advanceNumber; + data['errorCode'] = this.errorCode; + data['message'] = this.message; + if (this.responseInpatientAdvanceInfo != null) { + data['responseInpatientAdvanceInfo'] = this.responseInpatientAdvanceInfo.map((v) => v.toJson()).toList(); + } + data['statusCode'] = this.statusCode; + return data; + } +} + +class ResponseInpatientAdvanceInfo { + int admissionNo; + int admissionReqNo; + String createdOn; + int patientId; + int projectId; + int requestedAmount; + String setupId; + int status; + + ResponseInpatientAdvanceInfo({this.admissionNo, this.admissionReqNo, this.createdOn, this.patientId, this.projectId, this.requestedAmount, this.setupId, this.status}); + + ResponseInpatientAdvanceInfo.fromJson(Map json) { + admissionNo = json['admissionNo']; + admissionReqNo = json['admissionReqNo']; + createdOn = json['createdOn']; + patientId = json['patientId']; + projectId = json['projectId']; + requestedAmount = json['requestedAmount']; + setupId = json['setupId']; + status = json['status']; + } + + Map toJson() { + final Map data = new Map(); + data['admissionNo'] = this.admissionNo; + data['admissionReqNo'] = this.admissionReqNo; + data['createdOn'] = this.createdOn; + data['patientId'] = this.patientId; + data['projectId'] = this.projectId; + data['requestedAmount'] = this.requestedAmount; + data['setupId'] = this.setupId; + data['status'] = this.status; + return data; + } +} diff --git a/lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart b/lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart index 0db5bb17..35620ea0 100644 --- a/lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart +++ b/lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart @@ -1,15 +1,223 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_inpatient_advance_requests_response_model.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_inappwebview/flutter_inappwebview.dart'; +import 'package:provider/provider.dart'; class InPatientPendingAdvancePayment extends StatefulWidget { - const InPatientPendingAdvancePayment({Key key}) : super(key: key); + InPatientAdvanceResponseModel inPatientAdvanceResponseModel; + + InPatientPendingAdvancePayment({@required this.inPatientAdvanceResponseModel}); @override State createState() => _InPatientPendingAdvancePaymentState(); } class _InPatientPendingAdvancePaymentState extends State { + ProjectViewModel projectViewModel; + InAppBrowser browser = new InAppBrowser(); + + var _InAppBrowserOptions = InAppBrowserClassOptions( + inAppWebViewGroupOptions: InAppWebViewGroupOptions( + crossPlatform: InAppWebViewOptions(useShouldOverrideUrlLoading: true, transparentBackground: false), + ios: IOSInAppWebViewOptions(applePayAPIEnabled: true, isFraudulentWebsiteWarningEnabled: false)), + crossPlatform: InAppBrowserOptions(hideUrlBar: true, toolbarTopBackgroundColor: Colors.black), + android: AndroidInAppBrowserOptions(), + ios: + IOSInAppBrowserOptions(hideToolbarBottom: true, toolbarBottomBackgroundColor: Colors.white, closeButtonColor: Colors.white, presentationStyle: IOSUIModalPresentationStyle.OVER_FULL_SCREEN)); + + @override + void initState() { + browser = new InAppBrowser(); + super.initState(); + } + @override Widget build(BuildContext context) { - return Container(); + projectViewModel = Provider.of(context); + return Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: double.infinity, + child: Container( + decoration: cardRadius(12), + margin: EdgeInsets.zero, + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "Payment request for: ", + // TranslationBase.of(context).covidBookAppo, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16, + letterSpacing: -0.64, + ), + ), + mHeight(6), + Row( + children: [ + Text( + TranslationBase.of(context).patientName + ":", + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 10, + letterSpacing: -0.6, + color: CustomColors.grey, + ), + ), + mWidth(3), + Text( + projectViewModel.user.firstName + " " + projectViewModel.user.lastName, + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + letterSpacing: -0.48, + ), + ), + ], + ), + Row( + children: [ + Text( + TranslationBase.of(context).identificationNumber + ":", + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 10, + letterSpacing: -0.6, + color: CustomColors.grey, + ), + ), + mWidth(3), + Text( + projectViewModel.user.patientIdentificationNo, + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + letterSpacing: -0.48, + ), + ), + ], + ), + Row( + children: [ + Text( + TranslationBase.of(context).mrn + ":", + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 10, + letterSpacing: -0.6, + color: CustomColors.grey, + ), + ), + mWidth(3), + Text( + projectViewModel.user.patientID.toString(), + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + letterSpacing: -0.48, + ), + ), + ], + ), + ], + ), + ), + ), + ), + mHeight(12), + // Expanded(child: Container()), + Container( + decoration: cardRadius(12.0), + margin: EdgeInsets.zero, + padding: EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + TranslationBase.of(context).patientShareTotalToDo, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16, + letterSpacing: -0.64, + ), + ), + Text( + TranslationBase.of(context).sar + " ${widget.inPatientAdvanceResponseModel.responseInpatientAdvanceInfo[0].requestedAmount}", + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 24, + letterSpacing: -0.64, + ), + ), + ], + ), + SizedBox(height: 12), + Text( + TranslationBase.of(context).YouCanPayByTheFollowingOptions, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + SizedBox(height: 12), + SizedBox( + width: MediaQuery.of(context).size.width * 0.75, + child: getPaymentMethods(), + ), + SizedBox(height: 12), + DefaultButton( + TranslationBase.of(context).payNow.toUpperCase(), + () { + this.browser.openUrlRequest(urlRequest: URLRequest(url: Uri.parse("https://google.com/")), options: _InAppBrowserOptions); + }, + // : null, + color: CustomColors.green, + disabledColor: CustomColors.grey2, + ), + SizedBox(height: 12), + Text( + TranslationBase.of(context).copyLinkTxt, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + SizedBox(height: 12), + DefaultButton( + TranslationBase.of(context).copyLink.toUpperCase(), + () { + Clipboard.setData(const ClipboardData(text: "https://google.com/")).then((_) { + ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text(TranslationBase.of(context).paymentLinkCopied))); + }); + }, + svgIcon: "assets/images/new/copy.svg", + color: CustomColors.accentColor, + disabledColor: CustomColors.grey2, + ), + ], + ), + ), + ], + ), + ); } } diff --git a/lib/pages/InPatientServices/inpatient_advance_payment.dart b/lib/pages/InPatientServices/inpatient_advance_payment.dart index 3aed7934..736d7242 100644 --- a/lib/pages/InPatientServices/inpatient_advance_payment.dart +++ b/lib/pages/InPatientServices/inpatient_advance_payment.dart @@ -1,12 +1,18 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_inpatient_advance_requests_response_model.dart'; import 'package:diplomaticquarterapp/pages/InPatientServices/components/inpatient_pending_advance_payment.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; class InPatientAdvancePayment extends StatefulWidget { - const InPatientAdvancePayment({Key key}) : super(key: key); + InPatientAdvanceResponseModel inPatientAdvanceResponseModel; + + InPatientAdvancePayment({@required this.inPatientAdvanceResponseModel}); @override State createState() => _InPatientAdvancePaymentState(); @@ -59,7 +65,7 @@ class _InPatientAdvancePaymentState extends State with physics: BouncingScrollPhysics(), controller: _tabController, children: [ - InPatientPendingAdvancePayment(), + InPatientPendingAdvancePayment(inPatientAdvanceResponseModel: widget.inPatientAdvanceResponseModel), Container(), ], ), diff --git a/lib/pages/InPatientServices/inpatient_home.dart b/lib/pages/InPatientServices/inpatient_home.dart index 711a45df..683acfa6 100644 --- a/lib/pages/InPatientServices/inpatient_home.dart +++ b/lib/pages/InPatientServices/inpatient_home.dart @@ -17,10 +17,12 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; +import '../../models/InPatientServices/get_inpatient_advance_requests_response_model.dart'; import '../../models/InPatientServices/get_medical_instructions_response_model.dart'; class InPatientServicesHome extends StatelessWidget { ProjectViewModel projectViewModel; + InPatientAdvanceResponseModel inPatientAdvanceResponseModel; @override Widget build(BuildContext context) { @@ -158,7 +160,7 @@ class InPatientServicesHome extends StatelessWidget { serviceList.add( InkWell( onTap: () { - Navigator.push(context, FadePage(page: InPatientAdvancePayment())); + getInPatientAdvancePaymentRequests(context); }, child: MedicalProfileItem( title: "Advance", @@ -239,7 +241,7 @@ class InPatientServicesHome extends StatelessWidget { GifLoaderDialogUtils.showMyDialog(context); service.getBirthNotification(projectViewModel.user.patientID, context).then((res) { GifLoaderDialogUtils.hideDialog(context); - if(res["MessageStatus"] == 1) { + if (res["MessageStatus"] == 1) { print(res['birthNotification']); Navigator.push(context, FadePage(page: BirthNotification())); } else { @@ -289,4 +291,24 @@ class InPatientServicesHome extends StatelessWidget { print(err); }); } + + void getInPatientAdvancePaymentRequests(BuildContext context) { + ClinicListService service = new ClinicListService(); + GifLoaderDialogUtils.showMyDialog(context); + service + .getInPatientAdvancePaymentRequests( + projectViewModel.inPatientProjectID, projectViewModel.getAdmissionInfoResponseModel.admissionNo, projectViewModel.getAdmissionInfoResponseModel.admissionRequestNo, context) + .then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res["MessageStatus"] == 1) { + inPatientAdvanceResponseModel = InPatientAdvanceResponseModel.fromJson(res["responseInpatient"]); + Navigator.push(context, FadePage(page: InPatientAdvancePayment(inPatientAdvanceResponseModel: inPatientAdvanceResponseModel))); + } else { + AppToast.showErrorToast(message: res["endUserMessage"]); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } } diff --git a/lib/services/clinic_services/get_clinic_service.dart b/lib/services/clinic_services/get_clinic_service.dart index 73103aea..db813581 100644 --- a/lib/services/clinic_services/get_clinic_service.dart +++ b/lib/services/clinic_services/get_clinic_service.dart @@ -93,6 +93,20 @@ class ClinicListService extends BaseService { return Future.value(localRes); } + Future getInPatientAdvancePaymentRequests(int projectID, int admissionNo, int admissionReqNo, context) async { + Map request; + request = {"ProjectID": projectID, "AdmissionReqNo": admissionReqNo, "AdmissionNo": admissionNo}; + + dynamic localRes; + + await baseAppClient.post(GET_INPATIENT_ADVANCE_PAYMENT_REQUESTS, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isAllowAny: true); + return Future.value(localRes); + } + Future getMedicalInstructions(int projectID, context) async { Map request; request = {"ProjectID": projectID}; diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index a9b9f334..8ef54102 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2930,6 +2930,9 @@ class TranslationBase { String get noMedicalInstructions => localizedValues["noMedicalInstructions"][locale.languageCode]; String get medicalInstructions => localizedValues["medicalInstructions"][locale.languageCode]; String get generalInstructions => localizedValues["generalInstructions"][locale.languageCode]; + String get copyLink => localizedValues["copyLink"][locale.languageCode]; + String get copyLinkTxt => localizedValues["copyLinkTxt"][locale.languageCode]; + String get paymentLinkCopied => localizedValues["paymentLinkCopied"][locale.languageCode]; } From a9ae44ca8953c18d68a42abc0a17b0136a261d95 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 15 Aug 2023 14:40:25 +0300 Subject: [PATCH 29/49] Implemented checks for InPatient CR --- lib/config/config.dart | 4 +- lib/config/localized_values.dart | 1 + lib/core/viewModels/project_view_model.dart | 13 +++ ...admission_request_info_response_model.dart | 79 +++++++++++++++++++ .../InPatientServices/inpatient_home.dart | 73 ++++++++++------- .../fragments/home_page_fragment2.dart | 8 +- lib/pages/login/confirm-login.dart | 27 ++++--- lib/pages/login/login.dart | 24 ++++-- lib/uitl/translations_delegate_base.dart | 1 + 9 files changed, 180 insertions(+), 50 deletions(-) create mode 100644 lib/models/InPatientServices/get_admission_request_info_response_model.dart diff --git a/lib/config/config.dart b/lib/config/config.dart index da9781e8..b5e07054 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -325,7 +325,7 @@ var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnari var CHANNEL = 3; var GENERAL_ID = 'Cs2020@2016\$2958'; var IP_ADDRESS = '10.20.10.20'; -var VERSION_ID = 10.7; +var VERSION_ID = 10.8; var SETUP_ID = '91877'; var LANGUAGE = 2; // var PATIENT_OUT_SA = 0; @@ -606,7 +606,7 @@ var PAYFORT_PROD_URL = 'https://paymentservices.payfort.com/FortAPI/paymentApi'; // Check If InPatient API var CHECK_IF_INPATIENT = 'Services/Patients.svc/REST/GetInPatientAdmissionInfo'; -var CHECK_IF_PATIENT_ADMITTED = 'Services/Inps.svc/REST/chekIsPatientAdmitted'; +var CHECK_IF_PATIENT_ADMITTED = 'Services/Inps.svc/REST/checkIsPatientAdmittedOrAdmissionRequest'; // Get General Instructions API var GET_GENERAL_INSTRUCTIONS = 'Services/INPs.svc/REST/getGeneralInstructions'; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 95ee02e4..a2cd97fa 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1928,4 +1928,5 @@ const Map localizedValues = { "copyLink": {"en": "COPY LINK", "ar": "نسخ الوصلة:"}, "paymentLinkCopied": {"en": "Payment link copied to your clipboard!'", "ar": "تم نسخ رابط الدفع إلى الحافظة الخاصة بك!"}, "copyLinkTxt": {"en": "Or you can copy the payment link from below & send it to someone who can pay on your behalf: ", "ar": "أو يمكنك نسخ رابط الدفع من الأسفل وإرساله إلى شخص يمكنه الدفع نيابة عنك:"}, + "proErrorMessage": {"en": "Dear patient, Our staff is currently out of office, please note that our working hours are from 7:00 AM to 10:00 PM, and we'd love to help you during that time, or you can call ", "ar": "عزيزي المريض ، طاقم العمل لدينا خارج المكتب حاليًا ، يرجى ملاحظة أن ساعات العمل لدينا من 7:00 صباحًا إلى 10:00 مساءً ، ويسعدنا مساعدتك خلال هذا الوقت ، أو يمكنك الاتصال بـ <أدخل الرقم هنا>"}, }; \ No newline at end of file diff --git a/lib/core/viewModels/project_view_model.dart b/lib/core/viewModels/project_view_model.dart index 6c78da7f..fa665b36 100644 --- a/lib/core/viewModels/project_view_model.dart +++ b/lib/core/viewModels/project_view_model.dart @@ -10,6 +10,7 @@ import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/models/Appointments/laser_body_parts.dart'; import 'package:diplomaticquarterapp/models/Authentication/register_info_response.dart'; import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_info_response_model.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_request_info_response_model.dart'; import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:flutter/cupertino.dart'; @@ -37,8 +38,10 @@ class ProjectViewModel extends BaseViewModel { bool isLogin = false; int laserSelectionDuration; bool isPatientAdmitted = false; + bool patientHasAdmissionRequest = false; int inPatientProjectID = 0; GetAdmissionInfoResponseModel getAdmissionInfoResponseModel; + GetAdmissionRequestInfoResponseModel getAdmissionRequestInfoResponseModel; double _latitude; double _longitude; @@ -121,6 +124,11 @@ class ProjectViewModel extends BaseViewModel { notifyListeners(); } + setPatientHasAdmissionRequest(bool hasAdmissionRequest) { + this.patientHasAdmissionRequest = hasAdmissionRequest; + notifyListeners(); + } + setInPatientProjectID(int projectID) { this.inPatientProjectID = projectID; notifyListeners(); @@ -131,6 +139,11 @@ class ProjectViewModel extends BaseViewModel { notifyListeners(); } + setInPatientAdmissionRequest(GetAdmissionRequestInfoResponseModel _getAdmissionRequestInfoResponseModel) { + this.getAdmissionRequestInfoResponseModel = _getAdmissionRequestInfoResponseModel; + notifyListeners(); + } + setPrivilegeModelList({List privilege}) { this.isLoginChild = isLoginChild; privilegeRootUser = privilege; diff --git a/lib/models/InPatientServices/get_admission_request_info_response_model.dart b/lib/models/InPatientServices/get_admission_request_info_response_model.dart new file mode 100644 index 00000000..4c31c1fe --- /dev/null +++ b/lib/models/InPatientServices/get_admission_request_info_response_model.dart @@ -0,0 +1,79 @@ +class GetAdmissionRequestInfoResponseModel { + int admissionRequestNo; + String clinicName; + String doctorName; + String expectedAdmissionDate; + List medicalInstructions; + dynamic medicalInstructionsXML; + String medicalRemarks; + int projectId; + String projectName; + String setupId; + + GetAdmissionRequestInfoResponseModel( + {this.admissionRequestNo, + this.clinicName, + this.doctorName, + this.expectedAdmissionDate, + this.medicalInstructions, + this.medicalInstructionsXML, + this.medicalRemarks, + this.projectId, + this.projectName, + this.setupId}); + + GetAdmissionRequestInfoResponseModel.fromJson(Map json) { + admissionRequestNo = json['admissionRequestNo']; + clinicName = json['clinicName']; + doctorName = json['doctorName']; + expectedAdmissionDate = json['expectedAdmissionDate']; + if (json['medicaLInstructions'] != null) { + medicalInstructions = []; + json['medicaLInstructions'].forEach((v) { + medicalInstructions.add(new MedicaLInstructions.fromJson(v)); + }); + } + medicalInstructionsXML = json['medicalInstructionsXML']; + medicalRemarks = json['medicalRemarks']; + projectId = json['projectId']; + projectName = json['projectName']; + setupId = json['setupId']; + } + + Map toJson() { + final Map data = new Map(); + data['admissionRequestNo'] = this.admissionRequestNo; + data['clinicName'] = this.clinicName; + data['doctorName'] = this.doctorName; + data['expectedAdmissionDate'] = this.expectedAdmissionDate; + if (this.medicalInstructions != null) { + data['medicaLInstructions'] = + this.medicalInstructions.map((v) => v.toJson()).toList(); + } + data['medicalInstructionsXML'] = this.medicalInstructionsXML; + data['medicalRemarks'] = this.medicalRemarks; + data['projectId'] = this.projectId; + data['projectName'] = this.projectName; + data['setupId'] = this.setupId; + return data; + } +} + +class MedicaLInstructions { + String description; + int parameterCode; + + MedicaLInstructions({this.description, this.parameterCode}); + + MedicaLInstructions.fromJson(Map json) { + description = json['description']; + parameterCode = json['parameterCode']; + } + + Map toJson() { + final Map data = new Map(); + data['description'] = this.description; + data['parameterCode'] = this.parameterCode; + return data; + } +} diff --git a/lib/pages/InPatientServices/inpatient_home.dart b/lib/pages/InPatientServices/inpatient_home.dart index 683acfa6..eca5a7b8 100644 --- a/lib/pages/InPatientServices/inpatient_home.dart +++ b/lib/pages/InPatientServices/inpatient_home.dart @@ -8,14 +8,17 @@ import 'package:diplomaticquarterapp/pages/InPatientServices/meal_plan.dart'; import 'package:diplomaticquarterapp/pages/InPatientServices/medical_instructions.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; +import 'package:url_launcher/url_launcher.dart'; import '../../models/InPatientServices/get_inpatient_advance_requests_response_model.dart'; import '../../models/InPatientServices/get_medical_instructions_response_model.dart'; @@ -61,26 +64,10 @@ class InPatientServicesHome extends StatelessWidget { List getInPatientServicesList(BuildContext context) { List serviceList = List(); - // serviceList.add( - // InkWell( - // onTap: () { - // // Navigator.push(context, FadePage(page: AdvancePaymentPage())); - // }, - // child: MedicalProfileItem( - // title: TranslationBase.of(context).admissionGeneral, - // imagePath: 'admission.svg', - // subTitle: TranslationBase.of(context).consent, - // width: 50.0, - // height: 40.0, - // isInPatient: true, - // ), - // ), - // ); - serviceList.add( InkWell( onTap: () { - openGeneralInstructions(context); + if (projectViewModel.isPatientAdmitted ? true : checkAdmissionRequestDate()) openGeneralInstructions(context); }, child: MedicalProfileItem( title: TranslationBase.of(context).generalInstructionsTitle, @@ -89,6 +76,7 @@ class InPatientServicesHome extends StatelessWidget { width: 50.0, height: 40.0, isInPatient: true, + isEnable: projectViewModel.isPatientAdmitted ? true : checkAdmissionRequestDate(), ), ), ); @@ -96,7 +84,7 @@ class InPatientServicesHome extends StatelessWidget { serviceList.add( InkWell( onTap: () { - openMedicalInstructions(context); + if (projectViewModel.isPatientAdmitted ? true : checkAdmissionRequestDate()) openMedicalInstructions(context); }, child: MedicalProfileItem( title: TranslationBase.of(context).medicalInstructionsTitle, @@ -105,6 +93,7 @@ class InPatientServicesHome extends StatelessWidget { width: 50.0, height: 40.0, isInPatient: true, + isEnable: projectViewModel.isPatientAdmitted ? true : checkAdmissionRequestDate(), ), ), ); @@ -112,16 +101,20 @@ class InPatientServicesHome extends StatelessWidget { serviceList.add( InkWell( onTap: () { - Navigator.push(context, FadePage(page: MealPlanPage())); + if (projectViewModel.isPatientAdmitted) { + Navigator.push(context, FadePage(page: MealPlanPage())); + } else { + AppToast.showErrorToast(message: "This service is only available to admitted patients"); + } }, child: MedicalProfileItem( - title: TranslationBase.of(context).mealPlanTitle, - imagePath: 'meal_plan.svg', - subTitle: TranslationBase.of(context).mealPlanSubTitle, - width: 50.0, - height: 40.0, - isInPatient: true, - ), + title: TranslationBase.of(context).mealPlanTitle, + imagePath: 'meal_plan.svg', + subTitle: TranslationBase.of(context).mealPlanSubTitle, + width: 50.0, + height: 40.0, + isInPatient: true, + isEnable: projectViewModel.isPatientAdmitted), ), ); @@ -193,7 +186,7 @@ class InPatientServicesHome extends StatelessWidget { serviceList.add( InkWell( onTap: () { - Navigator.push(context, FadePage(page: HelpPRO())); + checkCurrentTime(context); }, child: MedicalProfileItem( title: "Help", @@ -311,4 +304,30 @@ class InPatientServicesHome extends StatelessWidget { print(err); }); } + + void checkCurrentTime(BuildContext context) { + print(DateTime.now().hour); + print(DateTime.now().minute); + if (DateTime.now().hour >= 7 && DateTime.now().hour <= 22) { + Navigator.push(context, FadePage(page: HelpPRO())); + } else { + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: TranslationBase.of(context).proErrorMessage, + okText: TranslationBase.of(context).callNow, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: () => {ConfirmDialog.closeAlertDialog(context), launchUrl(Uri.parse("tel://" + "011 525 9553"))}, + cancelFunction: () => {}); + dialog.showAlertDialog(context); + } + } + + bool checkAdmissionRequestDate() { + print(DateUtil.convertStringToDate(projectViewModel.getAdmissionRequestInfoResponseModel.expectedAdmissionDate)); + print(DateUtil.convertStringToDate(projectViewModel.getAdmissionRequestInfoResponseModel.expectedAdmissionDate).difference(DateTime.now()).inHours); + if (DateUtil.convertStringToDate(projectViewModel.getAdmissionRequestInfoResponseModel.expectedAdmissionDate).difference(DateTime.now()).inHours > 24) { + return false; + } + return true; + } } diff --git a/lib/pages/landing/fragments/home_page_fragment2.dart b/lib/pages/landing/fragments/home_page_fragment2.dart index f8132a73..d34de11d 100644 --- a/lib/pages/landing/fragments/home_page_fragment2.dart +++ b/lib/pages/landing/fragments/home_page_fragment2.dart @@ -78,7 +78,7 @@ class _HomePageFragment2State extends State { Widget build(BuildContext context) { projectViewModel = Provider.of(context); - if (projectViewModel.isPatientAdmitted) { + if (projectViewModel.isPatientAdmitted || projectViewModel.patientHasAdmissionRequest) { initialiseInPatientHmgServices(false); } else { initialiseHmgServices(false); @@ -274,7 +274,7 @@ class _HomePageFragment2State extends State { ], ), ), - projectViewModel.isPatientAdmitted + projectViewModel.isPatientAdmitted || projectViewModel.patientHasAdmissionRequest ? Column( children: [ Padding( @@ -289,7 +289,9 @@ class _HomePageFragment2State extends State { child: AspectRatio( aspectRatio: 2.15, child: ServicesView( - new HmgServices(23, TranslationBase.of(context).InPatient, TranslationBase.of(context).inPatientServices, "assets/images/new/InPatient.svg", false), 23, true)), + new HmgServices(23, TranslationBase.of(context).InPatient, TranslationBase.of(context).inPatientServices, "assets/images/new/InPatient.svg", false), + 23, + true)), ), ), Expanded( diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index 1e80ec3e..3af64363 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -14,6 +14,7 @@ import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authent import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart'; import 'package:diplomaticquarterapp/models/Authentication/send_activation_request.dart'; import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_info_response_model.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_request_info_response_model.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/login/register_new.dart'; import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart'; @@ -674,25 +675,31 @@ class _ConfirmLogin extends State { checkIfIsInPatient() { bool isAdmitted = false; + bool hasAdmissionRequest = false; GetAdmissionInfoResponseModel getAdmissionInfoResponseModel; + GetAdmissionRequestInfoResponseModel getAdmissionRequestInfoResponseModel; ClinicListService service = new ClinicListService(); service.checkIfInPatientAPI(context).then((res) { if (res['MessageStatus'] == 1) { isAdmitted = res['isAdmitted']; + hasAdmissionRequest = res['hasAdmissionRequests']; print("IS ADMITTED: $isAdmitted"); - if (res['isAdmitted'] == true) { - print("INPATIENT!!!"); - getAdmissionInfoResponseModel = GetAdmissionInfoResponseModel.fromJson(res['PatientAdmittedInformation'][0]); - projectViewModel.setIsPatientAdmitted(true); + print("Has Admission Request: $hasAdmissionRequest"); + if (isAdmitted) { if (res['PatientAdmittedInformation'].length != 0) { + getAdmissionInfoResponseModel = GetAdmissionInfoResponseModel.fromJson(res['PatientAdmittedInformation'][0]); projectViewModel.setInPatientProjectID(res['PatientAdmittedInformation'][0]['ProjectID']); - } else { - projectViewModel.setInPatientProjectID(15); + projectViewModel.setInPatientAdmissionInfo(getAdmissionInfoResponseModel); + projectViewModel.setIsPatientAdmitted(true); + } + } + if (hasAdmissionRequest) { + if (res['MedicalInstruction'].length != 0) { + getAdmissionRequestInfoResponseModel = GetAdmissionRequestInfoResponseModel.fromJson(res['MedicalInstruction'][0]); + projectViewModel.setInPatientProjectID(res['MedicalInstruction'][0]['ProjectID']); + projectViewModel.setInPatientAdmissionRequest(getAdmissionRequestInfoResponseModel); + projectViewModel.setPatientHasAdmissionRequest(true); } - projectViewModel.setInPatientAdmissionInfo(getAdmissionInfoResponseModel); - } else { - print("OUTPATIENT!!!"); - projectViewModel.setIsPatientAdmitted(false); } } else {} }); diff --git a/lib/pages/login/login.dart b/lib/pages/login/login.dart index ab715836..59fcf042 100644 --- a/lib/pages/login/login.dart +++ b/lib/pages/login/login.dart @@ -10,6 +10,7 @@ import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel. import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart'; import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_info_response_model.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_request_info_response_model.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/login/confirm-login.dart'; import 'package:diplomaticquarterapp/pages/login/login-type.dart'; @@ -20,6 +21,7 @@ import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; @@ -395,25 +397,31 @@ class _Login extends State { checkIfIsInPatient() { bool isAdmitted = false; + bool hasAdmissionRequest = false; GetAdmissionInfoResponseModel getAdmissionInfoResponseModel; + GetAdmissionRequestInfoResponseModel getAdmissionRequestInfoResponseModel; ClinicListService service = new ClinicListService(); service.checkIfInPatientAPI(context).then((res) { if (res['MessageStatus'] == 1) { isAdmitted = res['isAdmitted']; + hasAdmissionRequest = res['hasAdmissionRequests']; print("IS ADMITTED: $isAdmitted"); - if (res['isAdmitted'] == true) { - print("INPATIENT!!!"); - projectViewModel.setIsPatientAdmitted(true); + print("Has Admission Request: $hasAdmissionRequest"); + if (isAdmitted) { if (res['PatientAdmittedInformation'].length != 0) { getAdmissionInfoResponseModel = GetAdmissionInfoResponseModel.fromJson(res['PatientAdmittedInformation'][0]); projectViewModel.setInPatientProjectID(res['PatientAdmittedInformation'][0]['ProjectID']); projectViewModel.setInPatientAdmissionInfo(getAdmissionInfoResponseModel); - } else { - projectViewModel.setInPatientProjectID(15); + projectViewModel.setIsPatientAdmitted(true); + } + } + if (hasAdmissionRequest) { + if (res['MedicalInstruction'].length != 0) { + getAdmissionRequestInfoResponseModel = GetAdmissionRequestInfoResponseModel.fromJson(res['MedicalInstruction'][0]); + projectViewModel.setInPatientProjectID(res['MedicalInstruction'][0]['ProjectID']); + projectViewModel.setInPatientAdmissionRequest(getAdmissionRequestInfoResponseModel); + projectViewModel.setPatientHasAdmissionRequest(true); } - } else { - print("OUTPATIENT!!!"); - projectViewModel.setIsPatientAdmitted(false); } } else {} }); diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 8ef54102..dd262ad7 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2933,6 +2933,7 @@ class TranslationBase { String get copyLink => localizedValues["copyLink"][locale.languageCode]; String get copyLinkTxt => localizedValues["copyLinkTxt"][locale.languageCode]; String get paymentLinkCopied => localizedValues["paymentLinkCopied"][locale.languageCode]; + String get proErrorMessage => localizedValues["proErrorMessage"][locale.languageCode]; } From ae0fca865d0eafc10e0f74db25abd656e4358e3d Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 16 Aug 2023 13:34:11 +0300 Subject: [PATCH 30/49] InPatient Advance payment API implemented --- lib/config/config.dart | 2 + ...tient_advance_requests_response_model.dart | 2 +- .../inpatient_pending_advance_payment.dart | 44 +++++++++++++++++-- .../InPatientServices/inpatient_home.dart | 12 +++-- .../clinic_services/get_clinic_service.dart | 35 ++++++++++++++- lib/widgets/drawer/app_drawer_widget.dart | 1 + lib/widgets/in_app_browser/InAppBrowser.dart | 4 +- pubspec.yaml | 1 + 8 files changed, 88 insertions(+), 13 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index b5e07054..c79bc863 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -616,6 +616,8 @@ var GET_MEDICAL_INSTRUCTIONS = 'Services/INPs.svc/REST/getPatientAdmissionReques var GET_INPATIENT_ADVANCE_PAYMENT_REQUESTS = 'Services/INPs.svc/REST/getInpatientAdvancePendingPayment'; +var GET_INPATIENT_ADVANCE_PAYMENT_LINK = 'Services/PayFort_Serv.svc/REST/InsertInPatientAdvanceDetails'; + var INSERT_INPATIENT_ORDER = 'Services/INPs.svc/REST/Inpcp_insertOrder'; var GET_BIRTH_NOTIFICATION = 'Services/INPs.svc/REST/getBirthNotification_bymothermrn'; diff --git a/lib/models/InPatientServices/get_inpatient_advance_requests_response_model.dart b/lib/models/InPatientServices/get_inpatient_advance_requests_response_model.dart index a78f116b..bdf03283 100644 --- a/lib/models/InPatientServices/get_inpatient_advance_requests_response_model.dart +++ b/lib/models/InPatientServices/get_inpatient_advance_requests_response_model.dart @@ -39,7 +39,7 @@ class ResponseInpatientAdvanceInfo { String createdOn; int patientId; int projectId; - int requestedAmount; + num requestedAmount; String setupId; int status; diff --git a/lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart b/lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart index 35620ea0..93a438c3 100644 --- a/lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart +++ b/lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart @@ -1,6 +1,9 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/InPatientServices/get_inpatient_advance_requests_response_model.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; @@ -8,6 +11,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart'; import 'package:provider/provider.dart'; +import 'package:share_plus/share_plus.dart'; class InPatientPendingAdvancePayment extends StatefulWidget { InPatientAdvanceResponseModel inPatientAdvanceResponseModel; @@ -185,7 +189,7 @@ class _InPatientPendingAdvancePaymentState extends State getInPatientPaymentLink(int projectID, int admissionNo, int orderID, String name, String email, num amount, String nationalID, int clinicID, context) async { + Map request; + // request = {"ProjectID": projectID, "AdmissionReqNo": admissionReqNo, "AdmissionNo": admissionNo}; + + request = { + "ProjectID": projectID, + "ClientOrderID": admissionNo, + "OrderDescription": "InPatient Advance Payment", + "CustomerName": name, + "CustomerEmail": email, + "Amount": amount, + "IsPaid": 0, + "AppointmentID": admissionNo.toString(), + "PaymentOption": "0", + "PaymentReferenceNumber": admissionNo, + "SourceType": "1", + "NationalID": nationalID, + "ClinicID": clinicID, + "createdBy": 102 + }; + + dynamic localRes; + + await baseAppClient.post(GET_INPATIENT_ADVANCE_PAYMENT_LINK, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isAllowAny: true); + return Future.value(localRes); + } + Future getMedicalInstructions(int projectID, context) async { Map request; request = {"ProjectID": projectID}; @@ -239,8 +270,8 @@ class ClinicListService extends BaseService { return Future.value(localRes); } - Future insertInPatientOrder( - GetAdmissionInfoResponseModel getAdmissionInfoResponseModel, int typeID, String patientName, String patientNameAR, String patientMobileNo, String comments, context) async { + Future insertInPatientOrder(GetAdmissionInfoResponseModel getAdmissionInfoResponseModel, int typeID, String patientName, String patientNameAR, String patientMobileNo, String comments, + context) async { Map request; request = { "ProjectID": getAdmissionInfoResponseModel.projectID, diff --git a/lib/widgets/drawer/app_drawer_widget.dart b/lib/widgets/drawer/app_drawer_widget.dart index 9a5861d9..622856f3 100644 --- a/lib/widgets/drawer/app_drawer_widget.dart +++ b/lib/widgets/drawer/app_drawer_widget.dart @@ -604,6 +604,7 @@ class _AppDrawerState extends State { await _privilegeService.getPrivilege(); projectProvider.setPrivilegeModelList(privilege: _privilegeService.privilegeModelList); projectProvider.setIsPatientAdmitted(false); + projectProvider.setPatientHasAdmissionRequest(false); projectProvider.setInPatientProjectID(0); var appLanguage = await sharedPref.getString(APP_LANGUAGE); await sharedPref.clear(); diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index 73069b22..28a364e5 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -35,11 +35,11 @@ class MyInAppBrowser extends InAppBrowser { // static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL LIVE static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT - // static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT + static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT // static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE - static String SERVICE_URL = 'https://uat.hmgwebservices.com/payfortforvidaplus/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL UAT VIDA PLUS + // static String SERVICE_URL = 'https://uat.hmgwebservices.com/payfortforvidaplus/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL UAT VIDA PLUS // static String PRESCRIPTION_PAYMENT_WITH_ORDERID = // 'https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID='; diff --git a/pubspec.yaml b/pubspec.yaml index c9312a7f..a3c1c140 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -196,6 +196,7 @@ dependencies: # flutter_hms_gms_availability: ^2.0.0 huawei_hmsavailability: ^6.6.0+300 huawei_location: 6.0.0+302 + share_plus: ^6.3.4 # Marker Animation # flutter_animarker: ^3.2.0 From 5c5ed35df87c62313ecc602c03e35d4eabdbe9ac Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Sun, 20 Aug 2023 10:57:55 +0300 Subject: [PATCH 31/49] Clinic & Doctor ID added --- ...admission_request_info_response_model.dart | 29 ++++++++++++------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/lib/models/InPatientServices/get_admission_request_info_response_model.dart b/lib/models/InPatientServices/get_admission_request_info_response_model.dart index 4c31c1fe..c11a7ccd 100644 --- a/lib/models/InPatientServices/get_admission_request_info_response_model.dart +++ b/lib/models/InPatientServices/get_admission_request_info_response_model.dart @@ -9,23 +9,29 @@ class GetAdmissionRequestInfoResponseModel { int projectId; String projectName; String setupId; + int clinicId; + int doctorId; GetAdmissionRequestInfoResponseModel( {this.admissionRequestNo, - this.clinicName, - this.doctorName, - this.expectedAdmissionDate, - this.medicalInstructions, - this.medicalInstructionsXML, - this.medicalRemarks, - this.projectId, - this.projectName, - this.setupId}); + this.clinicName, + this.doctorName, + this.expectedAdmissionDate, + this.medicalInstructions, + this.medicalInstructionsXML, + this.medicalRemarks, + this.projectId, + this.projectName, + this.setupId, + this.clinicId, + this.doctorId}); GetAdmissionRequestInfoResponseModel.fromJson(Map json) { admissionRequestNo = json['admissionRequestNo']; clinicName = json['clinicName']; doctorName = json['doctorName']; + clinicId = json['ClinicID']; + doctorId = json['DoctorID']; expectedAdmissionDate = json['expectedAdmissionDate']; if (json['medicaLInstructions'] != null) { medicalInstructions = []; @@ -45,10 +51,11 @@ class GetAdmissionRequestInfoResponseModel { data['admissionRequestNo'] = this.admissionRequestNo; data['clinicName'] = this.clinicName; data['doctorName'] = this.doctorName; + data['clinicId'] = this.clinicId; + data['doctorId'] = this.doctorId; data['expectedAdmissionDate'] = this.expectedAdmissionDate; if (this.medicalInstructions != null) { - data['medicaLInstructions'] = - this.medicalInstructions.map((v) => v.toJson()).toList(); + data['medicaLInstructions'] = this.medicalInstructions.map((v) => v.toJson()).toList(); } data['medicalInstructionsXML'] = this.medicalInstructionsXML; data['medicalRemarks'] = this.medicalRemarks; From 4a7ca9cd46225f69272e9be535298cfa625f73b0 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Sun, 20 Aug 2023 12:19:18 +0300 Subject: [PATCH 32/49] InPatient advance payment history implemented --- lib/config/config.dart | 4 + ...atient_advance_history_response_model.dart | 71 +++++++++++++++ .../inpatient_paid_advance_payment.dart | 91 ++++++++++++++++++- .../inpatient_advance_payment.dart | 5 +- .../clinic_services/get_clinic_service.dart | 14 +++ 5 files changed, 182 insertions(+), 3 deletions(-) create mode 100644 lib/models/InPatientServices/get_inpatient_advance_history_response_model.dart diff --git a/lib/config/config.dart b/lib/config/config.dart index c79bc863..b95cbed6 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -608,6 +608,8 @@ var CHECK_IF_INPATIENT = 'Services/Patients.svc/REST/GetInPatientAdmissionInfo'; var CHECK_IF_PATIENT_ADMITTED = 'Services/Inps.svc/REST/checkIsPatientAdmittedOrAdmissionRequest'; + + // Get General Instructions API var GET_GENERAL_INSTRUCTIONS = 'Services/INPs.svc/REST/getGeneralInstructions'; @@ -616,6 +618,8 @@ var GET_MEDICAL_INSTRUCTIONS = 'Services/INPs.svc/REST/getPatientAdmissionReques var GET_INPATIENT_ADVANCE_PAYMENT_REQUESTS = 'Services/INPs.svc/REST/getInpatientAdvancePendingPayment'; +var GET_INPATIENT_PAID_ADVANCE_PAYMENT = 'Services/INPs.svc/REST/getInpatientAdvanceHistory'; + var GET_INPATIENT_ADVANCE_PAYMENT_LINK = 'Services/PayFort_Serv.svc/REST/InsertInPatientAdvanceDetails'; var INSERT_INPATIENT_ORDER = 'Services/INPs.svc/REST/Inpcp_insertOrder'; diff --git a/lib/models/InPatientServices/get_inpatient_advance_history_response_model.dart b/lib/models/InPatientServices/get_inpatient_advance_history_response_model.dart new file mode 100644 index 00000000..fcc42771 --- /dev/null +++ b/lib/models/InPatientServices/get_inpatient_advance_history_response_model.dart @@ -0,0 +1,71 @@ +class InPatientAdvanceHistoryResponseModel { + int advanceNumber; + int errorCode; + String message; + List responseInpatientAdvanceInfo; + int statusCode; + + InPatientAdvanceHistoryResponseModel({this.advanceNumber, this.errorCode, this.message, this.responseInpatientAdvanceInfo, this.statusCode}); + + InPatientAdvanceHistoryResponseModel.fromJson(Map json) { + advanceNumber = json['advanceNumber']; + errorCode = json['errorCode']; + message = json['message']; + if (json['responseInpatientAdvanceInfo'] != null) { + responseInpatientAdvanceInfo = []; + json['responseInpatientAdvanceInfo'].forEach((v) { + responseInpatientAdvanceInfo.add(new ResponseInpatientAdvanceInfo.fromJson(v)); + }); + } + statusCode = json['statusCode']; + } + + Map toJson() { + final Map data = new Map(); + data['advanceNumber'] = this.advanceNumber; + data['errorCode'] = this.errorCode; + data['message'] = this.message; + if (this.responseInpatientAdvanceInfo != null) { + data['responseInpatientAdvanceInfo'] = this.responseInpatientAdvanceInfo.map((v) => v.toJson()).toList(); + } + data['statusCode'] = this.statusCode; + return data; + } +} + +class ResponseInpatientAdvanceInfo { + int admissionNo; + int admissionReqNo; + String createdOn; + int patientId; + int projectId; + num requestedAmount; + String setupId; + int status; + + ResponseInpatientAdvanceInfo({this.admissionNo, this.admissionReqNo, this.createdOn, this.patientId, this.projectId, this.requestedAmount, this.setupId, this.status}); + + ResponseInpatientAdvanceInfo.fromJson(Map json) { + admissionNo = json['admissionNo']; + admissionReqNo = json['admissionReqNo']; + createdOn = json['createdOn']; + patientId = json['patientId']; + projectId = json['projectId']; + requestedAmount = json['requestedAmount']; + setupId = json['setupId']; + status = json['status']; + } + + Map toJson() { + final Map data = new Map(); + data['admissionNo'] = this.admissionNo; + data['admissionReqNo'] = this.admissionReqNo; + data['createdOn'] = this.createdOn; + data['patientId'] = this.patientId; + data['projectId'] = this.projectId; + data['requestedAmount'] = this.requestedAmount; + data['setupId'] = this.setupId; + data['status'] = this.status; + return data; + } +} diff --git a/lib/pages/InPatientServices/components/inpatient_paid_advance_payment.dart b/lib/pages/InPatientServices/components/inpatient_paid_advance_payment.dart index 76a44f75..a4b2949e 100644 --- a/lib/pages/InPatientServices/components/inpatient_paid_advance_payment.dart +++ b/lib/pages/InPatientServices/components/inpatient_paid_advance_payment.dart @@ -1,4 +1,14 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_inpatient_advance_history_response_model.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/my_rich_text.dart'; import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; class InPatientPaidAdvancePayment extends StatefulWidget { const InPatientPaidAdvancePayment({Key key}) : super(key: key); @@ -8,8 +18,87 @@ class InPatientPaidAdvancePayment extends StatefulWidget { } class _InPatientPaidAdvancePaymentState extends State { + ProjectViewModel projectViewModel; + InPatientAdvanceHistoryResponseModel inPatientAdvanceHistoryResponseModel; + + @override + void initState() { + super.initState(); + WidgetsBinding.instance.addPostFrameCallback((_) { + getInPatientAdvancePaymentHistory(); + }); + } + @override Widget build(BuildContext context) { - return const Placeholder(); + projectViewModel = Provider.of(context); + return Padding( + padding: const EdgeInsets.all(16.0), + child: inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo.isNotEmpty + ? ListView.separated( + itemCount: inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo.length, + itemBuilder: (BuildContext context, int index) { + return Container( + decoration: cardRadius(12), + padding: EdgeInsets.all(12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + MyRichText(TranslationBase.of(context).insuranceCompany + ": ", inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo[index].admissionNo.toString(), + projectViewModel.isArabic), + MyRichText(TranslationBase.of(context).insuranceCompany + ": ", inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo[index].admissionReqNo.toString(), + projectViewModel.isArabic), + MyRichText( + TranslationBase.of(context).date + ": ", + DateUtil.formatDateToDate(DateUtil.convertStringToDate(inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo[index].createdOn), false), + projectViewModel.isArabic), + MyRichText( + TranslationBase.of(context).amount_ + ": ", inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo[index].requestedAmount.toString(), projectViewModel.isArabic), + MyRichText(TranslationBase.of(context).status + ": ", getStatus(inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo[index]), projectViewModel.isArabic), + ], + ), + ); + }, + separatorBuilder: (BuildContext context, int index) { + return Padding( + padding: const EdgeInsets.only(left: 14, right: 14), + child: mDivider(CustomColors.devider), + ); + }, + ) + : getNoDataWidget(context), + ); + } + + String getStatus(ResponseInpatientAdvanceInfo responseInpatientAdvanceInfo) { + switch (responseInpatientAdvanceInfo.status) { + case 1: + return "Hold"; + break; + case 2: + return "Active"; + break; + case 4: + return "Cancelled"; + break; + default: + return ""; + } + } + + void getInPatientAdvancePaymentHistory() { + ClinicListService service = new ClinicListService(); + GifLoaderDialogUtils.showMyDialog(context); + service + .getInPatientAdvancePaymentHistory(projectViewModel.inPatientProjectID, projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionNo : 0, + projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionRequestNo : projectViewModel.getAdmissionRequestInfoResponseModel.admissionRequestNo, context) + .then((res) { + GifLoaderDialogUtils.hideDialog(context); + inPatientAdvanceHistoryResponseModel = InPatientAdvanceHistoryResponseModel.fromJson(res["responseInpatient"]); + print(inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo[0].requestedAmount); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); } } diff --git a/lib/pages/InPatientServices/inpatient_advance_payment.dart b/lib/pages/InPatientServices/inpatient_advance_payment.dart index 736d7242..3b6dd929 100644 --- a/lib/pages/InPatientServices/inpatient_advance_payment.dart +++ b/lib/pages/InPatientServices/inpatient_advance_payment.dart @@ -1,5 +1,6 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/InPatientServices/get_inpatient_advance_requests_response_model.dart'; +import 'package:diplomaticquarterapp/pages/InPatientServices/components/inpatient_paid_advance_payment.dart'; import 'package:diplomaticquarterapp/pages/InPatientServices/components/inpatient_pending_advance_payment.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; @@ -58,7 +59,7 @@ class _InPatientAdvancePaymentState extends State with fontWeight: FontWeight.w600, letterSpacing: -0.48, ), - tabs: [Text(TranslationBase.of(context).pending), Text(TranslationBase.of(context).paid)], + tabs: [Text(TranslationBase.of(context).pending), Text(TranslationBase.of(context).history)], ), Expanded( child: TabBarView( @@ -66,7 +67,7 @@ class _InPatientAdvancePaymentState extends State with controller: _tabController, children: [ InPatientPendingAdvancePayment(inPatientAdvanceResponseModel: widget.inPatientAdvanceResponseModel), - Container(), + InPatientPaidAdvancePayment(), ], ), ) diff --git a/lib/services/clinic_services/get_clinic_service.dart b/lib/services/clinic_services/get_clinic_service.dart index f0a0f0f9..4dc4538e 100644 --- a/lib/services/clinic_services/get_clinic_service.dart +++ b/lib/services/clinic_services/get_clinic_service.dart @@ -349,6 +349,20 @@ class ClinicListService extends BaseService { return Future.value(localRes); } + Future getInPatientAdvancePaymentHistory(int projectID, int admissionNo, int admissionReqNo, context) async { + Map request; + request = {"ProjectID": projectID, "AdmissionNo": admissionNo, "AdmissionReqNo": admissionReqNo}; + + dynamic localRes; + + await baseAppClient.post(GET_INPATIENT_PAID_ADVANCE_PAYMENT, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isAllowAny: true); + return Future.value(localRes); + } + Future getCurrentWeekIDAndDay(BuildContext context) async { dynamic localRes; await baseAppClient.get(GET_CURRENT_WEEKID_WEEKDAY, isExternal: false, isRCService: false, onSuccess: (response, statusCode) async { From 1300dadce167934231123633bc85b581b3c4fbf4 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Sun, 20 Aug 2023 15:17:19 +0300 Subject: [PATCH 33/49] Inpatient advance payment --- lib/config/localized_values.dart | 2 ++ .../inpatient_paid_advance_payment.dart | 15 +++++++-------- .../inpatient_advance_payment.dart | 1 + lib/uitl/translations_delegate_base.dart | 2 ++ 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index a2cd97fa..0fab9254 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1929,4 +1929,6 @@ const Map localizedValues = { "paymentLinkCopied": {"en": "Payment link copied to your clipboard!'", "ar": "تم نسخ رابط الدفع إلى الحافظة الخاصة بك!"}, "copyLinkTxt": {"en": "Or you can copy the payment link from below & send it to someone who can pay on your behalf: ", "ar": "أو يمكنك نسخ رابط الدفع من الأسفل وإرساله إلى شخص يمكنه الدفع نيابة عنك:"}, "proErrorMessage": {"en": "Dear patient, Our staff is currently out of office, please note that our working hours are from 7:00 AM to 10:00 PM, and we'd love to help you during that time, or you can call ", "ar": "عزيزي المريض ، طاقم العمل لدينا خارج المكتب حاليًا ، يرجى ملاحظة أن ساعات العمل لدينا من 7:00 صباحًا إلى 10:00 مساءً ، ويسعدنا مساعدتك خلال هذا الوقت ، أو يمكنك الاتصال بـ <أدخل الرقم هنا>"}, + "admissionNo": {"en": "Admission No", "ar": "رقم القبول:"}, + "admissionReqNo": {"en": "Admission Request No", "ar": "رقم طلب القبول:"}, }; \ No newline at end of file diff --git a/lib/pages/InPatientServices/components/inpatient_paid_advance_payment.dart b/lib/pages/InPatientServices/components/inpatient_paid_advance_payment.dart index a4b2949e..0a7bf878 100644 --- a/lib/pages/InPatientServices/components/inpatient_paid_advance_payment.dart +++ b/lib/pages/InPatientServices/components/inpatient_paid_advance_payment.dart @@ -34,7 +34,7 @@ class _InPatientPaidAdvancePaymentState extends State with labelColor: Color(0xff2B353E), unselectedLabelColor: Color(0xff575757), labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20), + physics: const NeverScrollableScrollPhysics(), labelStyle: TextStyle( fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', fontSize: 16, diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index dd262ad7..4973e448 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2934,6 +2934,8 @@ class TranslationBase { String get copyLinkTxt => localizedValues["copyLinkTxt"][locale.languageCode]; String get paymentLinkCopied => localizedValues["paymentLinkCopied"][locale.languageCode]; String get proErrorMessage => localizedValues["proErrorMessage"][locale.languageCode]; + String get admissionNo => localizedValues["admissionNo"][locale.languageCode]; + String get admissionReqNo => localizedValues["admissionReqNo"][locale.languageCode]; } From 3642ca6a474f12e48055be56f170eb93cea18538 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 21 Aug 2023 12:51:11 +0300 Subject: [PATCH 34/49] InPatient advance payment updates --- lib/core/service/client/base_app_client.dart | 2 +- .../components/inpatient_pending_advance_payment.dart | 2 +- lib/pages/insurance/insurance_card_update_details.dart | 5 +---- lib/services/clinic_services/get_clinic_service.dart | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index bd53bcf2..42eef043 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -149,7 +149,7 @@ class BaseAppClient { // body['IdentificationNo'] = 1023854217; // body['MobileNo'] = "531940021"; - // body['PatientID'] = 2480363; //3844083 + // body['PatientID'] = 3681708; //3844083 // body['TokenID'] = "@dm!n"; // body['PatientID'] = 4767347; //3844083 diff --git a/lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart b/lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart index 93a438c3..9c9fd047 100644 --- a/lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart +++ b/lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart @@ -226,7 +226,7 @@ class _InPatientPendingAdvancePaymentState extends State Date: Sun, 27 Aug 2023 11:08:33 +0300 Subject: [PATCH 35/49] updates --- .../inpatient_pending_advance_payment.dart | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart b/lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart index 9c9fd047..31a31255 100644 --- a/lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart +++ b/lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart @@ -7,6 +7,7 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart'; @@ -37,7 +38,7 @@ class _InPatientPendingAdvancePaymentState extends State Date: Wed, 30 Aug 2023 10:49:26 +0300 Subject: [PATCH 36/49] InPatient Discharge Medications --- lib/config/config.dart | 2 + lib/core/service/client/base_app_client.dart | 8 +-- lib/core/service/medical/reports_service.dart | 2 +- .../InPatientServices/inpatient_home.dart | 70 +++++++++++++++---- .../clinic_services/get_clinic_service.dart | 42 ++++++++++- lib/uitl/utils.dart | 6 +- 6 files changed, 104 insertions(+), 26 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index f9ef6bf8..b71679f5 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -625,6 +625,8 @@ var GET_INPATIENT_ADVANCE_PAYMENT_LINK = 'Services/PayFort_Serv.svc/REST/InsertI var INSERT_INPATIENT_ORDER = 'Services/INPs.svc/REST/Inpcp_insertOrder'; +var INPATIENT_DISCHARGE_MEDICATIONS = 'Services/INPs.svc/REST/chekPatientHasDischargeMedicine'; + var GET_BIRTH_NOTIFICATION = 'Services/INPs.svc/REST/getBirthNotification_bymothermrn'; var SAVE_BIRTH_NOTIFICATION = 'Services/INPs.svc/REST/SaveBirthNotification'; diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 42eef043..a8efa613 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -147,12 +147,12 @@ class BaseAppClient { } } - // body['IdentificationNo'] = 1023854217; - // body['MobileNo'] = "531940021"; - // body['PatientID'] = 3681708; //3844083 + // body['IdentificationNo'] = 1000340586; + // body['PatientID'] = 395978; //3844083 // body['TokenID'] = "@dm!n"; + // body['MobileNo'] = "531940021"; - // body['PatientID'] = 4767347; //3844083 + // body['PatientID'] = 869588; //3844083 // body['AdmissionNo'] = 2023000040; //3844083 // body['TokenID'] = "@dm!n"; diff --git a/lib/core/service/medical/reports_service.dart b/lib/core/service/medical/reports_service.dart index 9f8bfb45..ae3d2dfe 100644 --- a/lib/core/service/medical/reports_service.dart +++ b/lib/core/service/medical/reports_service.dart @@ -137,7 +137,7 @@ class ReportsService extends BaseService { body['ProjectID'] = projectID; body['Remarks'] = ""; body['ProcedureId'] = ""; - body['RequestType'] = 2; + body['RequestType'] = 1; body['Source'] = 2; body['Status'] = 1; body['CreatedBy'] = 102; diff --git a/lib/pages/InPatientServices/inpatient_home.dart b/lib/pages/InPatientServices/inpatient_home.dart index b19557c3..2e0f4302 100644 --- a/lib/pages/InPatientServices/inpatient_home.dart +++ b/lib/pages/InPatientServices/inpatient_home.dart @@ -23,9 +23,23 @@ import 'package:url_launcher/url_launcher.dart'; import '../../models/InPatientServices/get_inpatient_advance_requests_response_model.dart'; import '../../models/InPatientServices/get_medical_instructions_response_model.dart'; -class InPatientServicesHome extends StatelessWidget { +class InPatientServicesHome extends StatefulWidget { + @override + State createState() => _InPatientServicesHomeState(); +} + +class _InPatientServicesHomeState extends State { ProjectViewModel projectViewModel; InPatientAdvanceResponseModel inPatientAdvanceResponseModel; + bool isReceivePrescriptionEnabled = false; + + @override + void initState() { + super.initState(); + WidgetsBinding.instance.addPostFrameCallback((_) { + checkDischargeMedications(context); + }); + } @override Widget build(BuildContext context) { @@ -170,16 +184,16 @@ class InPatientServicesHome extends StatelessWidget { InkWell( onTap: () { // Navigator.push(context, FadePage(page: AdvancePaymentPage())); - receivePrescriptionAPI(context); + if (isReceivePrescriptionEnabled) receivePrescriptionAPI(context); }, child: MedicalProfileItem( - title: "Receive", - imagePath: 'receive_prescription.svg', - subTitle: TranslationBase.of(context).prescriptions, - width: 50.0, - height: 40.0, - isInPatient: true, - ), + title: "Receive", + imagePath: 'receive_prescription.svg', + subTitle: TranslationBase.of(context).prescriptions, + width: 50.0, + height: 40.0, + isInPatient: true, + isEnable: isReceivePrescriptionEnabled), ), ); @@ -203,16 +217,42 @@ class InPatientServicesHome extends StatelessWidget { } void receivePrescriptionAPI(BuildContext context) { - ConfirmDialog dialog = new ConfirmDialog( + AlertDialogBox( context: context, confirmMessage: TranslationBase.of(context).successSendReport, okText: TranslationBase.of(context).ok, - cancelText: TranslationBase.of(context).cancel_nocaps, okFunction: () { - Navigator.of(context).pop(); - }, - cancelFunction: () => {}); - dialog.showAlertDialog(context); + AlertDialogBox.closeAlertDialog(context); + callReceivePrescriptionAPI(context); + }).showAlertDialog(context); + + // ConfirmDialog dialog = new ConfirmDialog( + // context: context, + // confirmMessage: TranslationBase.of(context).successSendReport, + // okText: TranslationBase.of(context).ok, + // cancelText: TranslationBase.of(context).cancel_nocaps, + // okFunction: () { + // Navigator.of(context).pop(); + // }, + // cancelFunction: () => {}); + // dialog.showAlertDialog(context); + } + + void checkDischargeMedications(BuildContext context) { + ClinicListService service = new ClinicListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getDischargeMedicationOrder(projectViewModel.getAdmissionInfoResponseModel).then((res) { + print(res["PatientHasDischargeMedicineList"].length); + setState(() { + if (res["PatientHasDischargeMedicineList"].length != 0) { + isReceivePrescriptionEnabled = true; + } + }); + GifLoaderDialogUtils.hideDialog(context); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); } void callReceivePrescriptionAPI(BuildContext context) { diff --git a/lib/services/clinic_services/get_clinic_service.dart b/lib/services/clinic_services/get_clinic_service.dart index 191e681b..2a78704c 100644 --- a/lib/services/clinic_services/get_clinic_service.dart +++ b/lib/services/clinic_services/get_clinic_service.dart @@ -270,8 +270,8 @@ class ClinicListService extends BaseService { return Future.value(localRes); } - Future insertInPatientOrder(GetAdmissionInfoResponseModel getAdmissionInfoResponseModel, int typeID, String patientName, String patientNameAR, String patientMobileNo, String comments, - context) async { + Future insertInPatientOrder( + GetAdmissionInfoResponseModel getAdmissionInfoResponseModel, int typeID, String patientName, String patientNameAR, String patientMobileNo, String comments, context) async { Map request; request = { "ProjectID": getAdmissionInfoResponseModel.projectID, @@ -444,4 +444,42 @@ class ClinicListService extends BaseService { }, body: request, isAllowAny: true); return Future.value(localRes); } + + Future getDischargeMedicationOrder(GetAdmissionInfoResponseModel getAdmissionInfoResponseModel) async { + Map request; + request = { + "ProjectID": getAdmissionInfoResponseModel.projectID, + "ClinicID": getAdmissionInfoResponseModel.clinicID, + "DoctorID": getAdmissionInfoResponseModel.doctorID, + "AdmissionNo": getAdmissionInfoResponseModel.admissionNo + }; + + // request = { + // "ProjectID": 12, + // "VersionID": 10.8, + // "Channel": 3, + // "LanguageID": 2, + // "IPAdress": "10.20.10.20", + // "generalid": "Cs2020@2016\$2958", + // "DeviceTypeID": 2, + // "PatientType": 1, + // "PatientTypeID": 1, + // "TokenID": "@dm!n", + // "PatientID": 869588, + // "PatientOutSA": 0, + // "SessionID": "rVuK3nzN4UKN0SW95un0jQ==", + // "ClinicID": 2, + // "DoctorID": "7600", + // "AdmissionNo": 2011001258 + // }; + + dynamic localRes; + + await baseAppClient.post(INPATIENT_DISCHARGE_MEDICATIONS, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isAllowAny: true); + return Future.value(localRes); + } } diff --git a/lib/uitl/utils.dart b/lib/uitl/utils.dart index ece5613d..528bd740 100644 --- a/lib/uitl/utils.dart +++ b/lib/uitl/utils.dart @@ -736,6 +736,7 @@ class Utils { SizedBox(height: 6), Text( text, + maxLines: 1, style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 18 / 12), ), SizedBox(height: 5), @@ -810,10 +811,7 @@ class Utils { return crypto.md5.convert(utf8.encode(input)).toString(); } - static String generateSignature() { - - } - + static String generateSignature() {} } Widget applyShadow({Color color = Colors.grey, double shadowOpacity = 0.5, double spreadRadius = 2, double blurRadius = 7, Offset offset = const Offset(2, 2), @required Widget child}) { From c0595a8dc6d094a1f042fbf309ede8e3c1cc5619 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 27 Sep 2023 12:40:21 +0300 Subject: [PATCH 37/49] updates --- ...t_medical_instructions_response_model.dart | 6 ++--- .../InPatientServices/birth_notification.dart | 2 +- lib/pages/paymentService/payment_service.dart | 17 ++++++------ lib/uitl/utils.dart | 26 +++++++++---------- .../bottom_navigation_item.dart | 8 +++--- lib/widgets/others/app_scaffold_widget.dart | 8 +++--- 6 files changed, 33 insertions(+), 34 deletions(-) diff --git a/lib/models/InPatientServices/get_medical_instructions_response_model.dart b/lib/models/InPatientServices/get_medical_instructions_response_model.dart index 2bbe1e83..2396e588 100644 --- a/lib/models/InPatientServices/get_medical_instructions_response_model.dart +++ b/lib/models/InPatientServices/get_medical_instructions_response_model.dart @@ -30,9 +30,9 @@ class GetMedicalInstructions { clinicNameField = json['clinicNameField']; doctorNameField = json['doctorNameField']; expectedAdmissionDateField = json['expectedAdmissionDateField']; - if (json['medicaLInstructionsField'] != null) { + if (json['medicaLInstructions'] != null) { medicaLInstructionsField = []; - json['medicaLInstructionsField'].forEach((v) { + json['medicaLInstructions'].forEach((v) { medicaLInstructionsField.add(new MedicaLInstructionsField.fromJson(v)); }); } @@ -71,7 +71,7 @@ class MedicaLInstructionsField { MedicaLInstructionsField.fromJson(Map json) { propertyChanged = json['PropertyChanged']; - descriptionField = json['descriptionField']; + descriptionField = json['description']; parameterCodeField = json['parameterCodeField']; } diff --git a/lib/pages/InPatientServices/birth_notification.dart b/lib/pages/InPatientServices/birth_notification.dart index c5f78af9..23ae1a4c 100644 --- a/lib/pages/InPatientServices/birth_notification.dart +++ b/lib/pages/InPatientServices/birth_notification.dart @@ -159,7 +159,7 @@ class _BirthNotificationState extends State { letterSpacing: -0.64, ), ), - mHeight(16.0), + mHeight(100.0), // DefaultButton( // TranslationBase.of(context).submit, // (fatherNameAR.text.isEmpty || fatherName.text.isEmpty || babyNameAR.text.isEmpty || babyName.text.isEmpty) ? null : () { diff --git a/lib/pages/paymentService/payment_service.dart b/lib/pages/paymentService/payment_service.dart index 5bcf4592..c38ac9e0 100644 --- a/lib/pages/paymentService/payment_service.dart +++ b/lib/pages/paymentService/payment_service.dart @@ -1,11 +1,10 @@ -import 'package:badges/badges.dart'; +import 'package:badges/badges.dart' as badge_import; import 'package:diplomaticquarterapp/Constants.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart'; import 'package:diplomaticquarterapp/pages/medical/balance/advance_payment_page.dart'; import 'package:diplomaticquarterapp/pages/medical/balance/my_balance_page.dart'; -import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -95,11 +94,11 @@ class PaymentService extends StatelessWidget { ? Positioned( left: 8, top: 4, - child: Badge( + child: badge_import.Badge( toAnimate: false, elevation: 0, - position: BadgePosition.topEnd(), - shape: BadgeShape.circle, + position: badge_import.BadgePosition.topEnd(), + shape: badge_import.BadgeShape.circle, badgeColor: secondaryColor.withOpacity(1.0), borderRadius: BorderRadius.circular(8), badgeContent: Container( @@ -111,11 +110,11 @@ class PaymentService extends StatelessWidget { : Positioned( right: 8, top: 4, - child: Badge( + child: badge_import.Badge( toAnimate: false, elevation: 0, - position: BadgePosition.topEnd(), - shape: BadgeShape.circle, + position: badge_import.BadgePosition.topEnd(), + shape: badge_import.BadgeShape.circle, badgeColor: secondaryColor.withOpacity(1.0), borderRadius: BorderRadius.circular(8), badgeContent: Container( @@ -151,7 +150,7 @@ class PaymentService extends StatelessWidget { navigateToToDoPage(BuildContext context) { if (projectViewModel.isLogin) { // if (model.count != 0) { - Navigator.push(context, FadePage(page: ToDo(isShowAppBar: true))); + Navigator.push(context, FadePage(page: ToDo(isShowAppBar: true))); // } else { // AppToast.showErrorToast(message: TranslationBase.of(context).upcomingEmpty); // } diff --git a/lib/uitl/utils.dart b/lib/uitl/utils.dart index 528bd740..454c18f5 100644 --- a/lib/uitl/utils.dart +++ b/lib/uitl/utils.dart @@ -4,7 +4,7 @@ import 'dart:io'; import 'dart:typed_data'; import 'package:auto_size_text/auto_size_text.dart'; -import 'package:badges/badges.dart'; +import 'package:badges/badges.dart' as badge_import; import 'package:cached_network_image/cached_network_image.dart'; import 'package:connectivity/connectivity.dart'; import 'package:crypto/crypto.dart' as crypto; @@ -241,11 +241,11 @@ class Utils { ? Positioned( left: 8, top: 4, - child: Badge( + child: badge_import.Badge( toAnimate: false, elevation: 0, - position: BadgePosition.topEnd(), - shape: BadgeShape.circle, + position: badge_import.BadgePosition.topEnd(), + shape: badge_import.BadgeShape.circle, badgeColor: secondaryColor.withOpacity(1.0), borderRadius: BorderRadius.circular(8), badgeContent: Container( @@ -259,11 +259,11 @@ class Utils { ? Positioned( right: 8, top: 4, - child: Badge( + child: badge_import.Badge( toAnimate: false, elevation: 0, - position: BadgePosition.topEnd(), - shape: BadgeShape.circle, + position: badge_import.BadgePosition.topEnd(), + shape: badge_import.BadgeShape.circle, badgeColor: secondaryColor.withOpacity(1.0), borderRadius: BorderRadius.circular(8), badgeContent: Container( @@ -614,11 +614,11 @@ class Utils { ? Positioned( left: 8, top: 4, - child: Badge( + child: badge_import.Badge( toAnimate: false, elevation: 0, - position: BadgePosition.topEnd(), - shape: BadgeShape.circle, + position: badge_import.BadgePosition.topEnd(), + shape: badge_import.BadgeShape.circle, badgeColor: secondaryColor.withOpacity(1.0), borderRadius: BorderRadius.circular(8), badgeContent: Container( @@ -632,11 +632,11 @@ class Utils { ? Positioned( right: 8, top: 4, - child: Badge( + child: badge_import.Badge( toAnimate: false, elevation: 0, - position: BadgePosition.topEnd(), - shape: BadgeShape.circle, + position: badge_import.BadgePosition.topEnd(), + shape: badge_import.BadgeShape.circle, badgeColor: secondaryColor.withOpacity(1.0), borderRadius: BorderRadius.circular(8), badgeContent: Container( diff --git a/lib/widgets/bottom_navigation/bottom_navigation_item.dart b/lib/widgets/bottom_navigation/bottom_navigation_item.dart index ff085dd9..f7cdafce 100644 --- a/lib/widgets/bottom_navigation/bottom_navigation_item.dart +++ b/lib/widgets/bottom_navigation/bottom_navigation_item.dart @@ -1,4 +1,4 @@ -import 'package:badges/badges.dart'; +import 'package:badges/badges.dart' as badge_import; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/locator.dart'; @@ -106,10 +106,10 @@ class BottomNavigationItem extends StatelessWidget { Positioned( right: 18.0, bottom: 28.0, - child: Badge( + child: badge_import.Badge( toAnimate: false, - position: BadgePosition.topEnd(), - shape: BadgeShape.circle, + position: badge_import.BadgePosition.topEnd(), + shape: badge_import.BadgeShape.circle, badgeColor: secondaryColor.withOpacity(1.0), borderRadius: BorderRadius.circular(8), badgeContent: Container( diff --git a/lib/widgets/others/app_scaffold_widget.dart b/lib/widgets/others/app_scaffold_widget.dart index 6865ece5..f433a8e4 100644 --- a/lib/widgets/others/app_scaffold_widget.dart +++ b/lib/widgets/others/app_scaffold_widget.dart @@ -1,5 +1,5 @@ import 'package:auto_size_text/auto_size_text.dart'; -import 'package:badges/badges.dart'; +import 'package:badges/badges.dart' as badge_import; import 'package:barcode_scan2/barcode_scan2.dart'; import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; @@ -494,7 +494,7 @@ class AppBarWidgetState extends State { actions: [ (widget.isPharmacy && widget.showPharmacyCart) ? IconButton( - icon: Badge( + icon: badge_import.Badge( badgeContent: Text( orderPreviewViewModel.cartResponse.quantityCount.toString(), style: TextStyle(color: Colors.white), @@ -507,8 +507,8 @@ class AppBarWidgetState extends State { : Container(), (widget.isOfferPackages && widget.showOfferPackagesCart) ? IconButton( - icon: Badge( - position: BadgePosition.topStart(top: -15, start: -10), + icon: badge_import.Badge( + position: badge_import.BadgePosition.topStart(top: -15, start: -10), badgeContent: Text( _badgeText, style: TextStyle(fontSize: 9, color: Colors.white, fontWeight: FontWeight.normal), From e780df90e1bea58a3a8c24d10d8dcae60f200b30 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Thu, 28 Sep 2023 12:25:45 +0300 Subject: [PATCH 38/49] updates --- lib/config/localized_values.dart | 3 ++ .../InPatientServices/inpatient_home.dart | 2 +- lib/pages/paymentService/payment_service.dart | 53 +++++++++++++++++++ lib/uitl/translations_delegate_base.dart | 1 + 4 files changed, 58 insertions(+), 1 deletion(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 22ac086b..2b823e98 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1934,4 +1934,7 @@ const Map localizedValues = { "admissionReqNo": {"en": "Admission Request No", "ar": "رقم طلب القبول:"}, "dischargeDate": {"en": "Discharge Date", "ar": "تاريخ التفريغ"}, "selectAdmissionText": {"en": "Please select one of the admissions from below to view medical reports:", "ar": "يرجى تحديد أحد حالات القبول من الأسفل لعرض التقارير الطبية:"}, + + "onlyAdmitted": {"en": "This service is only available for admitted patients", "ar": "هذه الخدمة متاحة فقط للمرضى المقبولين"}, + }; \ No newline at end of file diff --git a/lib/pages/InPatientServices/inpatient_home.dart b/lib/pages/InPatientServices/inpatient_home.dart index 2e0f4302..2dafde6e 100644 --- a/lib/pages/InPatientServices/inpatient_home.dart +++ b/lib/pages/InPatientServices/inpatient_home.dart @@ -338,7 +338,7 @@ class _InPatientServicesHomeState extends State { inPatientAdvanceResponseModel = InPatientAdvanceResponseModel.fromJson(res["responseInpatient"]); Navigator.push(context, FadePage(page: InPatientAdvancePayment(inPatientAdvanceResponseModel: inPatientAdvanceResponseModel))); } else { - AppToast.showErrorToast(message: "No record found."); + AppToast.showErrorToast(message: TranslationBase.of(context).noData); } } else { AppToast.showErrorToast(message: res["endUserMessage"]); diff --git a/lib/pages/paymentService/payment_service.dart b/lib/pages/paymentService/payment_service.dart index c38ac9e0..7e89787d 100644 --- a/lib/pages/paymentService/payment_service.dart +++ b/lib/pages/paymentService/payment_service.dart @@ -2,9 +2,14 @@ import 'package:badges/badges.dart' as badge_import; import 'package:diplomaticquarterapp/Constants.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_inpatient_advance_requests_response_model.dart'; +import 'package:diplomaticquarterapp/pages/InPatientServices/inpatient_advance_payment.dart'; import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart'; import 'package:diplomaticquarterapp/pages/medical/balance/advance_payment_page.dart'; import 'package:diplomaticquarterapp/pages/medical/balance/my_balance_page.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -17,6 +22,8 @@ class PaymentService extends StatelessWidget { ToDoCountProviderModel model; ProjectViewModel projectViewModel; + InPatientAdvanceResponseModel inPatientAdvanceResponseModel; + @override Widget build(BuildContext context) { projectViewModel = Provider.of(context); @@ -144,9 +151,55 @@ class PaymentService extends StatelessWidget { ), ), ); + + medical.add( + InkWell( + onTap: () { + if(projectViewModel.isPatientAdmitted) { + getInPatientAdvancePaymentRequests(context); + projectViewModel.analytics.advancePayments.payment_services(service_type: 'inpatient advance payment'); + } else { + AppToast.showErrorToast(message: TranslationBase.of(context).onlyAdmitted); + } + }, + child: MedicalProfileItem( + title: "InPatient", + imagePath: 'assets/images/inpatient_advance.png', + subTitle: "Advance Payment", + isPngImage: true, + width: 45.0, + height: 45.0, + ), + ), + ); + return medical; } + void getInPatientAdvancePaymentRequests(BuildContext context) { + ClinicListService service = new ClinicListService(); + GifLoaderDialogUtils.showMyDialog(context); + service + .getInPatientAdvancePaymentRequests(projectViewModel.inPatientProjectID, projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionNo : 0, + projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionRequestNo : projectViewModel.getAdmissionRequestInfoResponseModel.admissionRequestNo, context) + .then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res["MessageStatus"] == 1) { + if (res['responseInpatient'] != null) { + inPatientAdvanceResponseModel = InPatientAdvanceResponseModel.fromJson(res["responseInpatient"]); + Navigator.push(context, FadePage(page: InPatientAdvancePayment(inPatientAdvanceResponseModel: inPatientAdvanceResponseModel))); + } else { + AppToast.showErrorToast(message: TranslationBase.of(context).noData); + } + } else { + AppToast.showErrorToast(message: res["endUserMessage"]); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + navigateToToDoPage(BuildContext context) { if (projectViewModel.isLogin) { // if (model.count != 0) { diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 6170873b..6cb48058 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2940,6 +2940,7 @@ class TranslationBase { String get admissionReqNo => localizedValues["admissionReqNo"][locale.languageCode]; String get dischargeDate => localizedValues["dischargeDate"][locale.languageCode]; String get selectAdmissionText => localizedValues["selectAdmissionText"][locale.languageCode]; + String get onlyAdmitted => localizedValues["onlyAdmitted"][locale.languageCode]; } From f2bf57f8cc5c5f5bd12c87ae70fbce27bb526a0c Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Sun, 1 Oct 2023 11:49:01 +0300 Subject: [PATCH 39/49] updates --- assets/images/inpatient_advance.png | Bin 0 -> 12027 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 assets/images/inpatient_advance.png diff --git a/assets/images/inpatient_advance.png b/assets/images/inpatient_advance.png new file mode 100644 index 0000000000000000000000000000000000000000..38f1b7f425d3c3c3af11079a62558cb8993cc153 GIT binary patch literal 12027 zcmd_Qg5cNnjUu4IzXCS$uH_7HsiAa7#$=Bm}ozT(Vej z*TvoS-TS`Jch32q>v{izclPS3>gxJcRnK(K)J}J#7Fdmp_yI8%78cnvbrl^9y~LCi zLITYByQuUShTz#f(R_lb#gSZF<74VSXe&XSXe=!|L6y;V_|uSVqtAsVPVOn zVPVljGwZcM7+sjH(X-c@nppf8o)8NUn+gjT!(n57SlAD+{<4PQu;j6s{>?v)u*bst zmmG|te;w+W@|WH}6gL<9KUQ*a{;hqPi~DbW;&iuv{U1+GZvW~Qrh_7XwTOrbi;DbjFk6`Y{{{9}%RjKc z`}L1I&|k)6jCE|?oE<#=3QPX6IOuN=|3Be>;`;|+^uGcATlhZ#5LbI!%q98TgV?_u z{I~4C^#6)eM#~;%>tLi}?`Z4f_E%I=k1%2VuPy%*sqF0F?5Yd3wy~ARIQkp%U!wo1 z{kI?E|M-yvO8vK=|7!Uc5+w51efzKb_|G8uTZ$Pa^28vKe~&nM;<&=9Q!Fe2&1Wi4 z^kCRKSzh}O)jYZoc)?hlM3ge08+7Ryu{kmaBa^T*tmqkti4m+?X;uz4A!7JHG#8O8 zS`!2sqTI_I3`s)o71u?&I1{-{;1 z0_iopo_M?U&a`0boWYimPwmrZ*+5{u5d{&!7g1=F`_1@gzwyxvdE_4VcHVvsQXiRu zjMFtkfDs#fXH0o0mG3_nI1-@8suR&awot7ej}-mzid3M3Hlaeu*-*|fT)a%?dnkOn zJ9wq}dE!3f;t`VeeHc+8$ot$R^j#-bcxZx^9+nM%h`aM04VnEX?23A)HA2;FAwT{7 zYX9tg*Ob5{s3qe4?T~YKx_FT5ry=cQ!KG(bW3E4|#8w*TzO*5RkW8UDM0GZI&(SS3 zgiZK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v=c|6PKIK$OCa)JZidlyPQ1ti9vPl@Q>N`xy9ZF4%hs@je9+gZ^(xdCpmARAqm_2OmHcn_u4 z$|QO{FrkNDz43fk{mIzJ&e!T4xzWSo?0aNBk0%NX3IH@I(F4qD!pY0vuDD4x@BMW!3p} zR=MQ3b5Y|xOx|zBDd84LU%Tl@k3R)NkLBNqT(XeRCLge06BD3+O+N~s+EKRrK_k`TjdU5M&y~X@6ef5E;j}w85!k(P|RT@ zRNMP`n!kro)Wm?^QPEDm50;mpgwNUSsLqE3r(;0l5BYxx#Ri{`8k6Wn6x1lb)ng=e zj}7JyjFY!_xZPs8zNwW_y4@nV_DGMn7F%e!j4snKoxOM_AcdT#c9&LF?j^;n_MB;u z%~#F@^PyMHEcasO`5^4?G=+~M*b`g=HEV0@x85+#`5Nl9_mZX+y87s%vl9mN!uIZ$ z(`?t8F`*kVTb^PkFV%3UBs>vqGAxcfF=VoJMztob2ClN-qJAD86?G2K33~g3qbqF* zI;D>Ue@kh13GS%QSy`1a7=6SYLNz*G+y<0=h(pBKvN_laN*-D6OZnVB*i6YB@7Wq< ysT+$7u1xV5ejUSw*~j`m*oqB99=uw(!xqD7`3U{eWA@kf?q{lCm2xGk_x}f1any Date: Wed, 4 Oct 2023 15:55:06 +0300 Subject: [PATCH 40/49] fixes --- lib/services/clinic_services/get_clinic_service.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/services/clinic_services/get_clinic_service.dart b/lib/services/clinic_services/get_clinic_service.dart index 2a78704c..6613ceb6 100644 --- a/lib/services/clinic_services/get_clinic_service.dart +++ b/lib/services/clinic_services/get_clinic_service.dart @@ -320,7 +320,7 @@ class ClinicListService extends BaseService { "fatherName": fatherNameEN, "fatherNameAr": fatherNameAR, "babyName": babyNameEN, - "babyNameAr": babyNameEN, + "babyNameAr": babyNameAR, "contactNumber": contactNum, "iDImage": idImage, }; From c5e88ac7ba4de1ebc05b6ed8d3de481eddb3f3bf Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 9 Oct 2023 15:06:52 +0300 Subject: [PATCH 41/49] fixes --- .../inpatient_paid_advance_payment.dart | 2 +- .../inpatient_pending_advance_payment.dart | 163 +++++++++--------- .../inpatient_advance_payment.dart | 8 +- .../InPatientServices/inpatient_home.dart | 6 +- lib/pages/login/confirm-login.dart | 4 +- 5 files changed, 93 insertions(+), 90 deletions(-) diff --git a/lib/pages/InPatientServices/components/inpatient_paid_advance_payment.dart b/lib/pages/InPatientServices/components/inpatient_paid_advance_payment.dart index 0a7bf878..460c7309 100644 --- a/lib/pages/InPatientServices/components/inpatient_paid_advance_payment.dart +++ b/lib/pages/InPatientServices/components/inpatient_paid_advance_payment.dart @@ -34,7 +34,7 @@ class _InPatientPaidAdvancePaymentState extends State createState() => _InPatientPendingAdvancePaymentState(); @@ -57,93 +58,95 @@ class _InPatientPendingAdvancePaymentState extends State createState() => _InPatientAdvancePaymentState(); @@ -67,7 +65,7 @@ class _InPatientAdvancePaymentState extends State with physics: BouncingScrollPhysics(), controller: _tabController, children: [ - InPatientPendingAdvancePayment(inPatientAdvanceResponseModel: widget.inPatientAdvanceResponseModel), + InPatientPendingAdvancePayment(isHasData: widget.isHasData, inPatientAdvanceResponseModel: widget.inPatientAdvanceResponseModel), InPatientPaidAdvancePayment(), ], ), diff --git a/lib/pages/InPatientServices/inpatient_home.dart b/lib/pages/InPatientServices/inpatient_home.dart index 2dafde6e..ff1ae40d 100644 --- a/lib/pages/InPatientServices/inpatient_home.dart +++ b/lib/pages/InPatientServices/inpatient_home.dart @@ -336,12 +336,14 @@ class _InPatientServicesHomeState extends State { if (res["MessageStatus"] == 1) { if (res['responseInpatient'] != null) { inPatientAdvanceResponseModel = InPatientAdvanceResponseModel.fromJson(res["responseInpatient"]); - Navigator.push(context, FadePage(page: InPatientAdvancePayment(inPatientAdvanceResponseModel: inPatientAdvanceResponseModel))); + Navigator.push(context, FadePage(page: InPatientAdvancePayment(isHasData: true, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel))); } else { + // Navigator.push(context, FadePage(page: InPatientAdvancePayment(isHasData: false, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel))); AppToast.showErrorToast(message: TranslationBase.of(context).noData); } } else { - AppToast.showErrorToast(message: res["endUserMessage"]); + // AppToast.showErrorToast(message: res["ErrorEndUserMessage"]); + Navigator.push(context, FadePage(page: InPatientAdvancePayment(isHasData: false, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel))); } }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index 3af64363..b4591886 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -636,8 +636,8 @@ class _ConfirmLogin extends State { loginTokenID = result.logInTokenID, sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID), sharedPref.setString(TOKEN, result.authenticationTokenID), - checkIfUserAgreedBefore(result), projectViewModel.analytics.loginRegistration.login_successful(), + checkIfUserAgreedBefore(result), } } else @@ -668,7 +668,6 @@ class _ConfirmLogin extends State { if (result.isNeedUserAgreement == true) { //move to agreement page. } else { - checkIfIsInPatient(); goToHome(); } } @@ -736,6 +735,7 @@ class _ConfirmLogin extends State { .getIsLastAppointmentRatedList() .then((value) => { getToDoCount(), + checkIfIsInPatient(), GifLoaderDialogUtils.hideDialog(AppGlobal.context), if (appointmentRateViewModel.isHaveAppointmentNotRate) { From dac842f50cb27e4032b3a5f1fa602fa963542991 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 10 Oct 2023 12:17:31 +0300 Subject: [PATCH 42/49] fixes for inpatient advance --- lib/pages/InPatientServices/inpatient_home.dart | 2 -- lib/pages/paymentService/payment_service.dart | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/pages/InPatientServices/inpatient_home.dart b/lib/pages/InPatientServices/inpatient_home.dart index ff1ae40d..35055358 100644 --- a/lib/pages/InPatientServices/inpatient_home.dart +++ b/lib/pages/InPatientServices/inpatient_home.dart @@ -338,11 +338,9 @@ class _InPatientServicesHomeState extends State { inPatientAdvanceResponseModel = InPatientAdvanceResponseModel.fromJson(res["responseInpatient"]); Navigator.push(context, FadePage(page: InPatientAdvancePayment(isHasData: true, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel))); } else { - // Navigator.push(context, FadePage(page: InPatientAdvancePayment(isHasData: false, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel))); AppToast.showErrorToast(message: TranslationBase.of(context).noData); } } else { - // AppToast.showErrorToast(message: res["ErrorEndUserMessage"]); Navigator.push(context, FadePage(page: InPatientAdvancePayment(isHasData: false, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel))); } }).catchError((err) { diff --git a/lib/pages/paymentService/payment_service.dart b/lib/pages/paymentService/payment_service.dart index 7e89787d..fe5935ba 100644 --- a/lib/pages/paymentService/payment_service.dart +++ b/lib/pages/paymentService/payment_service.dart @@ -187,12 +187,12 @@ class PaymentService extends StatelessWidget { if (res["MessageStatus"] == 1) { if (res['responseInpatient'] != null) { inPatientAdvanceResponseModel = InPatientAdvanceResponseModel.fromJson(res["responseInpatient"]); - Navigator.push(context, FadePage(page: InPatientAdvancePayment(inPatientAdvanceResponseModel: inPatientAdvanceResponseModel))); + Navigator.push(context, FadePage(page: InPatientAdvancePayment(isHasData: true, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel))); } else { AppToast.showErrorToast(message: TranslationBase.of(context).noData); } } else { - AppToast.showErrorToast(message: res["endUserMessage"]); + Navigator.push(context, FadePage(page: InPatientAdvancePayment(isHasData: false, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel))); } }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); From 185f54d26d7329a410a6cfbc091aa91f1e355e80 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 31 Oct 2023 11:00:13 +0300 Subject: [PATCH 43/49] updates & fixes --- lib/config/localized_values.dart | 3 ++- lib/pages/InPatientServices/help_PRO.dart | 11 ++++++++--- lib/uitl/translations_delegate_base.dart | 1 + 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 2b823e98..d99c1e6b 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1934,7 +1934,8 @@ const Map localizedValues = { "admissionReqNo": {"en": "Admission Request No", "ar": "رقم طلب القبول:"}, "dischargeDate": {"en": "Discharge Date", "ar": "تاريخ التفريغ"}, "selectAdmissionText": {"en": "Please select one of the admissions from below to view medical reports:", "ar": "يرجى تحديد أحد حالات القبول من الأسفل لعرض التقارير الطبية:"}, - "onlyAdmitted": {"en": "This service is only available for admitted patients", "ar": "هذه الخدمة متاحة فقط للمرضى المقبولين"}, + "assistYou": {"en": "How we may assist you?", "ar": "كيف يمكننا مساعدتك؟"}, + }; \ No newline at end of file diff --git a/lib/pages/InPatientServices/help_PRO.dart b/lib/pages/InPatientServices/help_PRO.dart index a9d192a7..6d5eda5f 100644 --- a/lib/pages/InPatientServices/help_PRO.dart +++ b/lib/pages/InPatientServices/help_PRO.dart @@ -1,5 +1,6 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; @@ -39,7 +40,7 @@ class _HelpPROState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - "How we may assist you?", + TranslationBase.of(context).assistYou, overflow: TextOverflow.clip, style: TextStyle( fontSize: 16.0, @@ -156,8 +157,12 @@ class _HelpPROState extends State { service .insertInPatientOrder(projectViewModel.getAdmissionInfoResponseModel, 1, (projectViewModel.user.firstName + " " + projectViewModel.user.lastName), (projectViewModel.user.firstNameN + " " + projectViewModel.user.lastNameN), projectViewModel.user.mobileNumber, assistText.text, context) - .then((res) {}) - .catchError((err) { + .then((res) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showSuccessToast(message: TranslationBase.of(context).successSendReport); + Navigator.of(context).pop(); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); print(err); }); } diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 6cb48058..531384a1 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2941,6 +2941,7 @@ class TranslationBase { String get dischargeDate => localizedValues["dischargeDate"][locale.languageCode]; String get selectAdmissionText => localizedValues["selectAdmissionText"][locale.languageCode]; String get onlyAdmitted => localizedValues["onlyAdmitted"][locale.languageCode]; + String get assistYou => localizedValues["assistYou"][locale.languageCode]; } From ee5fb615db9b3f8f57e43babdc32f055d8973c6f Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 31 Oct 2023 11:37:54 +0300 Subject: [PATCH 44/49] updates & fixes --- .../components/inpatient_pending_advance_payment.dart | 2 +- lib/pages/InPatientServices/inpatient_home.dart | 4 ++-- lib/pages/paymentService/payment_service.dart | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart b/lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart index 294496ac..b937b0b2 100644 --- a/lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart +++ b/lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart @@ -58,7 +58,7 @@ class _InPatientPendingAdvancePaymentState extends State { if (res["MessageStatus"] == 1) { if (res['responseInpatient'] != null) { inPatientAdvanceResponseModel = InPatientAdvanceResponseModel.fromJson(res["responseInpatient"]); - Navigator.push(context, FadePage(page: InPatientAdvancePayment(isHasData: true, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel))); + Navigator.push(context, FadePage(page: InPatientAdvancePayment(isHasData: inPatientAdvanceResponseModel.responseInpatientAdvanceInfo != null, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel))); } else { AppToast.showErrorToast(message: TranslationBase.of(context).noData); } } else { - Navigator.push(context, FadePage(page: InPatientAdvancePayment(isHasData: false, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel))); + Navigator.push(context, FadePage(page: InPatientAdvancePayment(isHasData: inPatientAdvanceResponseModel.responseInpatientAdvanceInfo != null, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel))); } }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); diff --git a/lib/pages/paymentService/payment_service.dart b/lib/pages/paymentService/payment_service.dart index fe5935ba..644d26b2 100644 --- a/lib/pages/paymentService/payment_service.dart +++ b/lib/pages/paymentService/payment_service.dart @@ -187,12 +187,12 @@ class PaymentService extends StatelessWidget { if (res["MessageStatus"] == 1) { if (res['responseInpatient'] != null) { inPatientAdvanceResponseModel = InPatientAdvanceResponseModel.fromJson(res["responseInpatient"]); - Navigator.push(context, FadePage(page: InPatientAdvancePayment(isHasData: true, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel))); + Navigator.push(context, FadePage(page: InPatientAdvancePayment(isHasData: inPatientAdvanceResponseModel.responseInpatientAdvanceInfo != null, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel))); } else { AppToast.showErrorToast(message: TranslationBase.of(context).noData); } } else { - Navigator.push(context, FadePage(page: InPatientAdvancePayment(isHasData: false, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel))); + Navigator.push(context, FadePage(page: InPatientAdvancePayment(isHasData: inPatientAdvanceResponseModel.responseInpatientAdvanceInfo != null, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel))); } }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); From 41cd55e02b620fd07d8e7adf2982fe71479bb69f Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 1 Nov 2023 12:18:25 +0300 Subject: [PATCH 45/49] paymentRequestID added in the request --- ...tient_advance_requests_response_model.dart | 5 +- .../inpatient_pending_advance_payment.dart | 149 +++++++++--------- .../clinic_services/get_clinic_service.dart | 3 +- 3 files changed, 82 insertions(+), 75 deletions(-) diff --git a/lib/models/InPatientServices/get_inpatient_advance_requests_response_model.dart b/lib/models/InPatientServices/get_inpatient_advance_requests_response_model.dart index bdf03283..b5f4fb49 100644 --- a/lib/models/InPatientServices/get_inpatient_advance_requests_response_model.dart +++ b/lib/models/InPatientServices/get_inpatient_advance_requests_response_model.dart @@ -42,8 +42,9 @@ class ResponseInpatientAdvanceInfo { num requestedAmount; String setupId; int status; + int paymentRequestID; - ResponseInpatientAdvanceInfo({this.admissionNo, this.admissionReqNo, this.createdOn, this.patientId, this.projectId, this.requestedAmount, this.setupId, this.status}); + ResponseInpatientAdvanceInfo({this.admissionNo, this.admissionReqNo, this.createdOn, this.patientId, this.projectId, this.requestedAmount, this.setupId, this.status, this.paymentRequestID}); ResponseInpatientAdvanceInfo.fromJson(Map json) { admissionNo = json['admissionNo']; @@ -54,6 +55,7 @@ class ResponseInpatientAdvanceInfo { requestedAmount = json['requestedAmount']; setupId = json['setupId']; status = json['status']; + paymentRequestID = json['PaymentRequestId']; } Map toJson() { @@ -66,6 +68,7 @@ class ResponseInpatientAdvanceInfo { data['requestedAmount'] = this.requestedAmount; data['setupId'] = this.setupId; data['status'] = this.status; + data['PaymentRequestId'] = this.paymentRequestID; return data; } } diff --git a/lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart b/lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart index b937b0b2..abed2b96 100644 --- a/lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart +++ b/lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart @@ -146,82 +146,84 @@ class _InPatientPendingAdvancePaymentState extends State getInPatientPaymentLink(int projectID, int admissionNo, int orderID, String name, String email, num amount, String nationalID, int clinicID, context) async { + Future getInPatientPaymentLink(int projectID, int admissionNo, int orderID, String name, String email, num amount, String nationalID, int clinicID, int paymentRequestID, context) async { Map request; // request = {"ProjectID": projectID, "AdmissionReqNo": admissionReqNo, "AdmissionNo": admissionNo}; @@ -125,6 +125,7 @@ class ClinicListService extends BaseService { "SourceType": "1", "NationalID": nationalID, "ClinicID": clinicID, + "PaymentRequestId": paymentRequestID, "createdBy": 102 }; From e4492cbc1fff52aefe904e9be11121ba7fcab203 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 6 Nov 2023 13:50:21 +0300 Subject: [PATCH 46/49] Medical instructions updates --- lib/pages/InPatientServices/inpatient_home.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/pages/InPatientServices/inpatient_home.dart b/lib/pages/InPatientServices/inpatient_home.dart index a79e40de..ffb5f57d 100644 --- a/lib/pages/InPatientServices/inpatient_home.dart +++ b/lib/pages/InPatientServices/inpatient_home.dart @@ -309,7 +309,7 @@ class _InPatientServicesHomeState extends State { ClinicListService service = new ClinicListService(); GifLoaderDialogUtils.showMyDialog(context); service.getMedicalInstructions(projectViewModel.inPatientProjectID, context).then((res) { - if (res['MedicalInstruction'].length != 0) { + if (res['MedicalInstruction'] != null && res['MedicalInstruction'].length != 0) { List getMedicalInstructionsList = []; res['MedicalInstruction'].forEach((v) { getMedicalInstructionsList.add(new GetMedicalInstructions.fromJson(v)); @@ -318,6 +318,7 @@ class _InPatientServicesHomeState extends State { print(res['MedicalInstruction']); Navigator.push(context, FadePage(page: MedicalInstructionsPage(getMedicalInstructionsList: getMedicalInstructionsList))); } else { + GifLoaderDialogUtils.hideDialog(context); AppToast.showErrorToast(message: TranslationBase.of(context).noMedicalInstructions); } }).catchError((err) { From 1997dbe1289ff9894f8415820c42a470cc71b574 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 7 Nov 2023 11:35:22 +0300 Subject: [PATCH 47/49] updates --- lib/config/config.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index b71679f5..4b51460f 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -326,7 +326,7 @@ var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnari var CHANNEL = 3; var GENERAL_ID = 'Cs2020@2016\$2958'; var IP_ADDRESS = '10.20.10.20'; -var VERSION_ID = 10.8; +var VERSION_ID = 11.0; var SETUP_ID = '91877'; var LANGUAGE = 2; // var PATIENT_OUT_SA = 0; From b10383c3ffc1528fb9dda7b24ac4dbf8e990dd93 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 7 Nov 2023 15:09:23 +0300 Subject: [PATCH 48/49] Translation updates --- lib/config/localized_values.dart | 3 +++ lib/pages/InPatientServices/help_PRO.dart | 2 +- lib/pages/InPatientServices/inpatient_home.dart | 8 ++++---- lib/uitl/translations_delegate_base.dart | 3 +++ 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index d99c1e6b..e45e0fc8 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1936,6 +1936,9 @@ const Map localizedValues = { "selectAdmissionText": {"en": "Please select one of the admissions from below to view medical reports:", "ar": "يرجى تحديد أحد حالات القبول من الأسفل لعرض التقارير الطبية:"}, "onlyAdmitted": {"en": "This service is only available for admitted patients", "ar": "هذه الخدمة متاحة فقط للمرضى المقبولين"}, "assistYou": {"en": "How we may assist you?", "ar": "كيف يمكننا مساعدتك؟"}, + "receive": {"en": "Receive", "ar": "تجهيز"}, + "PRO": {"en": "PRO", "ar": "علاقات المرضى"}, + "patientRelationOffice": {"en": "Patient Relation Office", "ar": "علاقات المرضى"}, }; \ No newline at end of file diff --git a/lib/pages/InPatientServices/help_PRO.dart b/lib/pages/InPatientServices/help_PRO.dart index 6d5eda5f..385f0672 100644 --- a/lib/pages/InPatientServices/help_PRO.dart +++ b/lib/pages/InPatientServices/help_PRO.dart @@ -29,7 +29,7 @@ class _HelpPROState extends State { isShowDecPage: false, showNewAppBarTitle: true, showNewAppBar: true, - appBarTitle: "Patient Relation Officer", + appBarTitle: TranslationBase.of(context).patientRelationOffice, body: SingleChildScrollView( child: Container( width: MediaQuery.of(context).size.width, diff --git a/lib/pages/InPatientServices/inpatient_home.dart b/lib/pages/InPatientServices/inpatient_home.dart index ffb5f57d..1d97cf0a 100644 --- a/lib/pages/InPatientServices/inpatient_home.dart +++ b/lib/pages/InPatientServices/inpatient_home.dart @@ -170,7 +170,7 @@ class _InPatientServicesHomeState extends State { getInPatientAdvancePaymentRequests(context); }, child: MedicalProfileItem( - title: "Advance", + title: TranslationBase.of(context).advancePayment, imagePath: 'advance_payment.svg', subTitle: TranslationBase.of(context).payment, width: 50.0, @@ -187,7 +187,7 @@ class _InPatientServicesHomeState extends State { if (isReceivePrescriptionEnabled) receivePrescriptionAPI(context); }, child: MedicalProfileItem( - title: "Receive", + title: TranslationBase.of(context).receive, imagePath: 'receive_prescription.svg', subTitle: TranslationBase.of(context).prescriptions, width: 50.0, @@ -203,9 +203,9 @@ class _InPatientServicesHomeState extends State { checkCurrentTime(context); }, child: MedicalProfileItem( - title: "Help", + title: TranslationBase.of(context).help, imagePath: 'help_pro.svg', - subTitle: "PRO", + subTitle: TranslationBase.of(context).PRO, width: 50.0, height: 40.0, isInPatient: true, diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 531384a1..8e8ddf06 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2942,6 +2942,9 @@ class TranslationBase { String get selectAdmissionText => localizedValues["selectAdmissionText"][locale.languageCode]; String get onlyAdmitted => localizedValues["onlyAdmitted"][locale.languageCode]; String get assistYou => localizedValues["assistYou"][locale.languageCode]; + String get receive => localizedValues["receive"][locale.languageCode]; + String get PRO => localizedValues["PRO"][locale.languageCode]; + String get patientRelationOffice => localizedValues["patientRelationOffice"][locale.languageCode]; } From 7f753014df1f3ebe55b66774fb3d09a5584ad51d Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 8 Nov 2023 14:35:37 +0300 Subject: [PATCH 49/49] Inpatient advance payment projectID param issue resolved --- lib/pages/InPatientServices/inpatient_home.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pages/InPatientServices/inpatient_home.dart b/lib/pages/InPatientServices/inpatient_home.dart index 1d97cf0a..bcc2010e 100644 --- a/lib/pages/InPatientServices/inpatient_home.dart +++ b/lib/pages/InPatientServices/inpatient_home.dart @@ -330,7 +330,7 @@ class _InPatientServicesHomeState extends State { ClinicListService service = new ClinicListService(); GifLoaderDialogUtils.showMyDialog(context); service - .getInPatientAdvancePaymentRequests(projectViewModel.inPatientProjectID, projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionNo : 0, + .getInPatientAdvancePaymentRequests(projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.projectID : projectViewModel.getAdmissionRequestInfoResponseModel.projectId, projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionNo : 0, projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionRequestNo : projectViewModel.getAdmissionRequestInfoResponseModel.admissionRequestNo, context) .then((res) { GifLoaderDialogUtils.hideDialog(context);