|
|
|
|
@ -1,6 +1,4 @@
|
|
|
|
|
import 'dart:convert';
|
|
|
|
|
import 'dart:io';
|
|
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/config/config.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/service/base_service.dart';
|
|
|
|
|
@ -28,10 +26,10 @@ class DoctorsListService extends BaseService {
|
|
|
|
|
AuthenticatedUser authUser = new AuthenticatedUser();
|
|
|
|
|
AuthProvider authProvider = new AuthProvider();
|
|
|
|
|
|
|
|
|
|
double lat;
|
|
|
|
|
double long;
|
|
|
|
|
String deviceToken;
|
|
|
|
|
String tokenID;
|
|
|
|
|
late double lat;
|
|
|
|
|
late double long;
|
|
|
|
|
late String deviceToken;
|
|
|
|
|
late String tokenID;
|
|
|
|
|
List<LaserBodyPart> selectedBodyPartList = [];
|
|
|
|
|
|
|
|
|
|
Future<Map> getDoctorsList(int clinicID, int projectID, bool isNearest, BuildContext context, {doctorId, doctorName, isContinueDentalPlan = false}) async {
|
|
|
|
|
@ -92,8 +90,8 @@ class DoctorsListService extends BaseService {
|
|
|
|
|
Future<Map> getDoctorsListByName(String docName, BuildContext context) async {
|
|
|
|
|
Map<String, dynamic> request;
|
|
|
|
|
|
|
|
|
|
double lat;
|
|
|
|
|
double long;
|
|
|
|
|
late double lat;
|
|
|
|
|
late double long;
|
|
|
|
|
|
|
|
|
|
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
|
|
|
|
|
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
|
|
|
|
|
@ -257,7 +255,7 @@ class DoctorsListService extends BaseService {
|
|
|
|
|
return Future.value(localRes);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future<Map> getDoctorFreeSlots(int docID, int clinicID, int projectID, BuildContext context, [ProjectViewModel projectViewModel]) async {
|
|
|
|
|
Future<Map> getDoctorFreeSlots(int docID, int clinicID, int projectID, BuildContext context, [ProjectViewModel? projectViewModel]) async {
|
|
|
|
|
Map<String, dynamic> request;
|
|
|
|
|
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
|
|
|
|
|
Request req = appGlobal.getPublicRequest();
|
|
|
|
|
@ -281,7 +279,7 @@ class DoctorsListService extends BaseService {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
if (clinicID == 253) {
|
|
|
|
|
List<String> procedureID = projectViewModel.selectedBodyPartList.map((element) => element.id.toString()).toList();
|
|
|
|
|
List<String> procedureID = projectViewModel!.selectedBodyPartList.map((element) => element.id.toString()).toList();
|
|
|
|
|
request["GeneralProcedureList"] = procedureID;
|
|
|
|
|
if (procedureID.length == 1 && procedureID[0] == "1") {
|
|
|
|
|
request["ProcedureSlotDuration"] = 90;
|
|
|
|
|
@ -799,7 +797,7 @@ class DoctorsListService extends BaseService {
|
|
|
|
|
"IsForLiveCare": appo.isLiveCareAppointment,
|
|
|
|
|
"OriginalClinicID": appo.originalClinicID,
|
|
|
|
|
"OriginalProjectID": appo.originalProjectID,
|
|
|
|
|
"StrAppointmentDate": DateUtil.getDateFormatted(appo.appointmentDate),
|
|
|
|
|
"StrAppointmentDate": DateUtil.getDateFormatted(appo.appointmentDate!),
|
|
|
|
|
"VersionID": req.VersionID,
|
|
|
|
|
"Channel": req.Channel,
|
|
|
|
|
"LanguageID": languageID == 'ar' ? 1 : 2,
|
|
|
|
|
@ -1306,7 +1304,7 @@ class DoctorsListService extends BaseService {
|
|
|
|
|
"ListPrescriptions": prescriptionReportEnhList,
|
|
|
|
|
"PatientIditificationNum": authUser.patientIdentificationNo,
|
|
|
|
|
"PatientMobileNumber": authUser.mobileNumber,
|
|
|
|
|
"PatientName": authUser.firstName + " " + authUser.lastName,
|
|
|
|
|
"PatientName": authUser.firstName! + " " + authUser.lastName!,
|
|
|
|
|
"To": authUser.emailAddress,
|
|
|
|
|
"SetupID": setupId,
|
|
|
|
|
"VersionID": req.VersionID,
|
|
|
|
|
@ -1395,7 +1393,7 @@ class DoctorsListService extends BaseService {
|
|
|
|
|
"AccountID": patientID,
|
|
|
|
|
"PaymentAmount": payedAmount,
|
|
|
|
|
"NationalityID": null,
|
|
|
|
|
"DepositorName": authUser.firstName + " " + authUser.lastName,
|
|
|
|
|
"DepositorName": authUser.firstName! + " " + authUser.lastName!,
|
|
|
|
|
"CreatedBy": 3,
|
|
|
|
|
"PaymentMethodName": paymentMethodName,
|
|
|
|
|
"PaymentReference": paymentReference,
|
|
|
|
|
@ -1443,7 +1441,7 @@ class DoctorsListService extends BaseService {
|
|
|
|
|
"ProjectId": projectID,
|
|
|
|
|
"PatientId": authUser.patientID,
|
|
|
|
|
"ClinicId": 10,
|
|
|
|
|
"DepositorName": authUser.firstName + " " + authUser.lastName,
|
|
|
|
|
"DepositorName": authUser.firstName! + " " + authUser.lastName!,
|
|
|
|
|
"MemberId": authUser.patientID,
|
|
|
|
|
"NationalityID": authUser.nationalityID,
|
|
|
|
|
"PaymentAmount": payedAmount,
|
|
|
|
|
@ -1487,7 +1485,7 @@ class DoctorsListService extends BaseService {
|
|
|
|
|
"PatientId": authUser.patientID,
|
|
|
|
|
"ClinicId": 10,
|
|
|
|
|
"FormId": 15,
|
|
|
|
|
"DepositorName": authUser.firstName + " " + authUser.lastName,
|
|
|
|
|
"DepositorName": authUser.firstName! + " " + authUser.lastName!,
|
|
|
|
|
"MemberId": authUser.patientID,
|
|
|
|
|
"NationalityID": authUser.nationalityID,
|
|
|
|
|
"PaymentAmount": payedAmount,
|
|
|
|
|
@ -1604,14 +1602,14 @@ class DoctorsListService extends BaseService {
|
|
|
|
|
"apple_signature": applePayRequest.appleSignature,
|
|
|
|
|
"apple_header": {
|
|
|
|
|
"apple_applicationData": "76a9a9cb2d9811e8de56d8e7713601bfa6acda3d488b1cf03b9b115bc3ff12b4",
|
|
|
|
|
"apple_ephemeralPublicKey": applePayRequest.appleHeader.appleEphemeralPublicKey,
|
|
|
|
|
"apple_publicKeyHash": applePayRequest.appleHeader.applePublicKeyHash,
|
|
|
|
|
"apple_transactionId": applePayRequest.appleHeader.appleTransactionId
|
|
|
|
|
"apple_ephemeralPublicKey": applePayRequest.appleHeader!.appleEphemeralPublicKey!,
|
|
|
|
|
"apple_publicKeyHash": applePayRequest.appleHeader!.applePublicKeyHash!,
|
|
|
|
|
"apple_transactionId": applePayRequest.appleHeader!.appleTransactionId
|
|
|
|
|
},
|
|
|
|
|
"apple_paymentMethod": {
|
|
|
|
|
"apple_displayName": applePayRequest.applePaymentMethod.appleDisplayName,
|
|
|
|
|
"apple_network": applePayRequest.applePaymentMethod.appleNetwork,
|
|
|
|
|
"apple_type": applePayRequest.applePaymentMethod.appleType
|
|
|
|
|
"apple_displayName": applePayRequest.applePaymentMethod!.appleDisplayName,
|
|
|
|
|
"apple_network": applePayRequest.applePaymentMethod!.appleNetwork,
|
|
|
|
|
"apple_type": applePayRequest.applePaymentMethod!.appleType
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
dynamic localRes;
|
|
|
|
|
@ -1808,7 +1806,7 @@ class DoctorsListService extends BaseService {
|
|
|
|
|
return Future.value(localRes);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future<Map> logDoctorFreeSlots(int docID, int clinicID, int projectID, List<dynamic> selectedfreeSlots, dynamic appoNumber, BuildContext context, [ProjectViewModel projectViewModel]) async {
|
|
|
|
|
Future<Map> logDoctorFreeSlots(int docID, int clinicID, int projectID, List<dynamic> selectedfreeSlots, dynamic appoNumber, BuildContext context, [ProjectViewModel? projectViewModel]) async {
|
|
|
|
|
Map<String, dynamic> requestFreeSlots;
|
|
|
|
|
Map<String, dynamic> request;
|
|
|
|
|
|
|
|
|
|
|