Updates & fixes

sultan_v3.3
haroon amjad 3 years ago
parent 9683b3f42f
commit 74b0acefd3

@ -183,6 +183,7 @@ const Map localizedValues = {
'sitWaitingQR': {'en': 'Sit in the waiting rooms until called by the nurse.', 'ar': 'الجلوس في غرف الانتظار لحين منادتك من قبل الممرضة.'},
'attendRegisterCode': {'en': 'Attendance registration code', 'ar': 'رمز تسجيل الحضور'},
'scanQRHospital': {'en': 'Approach the Online Check-In board in the hospital & scan via NFC to Check-In', 'ar': 'اقترب من لوحة تسجيل الوصول عبر الإنترنت في المستشفى وافحصها عبر NFC لتسجيل الوصول'},
'scanNFC': {'en': 'Scan NFC to Check-In', 'ar': 'مسح NFC لتسجيل الوصول'},
"sendEmail": {"en": "Send Email", "ar": "ارسال نسخة"},
"success": {"en": "Done successfully", "ar": "تم تنفذ الطلب بنجاح"},
"EmailSentSuccessfully": {"en": "Email Sent Successfully", "ar": "تم إرسال البريد الإلكتروني بنجاح"},

@ -512,6 +512,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
"3",
// Need to get new Service ID from Ayman for Ancillary Tamara
"",
context,
model.ancillaryListsDetails[0].appointmentDate,
model.ancillaryListsDetails[0].appointmentNo,
model.ancillaryListsDetails[0].clinicID,

@ -195,7 +195,7 @@ class ConfirmPaymentPage extends StatelessWidget {
browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart);
browser.openPaymentBrowser(amount, "Advance Payment", Utils.getAdvancePaymentTransID(authenticatedUser.projectID, authenticatedUser.patientID), appo.projectID.toString(),
authenticatedUser.emailAddress, paymentMethod, authenticatedUser.patientType, authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false, "3", "");
authenticatedUser.emailAddress, paymentMethod, authenticatedUser.patientType, authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false, "3", "", null);
}
onBrowserLoadStart(String url) {

@ -284,7 +284,7 @@ class _BookSuccessState extends State<BookSuccess> {
),
height: 45.0,
child: CustomTextButton(
backgroundColor: Color(0xffc5272d),
backgroundColor: CustomColors.green,
elevation: 0,
onPressed: () {
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
@ -587,6 +587,7 @@ class _BookSuccessState extends State<BookSuccess> {
widget.patientShareResponse.isLiveCareAppointment,
"2",
widget.patientShareResponse.isLiveCareAppointment ? widget.patientShareResponse.clinicID.toString() : "",
context,
widget.patientShareResponse.appointmentDate,
widget.patientShareResponse.appointmentNo,
widget.patientShareResponse.clinicID,

@ -1,4 +1,3 @@
import 'dart:convert';
import 'dart:typed_data';
import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
@ -8,15 +7,18 @@ import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResu
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/header_model.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/theme/colors.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/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart';
import 'package:diplomaticquarterapp/widgets/nfc/nfc_reader_sheet.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
@ -53,159 +55,131 @@ class _QRCodeState extends State<QRCode> {
});
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
Future.delayed(const Duration(milliseconds: 500), () {
showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () {
sendNfcCheckInRequest(nfcId);
locator<GAnalytics>().todoList.to_do_list_nfc(widget.appointment);
});
}, onCancel: () {
// Navigator.of(context).pop();
locator<GAnalytics>().todoList.to_do_list_nfc_cancel(widget.appointment);
});
});
startNFCScan();
});
super.initState();
}
startNFCScan() {
Future.delayed(const Duration(milliseconds: 500), () {
showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () {
sendNfcCheckInRequest(nfcId);
locator<GAnalytics>().todoList.to_do_list_nfc(widget.appointment);
});
}, onCancel: () {
// Navigator.of(context).pop();
locator<GAnalytics>().todoList.to_do_list_nfc_cancel(widget.appointment);
});
});
}
@override
Widget build(BuildContext context) {
_context = context;
return AppScaffold(
appBarTitle: TranslationBase.of(context).attendRegisterCode,
appBarTitle: TranslationBase.of(context).onlineCheckIn,
isShowAppBar: true,
showNewAppBar: true,
showNewAppBarTitle: true,
body: SingleChildScrollView(
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Container(
width: double.infinity,
height: MediaQuery.of(context).size.width / 3,
child: Row(
children: [
Expanded(
flex: 1,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
InkWell(
child: Container(
margin: EdgeInsets.only(top: 30.0),
alignment: Alignment.center,
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
border: Border.all(color: Colors.black),
borderRadius: BorderRadius.circular(10),
),
child: SvgPicture.asset("assets/images/nfc/contactless.svg"),
),
onTap: () {
showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () {
sendNfcCheckInRequest(nfcId);
locator<GAnalytics>().todoList.to_do_list_nfc(widget.appointment);
});
}, onCancel: () {
// Navigator.of(context).pop();
locator<GAnalytics>().todoList.to_do_list_nfc_cancel(widget.appointment);
});
},
),
],
),
),
// Expanded(
// flex: 1,
// child: Container(
// margin: EdgeInsets.only(top: 30.0),
// alignment: Alignment.center,
// child: Image.memory(
// _bytes,
// ),
// ),
// ),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
DoctorHeader(
headerModel: HeaderModel(
widget.appointment.doctorTitle + " " + widget.appointment.doctorNameObj,
widget.appointment.doctorID,
widget.appointment.doctorImageURL,
widget.appointment.doctorSpeciality,
"",
widget.appointment.projectName,
DateUtil.convertStringToDate(widget.appointment.appointmentDate),
widget.appointment.isLiveCareAppointment
? DateUtil.convertStringToDate(widget.appointment.appointmentDate).toString().split(" ")[1].substring(0, 5)
: widget.appointment.startTime.substring(0, 5),
null,
widget.appointment.doctorRate,
widget.appointment.actualDoctorRate,
widget.appointment.noOfPatientsRate,
"",
),
Container(
margin: EdgeInsets.only(top: 20.0, left: 20.0, right: 20.0),
child: Divider(
color: Colors.red[700],
thickness: 0.8,
isShowName: true,
isNeedToShowButton: false,
buttonTitle: '',
onTap: () {},
onRatingAndReviewTap: () {},
),
InkWell(
child: Container(
margin: EdgeInsets.only(top: 30.0),
padding: EdgeInsets.all(8),
child: SvgPicture.asset(
"assets/images/nfc/contactless.svg",
width: 80.0,
height: 80.0,
),
),
Row(
children: <Widget>[
Expanded(
child: Container(
width: double.infinity,
margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(TranslationBase.of(context).scanQRHospital, style: TextStyle(color: Colors.red[700], fontSize: 18.0, fontWeight: FontWeight.bold)),
),
onTap: () {
showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () {
sendNfcCheckInRequest(nfcId);
locator<GAnalytics>().todoList.to_do_list_nfc(widget.appointment);
});
}, onCancel: () {
// Navigator.of(context).pop();
locator<GAnalytics>().todoList.to_do_list_nfc_cancel(widget.appointment);
});
},
),
Row(
children: <Widget>[
Expanded(
child: Container(
width: double.infinity,
margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(TranslationBase.of(context).scanQRHospital,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
)),
),
],
),
Container(
margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0),
child: Divider(
color: Colors.red[700],
thickness: 0.8,
),
),
Container(
margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(TranslationBase.of(context).appoInfo, style: TextStyle(fontSize: 18.0, color: Colors.grey[700], fontWeight: FontWeight.bold)),
),
Container(
margin: EdgeInsets.only(left: 20.0, bottom: 20.0, right: 20.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.grey[200],
boxShadow: [
BoxShadow(color: Colors.grey, spreadRadius: 2),
],
],
),
],
),
),
bottomSheet: Container(
color: CustomColors.appBackgroudGreyColor,
padding: EdgeInsets.all(21),
// height: 45.0,
child: Row(
children: [
Expanded(
flex: 1,
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(widget.patientShareResponse.doctorNameObj, style: TextStyle(fontSize: 18.0, color: Colors.grey[700], fontWeight: FontWeight.bold)),
),
if (getDoctorSpeciality(widget.patientShareResponse.doctorSpeciality) != "null\n")
Container(
margin: EdgeInsets.only(bottom: 10.0, left: 20.0, right: 20.0),
child: Text(getDoctorSpeciality(widget.patientShareResponse.doctorSpeciality), style: TextStyle(fontSize: 18.0, color: Colors.grey[700])),
),
Container(
margin: EdgeInsets.only(top: 0.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(widget.patientShareResponse.projectName, style: TextStyle(fontSize: 18.0, color: Colors.grey[700])),
),
Container(
margin: EdgeInsets.only(top: 0.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(getDate(widget.patientShareResponse.appointmentDate), style: TextStyle(fontSize: 18.0, color: Colors.grey[700])),
),
],
height: 45.0,
child: CustomTextButton(
backgroundColor: CustomColors.green,
elevation: 0,
onPressed: () {
startNFCScan();
},
child: Text(TranslationBase.of(context).scanNFC,
style: TextStyle(
fontSize: 18.0,
color: Colors.white,
)),
),
),
// Container(
// margin: EdgeInsets.only(left: 20.0, right: 20.0, top: 15.0),
// alignment: Alignment.bottomCenter,
// child: Column(
// mainAxisAlignment: MainAxisAlignment.end,
// children: <Widget>[
// DefaultButton(TranslationBase.of(context).sendEmail.toUpperCase(), () => {sendEmail()})
// ],
// ),
// ),
],
),
),
],
),
),
);

@ -168,7 +168,7 @@ class _EdPaymentInformationPageState extends State<EdPaymentInformationPage> {
browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart);
transID = Utils.getAdvancePaymentTransID(widget.selectedHospital.iD, projectViewModel.user.patientID);
browser.openPaymentBrowser(amount, "ER Online Check-In", transID, appo.projectID.toString(), authenticatedUser.emailAddress, paymentMethod, authenticatedUser.patientType,
authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false, "3", "");
authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false, "3", "", context);
}
onBrowserLoadStart(String url) {

@ -960,6 +960,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
appo.isLiveCareAppointment,
"2",
appo.isLiveCareAppointment ? widget.patientShareResponse.clinicID.toString() : "",
context,
appo.appointmentDate,
appo.appointmentNo,
appo.clinicID,

@ -17,6 +17,9 @@ import 'package:provider/provider.dart';
class LiveCareHome extends StatefulWidget {
static bool showFooterButton = true;
static bool isLiveCareTypeSelected = false;
final bool isPharmacyLiveCare;
const LiveCareHome({Key key, this.isPharmacyLiveCare = false}) : super(key: key);
@override
_LiveCareHomeState createState() => _LiveCareHomeState();
@ -121,6 +124,7 @@ class _LiveCareHomeState extends State<LiveCareHome> with SingleTickerProviderSt
isDataLoaded && !hasLiveCareRequest
? ClinicList(
getLiveCareHistory: getLiveCareHistory,
isPharmacyLiveCare: widget.isPharmacyLiveCare,
)
: isDataLoaded
? LiveCarePendingRequest(getLiveCareHistory: getLiveCareHistory, pendingERRequestHistoryList: pendingERRequestHistoryList)

@ -39,8 +39,9 @@ import '../live_care_payment_page.dart';
class ClinicList extends StatefulWidget {
final Function getLiveCareHistory;
final bool isPharmacyLiveCare;
ClinicList({@required this.getLiveCareHistory});
ClinicList({@required this.getLiveCareHistory, this.isPharmacyLiveCare = false});
@override
_clinic_listState createState() => _clinic_listState();
@ -316,7 +317,7 @@ class _clinic_listState extends State<ClinicList> {
this.amount = amount.toString();
browser.openPaymentBrowser(amount, "LiveCare Payment", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), "12", authenticatedUser.emailAddress, paymentMethod[0],
authenticatedUser.patientType, authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false, "4", selectedClinicID, "", "", "", "", paymentMethod[1]);
authenticatedUser.patientType, authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false, "4", selectedClinicID, context, "", "", "", "", paymentMethod[1]);
}
onBrowserLoadStart(String url) {
@ -531,8 +532,12 @@ class _clinic_listState extends State<ClinicList> {
setState(() {
currentSelectedLiveCareType = "immediate";
});
getLiveCareClinicsList();
startLiveCare();
// if(widget.isPharmacyLiveCare) {
//
// } else {
getLiveCareClinicsList();
startLiveCare();
// }
} else {
Navigator.of(context)
.push(new MaterialPageRoute<String>(

@ -367,6 +367,7 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
false,
"3",
"0",
context,
"",
"",
"",

@ -2877,6 +2877,7 @@ class TranslationBase {
String get pendingActivation => localizedValues["pendingActivation"][locale.languageCode];
String get awaitingApproval => localizedValues["awaitingApproval"][locale.languageCode];
String get liveCareSupportContact => localizedValues["liveCareSupportContact"][locale.languageCode];
String get scanNFC => localizedValues["scanNFC"][locale.languageCode];
}

@ -1,5 +1,3 @@
import 'dart:io';
import 'package:barcode_scan2/barcode_scan2.dart';
import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/config.dart';
@ -18,6 +16,7 @@ import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStat
import 'package:diplomaticquarterapp/pages/Blood/user_agreement_page.dart';
import 'package:diplomaticquarterapp/pages/DrawerPages/notifications/notifications_page.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart';
import 'package:diplomaticquarterapp/pages/webRTC/call_page.dart';
import 'package:diplomaticquarterapp/routes.dart';
@ -335,19 +334,19 @@ class _AppDrawerState extends State<AppDrawer> {
}
},
),
// InkWell(
// child: DrawerItem(TranslationBase.of(context).pharmacyLiveCare, SvgPicture.asset("assets/images/new/Live_Care.svg"),
// isImageIcon: true,
// bottomLine: false,
// textColor: Theme.of(context).textTheme.bodyText1.color,
// iconColor: Theme.of(context).textTheme.bodyText1.color,
// sideArrow: true,
// letterSpacing: -0.84,
// projectProvider: projectProvider),
// onTap: () {
// readQRCode();
// },
// ),
InkWell(
child: DrawerItem(TranslationBase.of(context).pharmacyLiveCare, SvgPicture.asset("assets/images/new/Live_Care.svg"),
isImageIcon: true,
bottomLine: false,
textColor: Theme.of(context).textTheme.bodyText1.color,
iconColor: Theme.of(context).textTheme.bodyText1.color,
sideArrow: true,
letterSpacing: -0.84,
projectProvider: projectProvider),
onTap: () {
readQRCode();
},
),
InkWell(
child: Stack(
children: [
@ -505,9 +504,16 @@ class _AppDrawerState extends State<AppDrawer> {
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
Navigator.pop(context);
startPharmacyLiveCareProcess();
});
}
startPharmacyLiveCareProcess() {
sharedPref.setString(LIVECARE_CLINIC_DATA, "Pharmacy LiveCare" + "-" + "501" + "-" + "7");
Navigator.push(context, FadePage(page: LiveCareHome(isPharmacyLiveCare: true,)));
}
drawerNavigator(context, routeName) {
Navigator.of(context).pushNamed(routeName);
}

@ -22,6 +22,7 @@ class DoctorHeader extends StatelessWidget {
final String buttonTitle;
final String buttonIcon;
final bool isNeedToShowButton;
final bool isShowName;
DoctorHeader(
{Key key,
@ -29,6 +30,7 @@ class DoctorHeader extends StatelessWidget {
@required this.buttonTitle,
@required this.onTap,
this.isNeedToShowButton = true,
this.isShowName = false,
this.buttonIcon,
this.showConfirmMessageDialog = true,
@required this.onRatingAndReviewTap})
@ -44,7 +46,18 @@ class DoctorHeader extends StatelessWidget {
color: Colors.white,
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (isShowName)
Padding(
padding: EdgeInsets.only(left: 21, right: 21, bottom: 12),
child: Text(
headerModel.doctorName,
maxLines: 1,
style: TextStyle(
fontSize: 24, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24),
),
),
Padding(
padding: EdgeInsets.only(left: 21, right: 21, bottom: 12),
child: Row(

@ -44,6 +44,7 @@ class _NfcLayoutState extends State<NfcLayout> {
}
void readNFC() async {
FlutterNfcKit.finish();
FlutterNfcKit.poll(timeout: Duration(seconds: 10), androidPlatformSound: true, androidCheckNDEF: false, iosMultipleTagMessage: "Multiple tags found!").then((value) async {
setState(() {
_reading = true;
@ -55,6 +56,9 @@ class _NfcLayoutState extends State<NfcLayout> {
Navigator.pop(context);
});
nfcId = value.id;
}).catchError((err) {
print(err);
Navigator.of(context).pop();
});
}

Loading…
Cancel
Save