ED Online Check-In

merge-update-with-lab-changes
haroon amjad 4 years ago
parent bbb99667f8
commit 8b7a6e7689

@ -141,11 +141,11 @@ class BaseAppClient {
body.removeWhere((key, value) => key == null || value == null); body.removeWhere((key, value) => key == null || value == null);
if (BASE_URL == "https://uat.hmgwebservices.com/") { // if (BASE_URL == "https://uat.hmgwebservices.com/") {
print("URL : $url"); print("URL : $url");
final jsonBody = json.encode(body); final jsonBody = json.encode(body);
print(jsonBody); print(jsonBody);
} // }
if (await Utils.checkConnection(bypassConnectionCheck: bypassConnectionCheck)) { if (await Utils.checkConnection(bypassConnectionCheck: bypassConnectionCheck)) {
final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers); final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers);

@ -57,9 +57,12 @@ class _MyApp extends State<MyApp> {
final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>(); final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();
Future<void> checkForUpdate() async { // todo need to verify 'imp' checkForUpdate() { // todo need to verify 'imp'
InAppUpdate.checkForUpdate().then((info) { InAppUpdate.checkForUpdate().then((info) {
print("checkForUpdate!!!");
print(info.toString());
if (info.immediateUpdateAllowed) { if (info.immediateUpdateAllowed) {
print("Immediate Allowed!!!");
InAppUpdate.performImmediateUpdate().then((value) {}).catchError((e) => print(e.toString())); InAppUpdate.performImmediateUpdate().then((value) {}).catchError((e) => print(e.toString()));
} }
}).catchError((e) { }).catchError((e) {

@ -70,8 +70,6 @@ class _NewHomeHealthCareStepOnePageState extends State<NewHomeHealthCareStepOneP
serviceName: projectViewModel.isArabic ? service.textN : service.text)); serviceName: projectViewModel.isArabic ? service.textN : service.text));
else else
removeSelected(num.tryParse(service.serviceID)); removeSelected(num.tryParse(service.serviceID));
// widget.patientERInsertPresOrderRequestModel
// isPatientInsured = newValue;
}); });
}), }),
SizedBox(width: 6), SizedBox(width: 6),

@ -14,6 +14,7 @@ class UserAgreementPage extends StatelessWidget {
isShowAppBar: true, isShowAppBar: true,
showNewAppBarTitle: true, showNewAppBarTitle: true,
showNewAppBar: true, showNewAppBar: true,
isShowDecPage: false,
appBarTitle: TranslationBase.of(context).userAgreement, appBarTitle: TranslationBase.of(context).userAgreement,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Html( child: Html(

@ -62,6 +62,7 @@ class _DdServicesPageState extends State<DdServicesPage> {
EdOnlineQuestionsPage( EdOnlineQuestionsPage(
changePageViewIndex: _changePageViewIndex, changePageViewIndex: _changePageViewIndex,
selectedQuestions: selectedQuestions, selectedQuestions: selectedQuestions,
selectedHospital: triageInformationRequest.selectedHospital,
), ),
EdOnlineNotesPage( EdOnlineNotesPage(
changePageViewIndex: _changePageViewIndex, changePageViewIndex: _changePageViewIndex,

@ -1,10 +1,13 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/er/TriageQuestionsModel.dart'; import 'package:diplomaticquarterapp/core/model/er/TriageQuestionsModel.dart';
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/EdOnlineViewModel.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/EdOnlineViewModel.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.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/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -15,16 +18,13 @@ class EdOnlineQuestionsPage extends StatefulWidget {
final Function changePageViewIndex; final Function changePageViewIndex;
List<TriageQuestionsModel> selectedQuestions; List<TriageQuestionsModel> selectedQuestions;
EdOnlineQuestionsPage({Key key, this.selectedHospital,this.selectedQuestions, this.changePageViewIndex}); EdOnlineQuestionsPage({Key key, this.selectedHospital, this.selectedQuestions, this.changePageViewIndex});
@override @override
_EdOnlineQuestionsPageState createState() => _EdOnlineQuestionsPageState(); _EdOnlineQuestionsPageState createState() => _EdOnlineQuestionsPageState();
} }
class _EdOnlineQuestionsPageState extends State<EdOnlineQuestionsPage> { class _EdOnlineQuestionsPageState extends State<EdOnlineQuestionsPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<EdOnlineViewModel>( return BaseView<EdOnlineViewModel>(
@ -37,90 +37,160 @@ class _EdOnlineQuestionsPageState extends State<EdOnlineQuestionsPage> {
children: [ children: [
...List.generate( ...List.generate(
model.triageQuestionsModelList.length, model.triageQuestionsModelList.length,
(index) => (index) => InkWell(
InkWell( onTap: () {
onTap: (){ setState(() {
setState(() { if (widget.selectedQuestions.contains(model.triageQuestionsModelList[index])) {
if (widget.selectedQuestions widget.selectedQuestions.remove(model.triageQuestionsModelList[index]);
.contains(model.triageQuestionsModelList[index])) { } else {
widget.selectedQuestions widget.selectedQuestions.add(model.triageQuestionsModelList[index]);
.remove(model.triageQuestionsModelList[index]); }
} else { });
widget.selectedQuestions },
.add(model.triageQuestionsModelList[index]); child: Container(
} margin: EdgeInsets.only(bottom: 10.0),
}); child: Row(
}, children: [
child: Row( Checkbox(
children: [ value: widget.selectedQuestions.contains(model.triageQuestionsModelList[index]),
Checkbox( activeColor: Color(0xffD02127),
value: widget.selectedQuestions.contains(model.triageQuestionsModelList[index]), tristate: false,
activeColor: Colors.red[800], materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
onChanged: (bool newValue) { onChanged: (bool newValue) {
setState(() { setState(() {
if (widget.selectedQuestions if (widget.selectedQuestions.contains(model.triageQuestionsModelList[index])) {
.contains(model.triageQuestionsModelList[index])) { widget.selectedQuestions.remove(model.triageQuestionsModelList[index]);
widget.selectedQuestions } else {
.remove(model.triageQuestionsModelList[index]); widget.selectedQuestions.add(model.triageQuestionsModelList[index]);
} else { }
widget.selectedQuestions });
.add(model.triageQuestionsModelList[index]); }),
} SizedBox(width: 6),
}); Expanded(
}), child: Text(
Expanded( model.triageQuestionsModelList[index].question,
child: Padding( overflow: TextOverflow.clip,
padding: const EdgeInsets.all(20.0), style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64),
child: Texts(
model.triageQuestionsModelList[index].question,
fontSize: 15,
),
),
), ),
], ),
), ],
), ),
),
),
), ),
SizedBox(height: 80,) SizedBox(
height: 120,
)
], ],
), ),
), ),
bottomSheet: Padding( bottomSheet: Container(
padding: const EdgeInsets.all(8.0), color: CustomColors.appBackgroudGreyColor,
child: Container( child: Container(
height: 56, color: CustomColors.appBackgroudGreyColor,
margin: EdgeInsets.all(14),
height: 45.0,
child: Row( child: Row(
children: [ mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Expanded( Expanded(
child: Container( flex: 1,
margin: EdgeInsets.only(left: 5,right: 5), child: ButtonTheme(
child: SecondaryButton( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
height: 45.0,
child: RaisedButton(
color: new Color(0xffc5272d),
textColor: Colors.white, textColor: Colors.white,
color: Theme.of(context).primaryColor, elevation: 0,
label: TranslationBase.of(context).back.toUpperCase(), disabledTextColor: Colors.white,
onTap: () => widget.changePageViewIndex(1), disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
widget.changePageViewIndex(0);
},
child: Text(TranslationBase.of(context).back, style: TextStyle(fontSize: 16.0)),
), ),
), ),
), ),
SizedBox(width: 10,), mWidth(7),
Expanded( Expanded(
child: Container( flex: 1,
margin: EdgeInsets.only(left: 5,right: 5), child: ButtonTheme(
child: SecondaryButton( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
height: 45.0,
child: RaisedButton(
color: CustomColors.green,
textColor: Colors.white, textColor: Colors.white,
color: Theme.of(context).primaryColor, elevation: 0,
label: TranslationBase.of(context).next.toUpperCase(), disabledTextColor: Colors.white,
disabled: widget.selectedQuestions.isEmpty, disabledColor: new Color(0xFFbcc2c4),
onTap: () => widget.changePageViewIndex(3), onPressed: widget.selectedQuestions.isEmpty
? null
: () {
GifLoaderDialogUtils.showMyDialog(context);
model
.saveQuestionsInformation(
chiefComplaint: "", notes: "", selectedQuestions: widget.selectedQuestions, projectId: widget.selectedHospital.iD, selectedTime: DateTime.now())
.then((value) {
GifLoaderDialogUtils.hideDialog(context);
if (model.state == ViewState.ErrorLocal)
AppToast.showErrorToast(message: model.error);
else {
widget.changePageViewIndex(4);
}
}).catchError((onError) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: onError.toString());
});
// widget.changePageViewIndex(4);
},
child: Text(TranslationBase.of(context).next, style: TextStyle(fontSize: 16.0)),
), ),
), ),
), ),
], ],
), ),
), ),
), ),
// Padding(
// padding: const EdgeInsets.all(8.0),
// child: Container(
// height: 56,
// child: Row(
// children: [
// Expanded(
// child: Container(
// margin: EdgeInsets.only(left: 5, right: 5),
// child: SecondaryButton(
// textColor: Colors.white,
// color: Theme.of(context).primaryColor,
// label: TranslationBase.of(context).back.toUpperCase(),
// onTap: () => widget.changePageViewIndex(1),
// ),
// ),
// ),
// SizedBox(
// width: 10,
// ),
// Expanded(
// child: Container(
// margin: EdgeInsets.only(left: 5, right: 5),
// child: SecondaryButton(
// textColor: Colors.white,
// color: Theme.of(context).primaryColor,
// label: TranslationBase.of(context).next.toUpperCase(),
// disabled: widget.selectedQuestions.isEmpty,
// onTap: () => widget.changePageViewIndex(3),
// ),
// ),
// ),
// ],
// ),
// ),
// ),
), ),
); );
} }

@ -7,7 +7,6 @@ import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -140,33 +139,23 @@ class _EdOnlineSelectedHospitalPageState extends State<EdOnlineSelectedHospitalP
], ],
), ),
), ),
DefaultButton(
TranslationBase.of(context).payNow.toUpperCase(),
(){},
// selectedProcList.length > 0 && getTotalValue() != "0.00"
// ? () {
// makePayment();
// }
// : null,
color: CustomColors.green,
disabledColor: CustomColors.grey2,
),
], ],
), ),
), ),
// bottomSheet: bottomSheet: Container(
// Container( color: CustomColors.appBackgroudGreyColor,
// height: 76, padding: EdgeInsets.all(12.0),
// child: Padding( child: DefaultButton(
// padding: const EdgeInsets.all(8.0), TranslationBase.of(context).next,
// child: SecondaryButton( (widget.triageInformationRequest.selectedHospital == null || _selected == 0)
// // textColor: Colors.white, ? null
// color: Theme.of(context).primaryColor, : () {
// label: TranslationBase.of(context).next.toUpperCase(), widget.changePageViewIndex(2);
// disabled: (widget.triageInformationRequest.selectedHospital == null || _selected == 0), },
// onTap: () => widget.changePageViewIndex(1)), color: CustomColors.green,
// ), disabledColor: CustomColors.grey2,
// ), ),
),
), ),
); );
} }

@ -7,12 +7,13 @@ import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.da
import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart'; import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -38,7 +39,7 @@ class _EdPaymentInformationPageState extends State<EdPaymentInformationPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
return BaseView<EdOnlineViewModel>( return BaseView<EdOnlineViewModel>(
onModelReady: (model) => model.getPatientPaymentInformation(), onModelReady: (model) async => await model.getPatientPaymentInformation(),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
body: SingleChildScrollView( body: SingleChildScrollView(
@ -46,75 +47,129 @@ class _EdPaymentInformationPageState extends State<EdPaymentInformationPage> {
child: Column( child: Column(
children: [ children: [
Container( Container(
decoration: BoxDecoration(borderRadius: BorderRadius.circular(10.0), color: Colors.white), decoration: cardRadius(12),
margin: EdgeInsets.fromLTRB(0.0, 30.0, 0.0, 5.0), margin: EdgeInsets.fromLTRB(12.0, 30.0, 12.0, 5.0),
padding: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 20.0), child: Padding(
child: Column( padding: const EdgeInsets.all(12.0),
children: <Widget>[ child: Column(
Container( crossAxisAlignment: CrossAxisAlignment.start,
alignment: Alignment.center, children: [
margin: EdgeInsets.only(left: 0.0, right: 20.0, top: 30.0), Text(TranslationBase.of(context).payment,
child: Text(TranslationBase.of(context).testFee, style: TextStyle(color: Colors.black, fontSize: 22.0, fontWeight: FontWeight.bold)), style: TextStyle(
), color: Colors.black,
if (model.erPatientShareModel != null) fontSize: 16.0,
Table( fontWeight: FontWeight.w600,
children: [ letterSpacing: -0.64,
TableRow(children: [ )),
TableCell(child: Texts(TranslationBase.of(context).testFee)), Container(
TableCell(child: Texts(model.erPatientShareModel.patientShare.toStringAsFixed(2))), width: double.infinity,
]), padding: EdgeInsets.only(top: 10, bottom: 3),
TableRow(children: [ child: Row(
TableCell(child: Texts(TranslationBase.of(context).patientTaxToDo)), children: [
TableCell(child: Texts(model.erPatientShareModel.patientTaxAmount.toStringAsFixed(2))), Expanded(
]), child: _getNormalText(TranslationBase.of(context).patientShareToDo),
TableRow(children: [ ),
TableCell(child: Texts(TranslationBase.of(context).patientShareTotalToDo)), Expanded(
TableCell(child: Texts(model.erPatientShareModel.patientShareWithTax.toStringAsFixed(2))), child: _getNormalText(model.erPatientShareModel.patientShare.toStringAsFixed(2) ?? "0", isBold: true),
]), )
], ],
),
), ),
], mDivider(Colors.grey[200]),
Container(
width: double.infinity,
padding: EdgeInsets.only(top: 3, bottom: 3),
child: Row(
children: [
Expanded(
child: _getNormalText(TranslationBase.of(context).patientTaxToDo),
),
Expanded(
child: _getNormalText(model.erPatientShareModel.patientTaxAmount.toStringAsFixed(2) ?? "0", isBold: true),
)
],
),
),
mDivider(Colors.grey[200]),
Container(
width: double.infinity,
padding: EdgeInsets.only(top: 3, bottom: 3),
child: Row(
children: [
Expanded(
child: _getNormalText(TranslationBase.of(context).patientShareTotalToDo),
),
Expanded(
child: _getNormalText(model.erPatientShareModel.patientShareWithTax.toStringAsFixed(2) ?? "0", isBold: true),
)
],
),
),
],
),
),
),
mHeight(50.0),
Text(
TranslationBase.of(context).payOptions,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 12.0,
fontWeight: FontWeight.w600,
letterSpacing: -0.46,
), ),
), ),
Container(margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0), child: getPaymentMethods()),
], ],
), ),
), ),
bottomSheet: Container( bottomSheet: Container(
height: 76, color: CustomColors.appBackgroudGreyColor,
child: Padding( padding: EdgeInsets.all(12.0),
padding: const EdgeInsets.all(8.0), child: DefaultButton(
child: SecondaryButton( TranslationBase.of(context).payNow.toUpperCase(),
color: Theme.of(context).primaryColor, () {
label: TranslationBase.of(context).next.toUpperCase(), Navigator.push(context, FadePage(page: PaymentMethod(
onTap: () { onSelectedMethod: (String metohd, [String selectedInstallmentPlan]) {
Navigator.push(context, FadePage(page: PaymentMethod( setState(() {});
onSelectedMethod: (String metohd, [String selectedInstallmentPlan]) { },
setState(() {}); ))).then(
}, (value) {
))).then( //TODO Haroun call API here
(value) { print(value);
//TODO Haroun call API here if (value != null) {
print(value); AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
if (value != null) { appo.projectID = widget.selectedHospital.iD;
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList(); openPayment(value[0], projectViewModel.user, model.erPatientShareModel.patientShareWithTax, appo);
appo.projectID = widget.selectedHospital.iD; }
openPayment(value[0], projectViewModel.user, model.erPatientShareModel.patientShareWithTax, appo); },
} );
}, },
); color: CustomColors.green,
}, disabledColor: CustomColors.grey2,
),
), ),
), ),
), ),
); );
} }
_getNormalText(text, {bool isBold = false}) {
return Text(
text,
style: TextStyle(
fontSize: isBold ? 12 : 10,
letterSpacing: -0.5,
color: isBold ? Colors.black : Colors.grey[700],
fontWeight: FontWeight.w600,
),
);
}
openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, double amount, AppoitmentAllHistoryResultList appo) { openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, double amount, AppoitmentAllHistoryResultList appo) {
browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart); browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart);
transID = Utils.getAdvancePaymentTransID(widget.selectedHospital.iD, projectViewModel.user.patientID); transID = Utils.getAdvancePaymentTransID(widget.selectedHospital.iD, projectViewModel.user.patientID);
browser.openPaymentBrowser(amount, "ER Online Check-In", transID, appo.projectID.toString(), browser.openPaymentBrowser(amount, "ER Online Check-In", transID, appo.projectID.toString(), authenticatedUser.emailAddress, paymentMethod, authenticatedUser.patientType,
authenticatedUser.emailAddress, paymentMethod, authenticatedUser.patientType, authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false, "3", ""); authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false, "3", "");
} }
onBrowserLoadStart(String url) { onBrowserLoadStart(String url) {
@ -163,13 +218,12 @@ class _EdPaymentInformationPageState extends State<EdPaymentInformationPage> {
}); });
} }
ER_createAdvancePayment(res, AppoitmentAllHistoryResultList appo) { ER_createAdvancePayment(payment_res, AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
String paymentReference = res['Fort_id'].toString();
GifLoaderDialogUtils.showMyDialog(AppGlobal.context); GifLoaderDialogUtils.showMyDialog(AppGlobal.context);
service.ER_createAdvancePayment(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], AppGlobal.context).then((res) { service.ER_createAdvancePayment(appo, appo.projectID.toString(), payment_res['Amount'], payment_res['Fort_id'], payment_res['PaymentMethod'], AppGlobal.context).then((res) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context); GifLoaderDialogUtils.hideDialog(AppGlobal.context);
ER_InsertEROnlinePaymentDetails(res, appo); ER_InsertEROnlinePaymentDetails(payment_res, appo);
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context); GifLoaderDialogUtils.hideDialog(AppGlobal.context);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);
@ -177,11 +231,13 @@ class _EdPaymentInformationPageState extends State<EdPaymentInformationPage> {
}); });
} }
ER_InsertEROnlinePaymentDetails(res, AppoitmentAllHistoryResultList appo) { ER_InsertEROnlinePaymentDetails(payment_res, AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(AppGlobal.context); GifLoaderDialogUtils.showMyDialog(AppGlobal.context);
service.ER_InsertEROnlinePaymentDetails(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], AppGlobal.context).then((res) { service.ER_InsertEROnlinePaymentDetails(appo, appo.projectID.toString(), payment_res['Amount'], payment_res['Fort_id'], payment_res['PaymentMethod'], AppGlobal.context).then((res) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context); GifLoaderDialogUtils.hideDialog(AppGlobal.context);
AppToast.showSuccessToast(message: TranslationBase.of(context).success);
Navigator.of(context).pop();
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context); GifLoaderDialogUtils.hideDialog(AppGlobal.context);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);

@ -404,7 +404,7 @@ class Signaling {
'to': session.remote_user?.id, 'to': session.remote_user?.id,
'from': session.local_user.id, 'from': session.local_user.id,
'candidate': { 'candidate': {
'sdpMLineIndex': candidate.sdpMlineIndex, 'sdpMLineIndex': candidate.sdpMLineIndex,
'sdpMid': candidate.sdpMid, 'sdpMid': candidate.sdpMid,
'candidate': candidate.candidate, 'candidate': candidate.candidate,
}, },

@ -1393,7 +1393,6 @@ class DoctorsListService extends BaseService {
"PatientOutSA": authUser.outSA, "PatientOutSA": authUser.outSA,
"PatientTypeID": authUser.patientType, "PatientTypeID": authUser.patientType,
"ERAdvanceAmount": { "ERAdvanceAmount": {
"AppointmentID": paymentReference,
"ProjectId": projectID, "ProjectId": projectID,
"PatientId": authUser.patientID, "PatientId": authUser.patientID,
"ClinicId": 10, "ClinicId": 10,
@ -1436,7 +1435,6 @@ class DoctorsListService extends BaseService {
"EROnlineCheckinPaymentDetails": { "EROnlineCheckinPaymentDetails": {
"CheckinDate": DateUtil.convertDateToString(DateTime.now()), "CheckinDate": DateUtil.convertDateToString(DateTime.now()),
"ExpectedArrivalTime": DateUtil.convertDateToString(DateTime.now()), "ExpectedArrivalTime": DateUtil.convertDateToString(DateTime.now()),
"AppointmentID": paymentReference,
"ProjectId": projectID, "ProjectId": projectID,
"PatientId": authUser.patientID, "PatientId": authUser.patientID,
"ClinicId": 10, "ClinicId": 10,

@ -44,6 +44,7 @@ class _SplashScreenState extends State<SplashScreen> {
AppSharedPreferences().getAll().then((value){ AppSharedPreferences().getAll().then((value){
debugPrint("ALL SHARED PREFERENCES!!!!!");
debugPrint(jsonEncode(value)); debugPrint(jsonEncode(value));
}); });
} }

@ -53,7 +53,7 @@ class DateUtil {
static String convertDateToString(DateTime date) { static String convertDateToString(DateTime date) {
const start = "/Date("; const start = "/Date(";
const end = "+0300)"; const end = "+0300)/";
int milliseconds = date.millisecondsSinceEpoch; int milliseconds = date.millisecondsSinceEpoch;
return start + "$milliseconds" + end; return start + "$milliseconds" + end;

@ -271,8 +271,6 @@ class PushNotificationHandler {
FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) async { FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) async {
print("Firebase onMessageOpenedApp!!!"); print("Firebase onMessageOpenedApp!!!");
// Utils.showPermissionConsentDialog(context, "onMessageOpenedApp", (){});
// newMessage(message);
if (Platform.isIOS) if (Platform.isIOS)
await Future.delayed(Duration(milliseconds: 3000)).then((value) { await Future.delayed(Duration(milliseconds: 3000)).then((value) {
newMessage(message); newMessage(message);
@ -282,9 +280,15 @@ class PushNotificationHandler {
}); });
FirebaseMessaging.instance.onTokenRefresh.listen((fcm_token) { FirebaseMessaging.instance.onTokenRefresh.listen((fcm_token) {
print("Push Notification onTokenRefresh: " + fcm_token);
onToken(fcm_token); onToken(fcm_token);
}); });
FirebaseMessaging.instance.getToken(vapidKey: 'BHRJG8sIzcysWxPw3B6xQjz_85nUuCfU6EAmpH18kyUTmB2cj35IdFwCyWSab80SA1v6oBSWVh-p6PcHPw_y00Y').then((String token){
print("Push Notification getToken: " + token);
onToken(token);
});
FirebaseMessaging.onBackgroundMessage(backgroundMessageHandler); FirebaseMessaging.onBackgroundMessage(backgroundMessageHandler);
} }
} }

@ -33,13 +33,13 @@ 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 LIVE
static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWeb/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWeb/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 PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT
static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store // static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store
// static String PRESCRIPTION_PAYMENT_WITH_ORDERID = // static String PRESCRIPTION_PAYMENT_WITH_ORDERID =
// 'https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID='; // 'https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID=';
@ -162,7 +162,7 @@ class MyInAppBrowser extends InAppBrowser {
applePayInsertRequest.customerEmail = emailId; applePayInsertRequest.customerEmail = emailId;
applePayInsertRequest.customerID = authenticatedUser.patientID; applePayInsertRequest.customerID = authenticatedUser.patientID;
applePayInsertRequest.customerName = authenticatedUser.firstName; applePayInsertRequest.customerName = authenticatedUser.firstName;
applePayInsertRequest.deviceToken = await sharedPref.getString(PUSH_TOKEN); applePayInsertRequest.deviceToken = await AppSharedPreferences().getString(PUSH_TOKEN);
applePayInsertRequest.doctorID = (doctorID != null && doctorID != "") ? doctorID : 0; applePayInsertRequest.doctorID = (doctorID != null && doctorID != "") ? doctorID : 0;
applePayInsertRequest.projectID = projId; applePayInsertRequest.projectID = projId;
applePayInsertRequest.serviceID = servID; applePayInsertRequest.serviceID = servID;

Loading…
Cancel
Save