LiveCare Scheduling finalized, Appointments in ToDo list categorized

merge-update-with-lab-changes
haroon amjad 5 years ago
parent dde10cd27b
commit 7c538b350f

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

@ -1567,5 +1567,13 @@ const Map localizedValues = {
},
"bloodD-enter-desc": {"en" : "Enter the required information, In order to register for Blood Donation Service", "ar": "أدخل المعلومات المطلوبة ، للتسجيل في خدمة التبرع بالدم"},
"viewTermsConditions": {"en" : "To view the terms and conditions", "ar": "لعرض الشروط والأحكام"},
"WalkinAppo": {
"en": "Hospital Visit Appointment",
"ar": "موعد زيارة للمستشفى"
},
"videoAppo": {
"en": "Video Call Appointment",
"ar": "موعد اتصال فيديو"
},
// "visit": {"en" : "Visit", "ar": "الزيارة"},
};

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

@ -637,7 +637,12 @@ class _BookSuccessState extends State<BookSuccess> {
authenticatedUser.firstName,
authenticatedUser.patientID,
authenticatedUser,
widget.browser);
widget.browser,
widget.patientShareResponse.isLiveCareAppointment,
widget.patientShareResponse.appointmentDate,
widget.patientShareResponse.appointmentNo,
widget.patientShareResponse.clinicID,
widget.patientShareResponse.doctorID);
}
}

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

@ -93,243 +93,315 @@ class _ToDoState extends State<ToDo> {
itemBuilder: (context, index) {
return Container(
margin: EdgeInsets.all(10.0),
child: Card(
margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
child: Container(
width: MediaQuery.of(context).size.width,
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
? 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),
child: Divider(
color: Colors.grey[500],
),
child: Column(
children: [
Container(
child: Card(
margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
Flex(
direction: Axis.horizontal,
children: <Widget>[
Expanded(
flex: 1,
child: Container(
height: MediaQuery.of(context).size.height *
0.1,
child: Container(
width: MediaQuery.of(context).size.width,
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
? 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),
child: ClipRRect(
borderRadius:
BorderRadius.circular(100.0),
child: Image.network(
widget.appoList[index].doctorImageURL,
fit: BoxFit.fill),
child: Divider(
color: Colors.grey[500],
),
),
),
Expanded(
flex: 3,
child: Container(
margin: EdgeInsets.only(
top: 10.0, left: 20.0, right: 20.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Text(
widget.appoList[index].doctorTitle +
" " +
Flex(
direction: Axis.horizontal,
children: <Widget>[
Expanded(
flex: 1,
child: Container(
height: MediaQuery.of(context)
.size
.height *
0.1,
margin: EdgeInsets.only(top: 5.0),
child: ClipRRect(
borderRadius:
BorderRadius.circular(100.0),
child: Image.network(
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)),
.doctorImageURL,
fit: BoxFit.fill),
),
),
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,
),
],
),
Expanded(
flex: 3,
child: Container(
margin: EdgeInsets.only(
top: 10.0,
left: 20.0,
right: 20.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Text(
widget.appoList[index]
.doctorTitle +
" " +
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(
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,
),
Expanded(
flex: 1,
child: InkWell(
onTap: () => performNextAction(
widget.appoList[index]),
child: Container(
margin: EdgeInsets.only(top: 20.0),
child: Column(
children: <Widget>[
Image.asset(
getNextActionImage(widget
.appoList[index]
.nextAction),
width: 50.0,
height: 50.0),
Container(
margin:
EdgeInsets.only(top: 5.0),
child: Text(
getNextActionText(widget
.appoList[index]
.nextAction),
textAlign:
TextAlign.center,
style: TextStyle(
fontSize: 12.0,
color: Color(
0xff40ACC9)))
: Container();
},
fontSize: 12.0)),
)
],
),
),
),
],
),
)
],
),
Divider(
color: Colors.grey[500],
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () => performNextAction(
widget.appoList[index]),
child: Container(
margin: EdgeInsets.only(top: 20.0),
child: Column(
children: <Widget>[
Image.asset(
getNextActionImage(widget
Flex(
direction: Axis.horizontal,
children: <Widget>[
Expanded(
flex: 2,
child: Container(
child: Text(
getNextActionDescription(widget
.appoList[index].nextAction),
width: 50.0,
height: 50.0),
Container(
margin: EdgeInsets.only(top: 5.0),
child: Text(
getNextActionText(widget
.appoList[index]
.nextAction),
textAlign: TextAlign.center,
style:
TextStyle(fontSize: 12.0)),
)
],
style: TextStyle(
fontSize: 12.0,
color: Colors.grey[700])),
),
),
),
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>[
Expanded(
flex: 2,
child: Container(
child: Text(
getNextActionDescription(
widget.appoList[index].nextAction),
style: TextStyle(
fontSize: 12.0,
color: Colors.grey[700])),
),
),
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)),
),
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(10.0),
bottomRight: Radius.circular(10.0)),
color: Color(0xff20bc44),
),
height: 30.0,
margin: projectViewModel.isArabic ? EdgeInsets.fromLTRB(160.0, 0.0, 30.0, 0.0) : EdgeInsets.fromLTRB(30.0, 0.0, 160.0, 0.0),
transform: Matrix4.translationValues(0.0, -8.0, 0.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
widget.appoList[index].isLiveCareAppointment
? Container(
margin: EdgeInsets.fromLTRB(
5.0, 0.0, 5.0, 0.0),
child: Image.asset(
"assets/images/new-design/video.png"),
)
: Container(
margin: EdgeInsets.fromLTRB(
5.0, 0.0, 5.0, 0.0),
child: Image.asset(
"assets/images/new-design/walkin.png"),
),
),
)
],
),
],
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)),
)
],
),
),
),
],
),
);
},
@ -688,7 +760,12 @@ class _ToDoState extends State<ToDo> {
authenticatedUser.firstName,
authenticatedUser.patientID,
authenticatedUser,
widget.browser);
widget.browser,
appo.isLiveCareAppointment,
appo.appointmentDate,
appo.appointmentNo,
appo.clinicID,
appo.doctorID);
}
onBrowserLoadStart(String url) {

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

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

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

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

@ -117,7 +117,12 @@ class MyInAppBrowser extends InAppBrowser {
String patientName,
dynamic patientID,
AuthenticatedUser authenticatedUser,
InAppBrowser browser) {
InAppBrowser browser,
bool isLiveCareAppo,
[var appoDate,
var appoNo,
var clinicID,
var doctorID]) {
this.browser = browser;
getPatientData();
generateURL(
@ -130,7 +135,12 @@ class MyInAppBrowser extends InAppBrowser {
patientType,
patientName,
patientID,
authenticatedUser)
authenticatedUser,
isLiveCareAppo,
appoDate,
appoNo,
clinicID,
doctorID)
.then((value) {
this.browser.openUrl(url: value);
});
@ -152,19 +162,19 @@ class MyInAppBrowser extends InAppBrowser {
String patientName,
dynamic patientID,
AuthenticatedUser authUser,
[var patientData,
bool isLiveCareAppo,
[var appoDate,
var appoNo,
var clinicID,
var doctorID,
var patientData,
var servID,
var LiveServID]) async {
// getPatientData();
getDeviceToken();
String currentLanguageID = getLanguageID() == 'ar' ? 'AR' : 'EN';
String form = getForm();
String form = isLiveCareAppo ? getLiveCareForm() : getForm();
// if (authUser != null) {
// form = form.replaceFirst("EMAIL_VALUE", authUser.emailAddress);
// } else {
form = form.replaceFirst("EMAIL_VALUE", emailId);
// }
form = form.replaceFirst('AMOUNT_VALUE', amount.toString());
form = form.replaceFirst('ORDER_DESCRIPTION_VALUE', orderDesc);
@ -197,17 +207,16 @@ class MyInAppBrowser extends InAppBrowser {
form = form.replaceFirst('LIVE_SERVICE_ID', "2");
}
// if (patientData == null) {
form = form.replaceFirst('CUSTNAME_VALUE', patientName);
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");
// form = form.replaceFirst('LONGITUDE_VALUE', "46.665925");
// form = form.replaceFirst('DEVICE_TOKEN', DEVICE_TOKEN);
if (isLiveCareAppo) {
form = form.replaceFirst('IS_SCHEDULE_VALUE', "true");
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 base64Str = base64.encode(bytes);
@ -247,6 +256,42 @@ class MyInAppBrowser extends InAppBrowser {
'</body>' +
'</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 {

Loading…
Cancel
Save