livecare scheduling implemented

merge-update-with-lab-changes
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 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'; const GET_PROJECT = 'Services/Lists.svc/REST/GetProject';
@ -121,6 +121,9 @@ const GET_PATIENT_APPOINTMENT_CURFEW_HISTORY =
const CONFIRM_APPOINTMENT = const CONFIRM_APPOINTMENT =
"Services/MobileNotifications.svc/REST/ConfirmAppointment"; "Services/MobileNotifications.svc/REST/ConfirmAppointment";
const INSERT_VIDA_REQUEST =
"Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart";
//URL to cancel appointment //URL to cancel appointment
const CANCEL_APPOINTMENT = "Services/Doctors.svc/REST/CancelAppointment"; 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 = const GET_LIVECARE_CLINICS =
'Services/ER_VirtualCall.svc/REST/PatientER_GetClinics'; '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 = const GET_LIVECARE_CLINIC_TIMING =
'Services/ER_VirtualCall.svc/REST/PatientER_GetClinicsServiceTimingsSchedule'; 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinicsServiceTimingsSchedule';
@ -232,6 +251,7 @@ class AppGlobal {
request.TokenID = "@dm!n"; request.TokenID = "@dm!n";
request.isDentalAllowedBackend = false; request.isDentalAllowedBackend = false;
request.DeviceTypeID = Platform.isIOS ? 1 : 2; request.DeviceTypeID = Platform.isIOS ? 1 : 2;
request.DeviceType = Platform.isIOS ? "iOS" : "Android";
return request; return request;
} }

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

@ -64,6 +64,7 @@ class AppoitmentAllHistoryResultList {
String qR; String qR;
int remaniningHoursTocanPay; int remaniningHoursTocanPay;
bool sMSButtonVisable; bool sMSButtonVisable;
int serviceID;
AppoitmentAllHistoryResultList( AppoitmentAllHistoryResultList(
{this.setupID, {this.setupID,
@ -130,7 +131,8 @@ class AppoitmentAllHistoryResultList {
this.projectName, this.projectName,
this.qR, this.qR,
this.remaniningHoursTocanPay, this.remaniningHoursTocanPay,
this.sMSButtonVisable}); this.sMSButtonVisable,
this.serviceID});
AppoitmentAllHistoryResultList.fromJson(Map<String, dynamic> json) { AppoitmentAllHistoryResultList.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID']; setupID = json['SetupID'];
@ -173,7 +175,9 @@ class AppoitmentAllHistoryResultList {
doctorImageURL = json['DoctorImageURL']; doctorImageURL = json['DoctorImageURL'];
doctorNameObj = json['DoctorNameObj']; doctorNameObj = json['DoctorNameObj'];
doctorRate = json['DoctorRate']; doctorRate = json['DoctorRate'];
doctorSpeciality = json['DoctorSpeciality'] != null ?json['DoctorSpeciality'].cast<String>() : ["null"]; doctorSpeciality = json['DoctorSpeciality'] != null
? json['DoctorSpeciality'].cast<String>()
: ["null"];
doctorTitle = json['DoctorTitle']; doctorTitle = json['DoctorTitle'];
gender = json['Gender']; gender = json['Gender'];
genderDescription = json['GenderDescription']; genderDescription = json['GenderDescription'];
@ -199,6 +203,7 @@ class AppoitmentAllHistoryResultList {
qR = json['QR']; qR = json['QR'];
remaniningHoursTocanPay = json['RemaniningHoursTocanPay']; remaniningHoursTocanPay = json['RemaniningHoursTocanPay'];
sMSButtonVisable = json['SMSButtonVisable']; sMSButtonVisable = json['SMSButtonVisable'];
serviceID = json['ServiceID'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -269,6 +274,7 @@ class AppoitmentAllHistoryResultList {
data['QR'] = this.qR; data['QR'] = this.qR;
data['RemaniningHoursTocanPay'] = this.remaniningHoursTocanPay; data['RemaniningHoursTocanPay'] = this.remaniningHoursTocanPay;
data['SMSButtonVisable'] = this.sMSButtonVisable; data['SMSButtonVisable'] = this.sMSButtonVisable;
data['ServiceID'] = this.serviceID;
return data; return data;
} }
} }
@ -278,7 +284,8 @@ class PatientAppointmentList {
List<AppoitmentAllHistoryResultList> patientDoctorAppointmentList = List(); List<AppoitmentAllHistoryResultList> patientDoctorAppointmentList = List();
PatientAppointmentList( PatientAppointmentList(
{this.filterName, AppoitmentAllHistoryResultList patientDoctorAppointment}) { {this.filterName,
AppoitmentAllHistoryResultList patientDoctorAppointment}) {
patientDoctorAppointmentList.add(patientDoctorAppointment); patientDoctorAppointmentList.add(patientDoctorAppointment);
} }
} }

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

@ -12,6 +12,7 @@ class PatientShareResponse {
int companyShareWithTax; int companyShareWithTax;
String doctorImageURL; String doctorImageURL;
String doctorNameObj; String doctorNameObj;
int doctorID;
List<String> doctorSpeciality; List<String> doctorSpeciality;
dynamic errCode; dynamic errCode;
int groupID; int groupID;
@ -47,6 +48,7 @@ class PatientShareResponse {
dynamic statusDesc; dynamic statusDesc;
dynamic subPolicyNo; dynamic subPolicyNo;
int userID; int userID;
int serviceID;
PatientShareResponse( PatientShareResponse(
{this.advanceNumber, {this.advanceNumber,
@ -60,6 +62,7 @@ class PatientShareResponse {
this.companyId, this.companyId,
this.companyName, this.companyName,
this.companyShareWithTax, this.companyShareWithTax,
this.doctorID,
this.doctorImageURL, this.doctorImageURL,
this.doctorNameObj, this.doctorNameObj,
this.doctorSpeciality, this.doctorSpeciality,
@ -96,7 +99,8 @@ class PatientShareResponse {
this.statusCode, this.statusCode,
this.statusDesc, this.statusDesc,
this.subPolicyNo, this.subPolicyNo,
this.userID}); this.userID,
this.serviceID});
PatientShareResponse.fromJson(Map<String, dynamic> json) { PatientShareResponse.fromJson(Map<String, dynamic> json) {
advanceNumber = json['AdvanceNumber']; advanceNumber = json['AdvanceNumber'];
@ -110,6 +114,7 @@ class PatientShareResponse {
companyId = json['CompanyId']; companyId = json['CompanyId'];
companyName = json['CompanyName']; companyName = json['CompanyName'];
companyShareWithTax = json['CompanyShareWithTax']; companyShareWithTax = json['CompanyShareWithTax'];
doctorID = json['DoctorID'];
doctorImageURL = json['DoctorImageURL']; doctorImageURL = json['DoctorImageURL'];
doctorNameObj = json['DoctorNameObj']; doctorNameObj = json['DoctorNameObj'];
doctorSpeciality = json['DoctorSpeciality'].cast<String>(); doctorSpeciality = json['DoctorSpeciality'].cast<String>();
@ -147,6 +152,7 @@ class PatientShareResponse {
statusDesc = json['StatusDesc']; statusDesc = json['StatusDesc'];
subPolicyNo = json['SubPolicyNo']; subPolicyNo = json['SubPolicyNo'];
userID = json['UserID']; userID = json['UserID'];
serviceID = json['ServiceID'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -162,6 +168,7 @@ class PatientShareResponse {
data['CompanyId'] = this.companyId; data['CompanyId'] = this.companyId;
data['CompanyName'] = this.companyName; data['CompanyName'] = this.companyName;
data['CompanyShareWithTax'] = this.companyShareWithTax; data['CompanyShareWithTax'] = this.companyShareWithTax;
data['DoctorID'] = this.doctorID;
data['DoctorImageURL'] = this.doctorImageURL; data['DoctorImageURL'] = this.doctorImageURL;
data['DoctorNameObj'] = this.doctorNameObj; data['DoctorNameObj'] = this.doctorNameObj;
data['DoctorSpeciality'] = this.doctorSpeciality; data['DoctorSpeciality'] = this.doctorSpeciality;
@ -199,6 +206,7 @@ class PatientShareResponse {
data['StatusDesc'] = this.statusDesc; data['StatusDesc'] = this.statusDesc;
data['SubPolicyNo'] = this.subPolicyNo; data['SubPolicyNo'] = this.subPolicyNo;
data['UserID'] = this.userID; data['UserID'] = this.userID;
data['ServiceID'] = this.serviceID;
return data; 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 ProjectID;
var LanguageID; var LanguageID;
var DeviceTypeID; var DeviceTypeID;
var DeviceType;
var AppointmentNo; var AppointmentNo;
var IPAdress; var IPAdress;
var VersionID; var VersionID;

@ -210,11 +210,13 @@ class _BookConfirmState extends State<BookConfirm> {
"assets/images/new-design/icon_hospital.png"), "assets/images/new-design/icon_hospital.png"),
), ),
Container( Container(
width: MediaQuery.of(context).size.width * 0.7,
margin: EdgeInsets.fromLTRB(20.0, 5.0, 10.0, 5.0), margin: EdgeInsets.fromLTRB(20.0, 5.0, 10.0, 5.0),
child: Text( child: Text(
TranslationBase.of(context).clinic + TranslationBase.of(context).clinic +
": " + ": " +
widget.doctor.clinicName, widget.doctor.clinicName,
overflow: TextOverflow.clip,
style: TextStyle( style: TextStyle(
fontSize: 14.0, fontSize: 14.0,
color: Colors.grey[700], 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, disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4), disabledColor: new Color(0xFFbcc2c4),
onPressed: () { onPressed: () {
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList(); AppoitmentAllHistoryResultList appo =
new AppoitmentAllHistoryResultList();
appo.clinicID = widget.docObject.clinicID; appo.clinicID = widget.docObject.clinicID;
appo.projectID = widget.docObject.projectID; 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); confirmAppointment(appo);
}, },
child: Text( child: Text(
@ -336,7 +341,33 @@ class _BookSuccessState extends State<BookSuccess> {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service
.confirmAppointment( .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) { .then((res) {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
@ -346,7 +377,8 @@ class _BookSuccessState extends State<BookSuccess> {
} }
}).catchError((err) { }).catchError((err) {
print(err); print(err);
}).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); }).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
Widget _getPayNowAppo() { Widget _getPayNowAppo() {

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

@ -24,7 +24,7 @@ class _ApointmentCardState extends State<AppointmentCard> {
navigateToAppointmentDetails(context, widget.appo); navigateToAppointmentDetails(context, widget.appo);
}, },
child: Card( 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, color: Colors.white,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10), 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/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:rating_bar/rating_bar.dart'; import 'package:rating_bar/rating_bar.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart'; import 'package:smart_progress_bar/smart_progress_bar.dart';
@ -37,8 +38,6 @@ class _ToDoState extends State<ToDo> {
@override @override
void initState() { void initState() {
// authUser = authProvider.getAuthenticatedUser();
print("initState!!!!!");
widget.patientShareResponse = new PatientShareResponse(); widget.patientShareResponse = new PatientShareResponse();
WidgetsBinding.instance WidgetsBinding.instance
.addPostFrameCallback((_) => getPatientAppointmentHistory()); .addPostFrameCallback((_) => getPatientAppointmentHistory());
@ -50,7 +49,9 @@ class _ToDoState extends State<ToDo> {
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).todoList, appBarTitle: TranslationBase.of(context).todoList,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Column(
children: <Widget>[
Container(
child: ListView.builder( child: ListView.builder(
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
@ -80,19 +81,32 @@ class _ToDoState extends State<ToDo> {
width: 20.0, width: 20.0,
height: 20.0), height: 20.0),
Container( Container(
margin: EdgeInsets.only(left: 10.0, right: 30.0), margin:
EdgeInsets.only(left: 5.0, right: 25.0),
child: Text( child: Text(
getDate( getDate(widget
widget.appoList[index].appointmentDate), .appoList[index].appointmentDate),
style: TextStyle(fontSize: 12.0)), style: TextStyle(fontSize: 11.0)),
), ),
Image.asset( 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", "assets/images/new-design/hospital_address_icon.png",
width: 20.0, width: 20.0,
height: 20.0), height: 20.0),
Container( Container(
margin: EdgeInsets.only(left: 10.0, right: 10.0), margin:
child: Text(widget.appoList[index].projectName, 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)), style: TextStyle(fontSize: 12.0)),
), ),
], ],
@ -109,11 +123,12 @@ class _ToDoState extends State<ToDo> {
Expanded( Expanded(
flex: 1, flex: 1,
child: Container( child: Container(
height: height: MediaQuery.of(context).size.height *
MediaQuery.of(context).size.height * 0.1, 0.1,
margin: EdgeInsets.only(top: 5.0), margin: EdgeInsets.only(top: 5.0),
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(100.0), borderRadius:
BorderRadius.circular(100.0),
child: Image.network( child: Image.network(
widget.appoList[index].doctorImageURL, widget.appoList[index].doctorImageURL,
fit: BoxFit.fill), fit: BoxFit.fill),
@ -126,13 +141,14 @@ class _ToDoState extends State<ToDo> {
margin: EdgeInsets.only( margin: EdgeInsets.only(
top: 20.0, left: 20.0, right: 20.0), top: 20.0, left: 20.0, right: 20.0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Text( Text(
widget.appoList[index].doctorTitle + widget.appoList[index].doctorTitle +
" " + " " +
widget widget.appoList[index]
.appoList[index].doctorNameObj, .doctorNameObj,
style: TextStyle( style: TextStyle(
fontSize: 14.0, fontSize: 14.0,
color: Colors.black, color: Colors.black,
@ -158,7 +174,8 @@ class _ToDoState extends State<ToDo> {
children: <Widget>[ children: <Widget>[
RatingBar.readOnly( RatingBar.readOnly(
initialRating: widget initialRating: widget
.appoList[index].actualDoctorRate .appoList[index]
.actualDoctorRate
.toDouble(), .toDouble(),
size: 20.0, size: 20.0,
filledColor: Colors.yellow[700], filledColor: Colors.yellow[700],
@ -177,8 +194,8 @@ class _ToDoState extends State<ToDo> {
Expanded( Expanded(
flex: 1, flex: 1,
child: InkWell( child: InkWell(
onTap: () => onTap: () => performNextAction(
performNextAction(widget.appoList[index]), widget.appoList[index]),
child: Container( child: Container(
margin: EdgeInsets.only(top: 20.0), margin: EdgeInsets.only(top: 20.0),
child: Column( child: Column(
@ -192,9 +209,11 @@ class _ToDoState extends State<ToDo> {
margin: EdgeInsets.only(top: 5.0), margin: EdgeInsets.only(top: 5.0),
child: Text( child: Text(
getNextActionText(widget getNextActionText(widget
.appoList[index].nextAction), .appoList[index]
.nextAction),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(fontSize: 12.0)), style:
TextStyle(fontSize: 12.0)),
) )
], ],
), ),
@ -250,6 +269,11 @@ class _ToDoState extends State<ToDo> {
}, },
), ),
), ),
SizedBox(
height: 120.0,
),
],
),
), ),
); );
} }
@ -287,6 +311,10 @@ class _ToDoState extends State<ToDo> {
return "assets/images/new-design/confirm_button.png"; return "assets/images/new-design/confirm_button.png";
break; break;
case 60:
return "assets/images/new-design/waiting_for_doctor.png";
break;
default: default:
return ""; return "";
} }
@ -306,6 +334,8 @@ class _ToDoState extends State<ToDo> {
case 50: case 50:
confirmAppointment(appo); confirmAppointment(appo);
break; break;
case 60:
break;
} }
} }
@ -338,6 +368,10 @@ class _ToDoState extends State<ToDo> {
return TranslationBase.of(context).confirmLiveCare; return TranslationBase.of(context).confirmLiveCare;
break; break;
case 60:
return TranslationBase.of(context).waitingForDoctor;
break;
default: default:
return ""; return "";
} }
@ -372,6 +406,10 @@ class _ToDoState extends State<ToDo> {
return TranslationBase.of(context).upcomingLivecare; return TranslationBase.of(context).upcomingLivecare;
break; break;
case 60:
return TranslationBase.of(context).waitingForDoctor;
break;
default: default:
return ""; return "";
} }
@ -428,7 +466,6 @@ class _ToDoState extends State<ToDo> {
getPatientAppointmentHistory() { getPatientAppointmentHistory() {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service.getPatientAppointmentHistory(true, context).then((res) { service.getPatientAppointmentHistory(true, context).then((res) {
print(res['AppoimentAllHistoryResultList']);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
if (res['AppoimentAllHistoryResultList'].length != 0) { if (res['AppoimentAllHistoryResultList'].length != 0) {
@ -439,6 +476,10 @@ class _ToDoState extends State<ToDo> {
}); });
} else {} } else {}
}); });
widget.appoList.forEach((element) {
print(element.isLiveCareAppointment);
print(element.nextAction);
});
} else { } else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
@ -666,8 +707,8 @@ class _ToDoState extends State<ToDo> {
confirmAppointment(AppoitmentAllHistoryResultList appo) { confirmAppointment(AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service
.confirmAppointment( .confirmAppointment(appo.appointmentNo, appo.clinicID, appo.projectID,
appo.appointmentNo, appo.clinicID, appo.projectID, context) appo.isLiveCareAppointment, context)
.then((res) { .then((res) {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
@ -675,9 +716,40 @@ class _ToDoState extends State<ToDo> {
} else { } else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { })
.catchError((err) {
print(err); print(err);
}).showProgressBar( })
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); .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/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:rating_bar/rating_bar.dart'; import 'package:rating_bar/rating_bar.dart';
class TodoListCard extends StatefulWidget { class TodoListCard extends StatefulWidget {
@ -12,7 +13,6 @@ class TodoListCard extends StatefulWidget {
var languageID; var languageID;
final VoidCallback onListUpdated; final VoidCallback onListUpdated;
TodoListCard({@required this.appo, this.onListUpdated}); TodoListCard({@required this.appo, this.onListUpdated});
@override @override
@ -54,13 +54,21 @@ class _TodoListCardState extends State<TodoListCard> {
child: Text(getDate(widget.appo.appointmentDate), child: Text(getDate(widget.appo.appointmentDate),
style: TextStyle(fontSize: 12.0)), style: TextStyle(fontSize: 12.0)),
), ),
Image.asset( 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", "assets/images/new-design/hospital_address_icon.png",
width: 20.0, width: 20.0,
height: 20.0), height: 20.0),
Container( Container(
margin: EdgeInsets.only(left: 10.0, right: 10.0), margin: EdgeInsets.only(left: 10.0, right: 10.0),
child: Text(widget.appo.projectName, child: widget.appo.isLiveCareAppointment
? Text(TranslationBase.of(context).upcomingLivecare,
style: TextStyle(fontSize: 12.0))
: Text(widget.appo.projectName,
style: TextStyle(fontSize: 12.0)), style: TextStyle(fontSize: 12.0)),
), ),
], ],
@ -105,7 +113,10 @@ class _TodoListCardState extends State<TodoListCard> {
letterSpacing: 1.0)), letterSpacing: 1.0)),
Container( Container(
margin: EdgeInsets.only(top: 3.0, bottom: 3.0), 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( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
color: Colors.grey[600], color: Colors.grey[600],
@ -323,14 +334,13 @@ class _TodoListCardState extends State<TodoListCard> {
} }
String getMinute(DateTime dateObj) { String getMinute(DateTime dateObj) {
if(dateObj.minute == 0) { if (dateObj.minute == 0) {
return dateObj.minute.toString() + "0"; return dateObj.minute.toString() + "0";
} else { } else {
return dateObj.minute.toString(); return dateObj.minute.toString();
} }
} }
String getDoctorSpeciality(List<String> docSpecial) { String getDoctorSpeciality(List<String> docSpecial) {
String docSpeciality = ""; String docSpeciality = "";
docSpecial.forEach((v) { 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/ContactUs/hmg_service.dart';
import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.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/pages/paymentService/payment_service.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.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/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -56,44 +56,124 @@ class _HomePageState extends State<HomePage> {
child: Stack( child: Stack(
children: <Widget>[ children: <Widget>[
Positioned( Positioned(
top: 30, top: 15,
left: 15, left: 5,
right: 15, right: 5,
child: Container( child: Container(
width: width:
MediaQuery.of(context).size.width * 0.8, MediaQuery.of(context).size.width * 0.8,
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: InkWell(
onTap: () => Navigator.push(context,
FadePage(page: LiveCareHome())),
child: Container( child: Container(
height: 110, height: 120,
padding: EdgeInsets.all(15), padding: EdgeInsets.all(5),
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white image: DecorationImage(
.withOpacity(0.3), image: AssetImage("assets/images/new-design/covid_bg_transparent.png"),
fit: BoxFit.fill,
),
color:
Colors.white.withOpacity(0.3),
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(5))), Radius.circular(5))),
child: Image.asset( child: Container(
'assets/images/livecare_white_logo.png', 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( Expanded(
child: InkWell(
onTap: () => Navigator.push(context,
FadePage(page: LiveCareHome())),
child: Container( child: Container(
height: 110, height: 120,
padding: EdgeInsets.all(15), padding: EdgeInsets.all(15),
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
decoration: BoxDecoration( decoration: BoxDecoration(
color: color: Colors.white
Colors.white.withOpacity(0.3), .withOpacity(0.3),
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(5))), 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',
),
),
), ),
), ),
], ],

@ -74,7 +74,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
SvgPicture.asset("assets/images/new-design/check_icon.svg", SvgPicture.asset("assets/images/new-design/check_icon.svg",
width: 25), width: 25),
Container( Container(
width: MediaQuery.of(context).size.width * 0.75, width: MediaQuery.of(context).size.width * 0.72,
margin: EdgeInsets.all(10.0), margin: EdgeInsets.all(10.0),
child: Text( child: Text(
"No need to wait, you will get Medical consultation immediately via Video call.", "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", SvgPicture.asset("assets/images/new-design/check_icon.svg",
width: 25), width: 25),
Container( Container(
width: MediaQuery.of(context).size.width * 0.75, width: MediaQuery.of(context).size.width * 0.72,
margin: EdgeInsets.all(10.0), margin: EdgeInsets.all(10.0),
child: Text("The doctor will see your medical file.", child: Text("The doctor will see your medical file.",
overflow: TextOverflow.clip, overflow: TextOverflow.clip,
@ -107,7 +107,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
SvgPicture.asset("assets/images/new-design/check_icon.svg", SvgPicture.asset("assets/images/new-design/check_icon.svg",
width: 25), width: 25),
Container( Container(
width: MediaQuery.of(context).size.width * 0.75, width: MediaQuery.of(context).size.width * 0.72,
margin: EdgeInsets.all(10.0), margin: EdgeInsets.all(10.0),
child: Text("Free Prescription delivery service.", child: Text("Free Prescription delivery service.",
overflow: TextOverflow.clip, overflow: TextOverflow.clip,
@ -140,7 +140,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
width: 80), width: 80),
), ),
Container( 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), margin: EdgeInsets.fromLTRB(30.0, 20.0, 0.0, 0.0),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
@ -182,7 +182,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
width: 70), width: 70),
), ),
Container( 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), margin: EdgeInsets.fromLTRB(30.0, 30.0, 0.0, 0.0),
child: Column( child: Column(
children: <Widget>[ 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/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart'; import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.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/models/Request.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
@ -21,6 +22,8 @@ class DoctorsListService extends BaseService {
double lat; double lat;
double long; double long;
String deviceToken;
String tokenID;
Future<Map> getDoctorsList( Future<Map> getDoctorsList(
int clinicID, int projectID, bool isNearest, BuildContext context, int clinicID, int projectID, bool isNearest, BuildContext context,
@ -48,7 +51,7 @@ class DoctorsListService extends BaseService {
"VersionID": req.VersionID, "VersionID": req.VersionID,
"Channel": req.Channel, "Channel": req.Channel,
"generalid": 'Cs2020@2016\$2958', "generalid": 'Cs2020@2016\$2958',
"PatientOutSA": 0, "PatientOutSA": authUser.outSA,
"TokenID": "", "TokenID": "",
"DeviceTypeID": req.DeviceTypeID, "DeviceTypeID": req.DeviceTypeID,
"SessionID": "YckwoXhUmWBsnHKEKig", "SessionID": "YckwoXhUmWBsnHKEKig",
@ -106,7 +109,7 @@ class DoctorsListService extends BaseService {
"VersionID": req.VersionID, "VersionID": req.VersionID,
"Channel": req.Channel, "Channel": req.Channel,
"generalid": 'Cs2020@2016\$2958', "generalid": 'Cs2020@2016\$2958',
"PatientOutSA": 0, "PatientOutSA": authUser.outSA,
"TokenID": "", "TokenID": "",
"DeviceTypeID": req.DeviceTypeID, "DeviceTypeID": req.DeviceTypeID,
"SessionID": null, "SessionID": null,
@ -146,7 +149,7 @@ class DoctorsListService extends BaseService {
"VersionID": req.VersionID, "VersionID": req.VersionID,
"Channel": req.Channel, "Channel": req.Channel,
"generalid": 'Cs2020@2016\$2958', "generalid": 'Cs2020@2016\$2958',
"PatientOutSA": 0, "PatientOutSA": authUser.outSA,
"TokenID": "", "TokenID": "",
"DeviceTypeID": req.DeviceTypeID, "DeviceTypeID": req.DeviceTypeID,
"SessionID": null, "SessionID": null,
@ -188,7 +191,7 @@ class DoctorsListService extends BaseService {
"LanguageID": languageID == 'ar' ? 1 : 2, "LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20", "IPAdress": "10.20.10.20",
"generalid": "Cs2020@2016\$2958", "generalid": "Cs2020@2016\$2958",
"PatientOutSA": 0, "PatientOutSA": authUser.outSA,
"SessionID": null, "SessionID": null,
"isDentalAllowedBackend": false, "isDentalAllowedBackend": false,
"DeviceTypeID": 1 "DeviceTypeID": 1
@ -224,7 +227,7 @@ class DoctorsListService extends BaseService {
"LanguageID": languageID == 'ar' ? 1 : 2, "LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20", "IPAdress": "10.20.10.20",
"generalid": "Cs2020@2016\$2958", "generalid": "Cs2020@2016\$2958",
"PatientOutSA": 0, "PatientOutSA": authUser.outSA,
"SessionID": null, "SessionID": null,
"isDentalAllowedBackend": false, "isDentalAllowedBackend": false,
"DeviceTypeID": 1 "DeviceTypeID": 1
@ -513,7 +516,7 @@ class DoctorsListService extends BaseService {
} }
Future<Map> confirmAppointment( 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; Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -527,6 +530,7 @@ class DoctorsListService extends BaseService {
request = { request = {
"AppointmentNumber": appoNo, "AppointmentNumber": appoNo,
"IsLiveCareAppointment": isLiveCare,
"ClinicID": clinicID, "ClinicID": clinicID,
"ProjectID": projectID, "ProjectID": projectID,
"ConfirmationBy": 102, "ConfirmationBy": 102,
@ -556,6 +560,62 @@ class DoctorsListService extends BaseService {
return Future.value(localRes); 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( Future<Map> cancelAppointment(
AppoitmentAllHistoryResultList appo, BuildContext context) async { AppoitmentAllHistoryResultList appo, BuildContext context) async {
Map<String, dynamic> request; Map<String, dynamic> request;

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

Loading…
Cancel
Save