Inpatient services implementation

Dev_3.3_InPatient_CR
haroon amjad 3 years ago
parent dc859b01f7
commit 128bd2ec54

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

@ -1883,4 +1883,19 @@ const Map localizedValues = {
"pharmaLiveCareMakePayment1": {"en": "Make the payment through the mobile app", "ar": "قم بالدفع من خلال تطبيق الهاتف المحمول"},
"pharmaLiveCareJoinConsultation": {"en": "Join the virtual consultation from booth", "ar": "انضم إلى الاستشارة الافتراضية من الكبينة"},
"pharmaLiveCareJoinConsultation1": {"en": "Wait for the doctor in the pharma booth to join you", "ar": "انتظر حتى ينضم إليك الطبيب في كبينة لايف كير الصيدلية"},
"InPatient": {"en": "InPatient", "ar": "خدمات"},
"InPatientServices": {"en": "Services", "ar": "تنويم"},
"InPatientServicesHeader": {"en": "InPatient Services", "ar": "خدمات التنويم"},
"admissionGeneral": {"en": "Admission General", "ar": "اقرار"},
"consent": {"en": "Consent", "ar": "التنويم"},
"generalInstructionsTitle": {"en": "General", "ar": "تعليمات"},
"generalInstructionsSubTitle": {"en": "Instructions", "ar": "التنويم العامة"},
"medicalInstructionsTitle": {"en": "Medical", "ar": "التعليمات الطبية"},
"medicalInstructionsSubTitle": {"en": "Instructions", "ar": "قبل التنويم"},
"mealPlanTitle": {"en": "Meal Plan", "ar": "خدمات"},
"mealPlanSubTitle": {"en": "Services", "ar": "الوجبات"},
"birthNotificationTitle": {"en": "Birth", "ar": "خدمات"},
"birthNotificationSubTitle": {"en": "Notification", "ar": "تبليغ الولادة"},
"admissionNoticeTitle": {"en": "Admission", "ar": "إشعار"},
"admissionNoticeSubTitle": {"en": "Notice", "ar": "تنويم"},
};

@ -0,0 +1,146 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.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:flutter/material.dart';
import 'package:provider/provider.dart';
class InPatientServicesHome extends StatelessWidget {
ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
List<Widget> inPatientServiceList = 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<Widget> getInPatientServicesList(BuildContext context) {
List<Widget> 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;
}
}

@ -41,13 +41,12 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
List<AppoitmentAllHistoryResultList> 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<HomePageFragment2> {
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<ToDoCountProviderModel>(context);
var userProvider = Provider.of<ToDoCountProviderModel>(context);
List<Widget> myMedicalList = Utils.myMedicalListHomePage(projectViewModel: projectViewModel, context: context, count: appoCountProvider.count, isLogin: projectViewModel.isLogin);
@ -257,23 +275,69 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
],
),
),
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<HomePageFragment2> {
);
}
Widget getInpatientButton() {
return Container(
height: 50.0,
);
}
Widget showFloating(String icon) {
return Container(
width: MediaQuery.of(context).size.width * 0.06,

@ -320,6 +320,8 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
}
}
});
// HMG_Geofencing(context).loadZones().then((instance) => instance.init());
}
void setUserValues(value) async {
@ -337,25 +339,26 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
}
}
registerGeofences() async {
await locator<GeofencingServices>().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<GeofencingServices>().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<LandingPage> with WidgetsBindingObserver {
String voipToken = await sharedPref.getString(APNS_TOKEN);
getOneSignalVOIPToken(voipToken);
}
// registerGeofences();
}
getOneSignalVOIPToken(String voipToken) {

@ -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<GAnalytics>().hmgServices.logServiceName('latest news');
} else if (index == 23) {
Navigator.push(context, FadePage(page: InPatientServicesHome()));
locator<GAnalytics>().hmgServices.logServiceName('InPatient Services');
}
},
child: Container(

@ -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<Login> {
}
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<Login> {
});
}
void registerGeoZones() {
void registerGeoZones() async {
await locator<GeofencingServices>().getAllGeoZones(GeoZonesRequestModel());
projectViewModel.platformBridge().registerHmgGeofences();
}

@ -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;

@ -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<GeoZonesResponseModel> _zones;

@ -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<dynamic> 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<void> 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: <String, dynamic>{
// // 'reservationID': message['id'],
// 'userId': '1a2b3c4d'
// },
// headers: <String, dynamic>{'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();

@ -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];
}

@ -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

Loading…
Cancel
Save