Compare commits

..

2 Commits

Author SHA1 Message Date
haroon amjad f6fe367252 clear search bar added 5 months ago
Sultan khan 7cd4b6c73a search feature updated. 10 months ago

@ -21,8 +21,8 @@ var PACKAGES_ORDERS = '/api/orders';
var PACKAGES_ORDER_HISTORY = '/api/orders/items';
var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
// var BASE_URL = 'http://10.50.100.198:2018/';
// var BASE_URL = 'https://uat.hmgwebservices.com/';
var BASE_URL = 'https://hmgwebservices.com/';
var BASE_URL = 'https://uat.hmgwebservices.com/';
// var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'http://10.201.204.103/';
// var BASE_URL = 'https://orash.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/';
@ -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 = 50.0;
var SETUP_ID = '91877';
var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0;

@ -2326,5 +2326,7 @@ 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": "الرجاء الضغط هنا لعرض سياسة الخصوصية"},
"searchLabResult": {"en": "Search Lab Results", "ar": "نتائج البحث في المختبر"},
"searchRadiology": {"en": "Search Radiology", "ar": "البحث في الأشعة"},
};

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
class PatientLabOrders {
@ -39,6 +40,7 @@ class PatientLabOrders {
bool? isLiveCareAppointment;
int? status;
String? statusDesc;
List<TestDetail>? testDetails;
PatientLabOrders(
{this.actualDoctorRate,
this.clinicDescription,
@ -77,7 +79,9 @@ class PatientLabOrders {
this.speciality,
this.isLiveCareAppointment,
this.status,
this.statusDesc,});
this.statusDesc,
this.testDetails
});
PatientLabOrders.fromJson(Map<String, dynamic> json) {
actualDoctorRate = json['ActualDoctorRate'];
@ -117,6 +121,12 @@ class PatientLabOrders {
isLiveCareAppointment = json['IsLiveCareAppointment'];
status = json['Status'];
statusDesc = json['StatusDesc'];
if (json['TestDetails'] != null) {
testDetails = <TestDetail>[];
json['TestDetails'].forEach((v) {
testDetails!.add(new TestDetail.fromJson(v));
});
}
// speciality = json['Speciality'].cast<String>();
}
@ -159,6 +169,32 @@ class PatientLabOrders {
data['invoiceNo_VP'] = this.invoiceNo_VP;
data['Status'] = this.status;
data['StatusDesc'] = this.statusDesc;
data['TestDetails'] = this.testDetails;
if (this.testDetails != null) {
data['TestDetails'] = this.testDetails!.map((v) => v.toJson()).toList();
}
return data;
}
}
class TestDetail {
String? description;
String? testCode;
String? testID;
TestDetail({this.description, this.testCode, this.testID});
TestDetail.fromJson(Map<String, dynamic> json) {
description = json['Description'];
testCode = json['TestCode'];
testID = json['TestID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['Description'] = this.description;
data['TestCode'] = this.testCode;
data['TestID'] = this.testID;
return data;
}
}

@ -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,8 +44,7 @@ class FinalRadiology {
bool? isCVI;
bool? isRadMedicalReport;
bool? isLiveCareAppointment;
String? exam_Id;
String? description;
FinalRadiology(
{this.setupID,
this.projectID,
@ -90,7 +89,8 @@ class FinalRadiology {
this.isCVI,
this.isRadMedicalReport,
this.isLiveCareAppointment,
this.exam_Id});
this.description
});
FinalRadiology.fromJson(Map<String, dynamic> json) {
try {
@ -137,7 +137,7 @@ class FinalRadiology {
// speciality = json['Speciality'].cast<String>();
isCVI = json['isCVI'];
isRadMedicalReport = json['isRadMedicalReport'];
exam_Id = json['Exam_id'];
description = json['Description'];
} catch (e) {
print(e);
}
@ -187,6 +187,7 @@ class FinalRadiology {
data['Speciality'] = this.speciality;
data['isCVI'] = this.isCVI;
data['isRadMedicalReport'] = this.isRadMedicalReport;
data['Description'] =this.description;
return data;
}
}

@ -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'] = 814121; //4609100
// body['TokenID'] = "@dm!n";
// Patient ID: 3027574
@ -196,10 +196,10 @@ class BaseAppClient {
body.removeWhere((key, value) => key == null || value == null);
// if (url == 'https://uat.hmgwebservices.com/Services/NHIC.svc/REST/GetPatientInfo') {
// url = "https://hmgwebservices.com/Services/NHIC.svc/REST/GetPatientInfo";
// body['TokenID'] = "@dm!n";
// }
if (url == 'https://webservices.hmg.com/Services/Patients.svc/REST/GetPatientLabOrders' || url=='https://webservices.hmg.com/Services/Patients.svc/REST/GetPatientRadOrders') {
// url = "https://hmgwebservices.com/Services/NHIC.svc/REST/GetPatientInfo";
body['VersionID'] = 50.0;
}
// if (AppGlobal.isNetworkDebugEnabled) {
debugPrint("URL : $url");

@ -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());

@ -33,6 +33,10 @@ class LabsViewModel extends BaseViewModel {
List<PatientLabOrdersList> get patientLabOrdersList => filterType == FilterType.Clinic ? _patientLabOrdersListClinic : _patientLabOrdersListHospital;
List<PatientLabOrders> tempPatientLabOrdersList = [];
List<String> autoCompleteList = [];
bool _showSuggestions = false;
bool get showSuggestions => _showSuggestions;
void getLabs() async {
if (authenticatedUserObject.isLogin) {
setState(ViewState.Busy);
@ -41,34 +45,48 @@ class LabsViewModel extends BaseViewModel {
error = _labsService.error!;
setState(ViewState.Error);
} else {
_labsService.patientLabOrdersList.forEach((element) {
List<PatientLabOrdersList> patientLabOrdersClinic = _patientLabOrdersListClinic.where((elementClinic) => elementClinic.filterName == element.clinicDescription).toList();
tempPatientLabOrdersList = List.from(_labsService.patientLabOrdersList);
tempPatientLabOrdersList.forEach((item1){
item1.testDetails!.forEach((item2){
if (!autoCompleteList.contains(item2.description)) {
autoCompleteList.add(item2.description!);
}
});
if (patientLabOrdersClinic.length != 0) {
_patientLabOrdersListClinic[_patientLabOrdersListClinic.indexOf(patientLabOrdersClinic[0])].patientLabOrdersList.add(element);
} else {
_patientLabOrdersListClinic.add(PatientLabOrdersList(filterName: element.clinicDescription ?? element.projectName, patientDoctorAppointment: element));
}
// doctor list sort via project
List<PatientLabOrdersList> patientLabOrdersHospital = _patientLabOrdersListHospital
.where(
(elementClinic) => elementClinic.filterName == element.projectName,
)
.toList();
if (patientLabOrdersHospital.length != 0) {
_patientLabOrdersListHospital[_patientLabOrdersListHospital.indexOf(patientLabOrdersHospital[0])].patientLabOrdersList.add(element);
} else {
_patientLabOrdersListHospital.add(PatientLabOrdersList(filterName: element.projectName ?? element.clinicDescription, patientDoctorAppointment: element));
}
});
setState(ViewState.Idle);
runFilerTest();
}
}
}
runFilerTest() {
_labsService.patientLabOrdersList.forEach((element) {
List<PatientLabOrdersList> patientLabOrdersClinic = _patientLabOrdersListClinic.where((elementClinic) => elementClinic.filterName == element.clinicDescription).toList();
if (patientLabOrdersClinic.length != 0) {
_patientLabOrdersListClinic[_patientLabOrdersListClinic.indexOf(patientLabOrdersClinic[0])].patientLabOrdersList.add(element);
} else {
_patientLabOrdersListClinic.add(PatientLabOrdersList(filterName: element.clinicDescription ?? element.projectName, patientDoctorAppointment: element));
}
// doctor list sort via project
List<PatientLabOrdersList> patientLabOrdersHospital = _patientLabOrdersListHospital
.where(
(elementClinic) => elementClinic.filterName == element.projectName,
)
.toList();
if (patientLabOrdersHospital.length != 0) {
_patientLabOrdersListHospital[_patientLabOrdersListHospital.indexOf(patientLabOrdersHospital[0])].patientLabOrdersList.add(element);
} else {
_patientLabOrdersListHospital.add(PatientLabOrdersList(filterName: element.projectName ?? element.clinicDescription, patientDoctorAppointment: element));
}
});
setState(ViewState.Idle);
}
setFilterType(FilterType filterType) {
this.filterType = filterType;
notifyListeners();
@ -177,4 +195,43 @@ class LabsViewModel extends BaseViewModel {
await file.writeAsBytes(bytes);
return file.path;
}
searchLab(String searchParam, {bool isAutocomplete = false}) {
_showSuggestions = isAutocomplete;
if (searchParam.isEmpty) {
_showSuggestions =false;
_labsService.patientLabOrdersList = List.from(tempPatientLabOrdersList);
_patientLabOrdersListClinic.clear();
_patientLabOrdersListHospital.clear();
runFilerTest();
notifyListeners();
return;
}
if (isAutocomplete) {
notifyListeners();
return;
}
filterList(searchParam);
}
List<String> getFilteredSuggestions(String query) {
if (query.isEmpty) return [];
return autoCompleteList.where((suggestion) =>
suggestion.toLowerCase().contains(query.toLowerCase())
).toList();
}
filterList(String searchParam){
final lowerCaseQuery = searchParam.toLowerCase();
_labsService.patientLabOrdersList = tempPatientLabOrdersList.where((item) {
if (item.testDetails != null && item.testDetails!.isNotEmpty) {
return item.testDetails!.any((test) {
return test.description?.toLowerCase().contains(lowerCaseQuery) ?? false;
});
}
return false;
}).toList();
_patientLabOrdersListClinic.clear();
_patientLabOrdersListHospital.clear();
runFilerTest();
notifyListeners();
}
}

@ -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,27 +9,21 @@ 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;
bool _isRadiologyVIDAPlus = false;
bool _showSuggestions = false;
bool get showSuggestions => _showSuggestions;
bool get isRadiologyVIDAPlus => _isRadiologyVIDAPlus;
String get radReportPDF => _radiologyService.radReportPDF;
List<FinalRadiology> tempFinalRadiologyList =[];
List<String> autoCompleteList =[];
void getPatientRadOrders() async {
setState(ViewState.Busy);
await _radiologyService.getPatientRadOrders();
@ -39,26 +33,33 @@ class RadiologyViewModel extends BaseViewModel {
setState(ViewState.Error);
} else {
//Clinic Sorting
var clinicMap = groupBy(_radiologyService.finalRadiologyList, (FinalRadiology obj) => obj.clinicDescription);
clinicMap.forEach((key, value) {
_finalRadiologyListClinic.add(FinalRadiologyList(filterName: key, finalRadiologyList: value.toList()));
});
//Hospital Sorting
var hospitalMap = groupBy(_radiologyService.finalRadiologyList, (FinalRadiology obj) => obj.projectName);
hospitalMap.forEach((key, value) {
_finalRadiologyListHospital.add(FinalRadiologyList(filterName: key, finalRadiologyList: value.toList()));
});
filterRadiology();
tempFinalRadiologyList = List.from(_radiologyService.finalRadiologyList);
// tempFinalRadiologyList.forEach((item) {
// if(!autoCompleteList.contains(item.description!)) {
// autoCompleteList.add(item.description!);
// }});
setState(ViewState.Idle);
}
}
filterRadiology(){
var clinicMap = groupBy(_radiologyService.finalRadiologyList, (FinalRadiology obj) => obj.clinicDescription);
clinicMap.forEach((key, value) {
_finalRadiologyListClinic.add(FinalRadiologyList(filterName: key, finalRadiologyList: value.toList()));
});
//Hospital Sorting
var hospitalMap = groupBy(_radiologyService.finalRadiologyList, (FinalRadiology obj) => obj.projectName);
hospitalMap.forEach((key, value) {
_finalRadiologyListHospital.add(FinalRadiologyList(filterName: key, finalRadiologyList: value.toList()));
});
}
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,40 +67,53 @@ 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();
}
searchRadiology(String searchParam, {bool isAutocomplete = false}){
_showSuggestions = isAutocomplete;
if (searchParam.isEmpty) {
_finalRadiologyListClinic.clear();
_finalRadiologyListClinic.clear();
_radiologyService.finalRadiologyList = List.from(tempFinalRadiologyList);
filterRadiology();
notifyListeners();
return;
}
if (isAutocomplete) {
notifyListeners();
return;
}
final lowerCaseQuery = searchParam.toLowerCase();
_finalRadiologyListClinic.clear();
_finalRadiologyListClinic.clear();
_radiologyService.finalRadiologyList = tempFinalRadiologyList.where((item) {
return item.description?.toLowerCase().contains(lowerCaseQuery) ?? false;
}).toList();
filterRadiology();
notifyListeners();
}
List<String> getFilteredSuggestions(String query) {
if (query.isEmpty) return [];
return autoCompleteList.where((suggestion) =>
suggestion.toLowerCase().contains(query.toLowerCase())
).toList();
}
}

@ -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:

@ -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);

@ -99,7 +99,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
late ToDoCountProviderModel toDoProvider;
var dob;
int isHijri = 0;
late int isHijri;
var healthId;
@override

@ -44,7 +44,7 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
final authService = AuthProvider();
late final WebViewController _controller;
bool isPageLoaded = false;
bool isPageLoaded = true;
bool isTermsAndConditionsPage = true;
bool acceptTerms = false;
@ -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),

@ -6,6 +6,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/input/input_widget.dart';
import 'package:diplomaticquarterapp/widgets/new_design/my_tab_view.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -16,15 +17,33 @@ import 'package:provider/provider.dart';
import 'laboratory_result_page.dart';
class LabsHomePage extends StatelessWidget {
class LabsHomePage extends StatefulWidget {
LabsHomePage();
@override
_LabsHomePageState createState() => _LabsHomePageState();
}
class _LabsHomePageState extends State<LabsHomePage> {
List<ImagesInfo> imagesInfo = [];
TextEditingController searchController = new TextEditingController();
List<PatientLabOrders> tempList = [];
List<PatientLabOrdersList> originalList = [];
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-lab/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-lab/ar/0.png'));
return BaseView<LabsViewModel>(
onModelReady: (model) => model.getLabs(),
onModelReady: (model) {
model.getLabs();
originalList = model.patientLabOrdersList;
},
builder: (context, LabsViewModel model, widget) => AppScaffold(
baseViewModel: model,
isShowAppBar: true,
@ -46,6 +65,25 @@ class LabsHomePage extends StatelessWidget {
}),
],
),
Container(
padding: EdgeInsets.only(bottom: 5, top: 14, left: 21, right: 21),
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
inputWidget(TranslationBase.of(context).searchLabResult, '', searchController,
suffix: IconButton(
onPressed: () {
if (searchController.text.isNotEmpty) {
searchController.clear();
model.searchLab('');
}
},
icon: Icon(
searchController.text.isNotEmpty ? Icons.close : Icons.search,
size: 28,
)), onChanged: (String? searchParam) {
model.searchLab(searchParam!, isAutocomplete: true);
})
])),
if (model.showSuggestions) _buildSuggestionsList(model),
Expanded(
child: FractionallySizedBox(
widthFactor: 1.0,
@ -62,40 +100,49 @@ class LabsHomePage extends StatelessWidget {
},
itemBuilder: (context, index) {
return AppExpandableNotifier(
title: model.patientLabOrdersList[index].filterName,
bodyWidget: ListView.separated(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21),
itemBuilder: (context, _index) {
PatientLabOrders labOrder = model.patientLabOrdersList[index].patientLabOrdersList[_index];
bool _isSortByClinic = model.filterType == FilterType.Clinic;
return DoctorCard(
onTap: () => Navigator.push(
context,
FadePage(
page: LaboratoryResultPage(
patientLabOrders: labOrder,
),
),
),
isInOutPatient: labOrder.isInOutPatient,
name: TranslationBase.of(context).dr + " " + labOrder.doctorName!,
billNo: labOrder.invoiceNo,
profileUrl: labOrder.doctorImageURL,
subName: _isSortByClinic ? (labOrder.projectName ?? labOrder.clinicDescription) : (labOrder.clinicDescription ?? labOrder.projectName),
isLiveCareAppointment: labOrder.isLiveCareAppointment,
date: labOrder.orderDate,
isSortByClinic: _isSortByClinic,
isLabOrderResult: true,
resultStatus: labOrder.status!,
resultStatusDesc: labOrder.statusDesc!,
//projectViewModel.isArabic ? DateUtil.getMonthDayYearDateFormattedAr(labOrder.orderDate) : DateUtil.getMonthDayYearDateFormatted(labOrder.orderDate),
);
},
separatorBuilder: (context, index) => SizedBox(height: 14),
itemCount: model.patientLabOrdersList[index].patientLabOrdersList.length),
);
isExpand: true,
title: model.patientLabOrdersList[index].filterName,
bodyWidget:
// Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Container(
//
// padding: EdgeInsets.only(left:21, right: 21),
// child: Text(model.patientLabOrdersList[index].filterName!, style: TextStyle(fontSize: 22, fontWeight: FontWeight.bold), )),
ListView.separated(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21),
itemBuilder: (context, _index) {
PatientLabOrders labOrder = model.patientLabOrdersList[index].patientLabOrdersList[_index];
bool _isSortByClinic = model.filterType == FilterType.Clinic;
return DoctorCard(
onTap: () => Navigator.push(
context,
FadePage(
page: LaboratoryResultPage(
patientLabOrders: labOrder,
),
),
),
isInOutPatient: labOrder.isInOutPatient,
name: TranslationBase.of(context).dr + " " + labOrder.doctorName!,
billNo: labOrder.invoiceNo,
profileUrl: labOrder.doctorImageURL,
subName: _isSortByClinic ? (labOrder.projectName ?? labOrder.clinicDescription) : (labOrder.clinicDescription ?? labOrder.projectName),
isLiveCareAppointment: labOrder.isLiveCareAppointment,
date: labOrder.orderDate,
isSortByClinic: _isSortByClinic,
isLabOrderResult: true,
resultStatus: labOrder.status!,
resultStatusDesc: labOrder.statusDesc!,
//projectViewModel.isArabic ? DateUtil.getMonthDayYearDateFormattedAr(labOrder.orderDate) : DateUtil.getMonthDayYearDateFormatted(labOrder.orderDate),
);
},
separatorBuilder: (context, index) => SizedBox(height: 14),
itemCount: model.patientLabOrdersList[index].patientLabOrdersList.length));
},
itemCount: model.patientLabOrdersList.length),
),
@ -105,4 +152,46 @@ class LabsHomePage extends StatelessWidget {
),
);
}
Widget _buildSuggestionsList(LabsViewModel model) {
final suggestions = model.getFilteredSuggestions(searchController.text);
return ConstrainedBox(
constraints: BoxConstraints(
maxHeight: MediaQuery.of(context).size.height * 0.4,
),
child: Container(
padding: EdgeInsets.only(bottom: 5, top: 0, left: 21, right: 21),
child: Material(
elevation: 4,
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(8),
bottomRight: Radius.circular(8),
),
child: ListView.builder(
shrinkWrap: true,
physics: ClampingScrollPhysics(),
itemCount: suggestions.length,
itemBuilder: (context, index) {
return InkWell(
onTap: () {
searchController.text = suggestions[index];
model.searchLab(suggestions[index]);
},
child: Container(
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 12),
decoration: BoxDecoration(
border: Border(
bottom: index < suggestions.length - 1 ? BorderSide(color: Colors.grey.shade200) : BorderSide.none,
),
),
child: Text(suggestions[index]),
),
);
},
),
)),
);
}
}

@ -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!);
},
),
);

@ -8,16 +8,33 @@ import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_details_p
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/input/input_widget.dart';
import 'package:diplomaticquarterapp/widgets/new_design/my_tab_view.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class RadiologyHomePage extends StatelessWidget {
List<ImagesInfo> imagesInfo =[];
class RadiologyHomePage extends StatefulWidget {
RadiologyHomePage();
@override
_RadiologyHomePageState createState() => _RadiologyHomePageState();
}
bool isExpand = false;
class _RadiologyHomePageState extends State<RadiologyHomePage> {
List<ImagesInfo> imagesInfo = [];
TextEditingController searchController = new TextEditingController();
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
@ -49,6 +66,30 @@ class RadiologyHomePage extends StatelessWidget {
}),
],
),
Container(
padding: EdgeInsets.only(bottom: 5, top: 14, left: 21, right: 21),
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
inputWidget(TranslationBase.of(context).searchRadiology, '', searchController,
suffix: IconButton(
onPressed: () {
if (searchController.text.isNotEmpty) {
searchController.clear();
model.searchRadiology('');
}
},
icon: Icon(
searchController.text.isNotEmpty ? Icons.close : Icons.search,
size: 28,
)), onChanged: (String? searchParam) {
// if (searchParam!.length > 2) {
model.searchRadiology(searchParam!, isAutocomplete: true);
// setState(() {});
// } else {
// model.searchRadiology(searchParam!, isAutocomplete: false);
// }
}, onTap: () {})
])),
if (model.showSuggestions) _buildSuggestionsList(model),
Expanded(
child: FractionallySizedBox(
@ -65,40 +106,47 @@ class RadiologyHomePage extends StatelessWidget {
);
},
itemBuilder: (context, index) {
// return Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Container(
// padding: EdgeInsets.only(left:21, right: 21),
// child: Text(model.finalRadiologyList[index].filterName!, style: TextStyle(fontSize: 22, fontWeight: FontWeight.bold), )),
return AppExpandableNotifier(
title: model.finalRadiologyList[index].filterName,
bodyWidget: ListView.separated(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21),
itemBuilder: (context, _index) {
FinalRadiology radiology = model.finalRadiologyList[index].finalRadiologyList![_index];
bool _isSortByClinic = model.filterType == FilterType.Clinic;
return DoctorCard(
onTap: () => Navigator.push(
context,
FadePage(
page: RadiologyDetailsPage(
finalRadiology: radiology,
isRadiologyVidaPlus: Utils.isVidaPlusProject(projectViewModel, radiology.projectID!),
isExpand: true,
title: model.finalRadiologyList[index].filterName,
bodyWidget: ListView.separated(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21),
itemBuilder: (context, _index) {
FinalRadiology radiology = model.finalRadiologyList[index].finalRadiologyList![_index];
bool _isSortByClinic = model.filterType == FilterType.Clinic;
return DoctorCard(
onTap: () => Navigator.push(
context,
FadePage(
page: RadiologyDetailsPage(
finalRadiology: radiology,
isRadiologyVidaPlus: Utils.isVidaPlusProject(projectViewModel, radiology.projectID!),
),
),
),
),
isInOutPatient: radiology.isInOutPatient,
name: TranslationBase.of(context).dr + " " + radiology.doctorName!,
billNo: Utils.isVidaPlusProject(projectViewModel, radiology.projectID!) ? radiology.invoiceNo_VP.toString() : radiology.invoiceNo.toString(),
// billNo: radiology.invoiceNo_VP.toString(),
profileUrl: radiology.doctorImageURL,
subName: _isSortByClinic ? radiology.projectName : radiology.clinicDescription,
isLiveCareAppointment: radiology.isLiveCareAppointment,
date: radiology.orderDate,
isSortByClinic: _isSortByClinic,
//projectViewModel.isArabic ? DateUtil.getMonthDayYearDateFormattedAr(labOrder.orderDate) : DateUtil.getMonthDayYearDateFormatted(labOrder.orderDate),
);
},
separatorBuilder: (context, index) => SizedBox(height: 14),
itemCount: model.finalRadiologyList[index].finalRadiologyList!.length),
);
isInOutPatient: radiology.isInOutPatient,
name: TranslationBase.of(context).dr + " " + radiology.doctorName!,
billNo: Utils.isVidaPlusProject(projectViewModel, radiology.projectID!) ? radiology.invoiceNo_VP.toString() : radiology.invoiceNo.toString(),
// billNo: radiology.invoiceNo_VP.toString(),
profileUrl: radiology.doctorImageURL,
subName: _isSortByClinic ? radiology.projectName : radiology.clinicDescription,
isLiveCareAppointment: radiology.isLiveCareAppointment,
date: radiology.orderDate,
isSortByClinic: _isSortByClinic,
//projectViewModel.isArabic ? DateUtil.getMonthDayYearDateFormattedAr(labOrder.orderDate) : DateUtil.getMonthDayYearDateFormatted(labOrder.orderDate),
);
},
separatorBuilder: (context, index) => SizedBox(height: 14),
itemCount: model.finalRadiologyList[index].finalRadiologyList!.length));
//);
},
itemCount: model.finalRadiologyList.length),
),
@ -139,4 +187,43 @@ class RadiologyHomePage extends StatelessWidget {
),
);
}
Widget _buildSuggestionsList(RadiologyViewModel model) {
final suggestions = model.getFilteredSuggestions(searchController.text);
return ConstrainedBox(
constraints: BoxConstraints(
maxHeight: MediaQuery.of(context).size.height * 0.4,
),
child: Material(
elevation: 4,
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(8),
bottomRight: Radius.circular(8),
),
child: ListView.builder(
shrinkWrap: true,
physics: ClampingScrollPhysics(),
itemCount: suggestions.length,
itemBuilder: (context, index) {
return InkWell(
onTap: () {
searchController.text = suggestions[index];
model.searchRadiology(suggestions[index]);
},
child: Container(
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 12),
decoration: BoxDecoration(
border: Border(
bottom: index < suggestions.length - 1 ? BorderSide(color: Colors.grey.shade200) : BorderSide.none,
),
),
child: Text(suggestions[index]),
),
);
},
),
),
);
}
}

@ -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;

@ -168,7 +168,7 @@ class PayfortService extends BaseService {
/// Step 4: Processing Payment [Don't multiply with 100]
/// Amount value send always round ex. [100] not [100.00, 100.21]
FortRequest request = FortRequest(
command: FortCommand.purchase,
// command: FortCommand.purchase,
amount: orderAmount!,
customerName: customerName!,
customerEmail: customerEmail!,
@ -178,7 +178,7 @@ class PayfortService extends BaseService {
merchantReference: merchantReference!,
currency: currency,
customerIp: (await _info.getWifiIP() ?? ''),
language: 'en');
language: 'en', command: FortCommand.purchase);
_payfort.callPayFortForApplePay(
request: request,

@ -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,9 @@ 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];
String get searchLabResult => localizedValues["searchLabResult"][locale.languageCode];
String get searchRadiology => localizedValues["searchRadiology"][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!);

@ -0,0 +1,89 @@
import 'package:flutter/material.dart';
Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String? prefix, bool isEnable = true, bool hasSelection = false, Widget? suffix, void Function(String)? onChanged,GestureTapCallback? onTap }) {
return Container(
padding: EdgeInsets.only(left: 10, right: 10, bottom: 5, top: 5),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: Colors.white,
border: Border.all(
color: Color(0xffefefef),
width: 1,
),
),
child: InkWell(
onTap: hasSelection ? () {} : null,
child: Row(
children: [
Expanded(
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
_labelText,
style: TextStyle(
fontSize: 11,
fontWeight: FontWeight.w600,
color: Color(0xff2B353E),
letterSpacing: -0.44,
),
),
TextField(
enabled: isEnable,
onChanged: onChanged,
scrollPadding: EdgeInsets.zero,
onTap: onTap,
controller: _controller,
style: TextStyle(
fontSize: 14,
height: 21 / 14,
fontWeight: FontWeight.w400,
color: Color(0xff2B353E),
letterSpacing: -0.44,
),
decoration: InputDecoration(
isDense: true,
hintText: _hintText,
hintStyle: TextStyle(
fontSize: 14,
height: 21 / 14,
fontWeight: FontWeight.w400,
color: Color(0xff575757),
letterSpacing: -0.56,
),
prefixIconConstraints: BoxConstraints(minWidth: 50),
prefixIcon: prefix == null
? null
: Text(
"+" + prefix,
style: TextStyle(
fontSize: 14,
height: 21 / 14,
fontWeight: FontWeight.w500,
color: Color(0xff2E303A),
letterSpacing: -0.56,
),
),
contentPadding: EdgeInsets.zero,
border: InputBorder.none,
focusedBorder: InputBorder.none,
enabledBorder: InputBorder.none,
),
),
],
),
),
suffix ?? SizedBox()
],
),
),
);
}

@ -1,7 +1,7 @@
name: diplomaticquarterapp
description: A new Flutter application.
version: 4.6.014+1
version: 4.6.092+4050092
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