LiveCare schedule implemented

merge-update-with-lab-changes
haroon amjad 5 years ago
parent ab158e14e9
commit 146019432a

@ -201,6 +201,8 @@ const HIS_CREATE_ADVANCE_PAYMENT = "Services/Patients.svc/REST/HIS_CreateAdvance
const ADD_ADVANCE_NUMBER_REQUEST = 'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest';
const ADD_VIDA_REQUEST = 'Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart';
const IS_ALLOW_ASK_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
const GET_CALL_REQUEST_TYPE = 'Services/Doctors.svc/REST/GetCallRequestType_LOV';
const SEND_CALL_REQUEST = 'Services/Doctors.svc/REST/InsertCallInfo';

@ -365,7 +365,9 @@ class _ToDoState extends State<ToDo> {
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),
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,
@ -385,14 +387,17 @@ class _ToDoState extends State<ToDo> {
),
widget.appoList[index].isLiveCareAppointment
? Container(
child: Text(TranslationBase.of(context).videoAppo,
child: Text(
TranslationBase.of(context).videoAppo,
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 12.0)),
)
: Container(
child: Text(TranslationBase.of(context).walkinAppo,
child: Text(
TranslationBase.of(context)
.walkinAppo,
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
@ -825,20 +830,25 @@ class _ToDoState extends State<ToDo> {
res['Fort_id'], res['PaymentMethod'], context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']);
print(res['OnlineCheckInAppointments'][0]);
addAdvancedNumberRequest(
res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(),
paymentReference,
appo.appointmentNo.toString(),
appo);
appo,
res['OnlineCheckInAppointments'][0]);
}).catchError((err) {
print(err);
GifLoaderDialogUtils.hideDialog(context);
});
}
addAdvancedNumberRequest(String advanceNumber, String paymentReference,
String appointmentID, AppoitmentAllHistoryResultList appo) {
addAdvancedNumberRequest(
String advanceNumber,
String paymentReference,
String appointmentID,
AppoitmentAllHistoryResultList appo,
dynamic apptData) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service
@ -846,8 +856,25 @@ class _ToDoState extends State<ToDo> {
advanceNumber, paymentReference, appointmentID, context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (appo.isLiveCareAppointment)
addVIDARequestInsert(advanceNumber, paymentReference, apptData);
else
getAppoQR(context, appo);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
}
addVIDARequestInsert(
String advanceNumber, String paymentReference, dynamic apptData) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service
.addVIDARequest(advanceNumber, paymentReference, apptData, context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res);
getAppoQR(context, appo);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);

@ -10,6 +10,7 @@ import 'package:diplomaticquarterapp/models/Request.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:flutter/cupertino.dart';
class DoctorsListService extends BaseService {
@ -934,6 +935,64 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> addVIDARequest(String advanceNumber,
String paymentReference, dynamic apptData, 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 = {
"AdvanceNumber": advanceNumber,
"PaymentReferenceNumber": paymentReference,
"AppointmentNo": apptData.AppointmentNo,
"AcceptedBy": apptData.DoctorID,
"ServiceID": apptData.ServiceID,
"ProjectID": apptData.ProjectID,
"ClinicID": apptData.ClinicID,
"ClientRequestID": Utils.getAppointmentTransID(
apptData.ProjectID, apptData.ClinicID, apptData.AppointmentNo),
"AppointmentDate": apptData.AppointmentDate,
"DeviceType": Platform.isIOS ? "iOS" : "Android",
"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
};
// request.DeviceToken = this.cs.sharedService.getSharedData(AuthenticationService.DEVICE_TOKEN, false);
// request.Latitude = this.cs.sharedService.getSharedData('userLat', false);
// request.Longitude = this.cs.sharedService.getSharedData('userLong', false);
// request.ServiceID = apptData.ServiceID;
// request.ProjectID = apptData.ProjectID;
// request.ClinicID = apptData.ClinicID;
// request.ClientRequestID = AppointmentModel.getAppointmentTransID(apptData);
// request.AppointmentDate = apptData.AppointmentDate;
// request.DeviceType = this.getDeviceType();
// request.VoipToken = this.platform.is('ios') ? this.cs.sharedService.getSharedData(AuthenticationService.APNS_TOKEN, false) : "";
dynamic localRes;
await baseAppClient.post(ADD_VIDA_REQUEST,
onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
Future<Map> isAllowedToAskDoctor(int docID, BuildContext context) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -1109,14 +1168,16 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> getPatientLabOrdersByAppoNo(dynamic appoNo, dynamic projID, dynamic clinicID, BuildContext context) async {
Future<Map> getPatientLabOrdersByAppoNo(dynamic appoNo, dynamic projID,
dynamic clinicID, 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');
var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"AppointmentNo": appoNo,
@ -1140,10 +1201,10 @@ class DoctorsListService extends BaseService {
dynamic localRes;
await baseAppClient.post(GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT,
onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}

@ -8,17 +8,17 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
class MyInAppBrowser extends InAppBrowser {
// 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
'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
// static String PREAUTH_SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT
// static String SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
static String PREAUTH_SERVICE_URL =
'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store
'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 List<String> successURLS = [
'success',

Loading…
Cancel
Save