livecare scheduling implemented

er_location
haroon amjad 5 years ago
parent c9256a654a
commit 7fdc0da9dc

@ -5,7 +5,7 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
const MAX_SMALL_SCREEN = 660;
const BASE_URL = 'https://hmgwebservices.com/';
const BASE_URL = 'https://uat.hmgwebservices.com/';
const GET_PROJECT = 'Services/Lists.svc/REST/GetProject';
@ -121,6 +121,9 @@ const GET_PATIENT_APPOINTMENT_CURFEW_HISTORY =
const CONFIRM_APPOINTMENT =
"Services/MobileNotifications.svc/REST/ConfirmAppointment";
const INSERT_VIDA_REQUEST =
"Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart";
//URL to cancel appointment
const CANCEL_APPOINTMENT = "Services/Doctors.svc/REST/CancelAppointment";
@ -150,6 +153,22 @@ const SEND_CALL_REQUEST = 'Services/Doctors.svc/REST/InsertCallInfo';
const GET_LIVECARE_CLINICS =
'Services/ER_VirtualCall.svc/REST/PatientER_GetClinics';
const GET_LIVECARE_SCHEDULE_CLINICS =
'Services/Doctors.svc/REST/PatientER_GetClinicsHaveSchedule';
const GET_LIVECARE_SCHEDULE_CLINIC_DOCTOR_LIST =
'Services/Doctors.svc/REST/PatientER_GetDoctorByClinicID';
const GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS =
'Services/Doctors.svc/REST/PatientER_GetDoctorFreeSlots';
const INSERT_LIVECARE_SCHEDULE_APPOINTMENT =
'Services/Doctors.svc/REST/InsertSpecificAppoitmentForSchedule';
const GET_PATIENT_SHARE_LIVECARE =
"Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNOForLiveCare";
const GET_LIVECARE_CLINIC_TIMING =
'Services/ER_VirtualCall.svc/REST/PatientER_GetClinicsServiceTimingsSchedule';
@ -232,6 +251,7 @@ class AppGlobal {
request.TokenID = "@dm!n";
request.isDentalAllowedBackend = false;
request.DeviceTypeID = Platform.isIOS ? 1 : 2;
request.DeviceType = Platform.isIOS ? "iOS" : "Android";
return request;
}

@ -48,6 +48,7 @@ const Map<String, Map<String, String>> localizedValues = {
'confirmAppo': {'en': 'Confirm Appointment', 'ar': 'تأكيد الموعد'},
'confirm': {'en': 'Confirm', 'ar': 'تأكيد'},
'confirmLiveCare': {'en': 'Confirm LiveCare', 'ar': 'تأكيد لايف كير'},
'waitingForDoctor': {'en': 'Waiting for doctor', 'ar': 'في انتظار الطبيب'},
'appointment': {'en': 'Appointment', 'ar': 'الموعد'},
'confirmLater': {'en': 'Confirm Later', 'ar': 'تأكيد لاحقا'},
'todoList': {'en': 'Todo List', 'ar': 'مهامي'},
@ -59,6 +60,7 @@ const Map<String, Map<String, String>> localizedValues = {
'viewQR': {'en': 'View QR Code', 'ar': 'عرض رمز الاستجابة السريعة'},
'instruction': {'en': 'Instructions', 'ar': 'تعليمات'},
'livecare': {'en': 'LiveCare', 'ar': 'لايف كير'},
'livecareAppo': {'en': 'LiveCare Appointment', 'ar': 'الموعد لايف كير'},
'cancelAppoMsg': {
'en': 'Are you sure you want to cancel this appointment?',
'ar': 'هل أنت متأكد أنك تريد إلغاء هذا الموعد؟'

@ -64,73 +64,75 @@ class AppoitmentAllHistoryResultList {
String qR;
int remaniningHoursTocanPay;
bool sMSButtonVisable;
int serviceID;
AppoitmentAllHistoryResultList(
{this.setupID,
this.projectID,
this.appointmentNo,
this.appointmentDate,
this.appointmentDateN,
this.appointmentType,
this.bookDate,
this.patientType,
this.patientID,
this.clinicID,
this.doctorID,
this.endDate,
this.startTime,
this.endTime,
this.status,
this.visitType,
this.visitFor,
this.patientStatusType,
this.companyID,
this.bookedBy,
this.bookedOn,
this.confirmedBy,
this.confirmedOn,
this.arrivalChangedBy,
this.arrivedOn,
this.editedBy,
this.editedOn,
this.doctorName,
this.doctorNameN,
this.statusDesc,
this.statusDescN,
this.vitalStatus,
this.vitalSignAppointmentNo,
this.episodeID,
this.actualDoctorRate,
this.clinicName,
this.complainExists,
this.doctorImageURL,
this.doctorNameObj,
this.doctorRate,
this.doctorSpeciality,
this.doctorTitle,
this.gender,
this.genderDescription,
this.iSAllowOnlineCheckedIN,
this.isActiveDoctor,
this.isActiveDoctorProfile,
this.isDoctorAllowVedioCall,
this.isExecludeDoctor,
this.isFollowup,
this.isLiveCareAppointment,
this.isMedicalReportRequested,
this.isOnlineCheckedIN,
this.latitude,
this.listHISGetContactLensPerscription,
this.listHISGetGlassPerscription,
this.longitude,
this.nextAction,
this.noOfPatientsRate,
this.originalClinicID,
this.originalProjectID,
this.projectName,
this.qR,
this.remaniningHoursTocanPay,
this.sMSButtonVisable});
this.projectID,
this.appointmentNo,
this.appointmentDate,
this.appointmentDateN,
this.appointmentType,
this.bookDate,
this.patientType,
this.patientID,
this.clinicID,
this.doctorID,
this.endDate,
this.startTime,
this.endTime,
this.status,
this.visitType,
this.visitFor,
this.patientStatusType,
this.companyID,
this.bookedBy,
this.bookedOn,
this.confirmedBy,
this.confirmedOn,
this.arrivalChangedBy,
this.arrivedOn,
this.editedBy,
this.editedOn,
this.doctorName,
this.doctorNameN,
this.statusDesc,
this.statusDescN,
this.vitalStatus,
this.vitalSignAppointmentNo,
this.episodeID,
this.actualDoctorRate,
this.clinicName,
this.complainExists,
this.doctorImageURL,
this.doctorNameObj,
this.doctorRate,
this.doctorSpeciality,
this.doctorTitle,
this.gender,
this.genderDescription,
this.iSAllowOnlineCheckedIN,
this.isActiveDoctor,
this.isActiveDoctorProfile,
this.isDoctorAllowVedioCall,
this.isExecludeDoctor,
this.isFollowup,
this.isLiveCareAppointment,
this.isMedicalReportRequested,
this.isOnlineCheckedIN,
this.latitude,
this.listHISGetContactLensPerscription,
this.listHISGetGlassPerscription,
this.longitude,
this.nextAction,
this.noOfPatientsRate,
this.originalClinicID,
this.originalProjectID,
this.projectName,
this.qR,
this.remaniningHoursTocanPay,
this.sMSButtonVisable,
this.serviceID});
AppoitmentAllHistoryResultList.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID'];
@ -173,7 +175,9 @@ class AppoitmentAllHistoryResultList {
doctorImageURL = json['DoctorImageURL'];
doctorNameObj = json['DoctorNameObj'];
doctorRate = json['DoctorRate'];
doctorSpeciality = json['DoctorSpeciality'] != null ?json['DoctorSpeciality'].cast<String>() : ["null"];
doctorSpeciality = json['DoctorSpeciality'] != null
? json['DoctorSpeciality'].cast<String>()
: ["null"];
doctorTitle = json['DoctorTitle'];
gender = json['Gender'];
genderDescription = json['GenderDescription'];
@ -188,7 +192,7 @@ class AppoitmentAllHistoryResultList {
isOnlineCheckedIN = json['IsOnlineCheckedIN'];
latitude = json['Latitude'];
listHISGetContactLensPerscription =
json['List_HIS_GetContactLensPerscription'];
json['List_HIS_GetContactLensPerscription'];
listHISGetGlassPerscription = json['List_HIS_GetGlassPerscription'];
longitude = json['Longitude'];
nextAction = json['NextAction'];
@ -199,6 +203,7 @@ class AppoitmentAllHistoryResultList {
qR = json['QR'];
remaniningHoursTocanPay = json['RemaniningHoursTocanPay'];
sMSButtonVisable = json['SMSButtonVisable'];
serviceID = json['ServiceID'];
}
Map<String, dynamic> toJson() {
@ -269,6 +274,7 @@ class AppoitmentAllHistoryResultList {
data['QR'] = this.qR;
data['RemaniningHoursTocanPay'] = this.remaniningHoursTocanPay;
data['SMSButtonVisable'] = this.sMSButtonVisable;
data['ServiceID'] = this.serviceID;
return data;
}
}
@ -278,7 +284,8 @@ class PatientAppointmentList {
List<AppoitmentAllHistoryResultList> patientDoctorAppointmentList = List();
PatientAppointmentList(
{this.filterName, AppoitmentAllHistoryResultList patientDoctorAppointment}) {
{this.filterName,
AppoitmentAllHistoryResultList patientDoctorAppointment}) {
patientDoctorAppointmentList.add(patientDoctorAppointment);
}
}

@ -13,7 +13,6 @@ class InsertAppointmentRequest extends Request {
bool IsVirtual;
List<String> GeneralProcedureList;
String DeviceToken;
String DeviceType;
bool IsForLiveCare;
String OriginalClinicID;
String OriginalProjectID;

@ -12,6 +12,7 @@ class PatientShareResponse {
int companyShareWithTax;
String doctorImageURL;
String doctorNameObj;
int doctorID;
List<String> doctorSpeciality;
dynamic errCode;
int groupID;
@ -47,56 +48,59 @@ class PatientShareResponse {
dynamic statusDesc;
dynamic subPolicyNo;
int userID;
int serviceID;
PatientShareResponse(
{this.advanceNumber,
this.appointmentDate,
this.appointmentNo,
this.cashPrice,
this.cashPriceTax,
this.cashPriceWithTax,
this.clinicID,
this.clinicName,
this.companyId,
this.companyName,
this.companyShareWithTax,
this.doctorImageURL,
this.doctorNameObj,
this.doctorSpeciality,
this.errCode,
this.groupID,
this.iSAllowOnlineCheckedIN,
this.insurancePolicyNo,
this.isExcludedForOnlineCheckin,
this.isFollowup,
this.isLiveCareAppointment,
this.isOnlineCheckedIN,
this.message,
this.nextAction,
this.patientCardID,
this.patientID,
this.patientShare,
this.patientShareWithTax,
this.patientStatusType,
this.patientTaxAmount,
this.patientType,
this.paymentAmount,
this.paymentDate,
this.paymentMethodName,
this.paymentReferenceNumber,
this.policyId,
this.policyName,
this.procedureName,
this.projectID,
this.projectName,
this.setupID,
this.sourceType,
this.startTime,
this.status,
this.statusCode,
this.statusDesc,
this.subPolicyNo,
this.userID});
this.appointmentDate,
this.appointmentNo,
this.cashPrice,
this.cashPriceTax,
this.cashPriceWithTax,
this.clinicID,
this.clinicName,
this.companyId,
this.companyName,
this.companyShareWithTax,
this.doctorID,
this.doctorImageURL,
this.doctorNameObj,
this.doctorSpeciality,
this.errCode,
this.groupID,
this.iSAllowOnlineCheckedIN,
this.insurancePolicyNo,
this.isExcludedForOnlineCheckin,
this.isFollowup,
this.isLiveCareAppointment,
this.isOnlineCheckedIN,
this.message,
this.nextAction,
this.patientCardID,
this.patientID,
this.patientShare,
this.patientShareWithTax,
this.patientStatusType,
this.patientTaxAmount,
this.patientType,
this.paymentAmount,
this.paymentDate,
this.paymentMethodName,
this.paymentReferenceNumber,
this.policyId,
this.policyName,
this.procedureName,
this.projectID,
this.projectName,
this.setupID,
this.sourceType,
this.startTime,
this.status,
this.statusCode,
this.statusDesc,
this.subPolicyNo,
this.userID,
this.serviceID});
PatientShareResponse.fromJson(Map<String, dynamic> json) {
advanceNumber = json['AdvanceNumber'];
@ -110,6 +114,7 @@ class PatientShareResponse {
companyId = json['CompanyId'];
companyName = json['CompanyName'];
companyShareWithTax = json['CompanyShareWithTax'];
doctorID = json['DoctorID'];
doctorImageURL = json['DoctorImageURL'];
doctorNameObj = json['DoctorNameObj'];
doctorSpeciality = json['DoctorSpeciality'].cast<String>();
@ -147,6 +152,7 @@ class PatientShareResponse {
statusDesc = json['StatusDesc'];
subPolicyNo = json['SubPolicyNo'];
userID = json['UserID'];
serviceID = json['ServiceID'];
}
Map<String, dynamic> toJson() {
@ -162,6 +168,7 @@ class PatientShareResponse {
data['CompanyId'] = this.companyId;
data['CompanyName'] = this.companyName;
data['CompanyShareWithTax'] = this.companyShareWithTax;
data['DoctorID'] = this.doctorID;
data['DoctorImageURL'] = this.doctorImageURL;
data['DoctorNameObj'] = this.doctorNameObj;
data['DoctorSpeciality'] = this.doctorSpeciality;
@ -199,6 +206,7 @@ class PatientShareResponse {
data['StatusDesc'] = this.statusDesc;
data['SubPolicyNo'] = this.subPolicyNo;
data['UserID'] = this.userID;
data['ServiceID'] = this.serviceID;
return data;
}
}

@ -0,0 +1,92 @@
class insertVIDARequest {
int patientID;
int acceptedBy;
int appointmentNo;
String deviceToken;
double latitude;
double longitude;
int serviceID;
int projectID;
int clinicID;
String deviceType;
String voipToken;
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
insertVIDARequest(
{this.patientID,
this.acceptedBy,
this.appointmentNo,
this.deviceToken,
this.latitude,
this.longitude,
this.serviceID,
this.projectID,
this.clinicID,
this.deviceType,
this.voipToken,
this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID});
insertVIDARequest.fromJson(Map<String, dynamic> json) {
patientID = json['PatientID'];
acceptedBy = json['AcceptedBy'];
appointmentNo = json['AppointmentNo'];
deviceToken = json['DeviceToken'];
latitude = json['Latitude'];
longitude = json['Longitude'];
serviceID = json['ServiceID'];
projectID = json['ProjectID'];
clinicID = json['ClinicID'];
deviceType = json['DeviceType'];
voipToken = json['VoipToken'];
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['PatientID'] = this.patientID;
data['AcceptedBy'] = this.acceptedBy;
data['AppointmentNo'] = this.appointmentNo;
data['DeviceToken'] = this.deviceToken;
data['Latitude'] = this.latitude;
data['Longitude'] = this.longitude;
data['ServiceID'] = this.serviceID;
data['ProjectID'] = this.projectID;
data['ClinicID'] = this.clinicID;
data['DeviceType'] = this.deviceType;
data['VoipToken'] = this.voipToken;
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
return data;
}
}

@ -5,6 +5,7 @@ class Request {
var ProjectID;
var LanguageID;
var DeviceTypeID;
var DeviceType;
var AppointmentNo;
var IPAdress;
var VersionID;

@ -210,11 +210,13 @@ class _BookConfirmState extends State<BookConfirm> {
"assets/images/new-design/icon_hospital.png"),
),
Container(
width: MediaQuery.of(context).size.width * 0.7,
margin: EdgeInsets.fromLTRB(20.0, 5.0, 10.0, 5.0),
child: Text(
TranslationBase.of(context).clinic +
": " +
widget.doctor.clinicName,
overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 14.0,
color: Colors.grey[700],
@ -340,6 +342,9 @@ class _BookConfirmState extends State<BookConfirm> {
),
),
),
SizedBox(
height: 120.0,
),
],
),
),

@ -287,10 +287,15 @@ class _BookSuccessState extends State<BookSuccess> {
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
AppoitmentAllHistoryResultList appo =
new AppoitmentAllHistoryResultList();
appo.clinicID = widget.docObject.clinicID;
appo.projectID = widget.docObject.projectID;
appo.appointmentNo = widget.patientShareResponse.appointmentNo;
appo.appointmentNo =
widget.patientShareResponse.appointmentNo;
appo.serviceID = widget.patientShareResponse.serviceID;
appo.isLiveCareAppointment = widget.patientShareResponse.isLiveCareAppointment;
appo.doctorID = widget.patientShareResponse.doctorID;
confirmAppointment(appo);
},
child: Text(
@ -336,7 +341,33 @@ class _BookSuccessState extends State<BookSuccess> {
DoctorsListService service = new DoctorsListService();
service
.confirmAppointment(
appo.appointmentNo, appo.clinicID, appo.projectID, context)
appo.appointmentNo, appo.clinicID, appo.projectID, appo.isLiveCareAppointment, context)
.then((res) {
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
})
.catchError((err) {
print(err);
})
.showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
.then((value) {
if (appo.isLiveCareAppointment) {
insertLiveCareVIDARequest(appo);
} else {
navigateToHome(context);
}
});
}
insertLiveCareVIDARequest(AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService();
service
.insertVIDARequest(appo.appointmentNo, appo.clinicID, appo.projectID,
appo.serviceID, appo.doctorID, context)
.then((res) {
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
@ -346,7 +377,8 @@ class _BookSuccessState extends State<BookSuccess> {
}
}).catchError((err) {
print(err);
}).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
}
Widget _getPayNowAppo() {

@ -352,19 +352,24 @@ class _AppointmentActionsState extends State<AppointmentActions> {
cancelAppointment() {
ConfirmDialog.closeAlertDialog(context);
DoctorsListService service = new DoctorsListService();
service.cancelAppointment(widget.appo, context).then((res) {
print(res);
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)).then((value) {
Navigator.of(context).pop();
});
service
.cancelAppointment(widget.appo, context)
.then((res) {
print(res);
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
})
.catchError((err) {
print(err);
})
.showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
.then((value) {
Navigator.of(context).pop();
});
}
openAppointmentRadiology() {
@ -469,8 +474,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
}
}).catchError((err) {
print(err);
AppToast.showErrorToast(
message: err);
AppToast.showErrorToast(message: err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
}
@ -541,7 +545,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
DoctorsListService service = new DoctorsListService();
service
.confirmAppointment(widget.appo.appointmentNo, widget.appo.clinicID,
widget.appo.projectID, context)
widget.appo.projectID, widget.appo.isLiveCareAppointment, context)
.then((res) {
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);

@ -24,7 +24,7 @@ class _ApointmentCardState extends State<AppointmentCard> {
navigateToAppointmentDetails(context, widget.appo);
},
child: Card(
margin: EdgeInsets.fromLTRB(20.0, 16.0, 20.0, 8.0),
margin: EdgeInsets.fromLTRB(10.0, 16.0, 10.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),

@ -16,6 +16,7 @@ import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:rating_bar/rating_bar.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
@ -37,8 +38,6 @@ class _ToDoState extends State<ToDo> {
@override
void initState() {
// authUser = authProvider.getAuthenticatedUser();
print("initState!!!!!");
widget.patientShareResponse = new PatientShareResponse();
WidgetsBinding.instance
.addPostFrameCallback((_) => getPatientAppointmentHistory());
@ -50,205 +49,230 @@ class _ToDoState extends State<ToDo> {
return AppScaffold(
appBarTitle: TranslationBase.of(context).todoList,
body: SingleChildScrollView(
child: Container(
child: ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: ScrollPhysics(),
padding: EdgeInsets.all(0.0),
itemCount: widget.appoList.length,
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(
child: Column(
children: <Widget>[
Container(
child: ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: ScrollPhysics(),
padding: EdgeInsets.all(0.0),
itemCount: widget.appoList.length,
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>[
Image.asset(
"assets/images/new-design/time_icon.png",
width: 20.0,
height: 20.0),
Container(
margin: EdgeInsets.only(left: 10.0, right: 30.0),
child: Text(
getDate(
widget.appoList[index].appointmentDate),
style: TextStyle(fontSize: 12.0)),
Row(
children: <Widget>[
Image.asset(
"assets/images/new-design/time_icon.png",
width: 20.0,
height: 20.0),
Container(
margin:
EdgeInsets.only(left: 5.0, right: 25.0),
child: Text(
getDate(widget
.appoList[index].appointmentDate),
style: TextStyle(fontSize: 11.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 : "-",
style: TextStyle(fontSize: 12.0)),
),
],
),
Image.asset(
"assets/images/new-design/hospital_address_icon.png",
width: 20.0,
height: 20.0),
Container(
margin: EdgeInsets.only(left: 10.0, right: 10.0),
child: Text(widget.appoList[index].projectName,
style: TextStyle(fontSize: 12.0)),
),
],
),
Container(
margin: EdgeInsets.only(top: 5.0),
child: Divider(
color: Colors.grey[500],
),
),
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].doctorImageURL,
fit: BoxFit.fill),
),
margin: EdgeInsets.only(top: 5.0),
child: Divider(
color: Colors.grey[500],
),
),
Expanded(
flex: 3,
child: Container(
margin: EdgeInsets.only(
top: 20.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)),
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].doctorImageURL,
fit: BoxFit.fill),
),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.max,
),
),
Expanded(
flex: 3,
child: Container(
margin: EdgeInsets.only(
top: 20.0, left: 20.0, right: 20.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
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,
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,
),
],
),
],
),
],
),
),
),
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)),
)
],
),
),
),
)
],
),
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
.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)),
)
],
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])),
),
),
),
)
],
),
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: Colors.red[600],
decoration:
TextDecoration.underline)),
),
),
)
],
),
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: Colors.red[600],
decoration:
TextDecoration.underline)),
),
),
)
],
),
],
),
),
),
),
);
},
),
);
},
),
),
SizedBox(
height: 120.0,
),
],
),
),
);
@ -287,6 +311,10 @@ class _ToDoState extends State<ToDo> {
return "assets/images/new-design/confirm_button.png";
break;
case 60:
return "assets/images/new-design/waiting_for_doctor.png";
break;
default:
return "";
}
@ -306,6 +334,8 @@ class _ToDoState extends State<ToDo> {
case 50:
confirmAppointment(appo);
break;
case 60:
break;
}
}
@ -338,6 +368,10 @@ class _ToDoState extends State<ToDo> {
return TranslationBase.of(context).confirmLiveCare;
break;
case 60:
return TranslationBase.of(context).waitingForDoctor;
break;
default:
return "";
}
@ -372,6 +406,10 @@ class _ToDoState extends State<ToDo> {
return TranslationBase.of(context).upcomingLivecare;
break;
case 60:
return TranslationBase.of(context).waitingForDoctor;
break;
default:
return "";
}
@ -428,7 +466,6 @@ class _ToDoState extends State<ToDo> {
getPatientAppointmentHistory() {
DoctorsListService service = new DoctorsListService();
service.getPatientAppointmentHistory(true, context).then((res) {
print(res['AppoimentAllHistoryResultList']);
if (res['MessageStatus'] == 1) {
setState(() {
if (res['AppoimentAllHistoryResultList'].length != 0) {
@ -439,6 +476,10 @@ class _ToDoState extends State<ToDo> {
});
} else {}
});
widget.appoList.forEach((element) {
print(element.isLiveCareAppointment);
print(element.nextAction);
});
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
@ -666,18 +707,49 @@ class _ToDoState extends State<ToDo> {
confirmAppointment(AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService();
service
.confirmAppointment(
appo.appointmentNo, appo.clinicID, appo.projectID, context)
.confirmAppointment(appo.appointmentNo, appo.clinicID, appo.projectID,
appo.isLiveCareAppointment, context)
.then((res) {
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
getPatientAppointmentHistory();
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
getPatientAppointmentHistory();
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
})
.catchError((err) {
print(err);
})
.showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
.then((value) {
if (appo.isLiveCareAppointment) {
insertLiveCareVIDARequest(appo);
} else {
getPatientAppointmentHistory();
}
});
}
insertLiveCareVIDARequest(AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService();
service
.insertVIDARequest(appo.appointmentNo, appo.clinicID, appo.projectID,
appo.serviceID, appo.doctorID, context)
.then((res) {
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
})
.catchError((err) {
print(err);
})
.showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
.then((value) {
getPatientAppointmentHistory();
});
}
}

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:rating_bar/rating_bar.dart';
class TodoListCard extends StatefulWidget {
@ -12,7 +13,6 @@ class TodoListCard extends StatefulWidget {
var languageID;
final VoidCallback onListUpdated;
TodoListCard({@required this.appo, this.onListUpdated});
@override
@ -54,14 +54,22 @@ class _TodoListCardState extends State<TodoListCard> {
child: Text(getDate(widget.appo.appointmentDate),
style: TextStyle(fontSize: 12.0)),
),
Image.asset(
"assets/images/new-design/hospital_address_icon.png",
width: 20.0,
height: 20.0),
widget.appo.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: 10.0, right: 10.0),
child: Text(widget.appo.projectName,
style: TextStyle(fontSize: 12.0)),
child: widget.appo.isLiveCareAppointment
? Text(TranslationBase.of(context).upcomingLivecare,
style: TextStyle(fontSize: 12.0))
: Text(widget.appo.projectName,
style: TextStyle(fontSize: 12.0)),
),
],
),
@ -105,7 +113,10 @@ class _TodoListCardState extends State<TodoListCard> {
letterSpacing: 1.0)),
Container(
margin: EdgeInsets.only(top: 3.0, bottom: 3.0),
child: Text(getDoctorSpeciality(widget.appo.doctorSpeciality).trim(),
child: Text(
getDoctorSpeciality(
widget.appo.doctorSpeciality)
.trim(),
style: TextStyle(
fontSize: 12.0,
color: Colors.grey[600],
@ -323,14 +334,13 @@ class _TodoListCardState extends State<TodoListCard> {
}
String getMinute(DateTime dateObj) {
if(dateObj.minute == 0) {
if (dateObj.minute == 0) {
return dateObj.minute.toString() + "0";
} else {
return dateObj.minute.toString();
}
}
String getDoctorSpeciality(List<String> docSpecial) {
String docSpeciality = "";
docSpecial.forEach((v) {

@ -5,16 +5,16 @@ import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medic
import 'package:diplomaticquarterapp/pages/ContactUs/hmg_service.dart';
import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
@ -56,20 +56,112 @@ class _HomePageState extends State<HomePage> {
child: Stack(
children: <Widget>[
Positioned(
top: 30,
left: 15,
right: 15,
top: 15,
left: 5,
right: 5,
child: Container(
width:
MediaQuery.of(context).size.width * 0.8,
child: Row(
children: <Widget>[
Expanded(
child: Container(
height: 120,
padding: EdgeInsets.all(5),
margin: EdgeInsets.all(5),
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage("assets/images/new-design/covid_bg_transparent.png"),
fit: BoxFit.fill,
),
color:
Colors.white.withOpacity(0.3),
borderRadius: BorderRadius.all(
Radius.circular(5))),
child: Container(
margin: EdgeInsets.only(top: 10.0),
child: Column(
children: <Widget>[
Text("COVID-19 TEST",
style: TextStyle(
color: Colors.white,
fontWeight:
FontWeight.bold,
fontSize: 18.0)),
Row(
children: <Widget>[
Container(
margin: EdgeInsets.only(
top: 15.0),
child: SvgPicture.asset(
'assets/images/new-design/covid-19-car.svg',
width: 50.0,
height: 50.0),
),
Container(
margin: EdgeInsets.only(
left: 10.0, top: 10.0),
child: Column(
children: <Widget>[
Text("Drive-Thru",
style: TextStyle(
color: Colors
.white,
fontWeight:
FontWeight
.bold,
fontSize:
16.0)),
ButtonTheme(
shape:
RoundedRectangleBorder(
borderRadius:
BorderRadius
.circular(
5.0),
),
minWidth: MediaQuery.of(
context)
.size
.width *
0.15,
height: 25.0,
child: RaisedButton(
color: Colors.red[800],
textColor:
Colors.white,
disabledTextColor:
Colors.white,
disabledColor:
new Color(
0xFFbcc2c4),
onPressed: () {
// if (_isButtonDisabled == false) {
// _searchDoctor(context);
// }
},
child: Text("BOOK NOW",
style: TextStyle(
fontSize:
12.0)),
),
),
],
),
),
],
),
],
),
),
),
),
Expanded(
child: InkWell(
onTap: () => Navigator.push(context,
FadePage(page: LiveCareHome())),
child: Container(
height: 110,
height: 120,
padding: EdgeInsets.all(15),
margin: EdgeInsets.all(5),
decoration: BoxDecoration(
@ -77,25 +169,13 @@ class _HomePageState extends State<HomePage> {
.withOpacity(0.3),
borderRadius: BorderRadius.all(
Radius.circular(5))),
child: Image.asset(
'assets/images/livecare_white_logo.png',
child: SvgPicture.asset(
projectViewModel.isArabic ? 'assets/images/new-design/livecare_arabic_logo.svg' :
'assets/images/new-design/liveCare_white_logo.svg',
),
),
),
),
Expanded(
child: Container(
height: 110,
padding: EdgeInsets.all(15),
margin: EdgeInsets.all(5),
decoration: BoxDecoration(
color:
Colors.white.withOpacity(0.3),
borderRadius: BorderRadius.all(
Radius.circular(5))),
// child: Image.asset('assets/images/livecare_white_logo.png',),
),
),
],
),
),

@ -74,7 +74,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
SvgPicture.asset("assets/images/new-design/check_icon.svg",
width: 25),
Container(
width: MediaQuery.of(context).size.width * 0.75,
width: MediaQuery.of(context).size.width * 0.72,
margin: EdgeInsets.all(10.0),
child: Text(
"No need to wait, you will get Medical consultation immediately via Video call.",
@ -91,7 +91,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
SvgPicture.asset("assets/images/new-design/check_icon.svg",
width: 25),
Container(
width: MediaQuery.of(context).size.width * 0.75,
width: MediaQuery.of(context).size.width * 0.72,
margin: EdgeInsets.all(10.0),
child: Text("The doctor will see your medical file.",
overflow: TextOverflow.clip,
@ -107,7 +107,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
SvgPicture.asset("assets/images/new-design/check_icon.svg",
width: 25),
Container(
width: MediaQuery.of(context).size.width * 0.75,
width: MediaQuery.of(context).size.width * 0.72,
margin: EdgeInsets.all(10.0),
child: Text("Free Prescription delivery service.",
overflow: TextOverflow.clip,
@ -140,7 +140,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
width: 80),
),
Container(
width: MediaQuery.of(context).size.width * 0.6,
width: MediaQuery.of(context).size.width * 0.56,
margin: EdgeInsets.fromLTRB(30.0, 20.0, 0.0, 0.0),
child: Column(
children: <Widget>[
@ -182,7 +182,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
width: 70),
),
Container(
width: MediaQuery.of(context).size.width * 0.6,
width: MediaQuery.of(context).size.width * 0.58,
margin: EdgeInsets.fromLTRB(30.0, 30.0, 0.0, 0.0),
child: Column(
children: <Widget>[
@ -208,6 +208,9 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
],
)),
),
SizedBox(
height: 40.0,
),
],
),
),

@ -6,6 +6,7 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/LiveCare/insertVIDARequest.dart';
import 'package:diplomaticquarterapp/models/Request.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
@ -21,6 +22,8 @@ class DoctorsListService extends BaseService {
double lat;
double long;
String deviceToken;
String tokenID;
Future<Map> getDoctorsList(
int clinicID, int projectID, bool isNearest, BuildContext context,
@ -48,7 +51,7 @@ class DoctorsListService extends BaseService {
"VersionID": req.VersionID,
"Channel": req.Channel,
"generalid": 'Cs2020@2016\$2958',
"PatientOutSA": 0,
"PatientOutSA": authUser.outSA,
"TokenID": "",
"DeviceTypeID": req.DeviceTypeID,
"SessionID": "YckwoXhUmWBsnHKEKig",
@ -106,7 +109,7 @@ class DoctorsListService extends BaseService {
"VersionID": req.VersionID,
"Channel": req.Channel,
"generalid": 'Cs2020@2016\$2958',
"PatientOutSA": 0,
"PatientOutSA": authUser.outSA,
"TokenID": "",
"DeviceTypeID": req.DeviceTypeID,
"SessionID": null,
@ -146,7 +149,7 @@ class DoctorsListService extends BaseService {
"VersionID": req.VersionID,
"Channel": req.Channel,
"generalid": 'Cs2020@2016\$2958',
"PatientOutSA": 0,
"PatientOutSA": authUser.outSA,
"TokenID": "",
"DeviceTypeID": req.DeviceTypeID,
"SessionID": null,
@ -188,7 +191,7 @@ class DoctorsListService extends BaseService {
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"generalid": "Cs2020@2016\$2958",
"PatientOutSA": 0,
"PatientOutSA": authUser.outSA,
"SessionID": null,
"isDentalAllowedBackend": false,
"DeviceTypeID": 1
@ -224,7 +227,7 @@ class DoctorsListService extends BaseService {
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"generalid": "Cs2020@2016\$2958",
"PatientOutSA": 0,
"PatientOutSA": authUser.outSA,
"SessionID": null,
"isDentalAllowedBackend": false,
"DeviceTypeID": 1
@ -513,7 +516,7 @@ class DoctorsListService extends BaseService {
}
Future<Map> confirmAppointment(
int appoNo, int clinicID, int projectID, BuildContext context) async {
int appoNo, int clinicID, int projectID, bool isLiveCare, BuildContext context) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -527,6 +530,7 @@ class DoctorsListService extends BaseService {
request = {
"AppointmentNumber": appoNo,
"IsLiveCareAppointment": isLiveCare,
"ClinicID": clinicID,
"ProjectID": projectID,
"ConfirmationBy": 102,
@ -556,6 +560,62 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> insertVIDARequest(
int appoNo, int clinicID, int projectID, int serviceID, int docID, 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;
}
deviceToken = await sharedPref.getString(PUSH_TOKEN);
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);
}
var languageID = await sharedPref.getString(APP_LANGUAGE);
Request req = appGlobal.getPublicRequest();
request = {
"AppointmentNo": appoNo,
"ClinicID": clinicID,
"ProjectID": projectID,
"ServiceID": serviceID,
"AcceptedBy": docID,
"DeviceToken": deviceToken,
"Latitude": lat,
"Longitude": long,
"DeviceType": req.DeviceType,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
"isDentalAllowedBackend": false,
"DeviceTypeID": req.DeviceTypeID,
"PatientID": authUser.patientID,
"PatientTypeID": authUser.patientType,
"PatientType": authUser.patientType
};
dynamic localRes;
await baseAppClient.post(INSERT_VIDA_REQUEST,
onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
Future<Map> cancelAppointment(
AppoitmentAllHistoryResultList appo, BuildContext context) async {
Map<String, dynamic> request;

@ -97,6 +97,8 @@ class TranslationBase {
String get confirmLiveCare => localizedValues['confirmLiveCare'][locale.languageCode];
String get waitingForDoctor => localizedValues['waitingForDoctor'][locale.languageCode];
String get confirmLater =>
localizedValues['confirmLater'][locale.languageCode];
@ -222,6 +224,9 @@ class TranslationBase {
String get upcomingLivecare =>
localizedValues['upcoming-livecare'][locale.languageCode];
String get liveCareAppo =>
localizedValues['livecareAppo'][locale.languageCode];
String get upcomingDetails =>
localizedValues['upcoming-details'][locale.languageCode];

Loading…
Cancel
Save