Compare commits

..

No commits in common. 'dev_v3.13.6' and 'dev_v3.13.6_deep_link' have entirely different histories.

@ -174,20 +174,20 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<!-- <intent-filter android:autoVerify="true">-->
<!-- <action android:name="android.intent.action.VIEW" />-->
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<!-- <category android:name="android.intent.category.DEFAULT" />-->
<!-- <category android:name="android.intent.category.BROWSABLE" />-->
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- <data-->
<!-- android:host="hmg.com"-->
<!-- android:scheme="http" />-->
<!-- <data-->
<!-- android:host="www.hmg.com"-->
<!-- android:scheme="http" />-->
<!-- <data android:scheme="https" />-->
<!-- </intent-filter>-->
<data
android:host="hmg.com"
android:scheme="http" />
<data
android:host="www.hmg.com"
android:scheme="http" />
<data android:scheme="https" />
</intent-filter>
<intent-filter>
<action android:name="FLUTTER_NOTIFICATION_CLICK" />

@ -354,7 +354,7 @@ var CAN_PAY_FOR_FOR_WALKIN_APPOINTMENT = 'Services/Doctors.svc/REST/CanPayForWal
var CHANNEL = 3;
var GENERAL_ID = 'Cs2020@2016\$2958';
var IP_ADDRESS = '10.20.10.20';
var VERSION_ID = 18.7;
var VERSION_ID = 18.3;
var SETUP_ID = '91877';
var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0;

@ -2326,5 +2326,4 @@ const Map localizedValues = {
"liveCareTermsHeading16": {"en": "14. COMPLAINTS", "ar": "14. الشكاوى"},
"liveCareTermsConditions47": {"en": "Our Telehealth Services will be for specific medical specialties or follow-up or medication refill appointments.", "ar": "خدمات الرعاية الصحية عن بُعد الخاصة بنا سوف تكون لتخصصات طبية محددة أو لمواعيد المتابعة أو إعادة صرف الدواء. "},
"liveCareTermsConditions48": {"en": "If you have any complaints or concerns about the Application and or the Website, Our Services, or how we handle your personal information please contact us on: EServices.HMG@drsulaimanalhabib.com or call 011 525 9553", "ar": "إذا كانت لديك أي شكاوى أو مخاوف بشأن التطبيق و/أو موقع الويب أو خدماتنا أو كيفية تعاملنا مع معلوماتك الشخصية، فيرجى التواصل معنا على: EServices.HMG@drsulaimanalhabib.com أو الاتصال على الرقم: 9553 525 011"},
"clickPrivacyPolicy": {"en": "Please click here to view the privacy policy", "ar": "الرجاء الضغط هنا لعرض سياسة الخصوصية"},
};

@ -28,7 +28,6 @@ class RequestSendPrescriptionEmail {
int? projectID;
List<PrescriptionReport>? listPrescriptions;
List<PrescriptionReportINP>? listPrescriptionsINP;
bool? isDownload;
RequestSendPrescriptionEmail(
{this.appointmentDate,
@ -54,8 +53,7 @@ class RequestSendPrescriptionEmail {
this.clinicName,
this.doctorName,
this.projectID,
this.doctorID,
this.isDownload});
this.doctorID});
RequestSendPrescriptionEmail.fromJson(Map<String, dynamic> json) {
appointmentDate = json['AppointmentDate'];
@ -116,7 +114,6 @@ class RequestSendPrescriptionEmail {
data['DoctorName'] = this.doctorName;
data['ProjectID'] = this.projectID;
data['DoctorID'] = this.doctorID;
data['IsDownload'] = this.isDownload;
return data;
}
}

@ -44,7 +44,6 @@ class FinalRadiology {
bool? isCVI;
bool? isRadMedicalReport;
bool? isLiveCareAppointment;
String? exam_Id;
FinalRadiology(
{this.setupID,
@ -89,8 +88,7 @@ class FinalRadiology {
this.speciality,
this.isCVI,
this.isRadMedicalReport,
this.isLiveCareAppointment,
this.exam_Id});
this.isLiveCareAppointment});
FinalRadiology.fromJson(Map<String, dynamic> json) {
try {
@ -137,7 +135,6 @@ class FinalRadiology {
// speciality = json['Speciality'].cast<String>();
isCVI = json['isCVI'];
isRadMedicalReport = json['isRadMedicalReport'];
exam_Id = json['Exam_id'];
} catch (e) {
print(e);
}

@ -28,7 +28,6 @@ class RequestSendRadReportEmail {
String? tokenID;
double? versionID;
int? invoiceLineItemNo;
bool? isDownload;
RequestSendRadReportEmail(
{this.channel,
@ -58,7 +57,7 @@ class RequestSendRadReportEmail {
this.setupID,
this.to,
this.tokenID,
this.versionID, this.isDownload});
this.versionID});
RequestSendRadReportEmail.fromJson(Map<String, dynamic> json) {
channel = json['Channel'];
@ -123,7 +122,6 @@ class RequestSendRadReportEmail {
data['TokenID'] = this.tokenID;
data['VersionID'] = this.versionID;
data['InvoiceLineItemNo'] = this.invoiceLineItemNo;
data['IsDownload'] = this.isDownload;
return data;
}
}

@ -187,7 +187,7 @@ class BaseAppClient {
// body['IdentificationNo'] = 1023854217;
// body['MobileNo'] = "531940021"; //0560717232
// body['PatientID'] = 5690832; //4609100
// body['PatientID'] = 2007395; //4609100
// body['TokenID'] = "@dm!n";
// Patient ID: 3027574

@ -3,16 +3,15 @@ import 'package:diplomaticquarterapp/core/model/sick_leave/sick_leave.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
class PatientSickLeaveService extends BaseService {
List<SickLeave> sickLeaveList = [];
String sickLeavePDF = "";
List<SickLeave> sickLeaveList =[];
getSickLeave() async {
hasError = false;
super.error = "";
await baseAppClient.post(GET_PATIENT_SICK_LEAVE_STATUS, onSuccess: (response, statusCode) async {
await baseAppClient.post(GET_PATIENT_SICK_LEAVE_STATUS,
onSuccess: (response, statusCode) async {
sickLeaveList.clear();
if (response['List_SickLeave'] != null && response['List_SickLeave'].length != 0) {
if(response['List_SickLeave'] != null && response['List_SickLeave'].length != 0) {
response['List_SickLeave'].forEach((sickLeave) {
sickLeaveList.add(SickLeave.fromJson(sickLeave));
});
@ -23,7 +22,12 @@ class PatientSickLeaveService extends BaseService {
}, body: Map());
}
sendSickLeaveEmail({required int requestNo, required String projectName, required String doctorName, required int projectID, required String setupID, required bool isDownload}) async {
sendSickLeaveEmail(
{required int requestNo,
required String projectName,
required String doctorName,
required int projectID,
required String setupID}) async {
hasError = false;
super.error = "";
Map<String, dynamic> body = Map();
@ -37,12 +41,9 @@ class PatientSickLeaveService extends BaseService {
body['DoctorName'] = doctorName;
body['ProjectID'] = projectID;
body['SetupID'] = setupID;
body['IsDownload'] = isDownload;
await baseAppClient.post(SendSickLeaveEmail, onSuccess: (response, statusCode) async {
if(isDownload) {
sickLeavePDF = response['Base64Data'];
}
}, onFailure: (String error, int statusCode) {
await baseAppClient
.post(SendSickLeaveEmail, onSuccess: (response, statusCode) async {},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);

@ -55,7 +55,7 @@ class MedicalService extends BaseService {
getSchedule(DoctorList doctorRequest) async {
Map<String, dynamic> request;
request = {'DoctorID': doctorRequest.doctorID, 'ProjectID': doctorRequest.projectID, 'ClinicID': doctorRequest.clinicID, 'DoctorWorkingHoursDays': 90};
request = {'DoctorID': doctorRequest.doctorID, 'ProjectID': doctorRequest.projectID, 'ClinicID': doctorRequest.clinicID, 'DoctorWorkingHoursDays': 7};
dynamic localRes;
await baseAppClient.post(DOCTOR_SCHEDULE_URL, onSuccess: (response, statusCode) async {
localRes = response;
@ -68,7 +68,7 @@ class MedicalService extends BaseService {
getFreeSlot(DoctorList doctorRequest) async {
Map<String, dynamic> request;
request = {'DoctorID': doctorRequest.doctorID, 'ProjectID': doctorRequest.projectID, 'ClinicID': doctorRequest.clinicID, 'DoctorWorkingHoursDays': 90};
request = {'DoctorID': doctorRequest.doctorID, 'ProjectID': doctorRequest.projectID, 'ClinicID': doctorRequest.clinicID, 'DoctorWorkingHoursDays': 7};
dynamic localRes;
await baseAppClient.post(GET_DOCTOR_FREE_SLOTS, onSuccess: (response, statusCode) async {
localRes = response;

@ -16,14 +16,12 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:flutter/cupertino.dart';
class PrescriptionsService extends BaseService {
List<Prescriptions> prescriptionsList = [];
List<PrescriptionReportINP> prescriptionReportListINP = [];
List<GetCMCAllOrdersResponseModel> prescriptionsOrderList = [];
List<PrescriptionInfoRCModel> prescriptionsOrderListRC = [];
List<Prescriptions> prescriptionsList =[];
List<PrescriptionReportINP> prescriptionReportListINP =[];
List<GetCMCAllOrdersResponseModel> prescriptionsOrderList =[];
List<PrescriptionInfoRCModel> prescriptionsOrderListRC =[];
var isMedDeliveryAllowed;
String prescriptionReportPDF = "";
Future getPrescriptions() async {
hasError = false;
Map<String, dynamic> body = Map();
@ -82,7 +80,7 @@ class PrescriptionsService extends BaseService {
}
RequestPrescriptionReport _requestPrescriptionReport = RequestPrescriptionReport(appointmentNo: 0, isDentalAllowedBackend: false);
List<PrescriptionReport> prescriptionReportList = [];
List<PrescriptionReport> prescriptionReportList =[];
Future getPrescriptionReport({required Prescriptions prescriptions}) async {
hasError = false;
@ -123,7 +121,7 @@ class PrescriptionsService extends BaseService {
isDentalAllowedBackend: false,
);
Future sendPrescriptionEmail(String appointmentDate, int patientID, String clinicName, String doctorName, int doctorID, int projectID, bool isInOutPatient, bool isDownload) async {
Future sendPrescriptionEmail(String appointmentDate, int patientID, String clinicName, String doctorName, int doctorID, int projectID, bool isInOutPatient) async {
_requestSendPrescriptionEmail.listPrescriptions = prescriptionReportList;
_requestSendPrescriptionEmail.listPrescriptionsINP = prescriptionReportListINP;
_requestSendPrescriptionEmail.appointmentDate = appointmentDate;
@ -139,13 +137,8 @@ class PrescriptionsService extends BaseService {
_requestSendPrescriptionEmail.patientName = user.firstName! + " " + user.lastName!;
_requestSendPrescriptionEmail.setupID = user.setupID;
_requestSendPrescriptionEmail.to = user.emailAddress;
_requestSendPrescriptionEmail.isDownload = isDownload;
hasError = false;
await baseAppClient.post(SEND_PRESCRIPTION_EMAIL, onSuccess: (response, statusCode) {
if (isDownload) {
prescriptionReportPDF = response["Base64Data"];
}
}, onFailure: (String error, int statusCode) {
await baseAppClient.post(SEND_PRESCRIPTION_EMAIL, onSuccess: (response, statusCode) {}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _requestSendPrescriptionEmail.toJson());
@ -156,7 +149,7 @@ class PrescriptionsService extends BaseService {
longitude: 0,
isDentalAllowedBackend: false,
);
List<PharmacyPrescriptions> pharmacyPrescriptionsList = [];
List<PharmacyPrescriptions> pharmacyPrescriptionsList =[];
Future getListPharmacyForPrescriptions({required int itemId}) async {
hasError = false;
@ -184,7 +177,7 @@ class PrescriptionsService extends BaseService {
isDentalAllowedBackend: false,
);
List<PrescriptionReportEnh> prescriptionReportEnhList = [];
List<PrescriptionReportEnh> prescriptionReportEnhList =[];
Future getPrescriptionReportEnh({required PrescriptionsOrder prescriptionsOrder}) async {
bool isInPatient = false;

@ -10,9 +10,7 @@ class RadiologyService extends BaseService {
bool isRadiologyVIDAPlus = false;
String radReportPDF = "";
Future getRadImageURL({int? invoiceNo, String? invoiceType, int? lineItem, int? projectId, bool? isVidaPlus, String? examId}) async {
Future getRadImageURL({int? invoiceNo, String? invoiceType, int? lineItem, int? projectId, bool? isVidaPlus}) async {
hasError = false;
final Map<String, dynamic> body = new Map<String, dynamic>();
body['InvoiceNo'] = isVidaPlus! ? "0" : invoiceNo;
@ -20,7 +18,6 @@ class RadiologyService extends BaseService {
body['LineItemNo'] = lineItem;
body['ProjectID'] = projectId;
body['InvoiceType'] = invoiceType;
body['ExamId'] = examId;
await baseAppClient.post(GET_RAD_IMAGE_URL, isAllowAny: true, onSuccess: (dynamic response, int statusCode) {
url = response['Data'];
@ -67,7 +64,7 @@ class RadiologyService extends BaseService {
RequestSendRadReportEmail _requestSendRadReportEmail = RequestSendRadReportEmail();
Future sendRadReportEmail({FinalRadiology? finalRadiology, AuthenticatedUser? userObj, required bool isDownload}) async {
Future sendRadReportEmail({FinalRadiology? finalRadiology, AuthenticatedUser? userObj}) async {
_requestSendRadReportEmail.projectID = finalRadiology!.projectID;
_requestSendRadReportEmail.clinicName = finalRadiology.clinicDescription;
_requestSendRadReportEmail.invoiceNo = finalRadiology.invoiceNo;
@ -84,14 +81,9 @@ class RadiologyService extends BaseService {
_requestSendRadReportEmail.to = userObj.emailAddress;
_requestSendRadReportEmail.dateofBirth = userObj.dateofBirth;
_requestSendRadReportEmail.invoiceType = finalRadiology.invoiceType;
_requestSendRadReportEmail.isDownload = isDownload;
hasError = false;
await baseAppClient.post(SEND_RAD_REPORT_EMAIL, isAllowAny: true, onSuccess: (dynamic response, int statusCode) {
if(isDownload) {
radReportPDF = response["Base64Data"];
}
}, onFailure: (String error, int statusCode) {
await baseAppClient.post(SEND_RAD_REPORT_EMAIL, isAllowAny: true, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _requestSendRadReportEmail.toJson());

@ -195,7 +195,6 @@ class ReportsService extends BaseService {
body['ClinicName'] = clinicName;
body['ProjectID'] = projectID;
body['InvoiceNo'] = invoiceNo;
body['InvoiceNo_VP'] = invoiceNo;
body['PrintedByName'] = user.firstName! + " " + user.lastName!;
dynamic response;

@ -5,19 +5,11 @@ import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'dart:convert';
import 'dart:io';
import 'dart:typed_data';
import 'package:open_filex/open_filex.dart';
import 'package:path_provider/path_provider.dart';
class PatientSickLeaveViewMode extends BaseViewModel {
PatientSickLeaveService _patientSickLeaveService = locator<PatientSickLeaveService>();
List<SickLeave> get sickLeaveList => _patientSickLeaveService.sickLeaveList;
String get sickLeavePDF => _patientSickLeaveService.sickLeavePDF;
getSickLeave() async {
setState(ViewState.Busy);
await _patientSickLeaveService.getSickLeave();
@ -29,36 +21,16 @@ class PatientSickLeaveViewMode extends BaseViewModel {
}
}
Future sendSickLeaveEmail(
{required String message, required int requestNo, required String projectName, required String doctorName, required int projectID, required String setupID, required bool isDownload}) async {
Future sendSickLeaveEmail({required String message, required int requestNo, required String projectName, required String doctorName, required int projectID, required String setupID}) async {
setState(ViewState.Busy);
await _patientSickLeaveService.sendSickLeaveEmail(requestNo: requestNo, projectName: projectName, doctorName: doctorName, projectID: projectID, setupID: setupID, isDownload: isDownload);
await _patientSickLeaveService.sendSickLeaveEmail(requestNo: requestNo, projectName: projectName, doctorName: doctorName, projectID: projectID, setupID: setupID);
if (_patientSickLeaveService.hasError) {
error = _patientSickLeaveService.error!;
setState(ViewState.ErrorLocal);
AppToast.showErrorToast(message: error);
} else {
if (isDownload) {
if (sickLeavePDF.isNotEmpty) {
String path = await _createFileFromString(sickLeavePDF, "pdf");
try {
OpenFilex.open(path);
} catch (ex) {
AppToast.showErrorToast(message: "Cannot open file.");
}
}
} else {
AppToast.showSuccessToast(message: message);
}
AppToast.showSuccessToast(message: message);
setState(ViewState.Idle);
}
}
Future<String> _createFileFromString(String encodedStr, String ext) async {
Uint8List bytes = base64.decode(encodedStr);
String dir = (await getApplicationDocumentsDirectory()).path;
File file = File("$dir/" + DateTime.now().millisecondsSinceEpoch.toString() + "." + ext);
await file.writeAsBytes(bytes);
return file.path;
}
}

@ -7,7 +7,6 @@ import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_repor
import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:flutter/cupertino.dart';
import 'package:open_filex/open_filex.dart';
import '../../../core/enum/filter_type.dart';
import '../../../core/enum/viewstate.dart';
@ -16,20 +15,17 @@ import '../../../core/service/medical/prescriptions_service.dart';
import '../../../locator.dart';
import '../base_view_model.dart';
import 'dart:convert';
import 'dart:io';
import 'dart:typed_data';
import 'package:path_provider/path_provider.dart';
class PrescriptionsViewModel extends BaseViewModel {
FilterType filterType = FilterType.Clinic;
PrescriptionsService _prescriptionsService = locator<PrescriptionsService>();
List<PrescriptionsList> _prescriptionsOrderListClinic = [];
List<PrescriptionsList> _prescriptionsOrderListHospital = [];
List<PrescriptionsList> _prescriptionsOrderListClinic =[];
List<PrescriptionsList> _prescriptionsOrderListHospital =[];
List<PrescriptionReport> get prescriptionReportList => _prescriptionsService.prescriptionReportList;
List<PrescriptionReportINP> get prescriptionReportListINP => _prescriptionsService.prescriptionReportListINP;
List<Prescriptions> get prescriptionsList => _prescriptionsService.prescriptionsList;
@ -49,9 +45,6 @@ class PrescriptionsViewModel extends BaseViewModel {
}
get isMedDeliveryAllowed => _prescriptionsService.isMedDeliveryAllowed;
String get prescriptionReportPDF => _prescriptionsService.prescriptionReportPDF;
getPrescriptions() async {
setState(ViewState.Busy);
await _prescriptionsService.getPrescriptions();
@ -121,36 +114,15 @@ class PrescriptionsViewModel extends BaseViewModel {
}
}
sendPrescriptionEmail(
{required String appointmentDate,
required int patientID,
required String clinicName,
required String doctorName,
required int doctorID,
required String mes,
required int projectID,
required bool isInOutPatient,
required bool isDownload}) async {
sendPrescriptionEmail({required String appointmentDate, required int patientID, required String clinicName, required String doctorName, required int doctorID, required String mes, required int projectID, required bool isInOutPatient}) async {
setState(ViewState.BusyLocal);
await _prescriptionsService.sendPrescriptionEmail(appointmentDate, patientID, clinicName, doctorName, doctorID, projectID, isInOutPatient, isDownload);
await _prescriptionsService.sendPrescriptionEmail(appointmentDate, patientID, clinicName, doctorName, doctorID, projectID, isInOutPatient);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error!;
setState(ViewState.ErrorLocal);
AppToast.showErrorToast(message: error);
} else {
if (isDownload) {
if (prescriptionReportPDF.isNotEmpty) {
String path = await _createFileFromString(prescriptionReportPDF, "pdf");
try {
OpenFilex.open(path);
} catch (ex) {
AppToast.showErrorToast(message: "Cannot open file.");
}
}
} else {
AppToast.showSuccessToast(message: mes);
}
// AppToast.showSuccessToast(message: mes);
AppToast.showSuccessToast(message: mes);
setState(ViewState.Idle);
}
}
@ -188,14 +160,6 @@ class PrescriptionsViewModel extends BaseViewModel {
}
}
Future<String> _createFileFromString(String encodedStr, String ext) async {
Uint8List bytes = base64.decode(encodedStr);
String dir = (await getApplicationDocumentsDirectory()).path;
File file = File("$dir/" + DateTime.now().millisecondsSinceEpoch.toString() + "." + ext);
await file.writeAsBytes(bytes);
return file.path;
}
Future updatePressOrder({required int presOrderID}) async {
setState(ViewState.Busy);
// await _prescriptionsService.updatePressOrder(presOrderID: presOrderID);

@ -9,18 +9,12 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import '../../../locator.dart';
import '../base_view_model.dart';
import 'dart:convert';
import 'dart:io';
import 'dart:typed_data';
import 'package:open_filex/open_filex.dart';
import 'package:path_provider/path_provider.dart';
class RadiologyViewModel extends BaseViewModel {
FilterType filterType = FilterType.Clinic;
RadiologyService _radiologyService = locator<RadiologyService>();
List<FinalRadiologyList> _finalRadiologyListClinic = [];
List<FinalRadiologyList> _finalRadiologyListHospital = [];
List<FinalRadiologyList> _finalRadiologyListClinic =[];
List<FinalRadiologyList> _finalRadiologyListHospital =[];
List<FinalRadiologyList> get finalRadiologyList => filterType == FilterType.Clinic ? _finalRadiologyListClinic : _finalRadiologyListHospital;
@ -28,8 +22,6 @@ class RadiologyViewModel extends BaseViewModel {
bool get isRadiologyVIDAPlus => _isRadiologyVIDAPlus;
String get radReportPDF => _radiologyService.radReportPDF;
void getPatientRadOrders() async {
setState(ViewState.Busy);
await _radiologyService.getPatientRadOrders();
@ -56,9 +48,9 @@ class RadiologyViewModel extends BaseViewModel {
String get radImageURL => _radiologyService.url;
getRadImageURL({required int invoiceNo, String? invoiceType, required int lineItem, required int projectId, required bool isVidaPlus, required String examId}) async {
getRadImageURL({required int invoiceNo, String? invoiceType, required int lineItem, required int projectId, required bool isVidaPlus}) async {
setState(ViewState.Busy);
await _radiologyService.getRadImageURL(invoiceNo: invoiceNo, invoiceType: invoiceType, lineItem: lineItem, projectId: projectId, isVidaPlus: isVidaPlus, examId: examId);
await _radiologyService.getRadImageURL(invoiceNo: invoiceNo, invoiceType: invoiceType, lineItem: lineItem, projectId: projectId, isVidaPlus: isVidaPlus);
if (_radiologyService.hasError) {
error = _radiologyService.error!;
setState(ViewState.Error);
@ -66,38 +58,18 @@ class RadiologyViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
sendRadReportEmail({required FinalRadiology finalRadiology, required String mes, required AuthenticatedUser userObj, required isDownload}) async {
sendRadReportEmail({required FinalRadiology finalRadiology, required String mes, required AuthenticatedUser userObj}) async {
setState(ViewState.BusyLocal);
await _radiologyService.sendRadReportEmail(finalRadiology: finalRadiology, userObj: userObj, isDownload: isDownload);
await _radiologyService.sendRadReportEmail(finalRadiology: finalRadiology, userObj: userObj);
if (_radiologyService.hasError) {
error = _radiologyService.error!;
AppToast.showErrorToast(message: error);
} else {
if (isDownload) {
if (radReportPDF.isNotEmpty) {
String path = await _createFileFromString(radReportPDF, "pdf");
try {
OpenFilex.open(path);
} catch (ex) {
AppToast.showErrorToast(message: "Cannot open file.");
}
}
} else {
AppToast.showSuccessToast(message: mes);
}
// AppToast.showSuccessToast(message: mes);
AppToast.showSuccessToast(message: mes);
}
setState(ViewState.Idle);
}
Future<String> _createFileFromString(String encodedStr, String ext) async {
Uint8List bytes = base64.decode(encodedStr);
String dir = (await getApplicationDocumentsDirectory()).path;
File file = File("$dir/" + DateTime.now().millisecondsSinceEpoch.toString() + "." + ext);
await file.writeAsBytes(bytes);
return file.path;
}
setFilterType(FilterType filterType) {
this.filterType = filterType;
notifyListeners();

@ -15,7 +15,6 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
@ -81,11 +80,8 @@ class _DentalComplaintsState extends State<DentalComplaints> {
padding: const EdgeInsets.all(14.0),
child: AppExpandableNotifier(
isExpand: true,
title: patientDoctorAppointmentListHospital[index].filterName! +
" - " +
patientDoctorAppointmentListHospital[index].distanceInKMs! +
" " +
TranslationBase.of(context).km,
title:
patientDoctorAppointmentListHospital[index].filterName! + " - " + patientDoctorAppointmentListHospital[index].distanceInKMs! + " " + TranslationBase.of(context).km,
bodyWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -115,11 +111,7 @@ class _DentalComplaintsState extends State<DentalComplaints> {
isFromHospitalSearchPage: widget.isFromHospitalSearchPage,
onDoctorFetched: widget.isFromHospitalSearchPage
? (doctorsList) {
if (doctorsList.registeredDoctorMap?.isNotEmpty == true) {
Navigator.pop(context, doctorsList);
} else {
Utils.showErrorToast(TranslationBase.of(context).noDataAvailable);
}
Navigator.pop(context, doctorsList);
}
: null,
)..logAnalytics = () {

@ -51,10 +51,10 @@ class _SearchByHospitalState extends State<SearchByHospital> {
@override
void initState() {
WidgetsBinding.instance.addPostFrameCallback((_) {
locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
locationUtils.getCurrentLocation();
getProjectsList();
});
locationUtils =
new LocationUtils(isShowConfirmDialog: true, context: context);
}
@override
@ -290,15 +290,18 @@ class _SearchByHospitalState extends State<SearchByHospital> {
service.getProjectsList(languageID, context).then((res) async {
if (res['MessageStatus'] == 1) {
res['ListProject'].forEach((v) {
projectsListLocal.add(new HospitalsModel.fromJson(v));
});
projectsList = projectsListLocal;
hospitalList = await DoctorMapper.getMappedHospitals(projectsList, isArabic: context.read<ProjectViewModel>().isArabic);
projectsListLocal.add(new HospitalsModel.fromJson(v));
});
projectsList = projectsListLocal;
hospitalList = await DoctorMapper.getMappedHospitals(projectsList,
isArabic: context.read<ProjectViewModel>().isArabic);
var lat = await sharedPref.getDouble(USER_LAT);
var lng = await sharedPref.getDouble(USER_LONG);
var isLocationEnabled = (lat != null && lat != 0.0) && (lng != null && lng != 0.0);
hospitalList = await DoctorMapper.sortList(isLocationEnabled, hospitalList!);
var isLocationEnabled =
(lat != null && lat != 0.0) && (lng != null && lng != 0.0);
hospitalList =
await DoctorMapper.sortList(isLocationEnabled, hospitalList!);
setState(() {});
GifLoaderDialogUtils.hideDialog(context);
} else {}
@ -425,7 +428,14 @@ class _SearchByHospitalState extends State<SearchByHospital> {
DoctorsListService service = new DoctorsListService();
service
.getDoctorsList(clinicID, selectedHospital?.mainProjectID.toString() != "" ? int.parse(selectedHospital?.mainProjectID.toString() ?? "-1") : 0, nearestAppo, languageID, null)
.getDoctorsList(
clinicID,
selectedHospital?.mainProjectID.toString() != ""
? int.parse(selectedHospital?.mainProjectID.toString() ?? "-1")
: 0,
nearestAppo,
languageID,
null)
.then((res) async {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
@ -438,12 +448,15 @@ class _SearchByHospitalState extends State<SearchByHospital> {
));
});
regionHospitalList = await DoctorMapper.getMappedDoctor(doctorsList, isArabic: isArabic);
regionHospitalList = await DoctorMapper.getMappedDoctor(doctorsList,
isArabic: isArabic);
var lat = await sharedPref.getDouble(USER_LAT);
var lng = await sharedPref.getDouble(USER_LONG);
var isLocationEnabled = (lat != null && lat != 0.0) && (lng != null && lng != 0.0);
regionHospitalList = await DoctorMapper.sortList(isLocationEnabled, regionHospitalList);
var isLocationEnabled = (lat != null && lat != 0.0) &&
(lng != null && lng != 0.0);
regionHospitalList =
await DoctorMapper.sortList(isLocationEnabled, regionHospitalList);
setState(() {});
} else {

@ -25,9 +25,10 @@ import '../../../uitl/gif_loader_dialog_utils.dart';
class ResultByClinic extends StatefulWidget {
HospitalsModel? selectedValue;
Function(RegionList, int?) onClinicSelected;
Function(RegionList) onClinicSelected;
ResultByClinic({super.key, this.selectedValue, required this.onClinicSelected});
ResultByClinic(
{super.key, this.selectedValue, required this.onClinicSelected});
@override
State<ResultByClinic> createState() => _ResultByClinicState();
@ -39,7 +40,8 @@ class _ResultByClinicState extends State<ResultByClinic> {
@override
void initState() {
super.initState();
WidgetsBinding.instance.addPostFrameCallback((_) => getClinicWrtHospital(widget.selectedValue));
WidgetsBinding.instance.addPostFrameCallback(
(_) => getClinicWrtHospital(widget.selectedValue));
}
@override
@ -50,56 +52,66 @@ class _ResultByClinicState extends State<ResultByClinic> {
child: clinicIds?.isNotEmpty == true
? ListView.builder(
itemBuilder: (_, index) => InkWell(
onTap: () {
getDoctorsList(
context,
"${clinicIds?[index].clinicID.toString() ?? ''}-${clinicIds?[index].isLiveCareClinicAndOnline!.toString()}-${clinicIds?[index].liveCareClinicID.toString()}-${clinicIds?[index].liveCareServiceID.toString()}",
clinicIds?[index].clinicDescription!,
widget.selectedValue,
clinicIds?[index]);
},
child: Material(
color: CustomColors.white,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 24),
child: Row(
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
clinicIds?[index].clinicDescription ?? '',
style: TextStyle(fontSize: 22, color: Colors.black, fontWeight: FontWeight.w700),
),
],
),
),
Padding(
padding: EdgeInsets.all(8),
child: Center(
child: Icon(
Icons.arrow_forward_ios,
color: CustomColors.black,
size: 16,
),
),
),
],
)),
onTap: () {
getDoctorsList(
context,
"${clinicIds?[index].clinicID.toString() ?? ''}-${clinicIds?[index].isLiveCareClinicAndOnline!.toString()}-${clinicIds?[index].liveCareClinicID.toString()}-${clinicIds?[index].liveCareServiceID.toString()}",
clinicIds?[index].clinicDescription!,
widget.selectedValue,
clinicIds?[index]);
},
child: Material(
color: CustomColors.white,
child: Padding(
padding:
const EdgeInsets.symmetric(horizontal: 16, vertical: 24),
child: Row(
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
clinicIds?[index].clinicDescription ?? '',
style: TextStyle(
fontSize: 22,
color: Colors.black,
fontWeight: FontWeight.w700),
),
],
),
),
),
itemCount: clinicIds?.length ?? 0,
Padding(
padding: EdgeInsets.all(8),
child: Center(
child: Icon(
Icons.arrow_forward_ios,
color: CustomColors.black,
size: 16,
),
),
),
],
)),
),
),
itemCount: clinicIds?.length ?? 0,
)
: getNoDataWidget(context)),
],
);
}
getDoctorsList(BuildContext context, String? dropdownValue, String? dropdownTitle, HospitalsModel? selectedHospital, ListClinicCentralized? selectedClinic) {
getDoctorsList(
BuildContext context,
String? dropdownValue,
String? dropdownTitle,
HospitalsModel? selectedHospital,
ListClinicCentralized? selectedClinic) {
SearchInfo searchInfo = new SearchInfo();
if (dropdownValue != null) if (dropdownValue!.split("-")[0] == "17") {
searchInfo.ProjectID = int.parse(selectedHospital?.mainProjectID.toString() ?? "");
searchInfo.ProjectID =
int.parse(selectedHospital?.mainProjectID.toString() ?? "");
searchInfo.ClinicID = int.parse(dropdownValue!.split("-")[0]);
searchInfo.hospital = selectedHospital;
searchInfo.clinic = selectedClinic;
@ -124,7 +136,10 @@ class _ResultByClinicState extends State<ResultByClinic> {
Navigator.push(
context,
FadePage(
page: LiveCareBookAppointment(clinicName: dropdownTitle, liveCareClinicID: dropdownValue!.split("-")[2], liveCareServiceID: dropdownValue!.split("-")[3]),
page: LiveCareBookAppointment(
clinicName: dropdownTitle,
liveCareClinicID: dropdownValue!.split("-")[2],
liveCareServiceID: dropdownValue!.split("-")[3]),
),
).then((value) {
print("navigation return ");
@ -154,7 +169,8 @@ class _ResultByClinicState extends State<ResultByClinic> {
).then((value) {});
}
Future navigateToDentalComplaints(BuildContext context, SearchInfo searchInfo) async {
Future navigateToDentalComplaints(
BuildContext context, SearchInfo searchInfo) async {
Navigator.push(
context,
FadePage(
@ -165,7 +181,7 @@ class _ResultByClinicState extends State<ResultByClinic> {
),
).then((value) {
if (value is RegionList) {
widget.onClinicSelected(value,null);
widget.onClinicSelected(value);
}
});
}
@ -179,11 +195,20 @@ class _ResultByClinicState extends State<ResultByClinic> {
List<String> arrDistance = [];
List<String> result;
int numAll;
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = [];
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital =
[];
DoctorsListService service = new DoctorsListService();
service
.getDoctorsList(clinicID, widget.selectedValue?.mainProjectID.toString() != "" ? int.parse(widget.selectedValue?.mainProjectID.toString() ?? "-1") : 0, false, languageID, null)
.getDoctorsList(
clinicID,
widget.selectedValue?.mainProjectID.toString() != ""
? int.parse(
widget.selectedValue?.mainProjectID.toString() ?? "-1")
: 0,
false,
languageID,
null)
.then((res) async {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
@ -196,13 +221,16 @@ class _ResultByClinicState extends State<ResultByClinic> {
));
});
regionHospitalList = await DoctorMapper.getMappedDoctor(doctorsList, isArabic: isArabic);
regionHospitalList = await DoctorMapper.getMappedDoctor(doctorsList,
isArabic: isArabic);
var lat = await sharedPref.getDouble(USER_LAT);
var lng = await sharedPref.getDouble(USER_LONG);
var isLocationEnabled = (lat != null && lat != 0.0) && (lng != null && lng != 0.0);
regionHospitalList = await DoctorMapper.sortList(isLocationEnabled, regionHospitalList);
widget.onClinicSelected(regionHospitalList, clinicID);
var isLocationEnabled =
(lat != null && lat != 0.0) && (lng != null && lng != 0.0);
regionHospitalList = await DoctorMapper.sortList(
isLocationEnabled, regionHospitalList);
widget.onClinicSelected(regionHospitalList);
setState(() {});
} else {
GifLoaderDialogUtils.hideDialog(context);
@ -230,7 +258,8 @@ class _ResultByClinicState extends State<ResultByClinic> {
clinicIds = List.empty();
List<ListClinicCentralized> clinicId = [];
try {
Map res = await service.getClinicByHospital(projectID: newValue?.mainProjectID.toString() ?? "");
Map res = await service.getClinicByHospital(
projectID: newValue?.mainProjectID.toString() ?? "");
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
List list = res['ListClinic'];

@ -1,11 +1,7 @@
import 'package:auto_size_text/auto_size_text.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/OBGyneProcedureListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
@ -17,76 +13,28 @@ class ResultByDoctor extends StatefulWidget {
final bool isObGyneAppointment;
final bool isDoctorNameSearch;
final bool isDoctorSearchResult;
final bool showNearestAppointment;
final bool nearestAppointmentDoctors;
final OBGyneProcedureListResponse? obGyneProcedureListResponse;
final Function(bool)? refreshDoctorList;
ResultByDoctor({
required this.doctorsList,
required this.patientDoctorAppointmentListHospital,
required this.isLiveCareAppointment,
required this.isObGyneAppointment,
required this.isDoctorNameSearch,
required this.isDoctorSearchResult,
this.showNearestAppointment = false,
this.nearestAppointmentDoctors = false,
this.obGyneProcedureListResponse,
this.refreshDoctorList
});
ResultByDoctor(
{required this.doctorsList,
required this.patientDoctorAppointmentListHospital,
required this.isLiveCareAppointment,
required this.isObGyneAppointment,
required this.isDoctorNameSearch,
required this.isDoctorSearchResult,
this.obGyneProcedureListResponse,
});
@override
State<ResultByDoctor> createState() => _ResultByDoctorState();
}
class _ResultByDoctorState extends State<ResultByDoctor> {
bool nearestAppo = false;
@override
void initState() {
nearestAppo = widget.nearestAppointmentDoctors;
super.initState();
}
@override
Widget build(BuildContext context) {
return Column(
children: [
Visibility(
visible: widget.showNearestAppointment,
child: Padding(
padding: const EdgeInsets.only(left: 6, right: 6,),
child: Row(
children: <Widget>[
Checkbox(
activeColor: CustomColors.accentColor,
value: nearestAppo,
onChanged: (bool? value) {
setState(() {
nearestAppo = value ?? false;
});
widget.refreshDoctorList?.call(nearestAppo);
},
),
AutoSizeText(
TranslationBase.of(context).nearestAppo.trim(),
maxLines: 1,
minFontSize: 10,
style: TextStyle(
fontSize: SizeConfig.textMultiplier! * 1.4,
fontWeight: FontWeight.w600,
letterSpacing: -0.39,
height: 0.8,
),
),
// Text(TranslationBase.of(context).nearestAppo, style: TextStyle(fontSize: 14.0, letterSpacing: -0.56)),
],
),
),
),
widget.patientDoctorAppointmentListHospital?.isNotEmpty == true
? Expanded(
return SizedBox(
child: widget.patientDoctorAppointmentListHospital?.isNotEmpty == true
? Padding(
padding: const EdgeInsets.all(12.0),
child: ListView.separated(
addAutomaticKeepAlives: true,
physics: BouncingScrollPhysics(),
@ -99,27 +47,31 @@ class _ResultByDoctorState extends State<ResultByDoctor> {
);
},
itemBuilder: (context, index) {
final doctor = widget.patientDoctorAppointmentListHospital![index];
final doctor =
widget.patientDoctorAppointmentListHospital![index];
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 12.0),
child: DoctorView(
doctor: doctor,
isLiveCareAppointment: widget.isLiveCareAppointment,
isObGyneAppointment: widget.isObGyneAppointment,
isDoctorNameSearch: widget.isDoctorNameSearch,
obGyneProcedureListResponse: widget.obGyneProcedureListResponse,
isShowDate: false,
onTap: () {
context.read<ProjectViewModel>().analytics.appointment.book_appointment_select_doctor(appointment_type: 'regular', doctor: doctor);
}),
);
return DoctorView(
doctor: doctor,
isLiveCareAppointment: widget.isLiveCareAppointment,
isObGyneAppointment: widget.isObGyneAppointment,
isDoctorNameSearch: widget.isDoctorNameSearch,
obGyneProcedureListResponse:
widget.obGyneProcedureListResponse,
isShowDate: false,
onTap: () {
context
.read<ProjectViewModel>()
.analytics
.appointment
.book_appointment_select_doctor(
appointment_type: 'regular', doctor: doctor);
});
},
itemCount: widget.patientDoctorAppointmentListHospital?.length ?? 0,
itemCount:
widget.patientDoctorAppointmentListHospital?.length ?? 0,
),
)
: getNoDataWidget(context),
],
: getNoDataWidget(context),
);
}

@ -9,11 +9,7 @@ import 'package:diplomaticquarterapp/pages/BookAppointment/search_result/ResultB
import 'package:diplomaticquarterapp/pages/BookAppointment/search_result/ResultByHospital.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/search_result/ResultByRegion.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/appointment_services/doctor_response_mapper.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
@ -21,9 +17,6 @@ import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
import '../../../config/shared_pref_kay.dart';
import '../../../core/service/client/base_app_client.dart';
class SearchResultWithTabForHospital extends StatefulWidget {
List<DoctorList> doctorsList = [];
RegionList patientDoctorAppointmentListHospital;
@ -61,8 +54,6 @@ class _SearchResultWithTabForHospitalState
int selectedHospitalIndex = -1;
ScrollController scrollController = ScrollController();
RegionList? doctorList;
bool nearestAppointment= false;
int clinicId = -1;
@override
void initState() {
@ -144,8 +135,6 @@ class _SearchResultWithTabForHospitalState
doctorList = null;
_currentIndex = 0;
changePageViewIndex(0);
nearestAppointment = false;
clinicId = -1;
});
},
),
@ -170,9 +159,6 @@ class _SearchResultWithTabForHospitalState
doctorList = null;
_currentIndex = 1;
changePageViewIndex(1);
nearestAppointment = false;
clinicId = -1;
});
},
),
@ -197,9 +183,6 @@ class _SearchResultWithTabForHospitalState
doctorList = null;
_currentIndex = 2;
changePageViewIndex(2);
nearestAppointment = false;
clinicId = -1;
});
},
),
@ -220,12 +203,9 @@ class _SearchResultWithTabForHospitalState
: CustomColors.grey2,
onTap: () {
setState(() {
_currentIndex = 3;
doctorList = null;
changePageViewIndex(3);
_currentIndex = 3;
nearestAppointment= false;
clinicId = -1;
});
},
),
@ -370,14 +350,11 @@ class _SearchResultWithTabForHospitalState
selectedRegion != '' &&
selectedHospitalIndex != -1)
? ResultByClinic(
onClinicSelected: (doctorList, clinicId) {
onClinicSelected: (doctorList) {
setState(() {
this.nearestAppointment = false;
this.doctorList = doctorList;
_currentIndex = 4;
changePageViewIndex(4);
if(clinicId != null)
this.clinicId = clinicId;
});
},
selectedValue: selectedHospital)
@ -407,19 +384,7 @@ class _SearchResultWithTabForHospitalState
widget.isLiveCareAppointment,
isDoctorSearchResult: widget.isDoctorSearchResult,
isObGyneAppointment: widget.isObGyneAppointment,
isDoctorNameSearch: widget.isDoctorNameSearch,
showNearestAppointment: clinicId != -1 ,
nearestAppointmentDoctors: nearestAppointment,
refreshDoctorList: (isNearestAppointmentChecked){
setState(() {
// changePageViewIndex(3);
// _currentIndex = 3;
nearestAppointment= false;
});
callDoctorsSearchAPI(clinicId, isNearestAppointmentChecked);
},
)
isDoctorNameSearch: widget.isDoctorNameSearch)
: SizedBox.shrink(),
],
),
@ -430,62 +395,6 @@ class _SearchResultWithTabForHospitalState
);
}
callDoctorsSearchAPI(int clinicID, bool nearestAppointment) {
var isArabic = context.read<ProjectViewModel>().isArabic;
int languageID = isArabic ? 1 : 2;
GifLoaderDialogUtils.showMyDialog(context);
List<DoctorList> doctorsList = [];
List<String> arr = [];
List<String> arrDistance = [];
List<String> result;
int numAll;
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = [];
DoctorsListService service = new DoctorsListService();
service
.getDoctorsList(clinicID, selectedHospital?.mainProjectID.toString() != "" ? int.parse(selectedHospital?.mainProjectID.toString() ?? "-1") : 0, nearestAppointment, languageID, null)
.then((res) async {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
RegionList regionHospitalList = RegionList();
if (res['DoctorList'].length != 0) {
res['DoctorList'].forEach((v) {
doctorsList.add(new DoctorList.fromJson(
v,
));
});
regionHospitalList = await DoctorMapper.getMappedDoctor(doctorsList, isArabic: isArabic);
var lat = await sharedPref.getDouble(USER_LAT);
var lng = await sharedPref.getDouble(USER_LONG);
var isLocationEnabled = (lat != null && lat != 0.0) && (lng != null && lng != 0.0);
regionHospitalList = await DoctorMapper.sortList(isLocationEnabled, regionHospitalList);
setState(() {
this.doctorList = regionHospitalList;
_currentIndex = 4;
changePageViewIndex(4);
this.nearestAppointment = nearestAppointment;
});
} else {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: res['ErrorSearchMsg']);
}
GifLoaderDialogUtils.hideDialog(context);
// navigateToSearchResults(context, doctorsList, _patientDoctorAppointmentListHospital);
} else {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
AppToast.showErrorToast(message: err, localContext: context);
});
}
String getTitle() {
switch (_currentIndex) {
case 0:

@ -137,11 +137,11 @@ class _DoctorViewState extends State<DoctorView> {
// getDoctorSpeciality(this.doctor.speciality).trim(),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 18 / 12),
),
if (widget.doctor.nearestFreeSlot != null)
Text(
getDate(widget.doctor.nearestFreeSlot),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff359846), letterSpacing: -0.48, height: 18 / 12),
),
// if (widget.doctor.nearestFreeSlot != null)
// Text(
// getDate(widget.doctor.nearestFreeSlot),
// style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff359846), letterSpacing: -0.48, height: 18 / 12),
// ),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.max,

@ -154,8 +154,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
onTap: (index) {
setState(() {
if (index == 1) {
if (
// widget.appo.clinicID == 17 ||
if (widget.appo.clinicID == 17 ||
widget.appo.clinicID == 47 ||
widget.appo.clinicID == 23 ||
widget.appo.clinicID == 253 ||
@ -174,7 +173,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
},
tabs: [
Tab(child: Text(TranslationBase.of(context).appoActions, style: TextStyle(color: Colors.black))),
// widget.appo.clinicID == 17 ||
widget.appo.clinicID == 17 ||
widget.appo.clinicID == 23 ||
widget.appo.clinicID == 47 ||
widget.appo.clinicID == 265 ||

@ -8,10 +8,8 @@ import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_mode
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/SearchInfoModel.dart';
import 'package:diplomaticquarterapp/models/Appointments/appoDetailsButtons.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/DentalComplaints.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/reminder_dialog.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/ArrivedButtons.dart';
@ -85,11 +83,12 @@ class _AppointmentActionsState extends State<AppointmentActions> {
shrinkWrap: true,
itemBuilder: (context, index) {
// bool shouldEnable = ((widget.appo.clinicID == 17 || widget.appo.clinicID == 47) || (widget.appo.isLiveCareAppointment && appoButtonsList[index].caller == "askDoc") || appoButtonsList[index].caller == "openReschedule");
bool shouldEnable = (((widget.appo.clinicID == 47 || widget.appo.clinicID == 134 || widget.appo.clinicID == 253) && appoButtonsList[index].caller == "openReschedule") ||
(widget.appo.isLiveCareAppointment! && appoButtonsList[index].caller == "askDoc") ||
(Utils.isVidaPlusProject(projectViewModel, widget.appo.projectID) &&
widget.appo.clinicID == 10 &&
(appoButtonsList[index].caller == "prescriptions" || appoButtonsList[index].caller == "radiology" || appoButtonsList[index].caller == "labResult")));
bool shouldEnable =
(((widget.appo.clinicID == 17 || widget.appo.clinicID == 47 || widget.appo.clinicID == 134 || widget.appo.clinicID == 253) && appoButtonsList[index].caller == "openReschedule") ||
(widget.appo.isLiveCareAppointment! && appoButtonsList[index].caller == "askDoc") ||
(Utils.isVidaPlusProject(projectViewModel, widget.appo.projectID) &&
widget.appo.clinicID == 10 &&
(appoButtonsList[index].caller == "prescriptions" || appoButtonsList[index].caller == "radiology" || appoButtonsList[index].caller == "labResult")));
return InkWell(
onTap: shouldEnable
? null

@ -96,7 +96,7 @@ class _PrescriptionReportState extends State<PrescriptionReportPage> {
child: Button(
label: 'Send Copy',
onTap: () {
sendPrescriptionReportEmail(true);
sendPrescriptionReportEmail();
},
),
),
@ -112,10 +112,10 @@ class _PrescriptionReportState extends State<PrescriptionReportPage> {
);
}
sendPrescriptionReportEmail(bool isDownload) {
sendPrescriptionReportEmail() {
DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service.sendPrescriptionEmail(widget.appo.appointmentDate!, widget.appo.setupID!, projectViewModel!.isArabic ? 1 : 2, widget.listPres, isDownload, context).then((res) {
service.sendPrescriptionEmail(widget.appo.appointmentDate!, widget.appo.setupID!, projectViewModel!.isArabic ? 1 : 2, widget.listPres, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showSuccessToast(message: 'A copy has been sent to the e-mail');
}).catchError((err) {

@ -15,7 +15,6 @@ import 'package:flutter_zoom_videosdk/native/zoom_videosdk_event_listener.dart';
import 'package:flutter_zoom_videosdk/native/zoom_videosdk_live_transcription_message_info.dart';
import 'package:flutter_zoom_videosdk/native/zoom_videosdk_user.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:wakelock_plus/wakelock_plus.dart';
// import '../components/video_view.dart';
// import '../components/comment_list.dart';
@ -77,7 +76,6 @@ class _CallScreenState extends State<CallScreen> {
useEffect(() {
Future<void>.microtask(() async {
WakelockPlus.enable();
var token = generateJwt(args.sessionName, args.role);
try {
Map<String, bool> SDKaudioOptions = {"connect": true, "mute": false, "autoAdjustSpeakerVolume": false};
@ -172,7 +170,6 @@ class _CallScreenState extends State<CallScreen> {
fullScreenUser.value = null;
await zoom.leaveSession(false);
Navigator.pop(context);
WakelockPlus.disable();
});
final sessionNeedPasswordListener = emitter.on(EventType.onSessionNeedPassword, (data) async {
@ -475,7 +472,8 @@ class _CallScreenState extends State<CallScreen> {
],
),
);
if (errorType == Errors.SessionJoinFailed || errorType == Errors.SessionDisconnecting) {
if (errorType == Errors.SessionJoinFailed ||
errorType == Errors.SessionDisconnecting) {
Timer(
const Duration(milliseconds: 1000),
() => Navigator.pop(context),
@ -1159,7 +1157,6 @@ class _CallScreenState extends State<CallScreen> {
}
void onLeaveSession(bool isEndSession) async {
WakelockPlus.disable();
await zoom.leaveSession(isEndSession);
Navigator.pop(context);
// Navigator.pop(context);

@ -118,7 +118,6 @@ class _LiveCareCallTypeSelectPageState extends State<LiveCareCallTypeSelectPage>
},
mobileNo: this.mobileNo,
isLiveCareTypeSelect: true,
isEnable: false,
),
],
),

@ -99,7 +99,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
late ToDoCountProviderModel toDoProvider;
var dob;
int isHijri = 0;
late int isHijri;
var healthId;
@override
@ -646,7 +646,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
} else {
authService
.checkActivationCode(request, value)
.then((result) async => {
.then((result) => {
res = result,
if (result is Map)
{
@ -674,11 +674,11 @@ class _ConfirmLogin extends State<ConfirmLogin> {
//Remove o+ from here Added by Aamir
authenticatedUserObject.user = result.list,
projectViewModel.setPrivilege(privilegeList: res),
await sharedPref.setObject(MAIN_USER, result.list),
await sharedPref.setObject(USER_PROFILE, result.list),
sharedPref.setObject(MAIN_USER, result.list),
sharedPref.setObject(USER_PROFILE, result.list),
loginTokenID = result.logInTokenID,
await sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID),
await sharedPref.setString(TOKEN, result.authenticationTokenID),
sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID),
sharedPref.setString(TOKEN, result.authenticationTokenID),
checkIfUserAgreedBefore(result),
projectViewModel.analytics.loginRegistration.login_successful(),
}

@ -76,7 +76,7 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
},
),
)
..loadRequest(Uri.parse(widget.isArabic ? "https://hmg.com/ar/Pages/MBTerms.aspx" : "https://hmg.com/en/Pages/MBTerms.aspx"));
..loadRequest(Uri.parse(widget.isArabic ? "https://hmg.com/ar/Pages/Privacy.aspx" : "https://hmg.com/en/Pages/Privacy.aspx"));
}
@override
@ -90,12 +90,9 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
showNewAppBar: true,
isShowDecPage: false,
appBarTitle: TranslationBase.of(context).userAgreement,
body:
// isTermsAndConditionsPage
// ?
// getTermsAndConditionsContent(),
// :
isPageLoaded
body: isTermsAndConditionsPage
? getTermsAndConditionsContent()
: isPageLoaded
? WebViewWidget(controller: _controller)
: Container(
child: Center(
@ -142,24 +139,6 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
letterSpacing: -0.64,
),
),
mHeight(24.0),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Checkbox(
value: acceptTerms,
onChanged: (v) {
setState(() => acceptTerms = v!);
}),
Expanded(
child: Text(
TranslationBase.of(context).termsConditionsRead,
style: TextStyle(
fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24),
),
),
],
),
SizedBox(height: 12),
Row(
mainAxisAlignment: MainAxisAlignment.end,
@ -176,18 +155,17 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
elevation: 0,
onPressed: isPageLoaded
? () {
// if (isTermsAndConditionsPage) {
if (acceptTerms) {
addUsageAgreement();
// setState(() {
// isTermsAndConditionsPage = false;
// });
if (isTermsAndConditionsPage) {
if (acceptTerms) {
setState(() {
isTermsAndConditionsPage = false;
});
} else {
AppToast.showErrorToast(message: TranslationBase.of(context).pleaseAcceptTerms);
}
} else {
AppToast.showErrorToast(message: TranslationBase.of(context).pleaseAcceptTerms);
addUsageAgreement();
}
// } else {
// addUsageAgreement();
// }
}
: null,
child: Text(TranslationBase.of(context).acceptLbl.toUpperCase(),
@ -260,24 +238,6 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24),
),
mHeight(12.0),
// InkWell(
// onTap: () async {
// await launchUrl(uri);
// Uri.parse(widget.isArabic ? "https://hmg.com/ar/Pages/Privacy.aspx" : "https://hmg.com/en/Pages/Privacy.aspx");
// },
// child: Text(
// TranslationBase.of(context).clickPrivacyPolicy,
// style: TextStyle(
// fontSize: 16,
// fontWeight: FontWeight.bold,
// fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'),
// color: Colors.blue,
// letterSpacing: -1.44,
// height: 35 / 24,
// decoration: TextDecoration.underline),
// ),
// ),
mHeight(12.0),
Text(
TranslationBase.of(context).termsConditions4,
style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24),

@ -120,16 +120,14 @@ class MyBalancePage extends StatelessWidget {
),
),
mWidth(6),
projectViewModel.user!.outSA == 1
? Container()
: projectViewModel.isArabic
? SvgPicture.asset(
"assets/images/new/Saudi_Riyal_Symbol.svg",
width: 22,
height: 22,
color: Colors.white,
)
: Container(),
projectViewModel.isArabic
? SvgPicture.asset(
"assets/images/new/Saudi_Riyal_Symbol.svg",
width: 22,
height: 22,
color: Colors.white,
)
: Container(),
],
),
Text(
@ -201,11 +199,7 @@ class MyBalancePage extends StatelessWidget {
),
),
mWidth(6),
projectViewModel.user!.outSA == 1
? Container()
: projectViewModel.isArabic
? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16)
: Container(),
projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(),
],
),
],

@ -26,7 +26,7 @@ class PatientSickLeavePage extends StatefulWidget {
}
class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
List<ImagesInfo> imagesInfo = [];
List<ImagesInfo> imagesInfo =[];
@override
void initState() {
@ -37,6 +37,7 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<PatientSickLeaveViewMode>(
onModelReady: (model) => model.getSickLeave(),
builder: (_, model, w) => AppScaffold(
@ -49,29 +50,27 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
backgroundColor: Color(0xffF7F7F7),
imagesInfo: imagesInfo,
baseViewModel: model,
body: model.sickLeaveList.isNotEmpty
? ListView.separated(
physics: BouncingScrollPhysics(),
itemCount: model.sickLeaveList.length,
padding: EdgeInsets.all(21),
separatorBuilder: (context, index) => SizedBox(height: 14),
itemBuilder: (context, index) => DoctorCard(
isLiveCareAppointment: model.sickLeaveList[index].isLiveCareAppointment,
name: model.sickLeaveList[index].doctorName,
date: model.sickLeaveList[index].appointmentDate,
profileUrl: model.sickLeaveList[index].doctorImageURL,
rating: model.sickLeaveList[index].actualDoctorRate!.toDouble(),
subName: model.sickLeaveList[index].clinicName,
isSortByClinic: false,
isInOutPatient: model.sickLeaveList[index].isInOutPatient,
isSickLeave: true,
sickLeaveStatus: model.sickLeaveList[index].status ?? 0,
onEmailTap: () {
showConfirmMessage(model, index);
},
),
)
: getNoDataWidget(context),
body: model.sickLeaveList.isNotEmpty ? ListView.separated(
physics: BouncingScrollPhysics(),
itemCount: model.sickLeaveList.length,
padding: EdgeInsets.all(21),
separatorBuilder: (context, index) => SizedBox(height: 14),
itemBuilder: (context, index) => DoctorCard(
isLiveCareAppointment: model.sickLeaveList[index].isLiveCareAppointment,
name: model.sickLeaveList[index].doctorName,
date: model.sickLeaveList[index].appointmentDate,
profileUrl: model.sickLeaveList[index].doctorImageURL,
rating: model.sickLeaveList[index].actualDoctorRate!.toDouble(),
subName: model.sickLeaveList[index].clinicName,
isSortByClinic: false,
isInOutPatient: model.sickLeaveList[index].isInOutPatient,
isSickLeave: true,
sickLeaveStatus: model.sickLeaveList[index].status ?? 0,
onEmailTap: () {
showConfirmMessage(model, index);
},
),
) : getNoDataWidget(context),
),
);
}
@ -80,15 +79,7 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
if (model.sickLeaveList[index].status == 1) {
openWorkPlaceUpdatePage(model.sickLeaveList[index].requestNo!, model.sickLeaveList[index]!.setupID!, model, index, model.sickLeaveList[index]!.projectID!);
} else if (model.sickLeaveList[index].status == 2) {
// showEmailDialog(model, index);
model.sendSickLeaveEmail(
message: TranslationBase.of(context).emailSentSuccessfully,
requestNo: model.sickLeaveList[index].requestNo!,
doctorName: model.sickLeaveList[index].doctorName!,
projectName: model.sickLeaveList[index].projectName!,
setupID: model.sickLeaveList[index].setupID!,
projectID: model.sickLeaveList[index].projectID!,
isDownload: true);
showEmailDialog(model, index);
} else {
showApprovalDialog();
}
@ -119,8 +110,7 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
doctorName: model.sickLeaveList[index].doctorName!,
projectName: model.sickLeaveList[index].projectName!,
setupID: model.sickLeaveList[index].setupID!,
projectID: model.sickLeaveList[index].projectID!,
isDownload: true);
projectID: model.sickLeaveList[index].projectID!);
model.getSickLeave();
},
),
@ -179,15 +169,7 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
print(value);
if (value != null && value == true) {
model.getSickLeave();
// showEmailDialog(model, index);
model.sendSickLeaveEmail(
message: TranslationBase.of(context).emailSentSuccessfully,
requestNo: model.sickLeaveList[index].requestNo!,
doctorName: model.sickLeaveList[index].doctorName!,
projectName: model.sickLeaveList[index].projectName!,
setupID: model.sickLeaveList[index].setupID!,
projectID: model.sickLeaveList[index].projectID!,
isDownload: true);
showEmailDialog(model, index);
}
},
);

@ -11,7 +11,6 @@ import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_de
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_details_page.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
@ -75,24 +74,9 @@ class PrescriptionItemsPage extends StatelessWidget {
projectViewModel.user.emailAddress!,
),
isNeedToShowButton: (model.prescriptionReportListINP.length > 0 || model.prescriptionReportEnhList.length > 0) ? projectViewModel.havePrivilege(13) : false,
buttonTitle: TranslationBase.of(context).download,
buttonIcon: "assets/images/new/download_1.svg",
showConfirmMessageDialog: false,
isDownload: true,
onTap: () async {
// showConfirmMessage(context, model);
GifLoaderDialogUtils.showMyDialog(context);
await model.sendPrescriptionEmail(
appointmentDate: prescriptions.appointmentDate!,
patientID: prescriptions.patientID!,
clinicName: prescriptions.companyName!,
doctorName: prescriptions.doctorName!,
doctorID: prescriptions.doctorID!,
mes: TranslationBase.of(context).sendSuc,
projectID: prescriptions.projectID!,
isInOutPatient: prescriptions.isInOutPatient!,
isDownload: true);
GifLoaderDialogUtils.hideDialog(context);
onTap: () {
showConfirmMessage(context, model);
},
),
if (!prescriptions.isInOutPatient!)
@ -452,8 +436,9 @@ class PrescriptionItemsPage extends StatelessWidget {
doctorID: prescriptions.doctorID!,
mes: TranslationBase.of(context).sendSuc,
projectID: prescriptions.projectID!,
isInOutPatient: prescriptions.isInOutPatient!,
isDownload: true);
isInOutPatient: prescriptions.isInOutPatient!
);
},
),
);

@ -5,7 +5,6 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/header_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
@ -19,7 +18,7 @@ import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
class RadiologyDetailsPage extends StatelessWidget {
final FinalRadiology? finalRadiology;
final FinalRadiology? finalRadiology;
bool? isRadiologyVidaPlus;
RadiologyDetailsPage({Key? key, this.finalRadiology, this.isRadiologyVidaPlus});
@ -33,8 +32,8 @@ class RadiologyDetailsPage extends StatelessWidget {
invoiceType: finalRadiology!.invoiceType,
lineItem: finalRadiology!.invoiceLineItemNo!,
invoiceNo: Utils.isVidaPlusProject(projectViewModel, finalRadiology!.projectID!) ? finalRadiology!.invoiceNo_VP : finalRadiology!.invoiceNo,
isVidaPlus: Utils.isVidaPlusProject(projectViewModel, finalRadiology!.projectID!),
examId: finalRadiology!.exam_Id!),
isVidaPlus: Utils.isVidaPlusProject(projectViewModel, finalRadiology!.projectID!)),
builder: (_, model, widget) => AppScaffold(
appBarTitle: TranslationBase.of(context).report,
isShowAppBar: true,
@ -63,18 +62,12 @@ class RadiologyDetailsPage extends StatelessWidget {
finalRadiology!.noOfPatientsRate,
projectViewModel.user.emailAddress!,
),
onTap: () async {
GifLoaderDialogUtils.showMyDialog(context);
await model.sendRadReportEmail(mes: TranslationBase.of(AppGlobal.context).sendSuc, finalRadiology: finalRadiology!, userObj: projectViewModel.user, isDownload: true);
GifLoaderDialogUtils.hideDialog(context);
// showConfirmMessage(finalRadiology: finalRadiology!, model: model, userObj: projectViewModel.user!, isDownload: true);
onTap: () {
showConfirmMessage(finalRadiology: finalRadiology!, model: model, userObj: projectViewModel.user!);
},
buttonTitle: TranslationBase.of(context).download,
buttonIcon: "assets/images/new/download_1.svg",
showConfirmMessageDialog: false,
isDownload: true,
buttonTitle: TranslationBase.of(context).sendCopyRad,
isNeedToShowButton: projectViewModel.havePrivilege(8),
// showConfirmMessageDialog: false,
showConfirmMessageDialog: false,
),
Container(
margin: EdgeInsets.all(24),
@ -124,13 +117,13 @@ class RadiologyDetailsPage extends StatelessWidget {
);
}
void showConfirmMessage({FinalRadiology? finalRadiology, RadiologyViewModel? model, AuthenticatedUser? userObj, required bool isDownload}) {
void showConfirmMessage({FinalRadiology? finalRadiology, RadiologyViewModel? model, AuthenticatedUser? userObj}) {
showDialog(
context: AppGlobal.context,
builder: (cxt) => ConfirmSendEmailDialog(
email: model!.user!.emailAddress,
onTapSendEmail: () {
model.sendRadReportEmail(mes: TranslationBase.of(AppGlobal.context).sendSuc, finalRadiology: finalRadiology!, userObj: userObj!, isDownload: isDownload);
model.sendRadReportEmail(mes: TranslationBase.of(AppGlobal.context).sendSuc, finalRadiology: finalRadiology!, userObj: userObj!);
},
),
);

@ -209,30 +209,19 @@ class ReportListWidget extends StatelessWidget {
GifLoaderDialogUtils.showMyDialog(AppGlobal.context);
ReportsService _reportsService = locator<ReportsService>();
_reportsService
.getMedicalReportPDF(
report.projectName!,
report.clinicDescription!,
report.doctorName,
DateUtil.convertDateToString(report.requestDate!),
(Utils.isVidaPlusProject(projectViewModel, report.projectID!) ? report.invoiceNo_VP.toString() : report.invoiceNo.toString()),
report.projectID!,
DateUtil.convertDateToString(report.requestDate!),
report.setupId!)
.getMedicalReportPDF(report.projectName!, report.clinicDescription!, report.doctorName, DateUtil.convertDateToString(report.requestDate!), report.invoiceNo.toString(), report.projectID!,
DateUtil.convertDateToString(report.requestDate!), report.setupId!)
.then((value) async {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
if (value["MedicalReportBase64"] != "" && value["MedicalReportBase64"] != null) {
String path = await _createFileFromString(value["MedicalReportBase64"], "pdf");
if (isShare) {
Share.shareXFiles([XFile(path)], text: "Medical Report");
} else {
try {
OpenFilex.open(path);
} catch (ex) {
AppToast.showErrorToast(message: "Cannot open file.");
}
}
String path = await _createFileFromString(value["MedicalReportBase64"], "pdf");
if (isShare) {
Share.shareXFiles([XFile(path)], text: "Medical Report");
} else {
AppToast.showErrorToast(message: "Cannot open file.");
try {
OpenFilex.open(path);
} catch (ex) {
AppToast.showErrorToast(message: "Cannot open file.");
}
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);

@ -1392,7 +1392,7 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> sendPrescriptionEmail(String appoDate, String setupId, int languageID, dynamic prescriptionReportEnhList, bool isDownload, BuildContext context) async {
Future<Map> sendPrescriptionEmail(String appoDate, String setupId, int languageID, dynamic prescriptionReportEnhList, 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));
@ -1420,9 +1420,7 @@ class DoctorsListService extends BaseService {
"PatientID": authUser.patientID,
"PatientTypeID": authUser.patientType,
"LanguageID": authUser.patientType,
"PatientType": authUser.patientType,
"IsDownload": isDownload,
"PatientType": authUser.patientType
};
dynamic localRes;

@ -79,11 +79,7 @@ class _SplashScreenState extends State<SplashScreen> {
projectProvider.setVidaPlusProjectList(_privilegeService.vidaPlusProjectListModel);
projectProvider.setHMCProjectList(_privilegeService.hMCProjectListModel);
projectProvider.setProjectsDetailList(_privilegeService.projectDetailListModel);
double lat = await AppSharedPreferences().getDouble(USER_LAT) ?? 0.0;
double long = await AppSharedPreferences().getDouble(USER_LONG) ?? 0.0;
AppSharedPreferences().clear(); // Clearing Shared Preferences On App Launch
await AppSharedPreferences().setDouble(USER_LAT, lat);
await AppSharedPreferences().setDouble(USER_LONG, long);
AppSharedPreferences().setString(APP_LANGUAGE, projectProvider.isArabic ? "ar" : "en");
var themeNotifier = Provider.of<ThemeNotifier>(context, listen: false);
themeNotifier.setTheme(defaultTheme(fontName: projectProvider.isArabic ? 'Cairo' : 'Poppins'));

@ -3473,7 +3473,6 @@ class TranslationBase {
String get liveCareTermsHeading16 => localizedValues["liveCareTermsHeading16"][locale.languageCode];
String get liveCareTermsConditions47 => localizedValues["liveCareTermsConditions47"][locale.languageCode];
String get liveCareTermsConditions48 => localizedValues["liveCareTermsConditions48"][locale.languageCode];
String get clickPrivacyPolicy => localizedValues["clickPrivacyPolicy"][locale.languageCode];
}

@ -257,21 +257,10 @@ class DoctorCard extends StatelessWidget {
child: (onEmailTap != null && projectViewModel!.havePrivilege(17))
? InkWell(
onTap: onEmailTap,
child: Text(
TranslationBase.of(context).download,
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
fontStyle: FontStyle.italic,
color: CustomColors.accentColor,
letterSpacing: -0.48,
height: 18 / 12,
decoration: TextDecoration.underline),
child: Icon(
Icons.email,
color: sickLeaveStatus != 3 ? Theme.of(context).primaryColor : Colors.grey[400],
),
// Icon(
// Icons.email,
// color: sickLeaveStatus != 3 ? Theme.of(context).primaryColor : Colors.grey[400],
// ),
)
: onTap != null
? Icon(

@ -343,7 +343,7 @@ class MyInAppBrowser extends InAppBrowser {
form = form.replaceFirst('PROJECT_ID_VALUE', projId);
form = form.replaceFirst('PAYMENT_OPTION_VALUE', paymentMethod);
form = form.replaceFirst('LANG_VALUE', currentLanguageID);
form = form.replaceFirst('SERVICE_URL_VALUE', "https://mdlaboratories.com/tamaralive/Home/Checkout");
form = form.replaceFirst('SERVICE_URL_VALUE', "https://mdlaboratories.com/tamara/Home/Checkout");
form = form.replaceFirst('INSTALLMENTS_VALUE', installments);
form = form.replaceFirst('CUSTNATIONALID_VALUE', authUser.patientIdentificationNo!);

@ -14,9 +14,7 @@ class PhoneNumberSelectorWidget extends StatefulWidget {
final Function? onCountryChange;
final String? mobileNo;
bool isLiveCareTypeSelect;
bool isEnable;
PhoneNumberSelectorWidget({Key? key, this.onNumberChange, this.onCountryChange, this.mobileNo, this.isLiveCareTypeSelect = false, this.isEnable = true}) : super(key: key);
PhoneNumberSelectorWidget({Key? key, this.onNumberChange, this.onCountryChange, this.mobileNo, this.isLiveCareTypeSelect = false}) : super(key: key);
@override
_PhoneNumberSelectorWidgetState createState() {
@ -30,7 +28,6 @@ class _PhoneNumberSelectorWidgetState extends State<PhoneNumberSelectorWidget> {
List<Countries> counties = [];
ProjectViewModel? projectProvider;
TextEditingController textController = new TextEditingController();
@override
void initState() {
for (var element in countriesData) counties.add(Countries.fromJson(element));
@ -47,7 +44,7 @@ class _PhoneNumberSelectorWidgetState extends State<PhoneNumberSelectorWidget> {
Widget build(BuildContext context) {
projectProvider = Provider.of(context);
String? countryName = "";
if (widget.isLiveCareTypeSelect) {
if(widget.isLiveCareTypeSelect) {
textController.text = Utils.getPhoneNumberWithoutZero(widget.mobileNo!);
}
for (var element in counties) {
@ -58,9 +55,9 @@ class _PhoneNumberSelectorWidgetState extends State<PhoneNumberSelectorWidget> {
return Column(
children: [
inputWidget(TranslationBase.of(context).country, countryName!, isEnable: true, hasSelection: true),
inputWidget(TranslationBase.of(context).country, countryName!, isEnable: false, hasSelection: true),
SizedBox(height: 12),
Directionality(textDirection: TextDirection.ltr, child: inputWidget(TranslationBase.of(context).phoneNumber, isEnable: widget.isEnable, widget.mobileNo ?? "5xxxxxxxx", prefix: countryCode)),
Directionality(textDirection: TextDirection.ltr, child: inputWidget(TranslationBase.of(context).phoneNumber, widget.mobileNo ?? "5xxxxxxxx", prefix: countryCode)),
],
);
}
@ -181,7 +178,6 @@ class _MobileNo extends State<MobileNo> {
String countryCode = '+966';
List<Countries> counties = [];
ProjectViewModel? projectProvider;
@override
void initState() {
countriesData.forEach((element) {

@ -1,7 +1,7 @@
name: diplomaticquarterapp
description: A new Flutter application.
version: 4.6.014+1
version: 4.6.085+4050085
environment:
sdk: ">=3.0.0 <3.13.0"
@ -13,10 +13,10 @@ dependencies:
# Localizations
flutter_localizations:
sdk: flutter
# intl: ^0.18.1
# intl: ^0.18.1
intl: ^0.19.0
# webview_flutter: ^2.0.4
# webview_flutter: ^2.0.4
webview_flutter: ^4.8.0
# http client
@ -34,9 +34,9 @@ dependencies:
get_it: ^7.2.0
#Google Fit & Apple HealthKit
# health: ^3.0.3
# health: ^3.0.3
health: ^11.1.0
# pedometer: ^4.0.2
# pedometer: ^4.0.2
#chart
fl_chart: ^0.64.0
@ -60,7 +60,7 @@ dependencies:
local_auth: ^2.1.7
localstorage: ^4.0.0+1
maps_launcher: ^2.0.1
# url_launcher: ^6.0.15
# url_launcher: ^6.0.15
url_launcher: ^6.3.1
url_launcher_ios: ^6.3.2
shared_preferences: ^2.0.0
@ -144,12 +144,12 @@ dependencies:
carousel_slider: ^5.0.0
#Dependencies for video call implementation
native_device_orientation: ^1.0.0
# wakelock: ^0.6.2
# wakelock: ^0.6.2
wakelock_plus: ^1.1.4
after_layout: ^1.1.0
cached_network_image: ^3.3.0
flutter_tts: ^3.6.1
# vibration: ^1.7.3
# vibration: ^1.7.3
flutter_nfc_kit: ^3.3.1
#geofencing: any
speech_to_text: ^6.1.1
@ -159,13 +159,13 @@ dependencies:
in_app_review: ^2.0.3
badges: ^3.1.2
# flutter_app_icon_badge: ^2.0.0
# dropdown_search: 5.0.6
# flutter_app_icon_badge: ^2.0.0
# dropdown_search: 5.0.6
youtube_player_flutter: ^9.1.0
# shimmer: ^3.0.0
# carousel_slider: ^4.0.0
# flutter_staggered_grid_view: ^0.7.0
# shimmer: ^3.0.0
# carousel_slider: ^4.0.0
# flutter_staggered_grid_view: ^0.7.0
huawei_hmsavailability: ^6.11.0+301
huawei_location: ^6.11.0+301
share_plus: ^10.0.2
@ -174,7 +174,7 @@ dependencies:
equatable: ^2.0.3
wave: ^0.2.0
sms_otp_auto_verify: ^2.1.0
# flutter_ios_voip_kit: ^0.1.0
# flutter_ios_voip_kit: ^0.1.0
google_api_availability: ^4.0.0
open_filex: ^4.3.2
path_provider: ^2.0.8
@ -267,10 +267,10 @@ flutter:
- asset: assets/fonts/ar/Cairo-Light/Cairo-Light.woff
weight: 300
# - asset: assets/fonts/ar/Cairo-Light/Cairo-Light.eot
# - asset: assets/fonts/ar/Cairo-Light/Cairo-Light.otf
# - asset: assets/fonts/ar/Cairo-Light/Cairo-Light.eot
# - asset: assets/fonts/ar/Cairo-Light/Cairo-Light.otf
- asset: assets/fonts/ar/Cairo-Regular/Cairo-Regular.ttf
# - asset: assets/fonts/ar/Cairo-Light/Cairo-Light.woff
# - asset: assets/fonts/ar/Cairo-Light/Cairo-Light.woff
weight: 400
- asset: assets/fonts/ar/Cairo-Bold/Cairo-Bold.eot
@ -285,7 +285,7 @@ flutter:
- family: SaudiRiyal
fonts:
# - asset: assets/fonts/saudi_riyal.ttf
# - asset: assets/fonts/saudi_riyal.ttf
- asset: assets/fonts/sar-Regular.otf
- family: Poppins

Loading…
Cancel
Save