Merge branch 'Haroon' into 'development'

Haroon

See merge request Cloud_Solution/diplomatic-quarter!253
merge-update-with-lab-changes
Mohammad Aljammal 5 years ago
commit f0ee9db952

@ -10,6 +10,7 @@
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.ACTIVITY_RECOGNITION" />
<uses-permission android:name="android.permission.VIBRATE" /> <uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.CAMERA" />

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

@ -231,6 +231,8 @@ const SEND_LIVECARE_INVOICE_EMAIL = 'Services/Notifications.svc/REST/SendInvoice
const GET_USER_TERMS = 'Services/Patients.svc/REST/GetUserTermsAndConditions'; const GET_USER_TERMS = 'Services/Patients.svc/REST/GetUserTermsAndConditions';
const UPDATE_HEALTH_TERMS = 'services/Patients.svc/REST/UpdatePateintHealthSummaryReport'; const UPDATE_HEALTH_TERMS = 'services/Patients.svc/REST/UpdatePateintHealthSummaryReport';
const GET_PATIENT_HEALTH_STATS = 'Services/Patients.svc/REST/Med_GetTransactionsSts';
//URL to get medicine and pharmacies list //URL to get medicine and pharmacies list
const CHANNEL = 3; const CHANNEL = 3;
const GENERAL_ID = 'Cs2020@2016\$2958'; const GENERAL_ID = 'Cs2020@2016\$2958';

@ -1625,5 +1625,13 @@ const Map localizedValues = {
"en": "To view the terms and conditions", "en": "To view the terms and conditions",
"ar": "لعرض الشروط والأحكام" "ar": "لعرض الشروط والأحكام"
}, },
"WalkinAppo": {
"en": "Hospital Visit Appointment",
"ar": "موعد زيارة للمستشفى"
},
"videoAppo": {
"en": "Video Call Appointment",
"ar": "موعد اتصال فيديو"
},
// "visit": {"en" : "Visit", "ar": "الزيارة"}, // "visit": {"en" : "Visit", "ar": "الزيارة"},
}; };

@ -0,0 +1,8 @@
class healthData {
int MedCategoryID;
int MedSubCategoryID;
String Value;
String Notes;
String MachineDate;
int TransactionsListID;
}

@ -0,0 +1,36 @@
class YearlyStepsResModel {
double valueSum;
int medCategoryID;
int month;
String monthName;
int patientID;
int year;
YearlyStepsResModel(
{this.valueSum,
this.medCategoryID,
this.month,
this.monthName,
this.patientID,
this.year});
YearlyStepsResModel.fromJson(Map<String, dynamic> json) {
valueSum = json['ValueSum'];
medCategoryID = json['MedCategoryID'];
month = json['Month'];
monthName = json['MonthName'];
patientID = json['PatientID'];
year = json['Year'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ValueSum'] = this.valueSum;
data['MedCategoryID'] = this.medCategoryID;
data['Month'] = this.month;
data['MonthName'] = this.monthName;
data['PatientID'] = this.patientID;
data['Year'] = this.year;
return data;
}
}

@ -2,7 +2,6 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart';
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
@ -166,7 +165,7 @@ class ConfirmPaymentPage extends StatelessWidget {
patientID: int.parse(advanceModel.fileNumber), patientID: int.parse(advanceModel.fileNumber),
projectID: advanceModel.hospitalsModel.iD) projectID: advanceModel.hospitalsModel.iD)
.then((value) { .then((value) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (model.state != ViewState.ErrorLocal && if (model.state != ViewState.ErrorLocal &&
model.state != ViewState.Error) showSMSDialog(); model.state != ViewState.Error) showSMSDialog();
}); });
@ -218,7 +217,8 @@ class ConfirmPaymentPage extends StatelessWidget {
authenticatedUser.firstName, authenticatedUser.firstName,
authenticatedUser.patientID, authenticatedUser.patientID,
authenticatedUser, authenticatedUser,
browser); browser,
false);
} }
onBrowserLoadStart(String url) { onBrowserLoadStart(String url) {
@ -277,8 +277,8 @@ class ConfirmPaymentPage extends StatelessWidget {
String paymentReference = res['Fort_id'].toString(); String paymentReference = res['Fort_id'].toString();
GifLoaderDialogUtils.showMyDialog(AppGlobal.context); GifLoaderDialogUtils.showMyDialog(AppGlobal.context);
service service
.createAdvancePayment(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'], .createAdvancePayment(appo, appo.projectID.toString(), res['Amount'],
res['PaymentMethod'], AppGlobal.context) res['Fort_id'], res['PaymentMethod'], AppGlobal.context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context); GifLoaderDialogUtils.hideDialog(AppGlobal.context);
print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']); print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']);
@ -315,5 +315,4 @@ class ConfirmPaymentPage extends StatelessWidget {
Future navigateToHome(context) async { Future navigateToHome(context) async {
Navigator.of(context).pushNamed(HOME); Navigator.of(context).pushNamed(HOME);
} }
} }

@ -187,27 +187,29 @@ class _BookConfirmState extends State<BookConfirm> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: <Widget>[ children: <Widget>[
Row( !widget.isLiveCareAppointment ? Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Container( Container(
margin: EdgeInsets.fromLTRB(5.0, 0.0, 5.0, 0.0), margin:
child: Image.asset( EdgeInsets.fromLTRB(5.0, 0.0, 5.0, 0.0),
"assets/images/new-design/icon_hospital.png"), child: Image.asset(
), "assets/images/new-design/icon_hospital.png"),
Container( ),
margin: EdgeInsets.fromLTRB(20.0, 5.0, 10.0, 5.0), Container(
child: Text( margin:
TranslationBase.of(context).hospital + EdgeInsets.fromLTRB(20.0, 5.0, 10.0, 5.0),
": " + child: Text(
widget.doctor.projectName, TranslationBase.of(context).hospital +
style: TextStyle( ": " +
fontSize: 14.0, widget.doctor.projectName,
color: Colors.grey[700], style: TextStyle(
letterSpacing: 1.0)), fontSize: 14.0,
), color: Colors.grey[700],
], letterSpacing: 1.0)),
), ),
],
) : Container(),
Row( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
@ -325,7 +327,8 @@ class _BookConfirmState extends State<BookConfirm> {
Container( Container(
margin: EdgeInsets.only(top: 5.0), margin: EdgeInsets.only(top: 5.0),
child: Text( child: Text(
TranslationBase.of(context).gender + ": " + TranslationBase.of(context).gender +
": " +
widget.authUser.genderDescription, widget.authUser.genderDescription,
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
@ -335,7 +338,9 @@ class _BookConfirmState extends State<BookConfirm> {
Container( Container(
margin: EdgeInsets.only(top: 5.0, bottom: 3.0), margin: EdgeInsets.only(top: 5.0, bottom: 3.0),
child: Text( child: Text(
TranslationBase.of(context).age + ": " + widget.authUser.age.toString(), TranslationBase.of(context).age +
": " +
widget.authUser.age.toString(),
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
color: Colors.grey[600], color: Colors.grey[600],
@ -423,7 +428,8 @@ class _BookConfirmState extends State<BookConfirm> {
context) context)
.then((res) { .then((res) {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess); AppToast.showSuccessToast(
message: TranslationBase.of(context).bookedSuccess);
print(res['AppointmentNo']); print(res['AppointmentNo']);
Future.delayed(new Duration(milliseconds: 500), () { Future.delayed(new Duration(milliseconds: 500), () {
@ -543,13 +549,13 @@ class _BookConfirmState extends State<BookConfirm> {
getLiveCareAppointmentPatientShare(context, String appointmentNo, getLiveCareAppointmentPatientShare(context, String appointmentNo,
int clinicID, int projectID, DoctorList docObject) { int clinicID, int projectID, DoctorList docObject) {
GifLoaderDialogUtils.hideDialog(context);
widget.service widget.service
.getLiveCareAppointmentPatientShare( .getLiveCareAppointmentPatientShare(
appointmentNo, clinicID, projectID, context) appointmentNo, clinicID, projectID, context)
.then((res) { .then((res) {
print(res); print(res);
widget.patientShareResponse = new PatientShareResponse.fromJson(res); widget.patientShareResponse = new PatientShareResponse.fromJson(res);
GifLoaderDialogUtils.hideDialog(context);
navigateToBookSuccess(context, docObject, widget.patientShareResponse); navigateToBookSuccess(context, docObject, widget.patientShareResponse);
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);

@ -255,7 +255,7 @@ class _BookSuccessState extends State<BookSuccess> {
minWidth: MediaQuery.of(context).size.width * 0.7, minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0, height: 45.0,
child: RaisedButton( child: RaisedButton(
color: new Color(0xFF40ACC9), color: new Color(0xffc5272d),
textColor: Colors.white, textColor: Colors.white,
disabledTextColor: Colors.white, disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4), disabledColor: new Color(0xFFbcc2c4),
@ -318,7 +318,7 @@ class _BookSuccessState extends State<BookSuccess> {
minWidth: MediaQuery.of(context).size.width * 0.7, minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0, height: 45.0,
child: RaisedButton( child: RaisedButton(
color: new Color(0xFF40ACC9), color: new Color(0xFFc5272d),
textColor: Colors.white, textColor: Colors.white,
disabledTextColor: Colors.white, disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4), disabledColor: new Color(0xFFbcc2c4),
@ -637,7 +637,12 @@ class _BookSuccessState extends State<BookSuccess> {
authenticatedUser.firstName, authenticatedUser.firstName,
authenticatedUser.patientID, authenticatedUser.patientID,
authenticatedUser, authenticatedUser,
widget.browser); widget.browser,
widget.patientShareResponse.isLiveCareAppointment,
widget.patientShareResponse.appointmentDate,
widget.patientShareResponse.appointmentNo,
widget.patientShareResponse.clinicID,
widget.patientShareResponse.doctorID);
} }
} }

@ -61,7 +61,7 @@ class DoctorView extends StatelessWidget {
letterSpacing: 1.0)), letterSpacing: 1.0)),
Container( Container(
margin: EdgeInsets.only(top: 3.0), margin: EdgeInsets.only(top: 3.0),
child: Text(this.doctor.clinicName, child: Text(this.doctor.clinicName != null ? this.doctor.clinicName : "",
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
color: Colors.grey[600], color: Colors.grey[600],

@ -9,6 +9,7 @@ import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.da
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.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/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -469,9 +470,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
} }
bookCovidTestAppointment() { bookCovidTestAppointment() {
// Navigator.push(context, GifLoaderDialogUtils.showMyDialog(context);
// MaterialPageRoute(builder: (context) => CovidPaymentAlert()));
DoctorList docObject = new DoctorList(); DoctorList docObject = new DoctorList();
docObject.doctorID = widget.selectedDoctorID; docObject.doctorID = widget.selectedDoctorID;
docObject.clinicID = widget.selectedClinicID; docObject.clinicID = widget.selectedClinicID;
@ -494,11 +493,12 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
print(res); print(res);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: "Appointment Booked Successfully"); AppToast.showSuccessToast(message: "Appointment Booked Successfully");
Future.delayed(new Duration(milliseconds: 1800), () { // Future.delayed(new Duration(milliseconds: 1800), () {
getPatientShare(context, res['AppointmentNo'], docObject.clinicID, getPatientShare(context, res['AppointmentNo'], docObject.clinicID,
docObject.projectID, docObject); docObject.projectID, docObject);
}); // });
} else { } else {
GifLoaderDialogUtils.hideDialog(context);
appo = new AppoitmentAllHistoryResultList(); appo = new AppoitmentAllHistoryResultList();
appo.appointmentNo = res['SameClinicApptList'][0]['AppointmentNo']; appo.appointmentNo = res['SameClinicApptList'][0]['AppointmentNo'];
appo.clinicID = res['SameClinicApptList'][0]['DoctorID']; appo.clinicID = res['SameClinicApptList'][0]['DoctorID'];
@ -529,14 +529,16 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
cancelAppointment(DoctorList docObject, AppoitmentAllHistoryResultList appo, cancelAppointment(DoctorList docObject, AppoitmentAllHistoryResultList appo,
BuildContext context) { BuildContext context) {
GifLoaderDialogUtils.showMyDialog(context);
ConfirmDialog.closeAlertDialog(context); ConfirmDialog.closeAlertDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service.cancelAppointment(appo, context).then((res) { service.cancelAppointment(appo, context).then((res) {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
Future.delayed(new Duration(milliseconds: 1500), () { // Future.delayed(new Duration(milliseconds: 1500), () {
insertAppointmentCovidTest(context, docObject); insertAppointmentCovidTest(context, docObject);
}); // });
} else { } else {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
@ -592,6 +594,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
}); });
} else {} } else {}
} else { } else {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {

@ -166,7 +166,7 @@ class _ApointmentCardState extends State<AppointmentCard> {
), ),
Container( Container(
transform: transform:
Matrix4.translationValues(15.0, -40.0, 0.0), Matrix4.translationValues(15.0, -40.0, 0.0),
child: projectViewModel.isArabic child: projectViewModel.isArabic
? Image.asset( ? Image.asset(
"assets/images/new-design/arrow_menu_black-ar.png", "assets/images/new-design/arrow_menu_black-ar.png",

@ -13,7 +13,6 @@ import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/widgets/paymentDialog.dart'; import 'package:diplomaticquarterapp/pages/ToDoList/widgets/paymentDialog.dart';
import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
@ -26,7 +25,6 @@ import 'package:flutter/material.dart';
import 'package:flutter_countdown_timer/countdown_timer_controller.dart'; import 'package:flutter_countdown_timer/countdown_timer_controller.dart';
import 'package:flutter_countdown_timer/current_remaining_time.dart'; import 'package:flutter_countdown_timer/current_remaining_time.dart';
import 'package:flutter_countdown_timer/flutter_countdown_timer.dart'; import 'package:flutter_countdown_timer/flutter_countdown_timer.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:rating_bar/rating_bar.dart'; import 'package:rating_bar/rating_bar.dart';
@ -95,249 +93,315 @@ class _ToDoState extends State<ToDo> {
itemBuilder: (context, index) { itemBuilder: (context, index) {
return Container( return Container(
margin: EdgeInsets.all(10.0), margin: EdgeInsets.all(10.0),
child: Card( child: Column(
margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 8.0), children: [
color: Colors.white, Container(
shape: RoundedRectangleBorder( child: Card(
borderRadius: BorderRadius.circular(10), margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 8.0),
), color: Colors.white,
child: Container( shape: RoundedRectangleBorder(
width: MediaQuery.of(context).size.width, borderRadius: BorderRadius.circular(10),
padding: EdgeInsets.all(10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Row(
children: <Widget>[
Image.asset(
"assets/images/new-design/time_icon.png",
width: 20.0,
height: 20.0),
Container(
margin:
EdgeInsets.only(left: 10.0, right: 10.0),
child: Text(
DateUtil.getWeekDayMonthDayYearDateFormatted(
DateUtil.convertStringToDate(
widget.appoList[index]
.appointmentDate),
projectViewModel.isArabic
? "ar"
: "en") +
" " +
widget.appoList[index].startTime
.substring(0, 5),
style: TextStyle(fontSize: 10.0)),
),
widget.appoList[index].isLiveCareAppointment
? SvgPicture.asset(
"assets/images/new-design/liveCare_logo_icon.svg",
width: 20.0,
height: 20.0)
: Image.asset(
"assets/images/new-design/hospital_address_icon.png",
width: 20.0,
height: 20.0),
Container(
margin:
EdgeInsets.only(left: 5.0, right: 5.0),
child: widget
.appoList[index].isLiveCareAppointment
? Text(
TranslationBase.of(context)
.liveCareAppo,
style: TextStyle(fontSize: 12.0))
: Text(
widget.appoList[index].projectName !=
null
? widget
.appoList[index].projectName
: "-",
overflow: TextOverflow.clip,
maxLines: 2,
style: TextStyle(fontSize: 10.0)),
),
],
),
Container(
margin: EdgeInsets.only(top: 5.0),
child: Divider(
color: Colors.grey[500],
),
), ),
Flex( child: Container(
direction: Axis.horizontal, width: MediaQuery.of(context).size.width,
children: <Widget>[ padding: EdgeInsets.all(10.0),
Expanded( child: Column(
flex: 1, crossAxisAlignment: CrossAxisAlignment.start,
child: Container( mainAxisSize: MainAxisSize.max,
height: MediaQuery.of(context).size.height * children: <Widget>[
0.1, Row(
children: <Widget>[
Image.asset(
"assets/images/new-design/time_icon.png",
width: 20.0,
height: 20.0),
Container(
margin: EdgeInsets.only(
left: 10.0, right: 10.0),
child: Text(
DateUtil.getWeekDayMonthDayYearDateFormatted(
DateUtil.convertStringToDate(
widget.appoList[index]
.appointmentDate),
projectViewModel.isArabic
? "ar"
: "en") +
" " +
widget.appoList[index].startTime
.substring(0, 5),
style: TextStyle(fontSize: 10.0)),
),
!widget.appoList[index]
.isLiveCareAppointment
? Image.asset(
"assets/images/new-design/hospital_address_icon.png",
width: 20.0,
height: 20.0)
: Container(),
Container(
margin: EdgeInsets.only(
left: 5.0, right: 5.0),
child: widget.appoList[index]
.isLiveCareAppointment
? Container()
: Text(
widget.appoList[index]
.projectName !=
null
? widget.appoList[index]
.projectName
: "-",
overflow: TextOverflow.clip,
maxLines: 2,
style:
TextStyle(fontSize: 10.0)),
),
],
),
Container(
margin: EdgeInsets.only(top: 5.0), margin: EdgeInsets.only(top: 5.0),
child: ClipRRect( child: Divider(
borderRadius: color: Colors.grey[500],
BorderRadius.circular(100.0),
child: Image.network(
widget.appoList[index].doctorImageURL,
fit: BoxFit.fill),
), ),
), ),
), Flex(
Expanded( direction: Axis.horizontal,
flex: 3, children: <Widget>[
child: Container( Expanded(
margin: EdgeInsets.only( flex: 1,
top: 10.0, left: 20.0, right: 20.0), child: Container(
child: Column( height: MediaQuery.of(context)
crossAxisAlignment: .size
CrossAxisAlignment.start, .height *
children: <Widget>[ 0.1,
Text( margin: EdgeInsets.only(top: 5.0),
widget.appoList[index].doctorTitle + child: ClipRRect(
" " + borderRadius:
BorderRadius.circular(100.0),
child: Image.network(
widget.appoList[index] widget.appoList[index]
.doctorNameObj, .doctorImageURL,
style: TextStyle( fit: BoxFit.fill),
fontSize: 14.0, ),
color: Colors.black,
fontWeight: FontWeight.bold,
letterSpacing: 1.0)),
Container(
margin: EdgeInsets.only(
top: 3.0, bottom: 3.0),
child: Text(
getDoctorSpeciality(widget
.appoList[index]
.doctorSpeciality)
.trim(),
style: TextStyle(
fontSize: 12.0,
color: Colors.grey[600],
letterSpacing: 1.0)),
), ),
Row( ),
mainAxisAlignment: Expanded(
MainAxisAlignment.spaceBetween, flex: 3,
mainAxisSize: MainAxisSize.max, child: Container(
children: <Widget>[ margin: EdgeInsets.only(
RatingBar.readOnly( top: 10.0,
initialRating: widget left: 20.0,
.appoList[index] right: 20.0),
.actualDoctorRate child: Column(
.toDouble(), crossAxisAlignment:
size: 20.0, CrossAxisAlignment.start,
filledColor: Colors.yellow[700], children: <Widget>[
emptyColor: Colors.grey[500], Text(
isHalfAllowed: true, widget.appoList[index]
halfFilledIcon: Icons.star_half, .doctorTitle +
filledIcon: Icons.star, " " +
emptyIcon: Icons.star, widget.appoList[index]
), .doctorNameObj,
], style: TextStyle(
fontSize: 14.0,
color: Colors.black,
fontWeight:
FontWeight.bold,
letterSpacing: 1.0)),
Container(
margin: EdgeInsets.only(
top: 3.0, bottom: 3.0),
child: Text(
getDoctorSpeciality(widget
.appoList[index]
.doctorSpeciality)
.trim(),
style: TextStyle(
fontSize: 12.0,
color: Colors.grey[600],
letterSpacing: 1.0)),
),
Row(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
RatingBar.readOnly(
initialRating: widget
.appoList[index]
.actualDoctorRate
.toDouble(),
size: 20.0,
filledColor:
Colors.yellow[700],
emptyColor:
Colors.grey[500],
isHalfAllowed: true,
halfFilledIcon:
Icons.star_half,
filledIcon: Icons.star,
emptyIcon: Icons.star,
),
],
),
Container(
child: CountdownTimer(
controller: new CountdownTimerController(
endTime: DateTime.now()
.millisecondsSinceEpoch +
(widget
.appoList[
index]
.remaniningHoursTocanPay *
1000) *
60),
widgetBuilder: (_,
CurrentRemainingTime
time) {
return time != null
? Text(
'${time.days != null ? time.days : "0"}:${time.hours.toString().length == 1 ? "0" + time.hours.toString() : time.hours}:${time.min}:${time.sec} ' +
TranslationBase.of(
context)
.upcomingTimeLeft,
style: TextStyle(
fontSize: 12.0,
color: Color(
0xff40ACC9)))
: Container();
},
),
),
],
),
), ),
Container( ),
child: CountdownTimer( Expanded(
controller: new CountdownTimerController( flex: 1,
endTime: DateTime.now() child: InkWell(
.millisecondsSinceEpoch + onTap: () => performNextAction(
(widget.appoList[index] widget.appoList[index]),
.remaniningHoursTocanPay * child: Container(
1000) * margin: EdgeInsets.only(top: 20.0),
60), child: Column(
widgetBuilder: children: <Widget>[
(_, CurrentRemainingTime time) { Image.asset(
return time != null getNextActionImage(widget
? Text( .appoList[index]
'${time.days}:${time.hours}:${time.min}:${time.sec} ' + .nextAction),
TranslationBase.of( width: 50.0,
context) height: 50.0),
.upcomingTimeLeft, Container(
margin:
EdgeInsets.only(top: 5.0),
child: Text(
getNextActionText(widget
.appoList[index]
.nextAction),
textAlign:
TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0)),
color: Color( )
0xff40ACC9))) ],
: Container(); ),
},
), ),
), ),
], )
), ],
), ),
), Divider(
Expanded( color: Colors.grey[500],
flex: 1, ),
child: InkWell( Flex(
onTap: () => performNextAction( direction: Axis.horizontal,
widget.appoList[index]), children: <Widget>[
child: Container( Expanded(
margin: EdgeInsets.only(top: 20.0), flex: 2,
child: Column( child: Container(
children: <Widget>[ child: Text(
Image.asset( getNextActionDescription(widget
getNextActionImage(widget
.appoList[index].nextAction), .appoList[index].nextAction),
width: 50.0, style: TextStyle(
height: 50.0), fontSize: 12.0,
Container( color: Colors.grey[700])),
margin: EdgeInsets.only(top: 5.0), ),
child: Text(
getNextActionText(widget
.appoList[index]
.nextAction),
textAlign: TextAlign.center,
style:
TextStyle(fontSize: 12.0)),
)
],
), ),
), Expanded(
flex: 1,
child: GestureDetector(
onTap: () {
navigateToAppointmentDetails(
context,
widget.appoList[index]);
},
child: Container(
child: Text(
TranslationBase.of(context)
.upcomingDetails,
textAlign: TextAlign.end,
style: TextStyle(
fontSize: 12.0,
color:
new Color(0xFF40ACC9),
decoration: TextDecoration
.underline)),
),
),
)
],
), ),
) ],
], ),
),
Divider(
color: Colors.grey[500],
), ),
Flex( ),
direction: Axis.horizontal, ),
children: <Widget>[ Container(
Expanded( decoration: BoxDecoration(
flex: 2, borderRadius: BorderRadius.only(
child: Container( bottomLeft: Radius.circular(10.0),
child: Text( bottomRight: Radius.circular(10.0)),
getNextActionDescription( color: Color(0xff20bc44),
widget.appoList[index].nextAction), ),
style: TextStyle( height: 30.0,
fontSize: 12.0, margin: projectViewModel.isArabic ? EdgeInsets.fromLTRB(160.0, 0.0, 30.0, 0.0) : EdgeInsets.fromLTRB(30.0, 0.0, 160.0, 0.0),
color: Colors.grey[700])), transform: Matrix4.translationValues(0.0, -8.0, 0.0),
), child: Row(
), mainAxisAlignment: MainAxisAlignment.start,
Expanded( children: [
flex: 1, widget.appoList[index].isLiveCareAppointment
child: GestureDetector( ? Container(
onTap: () { margin: EdgeInsets.fromLTRB(
navigateToAppointmentDetails( 5.0, 0.0, 5.0, 0.0),
context, widget.appoList[index]); child: Image.asset(
}, "assets/images/new-design/video.png"),
child: Container( )
child: Text( : Container(
TranslationBase.of(context) margin: EdgeInsets.fromLTRB(
.upcomingDetails, 5.0, 0.0, 5.0, 0.0),
textAlign: TextAlign.end, child: Image.asset(
style: TextStyle( "assets/images/new-design/walkin.png"),
fontSize: 12.0,
color: new Color(0xFF40ACC9),
decoration:
TextDecoration.underline)),
), ),
), widget.appoList[index].isLiveCareAppointment
) ? Container(
], child: Text(TranslationBase.of(context).videoAppo,
), style: TextStyle(
], color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 12.0)),
)
: Container(
child: Text(TranslationBase.of(context).walkinAppo,
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 12.0)),
)
],
),
), ),
), ],
), ),
); );
}, },
@ -567,12 +631,34 @@ class _ToDoState extends State<ToDo> {
} }
getPatientShare(context, AppoitmentAllHistoryResultList appo) { getPatientShare(context, AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
if (appo.isLiveCareAppointment) {
getLiveCareAppointmentPatientShare(context, service, appo);
} else {
GifLoaderDialogUtils.showMyDialog(context);
service
.getPatientShare(appo.appointmentNo.toString(), appo.clinicID,
appo.projectID, context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
widget.patientShareResponse = new PatientShareResponse.fromJson(res);
openPaymentDialog(appo, widget.patientShareResponse);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err);
});
}
}
getLiveCareAppointmentPatientShare(context, DoctorsListService service,
AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context);
service service
.getPatientShare(appo.appointmentNo.toString(), appo.clinicID, .getLiveCareAppointmentPatientShare(appo.appointmentNo.toString(),
appo.projectID, context) appo.clinicID, appo.projectID, context)
.then((res) { .then((res) {
print(res);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
widget.patientShareResponse = new PatientShareResponse.fromJson(res); widget.patientShareResponse = new PatientShareResponse.fromJson(res);
openPaymentDialog(appo, widget.patientShareResponse); openPaymentDialog(appo, widget.patientShareResponse);
@ -674,7 +760,12 @@ class _ToDoState extends State<ToDo> {
authenticatedUser.firstName, authenticatedUser.firstName,
authenticatedUser.patientID, authenticatedUser.patientID,
authenticatedUser, authenticatedUser,
widget.browser); widget.browser,
appo.isLiveCareAppointment,
appo.appointmentDate,
appo.appointmentNo,
appo.clinicID,
appo.doctorID);
} }
onBrowserLoadStart(String url) { onBrowserLoadStart(String url) {

@ -197,7 +197,7 @@ class _TodoListCardState extends State<TodoListCard> {
), ),
) )
], ],
) ),
], ],
), ),
), ),

@ -326,6 +326,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
Permission.notification, Permission.notification,
Permission.accessMediaLocation, Permission.accessMediaLocation,
Permission.calendar, Permission.calendar,
Permission.activityRecognition
].request(); ].request();
var permissionsGranted = await deviceCalendarPlugin.hasPermissions(); var permissionsGranted = await deviceCalendarPlugin.hasPermissions();

@ -49,6 +49,7 @@ class _LiveCareHomeState extends State<LiveCareHome>
child: Column(children: [ child: Column(children: [
/// this is will not colored with theme data /// this is will not colored with theme data
TabBar( TabBar(
labelColor: Colors.black,
tabs: [ tabs: [
Tab(text: TranslationBase.of(context).consultation), Tab(text: TranslationBase.of(context).consultation),
Tab(text: TranslationBase.of(context).logs), Tab(text: TranslationBase.of(context).logs),

@ -21,7 +21,7 @@ class _ScheduleClinicCardState extends State<ScheduleClinicCard> {
return Container( return Container(
child: Card( child: Card(
margin: EdgeInsets.fromLTRB(15.0, 10.0, 15.0, 8.0), margin: EdgeInsets.fromLTRB(15.0, 10.0, 15.0, 8.0),
color: widget.isSelected ? Colors.blue : Colors.white, color: widget.isSelected ? Color(0xff06b806) : Colors.white,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10),
), ),
@ -35,8 +35,8 @@ class _ScheduleClinicCardState extends State<ScheduleClinicCard> {
Container( Container(
child: Text( child: Text(
widget.languageID == 'ar' widget.languageID == 'ar'
? widget.clinicsHaveScheduleList.clinicDescN ? widget.clinicsHaveScheduleList.clinicDescN != null ? widget.clinicsHaveScheduleList.clinicDescN: ""
: widget.clinicsHaveScheduleList.clinicDesc, : widget.clinicsHaveScheduleList.clinicDesc != null ? widget.clinicsHaveScheduleList.clinicDesc: "Dermatology",
style: TextStyle( style: TextStyle(
fontSize: 16.0, fontSize: 16.0,
color: color:

@ -42,10 +42,11 @@ class _LiveCareHistoryCardState extends State<LiveCareHistoryCard> {
), ),
child: Container( child: Container(
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height * 0.22, // height: MediaQuery.of(context).size.height * 0.22,
padding: EdgeInsets.all(10.0), padding: EdgeInsets.all(10.0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
Text("Requested date:", Text("Requested date:",
style: style:

@ -283,7 +283,8 @@ class _clinic_listState extends State<ClinicList> {
authenticatedUser.firstName, authenticatedUser.firstName,
authenticatedUser.patientID, authenticatedUser.patientID,
authenticatedUser, authenticatedUser,
browser); browser,
false);
} }
onBrowserLoadStart(String url) { onBrowserLoadStart(String url) {

@ -225,7 +225,8 @@ class ConfirmPaymentPage extends StatelessWidget {
advanceModel.patientName, advanceModel.patientName,
advanceModel.fileNumber, advanceModel.fileNumber,
authenticatedUser, authenticatedUser,
browser); browser,
false);
} }
onBrowserLoadStart(String url) { onBrowserLoadStart(String url) {

@ -0,0 +1,248 @@
import 'package:charts_flutter/flutter.dart' as charts;
import 'package:diplomaticquarterapp/models/SmartWatch/YearlyStepsResModel.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
class StepsTracker extends StatefulWidget {
@override
_StepsTrackerState createState() => _StepsTrackerState();
}
class _StepsTrackerState extends State<StepsTracker>
with SingleTickerProviderStateMixin {
TabController _tabController;
int weeklyStatsAvgValue = 0;
int monthlyStatsAvgValue = 0;
int yearlyStatsAvgValue = 0;
int avgStepsValue = 0;
int dataLength = 0;
List<YearlyStepsResModel> yearlyStepsList = List();
List<TimeSeriesSales> yearlyTimeSeriesData = [];
bool isDataLoaded = false;
@override
void initState() {
_tabController = new TabController(length: 3, vsync: this);
WidgetsBinding.instance.addPostFrameCallback((_) {
getYearlyStepsData();
});
super.initState();
}
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: "Steps",
isShowDecPage: false,
body: Container(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
TabBar(
tabs: [
Tab(text: TranslationBase.of(context).weekly),
Tab(text: TranslationBase.of(context).monthly),
Tab(text: TranslationBase.of(context).yearly),
],
controller: _tabController,
),
Expanded(
child: new TabBarView(
physics: NeverScrollableScrollPhysics(),
children: [
isDataLoaded ? getWeeklyStepsDetails() : Container(),
isDataLoaded ? getMonthlyStepsDetails() : Container(),
isDataLoaded ? getYearlyStepsDetails() : Container()
],
controller: _tabController,
),
),
],
),
),
);
}
getYearlyStepsData() {
avgStepsValue = 0;
dataLength = 0;
DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service.getPatientHealthDataStats(6, 3, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res['Med_GetYearStepsTransactionsStsList']);
yearlyStepsList.clear();
res['Med_GetYearStepsTransactionsStsList'].forEach((element) {
yearlyStepsList.add(new YearlyStepsResModel.fromJson(element));
if (element['ValueSum'] != null) {
double value = element['ValueSum'];
avgStepsValue += value.toInt();
dataLength++;
}
});
print(avgStepsValue);
print(dataLength);
setState(() {
yearlyStatsAvgValue = avgStepsValue ~/ dataLength;
isDataLoaded = true;
});
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
// AppToast.showErrorToast(message: err);
print(err);
});
}
generateData() {
if (yearlyStepsList.length > 0) {
yearlyTimeSeriesData.clear();
yearlyStepsList.forEach(
(element) {
yearlyTimeSeriesData.add(
TimeSeriesSales(
new DateTime(element.year, element.month, 1),
element.valueSum != null ? element.valueSum.toInt() : 0,
),
);
},
);
yearlyTimeSeriesData.forEach((element) {
print(element.sales);
print(element.time);
});
}
return [
new charts.Series<TimeSeriesSales, DateTime>(
id: 'Sales',
colorFn: (_, __) => charts.MaterialPalette.red.shadeDefault,
domainFn: (TimeSeriesSales sales, _) => sales.time,
measureFn: (TimeSeriesSales sales, _) => sales.sales,
data: yearlyTimeSeriesData,
)
];
}
getWeeklyStepsDetails() {
return Container(
child: Text("Weekly"),
);
}
getMonthlyStepsDetails() {
return Container(
child: Text("Monthly"),
);
}
getYearlyStepsDetails() {
return Container(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Container(
child: AppTimeSeriesChart(
seriesList: generateData(),
chartName: "Steps",
startDate: DateTime(
yearlyStepsList[0].year, yearlyStepsList[0].month, 1),
endDate: DateTime(
yearlyStepsList[yearlyStepsList.length - 1].year,
yearlyStepsList[yearlyStepsList.length - 1].month,
1),
),
),
Container(
margin: EdgeInsets.only(top: 5.0),
child: Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
side: BorderSide(color: Colors.grey[400], width: 0.6)),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Container(
padding: EdgeInsets.fromLTRB(30.0, 15.0, 30.0, 15.0),
child:
Text("Average Steps", style: TextStyle(fontSize: 18.0)),
),
Container(
margin: EdgeInsets.only(bottom: 10.0),
child: Text(yearlyStatsAvgValue.toString() + " Steps",
style: TextStyle(
fontSize: 20.0, fontWeight: FontWeight.bold)),
),
],
),
),
),
Container(
margin: EdgeInsets.all(10.0),
child: Divider(
color: Colors.grey[500],
),
),
Container(
transform: Matrix4.translationValues(0.0, -10.0, 0.0),
margin: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 5.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text("History", style: TextStyle(fontSize: 14.0)),
Row(
children: [
Text("view more", style: TextStyle(fontSize: 14.0)),
Container(
margin: EdgeInsets.only(left: 3.0, right: 3.0),
transform: Matrix4.translationValues(0.0, 1.5, 0.0),
width: 30.0,
height: 30.0,
child: Image.asset(
"assets/images/new-design/view_more.png",
fit: BoxFit.contain),
),
],
),
],
),
),
Container(
margin: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 5.0),
child: Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
side: BorderSide(color: Colors.grey[400], width: 0.6)),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
padding: EdgeInsets.fromLTRB(30.0, 15.0, 30.0, 15.0),
child: Text("Date",
style: TextStyle(
fontSize: 18.0, fontWeight: FontWeight.bold)),
),
Container(
padding: EdgeInsets.fromLTRB(30.0, 0.0, 30.0, 0.0),
child: Text("Steps", style: TextStyle(fontSize: 18.0)),
),
],
),
),
),
],
),
);
}
}

@ -41,7 +41,8 @@ class DoctorsListService extends BaseService {
long = await this.sharedPref.getDouble(USER_LONG); long = await this.sharedPref.getDouble(USER_LONG);
} }
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
"LanguageID": languageID == 'ar' ? 1 : 2, "LanguageID": languageID == 'ar' ? 1 : 2,
@ -105,7 +106,8 @@ class DoctorsListService extends BaseService {
long = await this.sharedPref.getDouble(USER_LONG); long = await this.sharedPref.getDouble(USER_LONG);
} }
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
"LanguageID": languageID == 'ar' ? 1 : 2, "LanguageID": languageID == 'ar' ? 1 : 2,
@ -145,7 +147,8 @@ class DoctorsListService extends BaseService {
Future<Map> getDoctorsProfile( Future<Map> getDoctorsProfile(
int docID, int clinicID, int projectID, context) async { int docID, int clinicID, int projectID, context) async {
Map<String, dynamic> request; Map<String, dynamic> request;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
"LanguageID": languageID == 'ar' ? 1 : 2, "LanguageID": languageID == 'ar' ? 1 : 2,
@ -177,10 +180,10 @@ class DoctorsListService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
Future<Map> getDoctorsRating( Future<Map> getDoctorsRating(int docID, context) async {
int docID, context) async {
Map<String, dynamic> request; Map<String, dynamic> request;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
"LanguageID": languageID == 'ar' ? 1 : 2, "LanguageID": languageID == 'ar' ? 1 : 2,
@ -203,17 +206,17 @@ class DoctorsListService extends BaseService {
await baseAppClient.post(GET_DOCTOR_RATING_NOTES, await baseAppClient.post(GET_DOCTOR_RATING_NOTES,
onSuccess: (response, statusCode) async { onSuccess: (response, statusCode) async {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error; throw error;
}, body: request); }, body: request);
return Future.value(localRes); return Future.value(localRes);
} }
Future<Map> getDoctorsRatingDetails( Future<Map> getDoctorsRatingDetails(int docID, context) async {
int docID, context) async {
Map<String, dynamic> request; Map<String, dynamic> request;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
"LanguageID": languageID == 'ar' ? 1 : 2, "LanguageID": languageID == 'ar' ? 1 : 2,
@ -236,17 +239,18 @@ class DoctorsListService extends BaseService {
await baseAppClient.post(GET_DOCTOR_RATING_DETAILS, await baseAppClient.post(GET_DOCTOR_RATING_DETAILS,
onSuccess: (response, statusCode) async { onSuccess: (response, statusCode) async {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error; throw error;
}, body: request); }, body: request);
return Future.value(localRes); return Future.value(localRes);
} }
Future<Map> getDoctorFreeSlots( Future<Map> getDoctorFreeSlots(
int docID, int clinicID, int projectID, BuildContext context) async { int docID, int clinicID, int projectID, BuildContext context) async {
Map<String, dynamic> request; Map<String, dynamic> request;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
"DoctorID": docID, "DoctorID": docID,
@ -281,7 +285,8 @@ class DoctorsListService extends BaseService {
Future<Map> getDoctorScheduledFreeSlots(int docID, int clinicID, Future<Map> getDoctorScheduledFreeSlots(int docID, int clinicID,
int projectID, int serviceID, BuildContext context) async { int projectID, int serviceID, BuildContext context) async {
Map<String, dynamic> request; Map<String, dynamic> request;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
"DoctorID": docID, "DoctorID": docID,
@ -324,7 +329,8 @@ class DoctorsListService extends BaseService {
authUser = data; authUser = data;
} }
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
"IsForLiveCare": false, "IsForLiveCare": false,
@ -383,7 +389,8 @@ class DoctorsListService extends BaseService {
authUser = data; authUser = data;
} }
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
"IsForLiveCare": true, "IsForLiveCare": true,
@ -437,7 +444,8 @@ class DoctorsListService extends BaseService {
authUser = data; authUser = data;
} }
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
@ -481,7 +489,8 @@ class DoctorsListService extends BaseService {
authUser = data; authUser = data;
} }
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
@ -526,7 +535,8 @@ class DoctorsListService extends BaseService {
authUser = data; authUser = data;
} }
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
@ -560,7 +570,8 @@ class DoctorsListService extends BaseService {
Future<Map> getPatientAppointmentCurfewHistory( Future<Map> getPatientAppointmentCurfewHistory(
bool isActiveAppointment) async { bool isActiveAppointment) async {
Map<String, dynamic> request; Map<String, dynamic> request;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
@ -601,7 +612,8 @@ class DoctorsListService extends BaseService {
authUser = data; authUser = data;
} }
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
@ -654,7 +666,8 @@ class DoctorsListService extends BaseService {
long = await this.sharedPref.getDouble(USER_LONG); long = await this.sharedPref.getDouble(USER_LONG);
} }
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
@ -701,7 +714,8 @@ class DoctorsListService extends BaseService {
authUser = data; authUser = data;
} }
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
@ -751,7 +765,8 @@ class DoctorsListService extends BaseService {
authUser = data; authUser = data;
} }
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
@ -802,7 +817,8 @@ class DoctorsListService extends BaseService {
authUser = data; authUser = data;
} }
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
@ -847,7 +863,8 @@ class DoctorsListService extends BaseService {
await this.sharedPref.getObject(USER_PROFILE)); await this.sharedPref.getObject(USER_PROFILE));
authUser = data; authUser = data;
} }
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
"ClientRequestID": transactionID, "ClientRequestID": transactionID,
@ -886,7 +903,8 @@ class DoctorsListService extends BaseService {
await this.sharedPref.getObject(USER_PROFILE)); await this.sharedPref.getObject(USER_PROFILE));
authUser = data; authUser = data;
} }
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
"AdvanceNumber": advanceNumber, "AdvanceNumber": advanceNumber,
@ -923,7 +941,8 @@ class DoctorsListService extends BaseService {
await this.sharedPref.getObject(USER_PROFILE)); await this.sharedPref.getObject(USER_PROFILE));
authUser = data; authUser = data;
} }
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
"IsForAskYourDoctor": true, "IsForAskYourDoctor": true,
@ -963,7 +982,8 @@ class DoctorsListService extends BaseService {
await this.sharedPref.getObject(USER_PROFILE)); await this.sharedPref.getObject(USER_PROFILE));
authUser = data; authUser = data;
} }
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
"VersionID": req.VersionID, "VersionID": req.VersionID,
@ -999,7 +1019,8 @@ class DoctorsListService extends BaseService {
await this.sharedPref.getObject(USER_PROFILE)); await this.sharedPref.getObject(USER_PROFILE));
authUser = data; authUser = data;
} }
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
@ -1058,7 +1079,8 @@ class DoctorsListService extends BaseService {
await this.sharedPref.getObject(USER_PROFILE)); await this.sharedPref.getObject(USER_PROFILE));
authUser = data; authUser = data;
} }
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
"AppointmentNo": appoNo, "AppointmentNo": appoNo,
@ -1133,7 +1155,8 @@ class DoctorsListService extends BaseService {
await this.sharedPref.getObject(USER_PROFILE)); await this.sharedPref.getObject(USER_PROFILE));
authUser = data; authUser = data;
} }
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
"AppointmentNo": appo.appointmentNo, "AppointmentNo": appo.appointmentNo,
@ -1174,7 +1197,8 @@ class DoctorsListService extends BaseService {
await this.sharedPref.getObject(USER_PROFILE)); await this.sharedPref.getObject(USER_PROFILE));
authUser = data; authUser = data;
} }
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
"AppointmentDate": appoDate, "AppointmentDate": appoDate,
@ -1223,7 +1247,8 @@ class DoctorsListService extends BaseService {
await this.sharedPref.getObject(USER_PROFILE)); await this.sharedPref.getObject(USER_PROFILE));
authUser = data; authUser = data;
} }
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
"ProjectID": projectID, "ProjectID": projectID,
@ -1282,7 +1307,8 @@ class DoctorsListService extends BaseService {
await this.sharedPref.getObject(USER_PROFILE)); await this.sharedPref.getObject(USER_PROFILE));
authUser = data; authUser = data;
} }
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
@ -1320,4 +1346,42 @@ class DoctorsListService extends BaseService {
}, body: request); }, body: request);
return Future.value(localRes); return Future.value(localRes);
} }
Future<Map> getPatientHealthDataStats(
int medCategoryId, int medCategoryStsId, BuildContext context) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"MedCategoryID": medCategoryId,
"MedGetStsID": medCategoryStsId,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
"SessionID": "YckwoXhUmWBsnHKEKig",
"isDentalAllowedBackend": false,
"DeviceTypeID": req.DeviceTypeID,
"PatientID": authUser.patientID,
"TokenID": "@dm!n",
"PatientTypeID": authUser.patientType,
"PatientType": authUser.patientType
};
dynamic localRes;
await baseAppClient.post(GET_PATIENT_HEALTH_STATS,
onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
} }

@ -1375,6 +1375,9 @@ class TranslationBase {
localizedValues["bloodD-enter-desc"][locale.languageCode]; localizedValues["bloodD-enter-desc"][locale.languageCode];
String get viewTermsConditions => String get viewTermsConditions =>
localizedValues["viewTermsConditions"][locale.languageCode]; localizedValues["viewTermsConditions"][locale.languageCode];
String get walkinAppo => localizedValues["WalkinAppo"][locale.languageCode];
String get videoAppo => localizedValues["videoAppo"][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -1,8 +1,6 @@
import 'dart:convert'; import 'dart:convert';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
@ -13,14 +11,14 @@ class MyInAppBrowser extends InAppBrowser {
// static String SERVICE_URL = // static String SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT // 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
static String SERVICE_URL = static String SERVICE_URL =
'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
// static String PREAUTH_SERVICE_URL = // static String PREAUTH_SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT // 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT
static String PREAUTH_SERVICE_URL = static String PREAUTH_SERVICE_URL =
'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store
static List<String> successURLS = [ static List<String> successURLS = [
'success', 'success',
@ -42,6 +40,9 @@ class MyInAppBrowser extends InAppBrowser {
String deviceToken; String deviceToken;
double lat = 0.0;
double long = 0.0;
static bool isPaymentDone = false; static bool isPaymentDone = false;
MyInAppBrowser({this.onExitCallback, this.appo, this.onLoadStartCallback}); MyInAppBrowser({this.onExitCallback, this.appo, this.onLoadStartCallback});
@ -98,6 +99,11 @@ class MyInAppBrowser extends InAppBrowser {
await this.sharedPref.getObject(USER_PROFILE)); await this.sharedPref.getObject(USER_PROFILE));
authUser = data; authUser = data;
} }
if (await this.sharedPref.getDouble(USER_LAT) != null &&
await this.sharedPref.getDouble(USER_LONG) != null) {
lat = await this.sharedPref.getDouble(USER_LAT);
long = await this.sharedPref.getDouble(USER_LONG);
}
} }
openPaymentBrowser( openPaymentBrowser(
@ -111,12 +117,33 @@ class MyInAppBrowser extends InAppBrowser {
String patientName, String patientName,
dynamic patientID, dynamic patientID,
AuthenticatedUser authenticatedUser, AuthenticatedUser authenticatedUser,
InAppBrowser browser) { InAppBrowser browser,
getDeviceToken(); bool isLiveCareAppo,
[var appoDate,
var appoNo,
var clinicID,
var doctorID]) {
this.browser = browser; this.browser = browser;
this.browser.openUrl( getPatientData();
url: generateURL(amount, orderDesc, transactionID, projId, emailId, generateURL(
paymentMethod, patientType, patientName, patientID, authenticatedUser)); amount,
orderDesc,
transactionID,
projId,
emailId,
paymentMethod,
patientType,
patientName,
patientID,
authenticatedUser,
isLiveCareAppo,
appoDate,
appoNo,
clinicID,
doctorID)
.then((value) {
this.browser.openUrl(url: value);
});
} }
openBrowser(String url) { openBrowser(String url) {
@ -124,7 +151,7 @@ class MyInAppBrowser extends InAppBrowser {
this.browser.openUrl(url: url); this.browser.openUrl(url: url);
} }
String generateURL( Future<String> generateURL(
double amount, double amount,
String orderDesc, String orderDesc,
String transactionID, String transactionID,
@ -135,18 +162,19 @@ class MyInAppBrowser extends InAppBrowser {
String patientName, String patientName,
dynamic patientID, dynamic patientID,
AuthenticatedUser authUser, AuthenticatedUser authUser,
[var patientData, bool isLiveCareAppo,
[var appoDate,
var appoNo,
var clinicID,
var doctorID,
var patientData,
var servID, var servID,
var LiveServID]) { var LiveServID]) async {
getPatientData(); getDeviceToken();
String currentLanguageID = getLanguageID() == 'ar' ? 'AR' : 'EN'; String currentLanguageID = getLanguageID() == 'ar' ? 'AR' : 'EN';
String form = getForm(); String form = isLiveCareAppo ? getLiveCareForm() : getForm();
// if (authUser != null) { form = form.replaceFirst("EMAIL_VALUE", emailId);
// form = form.replaceFirst("EMAIL_VALUE", authUser.emailAddress);
// } else {
form = form.replaceFirst("EMAIL_VALUE", emailId);
// }
form = form.replaceFirst('AMOUNT_VALUE', amount.toString()); form = form.replaceFirst('AMOUNT_VALUE', amount.toString());
form = form.replaceFirst('ORDER_DESCRIPTION_VALUE', orderDesc); form = form.replaceFirst('ORDER_DESCRIPTION_VALUE', orderDesc);
@ -157,12 +185,13 @@ class MyInAppBrowser extends InAppBrowser {
form = form.replaceFirst('LANG_VALUE', currentLanguageID); form = form.replaceFirst('LANG_VALUE', currentLanguageID);
form = form.replaceFirst('PATIENT_OUT_SA', form = form.replaceFirst('PATIENT_OUT_SA',
authUser.outSA == 0 ? false.toString() : true.toString()); authUser.outSA == 0 ? false.toString() : true.toString());
form = form.replaceFirst('PATIENT_TYPE_ID', form = form.replaceFirst(
patientData == null ? patientType.toString() : "1"); 'PATIENT_TYPE_ID', patientData == null ? patientType.toString() : "1");
// form = form.replaceFirst('DEVICE_TOKEN', this.cs.sharedService.getSharedData(AuthenticationService.DEVICE_TOKEN, false) + "," + this.cs.sharedService.getSharedData(AuthenticationService.APNS_TOKEN, false)); form = form.replaceFirst(
// form = form.replaceFirst('LATITUDE_VALUE', this.cs.sharedService.getSharedData('userLat', false)); 'DEVICE_TOKEN', await sharedPref.getString(PUSH_TOKEN));
// form = form.replaceFirst('LONGITUDE_VALUE', this.cs.sharedService.getSharedData('userLong', false)); form = form.replaceFirst('LATITUDE_VALUE', this.lat.toString());
form = form.replaceFirst('LONGITUDE_VALUE', this.long.toString());
if (servID == "4") if (servID == "4")
form = form.replaceFirst( form = form.replaceFirst(
@ -178,17 +207,16 @@ class MyInAppBrowser extends InAppBrowser {
form = form.replaceFirst('LIVE_SERVICE_ID', "2"); form = form.replaceFirst('LIVE_SERVICE_ID', "2");
} }
// if (patientData == null) { form = form.replaceFirst('CUSTNAME_VALUE', patientName);
form = form.replaceFirst('CUSTNAME_VALUE', patientName); form = form.replaceFirst('CUSTID_VALUE', patientID.toString());
form = form.replaceFirst('CUSTID_VALUE', patientID.toString());
// } else {
// form = form.replaceFirst('CUSTNAME_VALUE', patientData.depositorName);
// form = form.replaceFirst('CUSTID_VALUE', patientData.fileNumber);
// }
form = form.replaceFirst('LATITUDE_VALUE', "24.708488"); if (isLiveCareAppo) {
form = form.replaceFirst('LONGITUDE_VALUE', "46.665925"); form = form.replaceFirst('IS_SCHEDULE_VALUE', "true");
form = form.replaceFirst('DEVICE_TOKEN', DEVICE_TOKEN); form = form.replaceFirst('APPOINTMENT_DATE_VALUE', appoDate);
form = form.replaceFirst('APPOINTMENT_NO_VALUE', appoNo.toString());
form = form.replaceFirst('DOCTOR_ID_VALUE', doctorID.toString());
form = form.replaceFirst('CLINIC_ID_VALUE', clinicID.toString());
}
var bytes = utf8.encode(form); var bytes = utf8.encode(form);
var base64Str = base64.encode(bytes); var base64Str = base64.encode(bytes);
@ -228,6 +256,42 @@ class MyInAppBrowser extends InAppBrowser {
'</body>' + '</body>' +
'</html>'; '</html>';
} }
String getLiveCareForm() {
return '<html> ' +
'<head></head>' +
'<body>' +
'<form id="paymentForm" action="SERVICE_URL_VALUE" method="post">' +
'<input type="hidden" name="Amount" value="AMOUNT_VALUE">' +
'<input type="hidden" name="ProjID" value="PROJECT_ID_VALUE">' +
'<input type="hidden" name="IsSchedule" value="IS_SCHEDULE_VALUE">' +
'<input type="hidden" name="AppointmentDate" value="APPOINTMENT_DATE_VALUE">' +
'<input type="hidden" name="AppointmentNo" value="APPOINTMENT_NO_VALUE">' +
'<input type="hidden" name="DoctorID" value="DOCTOR_ID_VALUE">' +
'<input type="hidden" name="ClinicID" value="CLINIC_ID_VALUE">' +
'<input type="hidden" name="Order_Desc" value="ORDER_DESCRIPTION_VALUE">' +
'<input type="hidden" name="OrderID" value="ORDER_ID_VALUE">' +
'<input type="hidden" name="PaymentOption" value="PAYMENT_OPTION_VALUE">' +
'<input type="hidden" name="Email" value="EMAIL_VALUE">' +
'<input type="hidden" name="ServID" value="SERV_ID" >' +
'<input type="hidden" name="ChannelID" value="2" >' +
'<input type="hidden" name="Lang" value="LANG_VALUE" >' +
'<input type="hidden" name="ReturnURL" value="" >' +
'<input type="hidden" name="CustName" value="CUSTNAME_VALUE" >' +
'<input type="hidden" name="PatientOutSA" value="PATIENT_OUT_SA" >' +
'<input type="hidden" name="PatientTypeID" value="PATIENT_TYPE_ID" >' +
'<input type="hidden" name="DeviceToken" value="DEVICE_TOKEN" >' +
'<input type="hidden" name="Longitude" value="LONGITUDE_VALUE" >' +
'<input type="hidden" name="Latitude" value="LATITUDE_VALUE" >' +
'<input type="hidden" name="Live_ServiceID" value="LIVE_SERVICE_ID" >' +
'<input type="hidden" name="CustID" value="CUSTID_VALUE" >' +
'<input type="hidden" name="ResponseContinueURL" value="http://hmg.com/Documents/success.html" >' +
'<input type="hidden" name="BackClickUrl" value="http://hmg.com/Documents/success.html" >' +
'</form>' +
'<script type="text/javascript"> document.getElementById("paymentForm").submit(); </script>' +
'</body>' +
'</html>';
}
} }
class MyChromeSafariBrowser extends ChromeSafariBrowser { class MyChromeSafariBrowser extends ChromeSafariBrowser {

Loading…
Cancel
Save