Pharma LiveCare updates

merge-update-with-lab-changes
haroon amjad 3 years ago
parent da423fe12a
commit 4ecab57173

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

@ -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/';
// Pharmacy UAT URLs
// var BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
@ -321,7 +321,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 = 9.91;
var VERSION_ID = 10.0;
var SETUP_ID = '91877';
var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0;

@ -1871,4 +1871,16 @@ const Map localizedValues = {
"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": "تتيح لك خدمة لايف كير الصيدلية الحصول على استشارة من طبيبك المتواجد فعليًا في كشك صيدلية د.سليمان الحبيب."},
"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": "باتباع الخطوات التالية يمكنك الاستفادة بسهولة من خدمة الاستشارة الافتراضية:"},
"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": "قم بالدفع عبر الإنترنت"},
"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": "انتظر حتى ينضم إليك الطبيب في كابينة لايف كير الصيدلية"},
};

@ -1,12 +1,14 @@
import 'package:barcode_scan2/barcode_scan2.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/livecare/pharma_livecare_intro_page.dart';
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.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:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
@ -101,9 +103,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
children: [
_loginOptionButton(TranslationBase.of(context).livecareOption1, 'assets/images/new/Live_Care.svg', 1),
_loginOptionButton(TranslationBase.of(context).livecareOption4, 'assets/images/new/book appointment.svg', 2),
_loginOptionButton(TranslationBase.of(context).pharmaLiveCare, 'assets/images/new/pharma.svg', 3,
// isEnable: projectViewModel.havePrivilege(99)
),
_loginOptionButton(TranslationBase.of(context).pharmaLiveCare, 'assets/images/new/pharma.svg', 3, isEnable: projectViewModel.havePrivilege(99)),
],
),
SizedBox(
@ -127,7 +127,19 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
projectViewModel.analytics.liveCare.livecare_schedule_video_call();
} else {
//Pharmacy LiveCare
if (isEnable) readQRCode();
if (isEnable) {
Navigator.push(
context,
FadePage(
page: PharmaLiveCareIntroPage(),
),
).then((value) {
if (value != null && value.contains("pharmacy/")) {
pharmacyLiveCareQRCode = value.split("/")[1];
startPharmacyLiveCareProcess();
}
});
}
}
},
child: Stack(children: [

@ -0,0 +1,207 @@
import 'package:barcode_scan2/barcode_scan2.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.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 '../../uitl/utils.dart';
class PharmaLiveCareIntroPage extends StatefulWidget {
const PharmaLiveCareIntroPage({Key key}) : super(key: key);
@override
State<PharmaLiveCareIntroPage> createState() => _PharmaLiveCareIntroPageState();
}
class _PharmaLiveCareIntroPageState extends State<PharmaLiveCareIntroPage> {
ProjectViewModel projectViewModel;
String pharmacyLiveCareQRCode = "";
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return AppScaffold(
appBarTitle: TranslationBase.of(context).pharmaLiveCare,
isShowAppBar: true,
showNewAppBarTitle: true,
showNewAppBar: true,
body: SingleChildScrollView(
child: Container(
margin: EdgeInsets.only(left: 20.0, right: 20.0, top: 20.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(child: Text(TranslationBase.of(context).pharmaLiveCare1, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0, letterSpacing: -0.64, color: CustomColors.darkGrey))),
Container(
margin: EdgeInsets.only(top: 7.0),
child: Text(TranslationBase.of(context).pharmaLiveCareDesc1, style: TextStyle(fontSize: 14.0, letterSpacing: -0.64, color: CustomColors.textColor, fontWeight: FontWeight.w600))),
Container(
margin: EdgeInsets.only(top: 20.0),
child: Text(TranslationBase.of(context).wherePharmaLiveCare, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0, letterSpacing: -0.64, color: CustomColors.darkGrey))),
Container(
margin: EdgeInsets.only(top: 7.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image.asset(
"assets/images/new/booth_image.png",
),
Container(
width: MediaQuery.of(context).size.width * 0.6,
margin: EdgeInsets.only(left: 10.0, right: 10.0),
child: Text(TranslationBase.of(context).pharmaLiveCareDesc2,
style: TextStyle(fontSize: 14.0, letterSpacing: -0.64, color: CustomColors.textColor, fontWeight: FontWeight.w600))),
],
)),
Container(
margin: EdgeInsets.only(top: 20.0),
child: Text(TranslationBase.of(context).howPharmaLiveCare, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0, letterSpacing: -0.64, color: CustomColors.darkGrey))),
Container(
margin: EdgeInsets.only(top: 7.0),
child: Text(TranslationBase.of(context).pharmaLiveCareDesc3, style: TextStyle(fontSize: 14.0, letterSpacing: -0.64, color: CustomColors.textColor, fontWeight: FontWeight.w600))),
Container(
margin: EdgeInsets.only(top: 7.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(top: 7.0),
padding: EdgeInsets.fromLTRB(14.0, 5.0, 14.0, 5.0),
decoration: BoxDecoration(color: CustomColors.green, borderRadius: BorderRadius.all(Radius.circular(100.0))),
child: Text("1", style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, color: CustomColors.white, fontWeight: FontWeight.w600))),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: SvgPicture.asset("assets/images/new/qr_code.svg", width: 40),
),
Container(
margin: EdgeInsets.only(left: 5.0, right: 5.0),
child: Text(TranslationBase.of(context).pharmaLiveCareScanQR,
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0, letterSpacing: -0.64, color: CustomColors.darkGrey))),
Container(
width: MediaQuery.of(context).size.width * 0.7,
margin: EdgeInsets.only(left: 5.0, right: 5.0),
child: Text(TranslationBase.of(context).pharmaLiveCareScanQR1,
style: TextStyle(fontSize: 14.0, letterSpacing: -0.64, color: CustomColors.textColor, fontWeight: FontWeight.w600))),
],
),
],
),
),
Container(
margin: EdgeInsets.only(top: 7.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(top: 7.0),
padding: EdgeInsets.fromLTRB(12.0, 5.0, 12.0, 5.0),
decoration: BoxDecoration(color: CustomColors.green, borderRadius: BorderRadius.all(Radius.circular(100.0))),
child: Text("2", style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, color: CustomColors.white, fontWeight: FontWeight.w600))),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: SvgPicture.asset("assets/images/new/payment.svg", width: 40),
),
Container(
margin: EdgeInsets.only(left: 5.0, right: 5.0),
child: Text(TranslationBase.of(context).pharmaLiveCareMakePayment,
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0, letterSpacing: -0.64, color: CustomColors.darkGrey))),
Container(
width: MediaQuery.of(context).size.width * 0.7,
margin: EdgeInsets.only(left: 5.0, right: 5.0),
child: Text(TranslationBase.of(context).pharmaLiveCareMakePayment1,
style: TextStyle(fontSize: 14.0, letterSpacing: -0.64, color: CustomColors.textColor, fontWeight: FontWeight.w600))),
],
),
],
),
),
Container(
margin: EdgeInsets.only(top: 7.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(top: 7.0),
padding: EdgeInsets.fromLTRB(12.0, 5.0, 12.0, 5.0),
decoration: BoxDecoration(color: CustomColors.green, borderRadius: BorderRadius.all(Radius.circular(100.0))),
child: Text("3", style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, color: CustomColors.white, fontWeight: FontWeight.w600))),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: SvgPicture.asset("assets/images/new/pharmaicon.svg", width: 40),
),
Container(
width: MediaQuery.of(context).size.width * 0.7,
margin: EdgeInsets.only(left: 5.0, right: 5.0),
child: Text(TranslationBase.of(context).pharmaLiveCareJoinConsultation,
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0, letterSpacing: -0.64, color: CustomColors.darkGrey))),
Container(
width: MediaQuery.of(context).size.width * 0.7,
margin: EdgeInsets.only(left: 5.0, right: 5.0),
child: Text(TranslationBase.of(context).pharmaLiveCareJoinConsultation1,
style: TextStyle(fontSize: 14.0, letterSpacing: -0.64, color: CustomColors.textColor, fontWeight: FontWeight.w600))),
],
),
],
),
),
SizedBox(
height: 100.0,
)
],
),
),
),
bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.08,
width: double.infinity,
color: Colors.white,
child: Column(
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.9,
child: DefaultButton(TranslationBase.of(context).pharmaLiveCareScanQR, () {
readQRCode();
}),
),
],
),
),
);
}
readQRCode() async {
pharmacyLiveCareQRCode = (await BarcodeScanner.scan())?.rawContent;
if (pharmacyLiveCareQRCode != "") {
GifLoaderDialogUtils.showMyDialog(context);
LiveCareService service = new LiveCareService();
service.getPatientInfoByQR(pharmacyLiveCareQRCode, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
startPharmacyLiveCareProcess();
});
} else {}
}
startPharmacyLiveCareProcess() {
sharedPref.setString(LIVECARE_CLINIC_DATA, "Pharmacy LiveCare" + "-" + "501" + "-" + "1");
Navigator.pop(context, "pharmacy/$pharmacyLiveCareQRCode");
}
}

@ -123,91 +123,6 @@ class _LiveCarePendingRequestState extends State<LiveCarePendingRequest> {
),
],
),
// Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// mainAxisSize: MainAxisSize.min,
// children: <Widget>[
// Container(
// child: Text("In Progress:",
// style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)),
// ),
// Container(
// alignment: Alignment.center,
// margin: EdgeInsets.only(top: 10.0),
// child: Text("Estimated Waiting Time: ",
// style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold)),
// ),
// Container(
// transform: Matrix4.translationValues(0.0, -50.0, 0.0),
// alignment: Alignment.center,
// child: CircularCountDownTimer(
// duration:
// widget.pendingERRequestHistoryList.watingtimeInteger * 60,
// width: MediaQuery.of(context).size.width / 3,
// height: MediaQuery.of(context).size.height / 3,
// color: Colors.white,
// fillColor: Colors.green[700],
// strokeWidth: 15.0,
// textStyle: TextStyle(
// fontSize: 22.0,
// color: Colors.black87,
// fontWeight: FontWeight.bold),
// isReverse: true,
// isTimerTextShown: true,
// onComplete: () {
// print('Countdown Ended');
// },
// ),
// ),
// Container(
// transform: Matrix4.translationValues(0.0, -60.0, 0.0),
// child: Divider(
// color: Colors.grey[500],
// thickness: 0.7,
// ),
// ),
// Container(
// transform: Matrix4.translationValues(0.0, -50.0, 0.0),
// child: Text("Requested date:",
// style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.bold)),
// ),
// Container(
// transform: Matrix4.translationValues(0.0, -30.0, 0.0),
// child: Text(
// DateUtil.getDateFormatted(
// widget.pendingERRequestHistoryList.arrivalTime),
// style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold)),
// ),
// Container(
// transform: Matrix4.translationValues(0.0, -20.0, 0.0),
// padding: EdgeInsets.all(7.0),
// decoration: BoxDecoration(
// shape: BoxShape.rectangle,
// borderRadius: BorderRadius.all(Radius.circular(5)),
// color: Colors.red[800],
// ),
// margin: EdgeInsets.only(top: 5.0, bottom: 5.0),
// child: Text(widget.pendingERRequestHistoryList.stringCallStatus,
// style: TextStyle(fontSize: 14.0, color: Colors.white)),
// ),
// Container(
// transform: Matrix4.translationValues(0.0, 0.0, 0.0),
// child: Divider(
// color: Colors.grey[500],
// thickness: 0.7,
// ),
// ),
// Container(
// alignment: Alignment.center,
// transform: Matrix4.translationValues(0.0, 10.0, 0.0),
// child: Text(
// "Your turn is after " +
// widget.pendingERRequestHistoryList.patCount.toString() +
// " Patients",
// style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)),
// ),
// ],
// ),
);
}

@ -295,6 +295,9 @@ class _clinic_listState extends State<ClinicList> {
});
}
bool isPharmacyLiveCare = widget.isPharmacyLiveCare;
String pharmaLiveCareQRCodeValue = widget.pharmacyLiveCareQRCode;
Navigator.push(
context,
FadePage(
@ -306,6 +309,8 @@ class _clinic_listState extends State<ClinicList> {
isFromAdvancePayment: widget.isPharmacyLiveCare,
))).then((value) {
print(value);
widget.isPharmacyLiveCare = isPharmacyLiveCare;
widget.pharmacyLiveCareQRCode = pharmaLiveCareQRCodeValue;
if (value != null) {
openPayment(value, authUser, num.parse(getERAppointmentFeesList.total), appo);
projectViewModel.analytics.liveCare.payment_method(appointment_type: 'livecare', clinic: selectedClinicName, payment_method: value[0], payment_type: 'appointment');
@ -576,7 +581,7 @@ class _clinic_listState extends State<ClinicList> {
widget.isPharmacyLiveCare = true;
widget.pharmacyLiveCareQRCode = value.split("/")[1];
liveCareClinicIDs = await sharedPref.getString(LIVECARE_CLINIC_DATA);
selectedClinicID = 1;
selectedClinicID = 7;
selectedClinicName = TranslationBase.of(context).pharmaLiveCare;
sharedPref.remove(LIVECARE_CLINIC_DATA);
startLiveCare();

@ -2879,6 +2879,18 @@ class TranslationBase {
String get liveCareSupportContact => localizedValues["liveCareSupportContact"][locale.languageCode];
String get scanNFC => localizedValues["scanNFC"][locale.languageCode];
String get pharmaLiveCare => localizedValues["pharmaLiveCare"][locale.languageCode];
String get pharmaLiveCare1 => localizedValues["pharmaLiveCare1"][locale.languageCode];
String get pharmaLiveCareDesc1 => localizedValues["pharmaLiveCareDesc1"][locale.languageCode];
String get wherePharmaLiveCare => localizedValues["wherePharmaLiveCare"][locale.languageCode];
String get pharmaLiveCareDesc2 => localizedValues["pharmaLiveCareDesc2"][locale.languageCode];
String get howPharmaLiveCare => localizedValues["howPharmaLiveCare"][locale.languageCode];
String get pharmaLiveCareDesc3 => localizedValues["pharmaLiveCareDesc3"][locale.languageCode];
String get pharmaLiveCareScanQR => localizedValues["pharmaLiveCareScanQR"][locale.languageCode];
String get pharmaLiveCareScanQR1 => localizedValues["pharmaLiveCareScanQR1"][locale.languageCode];
String get pharmaLiveCareMakePayment => localizedValues["pharmaLiveCareMakePayment"][locale.languageCode];
String get pharmaLiveCareMakePayment1 => localizedValues["pharmaLiveCareMakePayment1"][locale.languageCode];
String get pharmaLiveCareJoinConsultation => localizedValues["pharmaLiveCareJoinConsultation"][locale.languageCode];
String get pharmaLiveCareJoinConsultation1 => localizedValues["pharmaLiveCareJoinConsultation1"][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 PRESCRIPTION_PAYMENT_WITH_ORDERID =
// 'https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID=';

Loading…
Cancel
Save