Merge branch 'dev_v3.13.6' into dev_3.13.6_CR5047_LiveCare_Enhancements

# Conflicts:
#	lib/config/config.dart
#	lib/main.dart
#	lib/splashPage.dart
#	lib/uitl/CalendarUtils.dart
#	lib/uitl/translations_delegate_base.dart
dev_3.13.6_CR5047_LiveCare_Enhancements
haroon amjad 10 months ago
commit 3f22d69058

@ -58,6 +58,7 @@ android {
buildFeatures {
viewBinding true
dataBinding true
}
sourceSets {

@ -204,6 +204,7 @@ internal class PenguinView(
// .setDeepLinkData("deeplink")
.setCustomizeColor("#2CA0AF")
.setDeepLinkSchema("")
.setIsEnableReportIssue(true)
.build()
// Set location delegate to handle location updates
@ -215,7 +216,17 @@ internal class PenguinView(
// }
// Set events delegate for reporting issues
PlugAndPlaySDK.setPiEventsDelegate { }
// PlugAndPlaySDK.setPiEventsDelegate(new PIEventsDelegate() {
// @Override
// public void onReportIssue(PIReportIssue issue) {
// Log.e("Issue Reported: ", issue.getReportType());
// }
// // Implement issue reporting logic here }
// @Override
// public void onSharedLocation(String link) {
// // Implement Shared location logic here
// }
// })
// Start the Penguin SDK
PlugAndPlaySDK.start(mContext, this)

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

@ -20,11 +20,9 @@ var PACKAGES_SHOPPING_CART = '/api/shopping_cart_items';
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 = 'http://10.50.100.198:4422/';
// var BASE_URL = 'https://uat.hmgwebservices.com/';
// 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 = 'http://10.20.200.111:1010/';
// var BASE_URL = 'https://orash.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidamergeuat.cloudsolutions.com.sa/';
@ -354,7 +352,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 = 16.7;
var VERSION_ID = 17.0;
var SETUP_ID = '91877';
var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0;
@ -694,6 +692,8 @@ var CHECK_PATIENT_ER_ADVANCE_BALANCE = 'Services/OUTPs.svc/Rest/getPatientAdvanc
var GET_PROJECT_FROM_NFC = 'Services/OUTPs.svc/Rest/GetProjectByNFC';
var GET_PATIENT_OCCUPATION_LIST = 'Services/Authentication.svc/REST/GetPatientOccupation';
//PAYFORT
var getPayFortProjectDetails = "Services/PayFort_Serv.svc/REST/GetPayFortProjectDetails";
var addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse";

@ -1921,6 +1921,8 @@ const Map localizedValues = {
"consent": {"en": "Consent", "ar": "التنويم"},
"generalInstructionsTitle": {"en": "General", "ar": "تعليمات"},
"generalInstructionsSubTitle": {"en": "Instructions", "ar": "التنويم العامة"},
"generalConsentTitle": {"en": "General", "ar": "الموافقة"},
"generalConsentSubTitle": {"en": "Consent", "ar": "العامة"},
"medicalInstructionsTitle": {"en": "Medical", "ar": "التعليمات الطبية"},
"medicalInstructionsSubTitle": {"en": "Instructions", "ar": "قبل التنويم"},
"mealPlanTitle": {"en": "Meal Plan", "ar": "خدمات"},
@ -1984,6 +1986,7 @@ const Map localizedValues = {
"ar": "يرجى ملاحظة أن هذا هو المبلغ النقدي، إذا كنت ترغب في تحديث التأمين الخاص بك، يرجى النقر أدناه:"
},
"validInsurance": {"en": "Do you have a valid insurance?", "ar": "هل لديك تأمين صالح؟"},
"resultStatus": {"en": "Result Status: ", "ar": "حالة النتيجة: "},
"contactRRT": {"en": "Contact RRT", "ar": "تواصل مع فريق الاستجابة السريعة"},
"checkInViaLocation": {"en": "Check-In Via Location", "ar": "تسجيل الوصول عبر الموقع"},
"locationCheckInError": {"en": "Please ensure you're within the hospital location to perform online check-in.", "ar": "يرجى التأكد من تواجدك داخل موقع المستشفى لإجراء تسجيل الوصول عبر الإنترنت."},
@ -2027,7 +2030,7 @@ const Map localizedValues = {
"hospitalNavigationSubtitle": {"en": "Navigation", "ar": "المستشفى"},
"continueAgreeTerms": {"en": "By continuing, You agree to the above Terms and Conditions.", "ar": "من خلال المتابعة، فإنك توافق على الشروط والأحكام المذكورة أعلاه."},
"agreeText": {"en": "Agree", "ar": "أوافق"},
"ERCheckInSuccess": {"en": "Your ER Online Check-In has been successfully done.", "ar": "لقد تم تسجيل وصولك للطوارئ عبر الإنترنت بنجاح."},
"ERCheckInSuccess": {"en": "Your ER Online Check-In has been successfully done. Please proceed to the waiting area.", "ar": "لقد تم تسجيل دخولك عبر الإنترنت بنجاح. يرجى التوجه إلى منطقة الانتظار."},
"generalConsent": {"en": "General Consent: ", "ar": "موافقة عامة:"},
"generalConsent1": {
@ -2120,4 +2123,18 @@ const Map localizedValues = {
"ar":
"لقد قرأت وفهمت وأوافق على الشروط والأحكام المبينة أعلاه وأوافق على الإلتزام بالمتطلبات المذكورة تجاه المستشفى ، لقد قرأت التفاصيل المبينة في نموذج التسجيل الخاص بي وأقر بأنها صحيحة. أنا الموقع ادناه أقر بأنه أتيحت لي الفرصة لطرح الأسئلة والتحفظات بشأن هذه الموافقة، وتلقيت إجابات مرضية على جميع إستفساراتي."
},
"incorrectNationalId": {"en": "Incorrect National ID", "ar": "رقم الهوية غير صحيحة"},
"labResultFlag": {"en": "Flag", "ar": "Flag"},
"selectOccupation": {"en": "Select Occupation", "ar": "اختر المهنة"},
"selectOccupationError": {"en": "Please select your occupation.", "ar": "الرجاء تحديد مهنتك."},
"whatIsOnlineCheckIn": {"en": "What is Online Check-In?", "ar": "ما هو تسجيل الوصول عبر الإنترنت؟"},
"EROnlineCheckInDesc1": {"en": "Online check-in lets patients fill out forms, share insurance details, and book appointments online, making their visit smoother and quicker.", "ar": "يتيح تسجيل الوصول عبر الإنترنت للمرضى ملء النماذج ومشاركة تفاصيل التأمين وحجز المواعيد عبر الإنترنت، مما يجعل زيارتهم أكثر سلاسة وسرعة."},
"EROnlineCheckInHow": {"en": "How can i use Online Check-In?", "ar": "كيف يمكنني استخدام تسجيل الوصول عبر الإنترنت؟"},
"EROnlineCheckInTapOn": {"en": "Tap On", "ar": "اضغط على"},
"EROnlineCheckInHoldPhone": {"en": "Hold your phone", "ar": "أمسك هاتفك"},
"EROnlineCheckInWaitTurn": {"en": "Wait your turn", "ar": "انتظر دورك"},
"EROnlineCheckInWaitTurnInstruction": {"en": "Please wait in the waiting area until called by the nurse.", "ar": "يرجى الانتظار في منطقة الانتظار حتى يتم استدعاؤك من قبل الممرضة."},
"EROnlineCheckInHoldPhoneInstruction": {"en": "Hold the phone 1 to 2 cm from the NFC sign displayed on the board", "ar": "امسك الهاتف على مسافة 1 إلى 2 سم من علامة NFC المعروضة على اللوحة"},
"EROnlineCheckInTapOnCheckIn": {"en": "Tap on the check-in button within the app", "ar": "اضغط على زر تسجيل الدخول داخل التطبيق"},
};

@ -44,3 +44,4 @@ const COVID_QA_LIST = 'COVID_QA_LIST';
const IS_COVID_CONSENT_SHOWN = 'IS_COVID_CONSENT_SHOWN';
const REGISTER_INFO_DUBAI ='register-info-dubai';
const IS_LAST_APPOINTMENT_RATE_SHOWN ='is-last-appointment-rate-shown';
const PATIENT_OCCUPATION_LIST ='patient-occupation-list';

@ -37,6 +37,8 @@ class PatientLabOrders {
String? setupID;
List<String>? speciality;
bool? isLiveCareAppointment;
int? status;
String? statusDesc;
PatientLabOrders(
{this.actualDoctorRate,
this.clinicDescription,
@ -73,7 +75,9 @@ class PatientLabOrders {
this.invoiceNo_VP,
this.invoiceType,
this.speciality,
this.isLiveCareAppointment});
this.isLiveCareAppointment,
this.status,
this.statusDesc,});
PatientLabOrders.fromJson(Map<String, dynamic> json) {
actualDoctorRate = json['ActualDoctorRate'];
@ -111,6 +115,8 @@ class PatientLabOrders {
invoiceNo_VP = json['invoiceNo_VP'];
invoiceType = json['InvoiceType'];
isLiveCareAppointment = json['IsLiveCareAppointment'];
status = json['Status'];
statusDesc = json['StatusDesc'];
// speciality = json['Speciality'].cast<String>();
}
@ -151,6 +157,8 @@ class PatientLabOrders {
data['Speciality'] = this.speciality;
data['IsLiveCareAppointment'] = this.isLiveCareAppointment;
data['invoiceNo_VP'] = this.invoiceNo_VP;
data['Status'] = this.status;
data['StatusDesc'] = this.statusDesc;
return data;
}
}

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_inp.dart';
class RequestSendPrescriptionEmail {
String? appointmentDate;
@ -26,6 +27,7 @@ class RequestSendPrescriptionEmail {
int? doctorID;
int? projectID;
List<PrescriptionReport>? listPrescriptions;
List<PrescriptionReportINP>? listPrescriptionsINP;
RequestSendPrescriptionEmail(
{this.appointmentDate,
@ -102,9 +104,12 @@ class RequestSendPrescriptionEmail {
data['PatientMobileNumber'] = this.patientMobileNumber;
data['PatientName'] = this.patientName;
data['SetupID'] = this.setupID;
if (this.listPrescriptions != null) {
if (this.listPrescriptions != null && this.listPrescriptions!.isNotEmpty) {
data['ListPrescriptions'] = this.listPrescriptions!.map((v) => v.toJson()).toList();
}
if (this.listPrescriptionsINP != null && this.listPrescriptionsINP!.isNotEmpty) {
data['ListPrescriptions'] = this.listPrescriptionsINP!.map((v) => v.toJson()).toList();
}
data['ClinicName'] = this.clinicName;
data['DoctorName'] = this.doctorName;
data['ProjectID'] = this.projectID;

@ -37,6 +37,9 @@ VitalSignService _vitalSignService = locator<VitalSignService>();
class BaseAppClient {
final _analytics = locator<GAnalytics>();
var sampleNHICResponse =
'{"Date":null,"LanguageID":0,"ServiceName":0,"Time":null,"AndroidLink":null,"AuthenticationTokenID":null,"Data":null,"Dataw":false,"DietType":0,"DietTypeID":0,"ErrorCode":null,"ErrorEndUserMessage":null,"ErrorEndUserMessageN":null,"ErrorMessage":null,"ErrorStatusCode":0,"ErrorType":0,"FoodCategory":0,"IOSLink":null,"IsAuthenticated":false,"MealOrderStatus":0,"MealType":0,"MessageStatus":1,"NumberOfResultRecords":0,"PatientBlodType":null,"SuccessMsg":null,"SuccessMsgN":null,"VidaUpdatedResponse":null,"AccessTokenObject":null,"Age":23,"ClientIdentifierId":null,"CreatedBy":0,"DateOfBirth":"05\/20\/2001","FirstNameAr":"عميرخان","FirstNameEn":"UMAIR KHAN","Gender":"M","GenderAr":null,"GenderEn":null,"HealthId":"30000411002276","IdNumber":"2188030163","IdType":"Iqama","IsHijri":false,"IsInstertedOrUpdated":0,"IsNull":0,"IsPatientExistNHIC":0,"IsRecordLockedByCurrentUser":false,"LastNameAr":"خان","LastNameEn":"KHAN","List_ActiveAccessToken":null,"MaritalStatus":"غير معروف","MaritalStatusCode":"U","NationalDateOfBirth":"26\/02\/1422","Nationality":"باكستان","NationalityCode":"PAK","Occupation":"-","PCDTransactionDataResultList":null,"PCD_GetVidaPatientForManualVerificationList":null,"PCD_NHIC_HMG_PatientDetailsMatchCalulationList":null,"PCD_ReturnValue":0,"PatientStatus":"-","PlaceofBirth":"-","PractitionerStatusCode":null,"PractitionerStatusDescAr":null,"PractitionerStatusDescEn":null,"RowCount":0,"SecondNameAr":"عظيم","SecondNameEn":"AZEEM","ThirdNameAr":"خان عمر","ThirdNameEn":"KHAN UMAR","YakeenDoctorData_GetSourceList":null,"YakeenVidaPatientDataStatisticsByPatientIdList":null,"YakeenVidaPatientDataStatisticsList":null,"YakeenVidaPatientDataStatisticsPrefferedList":null,"accessToken":null,"categoryCode":0,"categoryNameAr":null,"categoryNameEn":null,"constraintCode":0,"constraintNameAr":null,"constraintNameEn":null,"content":null,"errorList":null,"licenseExpiryDate":null,"licenseIssuedDate":null,"licenseStatusCode":null,"licenseStatusDescAr":null,"licenseStatusDescEn":null,"organizations":null,"registrationNumber":null,"specialtyCode":0,"specialtyNameAr":null,"specialtyNameEn":null}';
post(String endPoint,
{required Map<String, dynamic> body,
required Function(dynamic response, int statusCode) onSuccess,
@ -184,7 +187,7 @@ class BaseAppClient {
// body['IdentificationNo'] = 1023854217;
// body['MobileNo'] = "531940021"; //0560717232
// body['PatientID'] = 4768303; //4609100
// body['PatientID'] = 1058229; //4609100
// body['TokenID'] = "@dm!n";
// Patient ID: 3027574
@ -195,13 +198,13 @@ class BaseAppClient {
// if (url == 'https://uat.hmgwebservices.com/Services/NHIC.svc/REST/GetPatientInfo') {
// url = "https://hmgwebservices.com/Services/NHIC.svc/REST/GetPatientInfo";
// body['TokenID'] = "@dm!n";
// body['TokenID'] = "@dm!n";
// }
// if (AppGlobal.isNetworkDebugEnabled) {
print("URL : $url");
debugPrint("URL : $url");
final jsonBody = json.encode(body);
print(jsonBody);
debugPrint(jsonBody);
// }
if (await Utils.checkConnection(bypassConnectionCheck: bypassConnectionCheck)) {
@ -212,7 +215,12 @@ class BaseAppClient {
logApiEndpointError(endPoint, 'Error While Fetching data', statusCode);
} else {
// var decoded = utf8.decode(response.bodyBytes);
var parsed = json.decode(utf8.decode(response.bodyBytes));
var parsed;
// if (url.contains('Services/NHIC.svc/REST/GetPatientInfo')) {
// parsed = json.decode(sampleNHICResponse);
// } else {
parsed = json.decode(utf8.decode(response.bodyBytes));
// }
// print("Response: $parsed");

@ -98,6 +98,7 @@ class PrescriptionsService extends BaseService {
await baseAppClient.post(prescriptions.isInOutPatient! ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT, onSuccess: (dynamic response, int statusCode) {
prescriptionReportList.clear();
prescriptionReportEnhList.clear();
prescriptionReportListINP.clear();
isMedDeliveryAllowed = response['IsHomeMedicineDeliverySupported'];
if (prescriptions.isInOutPatient!) {
response['ListPRM'].forEach((prescriptions) {
@ -120,8 +121,9 @@ class PrescriptionsService extends BaseService {
isDentalAllowedBackend: false,
);
Future sendPrescriptionEmail(String appointmentDate, int patientID, String clinicName, String doctorName, int doctorID, int projectID) 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;
_requestSendPrescriptionEmail.patientID = patientID;
_requestSendPrescriptionEmail.clinicName = clinicName;

@ -114,9 +114,9 @@ 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}) 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);
await _prescriptionsService.sendPrescriptionEmail(appointmentDate, patientID, clinicName, doctorName, doctorID, projectID, isInOutPatient);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error!;
setState(ViewState.ErrorLocal);

@ -31,16 +31,17 @@ void main() async {
await Firebase.initializeApp();
// Pass all uncaught "fatal" errors from the framework to Crashlytics
FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterFatalError;
// FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterFatalError;
// Pass all uncaught asynchronous errors that aren't handled by the Flutter framework to Crashlytics
PlatformDispatcher.instance.onError = (error, stack) {
FirebaseCrashlytics.instance.recordError(error, stack, fatal: true);
return true;
};
// PlatformDispatcher.instance.onError = (error, stack) {
// if (!kDebugMode) FirebaseCrashlytics.instance.recordError(error, stack, fatal: true);
// return true;
// };
setupLocator();
HttpOverrides.global = MyHttpOverrides();
runApp(MyApp());
}

@ -204,8 +204,10 @@ class PatientDoctorAppointmentList {
String? filterName = "";
String? distanceInKMs = "";
List<DoctorList>? patientDoctorAppointmentList = [];
String? projectTopName = "";
String? projectBottomName = "";
PatientDoctorAppointmentList({this.filterName, this.distanceInKMs, DoctorList? patientDoctorAppointment}) {
PatientDoctorAppointmentList({this.filterName, this.distanceInKMs, this.projectTopName, this.projectBottomName, DoctorList? patientDoctorAppointment}) {
patientDoctorAppointmentList!.add(patientDoctorAppointment!);
}
}

@ -0,0 +1,22 @@
class GetPatientOccupationListResponse {
String? occupationID;
String? description;
String? descriptionN;
GetPatientOccupationListResponse(
{this.occupationID, this.description, this.descriptionN});
GetPatientOccupationListResponse.fromJson(Map<String, dynamic> json) {
occupationID = json['OccupationID'];
description = json['Description'];
descriptionN = json['DescriptionN'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['OccupationID'] = this.occupationID;
data['Description'] = this.description;
data['DescriptionN'] = this.descriptionN;
return data;
}
}

@ -75,6 +75,7 @@ class RegisterInfoResponse {
int? specialtyCode;
dynamic specialtyNameAr;
dynamic specialtyNameEn;
// String? occupationID;
RegisterInfoResponse(
{this.date,
@ -152,7 +153,9 @@ class RegisterInfoResponse {
this.registrationNumber,
this.specialtyCode,
this.specialtyNameAr,
this.specialtyNameEn});
this.specialtyNameEn,
// this.occupationID
});
RegisterInfoResponse.fromJson(Map<String, dynamic> json) {
date = json['Date'];
@ -231,6 +234,7 @@ class RegisterInfoResponse {
specialtyCode = json['specialtyCode'];
specialtyNameAr = json['specialtyNameAr'];
specialtyNameEn = json['specialtyNameEn'];
// occupationID = json['OccupationID'];
}
Map<String, dynamic> toJson() {
@ -311,6 +315,7 @@ class RegisterInfoResponse {
data['specialtyCode'] = this.specialtyCode;
data['specialtyNameAr'] = this.specialtyNameAr;
data['specialtyNameEn'] = this.specialtyNameEn;
// data['OccupationID'] = this.occupationID;
return data;
}
}

@ -16,6 +16,8 @@ class RegisterUserRequest {
int? isHijri;
String? healthId;
String? zipCode;
// String? occupationID;
RegisterUserRequest(
{this.patientobject,
this.patientIdentificationID,
@ -33,7 +35,9 @@ class RegisterUserRequest {
this.dob,
this.isHijri,
this.healthId,
this.zipCode});
this.zipCode,
// this.occupationID
});
RegisterUserRequest.fromJson(Map<String, dynamic> json) {
patientobject = json['Patientobject'] != null ? new Patientobject.fromJson(json['Patientobject']) : null;
@ -53,6 +57,7 @@ class RegisterUserRequest {
isHijri = json['IsHijri'];
healthId = json['HealthId'];
zipCode = json['ZipCode'];
// occupationID = json['OccupationID'];
}
Map<String, dynamic> toJson() {
@ -76,6 +81,7 @@ class RegisterUserRequest {
data['IsHijri'] = this.isHijri;
data['HealthId'] = this.healthId;
data['ZipCode'] = this.zipCode;
// data['OccupationID'] = this.occupationID;
return data;
}
}
@ -102,6 +108,7 @@ class Patientobject {
String? sourceType;
String? preferredLanguage;
String? marital;
// String? occupationID;
Patientobject(
{this.tempValue,
@ -124,7 +131,9 @@ class Patientobject {
this.emailAddress,
this.sourceType,
this.preferredLanguage,
this.marital});
this.marital,
// this.occupationID
});
Patientobject.fromJson(Map<String, dynamic> json) {
tempValue = json['TempValue'];
@ -149,6 +158,7 @@ class Patientobject {
preferredLanguage = json['PreferredLanguage'];
marital = json['Marital'];
// occupationID = json['OccupationID'] ?? "";
}
Map<String, dynamic> toJson() {
@ -174,6 +184,7 @@ class Patientobject {
data['SourceType'] = this.sourceType;
data['PreferredLanguage'] = this.preferredLanguage;
data['Marital'] = this.marital;
// data['OccupationID'] = this.occupationID;
return data;
}
}

@ -4,6 +4,7 @@ class HmgServices {
String subTitle;
String icon;
bool isLogin;
bool isLocked;
HmgServices(this.action, this.title, this.subTitle, this.icon,this.isLogin);
HmgServices(this.action, this.title, this.subTitle, this.icon, this.isLogin, {this.isLocked = false});
}

@ -30,28 +30,18 @@ class NewHomeHealthCareStepTowPage extends StatefulWidget {
final Function(PickResult)? onPick;
final double? latitude;
final double? longitude;
final PatientERInsertPresOrderRequestModel?
patientERInsertPresOrderRequestModel;
final PatientERInsertPresOrderRequestModel? patientERInsertPresOrderRequestModel;
final Function? changePageViewIndex;
final HomeHealthCareViewModel model;
const NewHomeHealthCareStepTowPage(
{Key? key,
this.onPick,
this.latitude,
this.longitude,
this.patientERInsertPresOrderRequestModel,
this.changePageViewIndex,
required this.model})
const NewHomeHealthCareStepTowPage({Key? key, this.onPick, this.latitude, this.longitude, this.patientERInsertPresOrderRequestModel, this.changePageViewIndex, required this.model})
: super(key: key);
@override
_NewHomeHealthCareStepTowPageState createState() =>
_NewHomeHealthCareStepTowPageState();
_NewHomeHealthCareStepTowPageState createState() => _NewHomeHealthCareStepTowPageState();
}
class _NewHomeHealthCareStepTowPageState
extends State<NewHomeHealthCareStepTowPage> {
class _NewHomeHealthCareStepTowPageState extends State<NewHomeHealthCareStepTowPage> {
double latitude = 0;
double longitude = 0;
AddressInfo? _selectedAddress;
@ -88,8 +78,7 @@ class _NewHomeHealthCareStepTowPageState
}
void _getUserLocation() async {
if (await this.sharedPref.getDouble(USER_LAT) != null &&
await this.sharedPref.getDouble(USER_LONG) != null) {
if (await this.sharedPref.getDouble(USER_LAT) != null && await this.sharedPref.getDouble(USER_LONG) != null) {
var lat = await this.sharedPref.getDouble(USER_LAT);
var long = await this.sharedPref.getDouble(USER_LONG);
latitude = lat;
@ -97,8 +86,7 @@ class _NewHomeHealthCareStepTowPageState
currentPostion = LatLng(lat, long);
setMap();
} else {
locationUtils =
new LocationUtils(isShowConfirmDialog: true, context: context);
locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
locationUtils.getCurrentLocation(callBack: (value) {
print(value);
setMap();
@ -138,8 +126,7 @@ class _NewHomeHealthCareStepTowPageState
showCurrentLocation = true;
});
} else {
latLong = widget
.model.addressesList[widget.model.addressesList.length - 1].latLong;
latLong = widget.model.addressesList[widget.model.addressesList.length - 1].latLong;
}
}
@ -178,8 +165,7 @@ class _NewHomeHealthCareStepTowPageState
decoration: cardRadius(12),
child: Container(
child: InkWell(
onTap: () =>
confirmSelectLocationDialog(widget.model.addressesList),
onTap: () => confirmSelectLocationDialog(widget.model.addressesList),
child: Container(
padding: EdgeInsets.all(8),
width: double.infinity,
@ -212,28 +198,28 @@ class _NewHomeHealthCareStepTowPageState
),
InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: LocationPage(
// latitude: latitude,
// longitude: longitude,
),
),
).then((value) async {
print(value);
await widget.model.getCustomerAddresses();
setState(() {});
});
// Navigator.push(
// context,
// FadePage(
// page: LocationPage(
// // latitude: latitude,
// // longitude: longitude,
// ),
// ),
// ).then((value) async {
// print(value);
// await widget.model.getCustomerAddresses();
// setState(() {});
// });
},
child: Padding(
padding: EdgeInsets.only(left: 12, right: 12, bottom: 16, top: 8),
padding: EdgeInsets.only(left: 12, right: 12, bottom: 16, top: 16),
child: Row(
children: [
Icon(Icons.add_circle_outline_sharp),
Icon(Icons.location_on_outlined),
mWidth(12),
Text(
TranslationBase.of(context).addNewAddress,
TranslationBase.of(context).selectLocation,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
@ -261,23 +247,18 @@ class _NewHomeHealthCareStepTowPageState
),
),
Padding(
padding:
const EdgeInsets.only(left: 20, right: 20, top: 14, bottom: 14),
padding: const EdgeInsets.only(left: 20, right: 20, top: 14, bottom: 14),
child: DefaultButton(
TranslationBase.of(context).continues,
() {
setState(() {
widget.patientERInsertPresOrderRequestModel!.latitude =
latitude;
widget.patientERInsertPresOrderRequestModel!.longitude =
longitude;
widget.patientERInsertPresOrderRequestModel!.latitude = latitude;
widget.patientERInsertPresOrderRequestModel!.longitude = longitude;
});
navigateTo(
context,
NewHomeHealthCareStepThreePage(
patientERInsertPresOrderRequestModel:
widget.patientERInsertPresOrderRequestModel,
patientERInsertPresOrderRequestModel: widget.patientERInsertPresOrderRequestModel,
model: widget.model,
),
);
@ -319,8 +300,7 @@ class _NewHomeHealthCareStepTowPageState
goToCurrentLocation() {
Geolocator.getCurrentPosition().then((value) {
_selectedAddress =
AddressInfo(latLong: '${value.latitude},${value.longitude}');
_selectedAddress = AddressInfo(latLong: '${value.latitude},${value.longitude}');
moveToLocation(LatLng(value.latitude, value.longitude));
});
}

@ -190,7 +190,7 @@ class _BariatricsPageState extends State<BariatricsPage> {
}
Future navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) async {
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital)))
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, isDoctorSearchResult: false,)))
.then((value) {
setState(() {
// dropdownValue = null;

@ -188,7 +188,7 @@ class _ResultPageState extends State<ResultPage> {
}
Future navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) async {
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital)))
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, isDoctorSearchResult: false,)))
.then((value) {
setState(() {
// dropdownValue = null;

@ -154,7 +154,7 @@ class BmrResultPage extends StatelessWidget {
}
});
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital)));
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital, isDoctorSearchResult: false,)));
}
}
}).catchError((err) {

@ -150,7 +150,7 @@ class FatResult extends StatelessWidget {
}
});
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital)));
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital, isDoctorSearchResult: false,)));
}
}
}).catchError((err) {

@ -155,7 +155,7 @@ class CalorieResultPage extends StatelessWidget {
}
});
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital)));
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital, isDoctorSearchResult: false,)));
}
}
}).catchError((err) {

@ -176,7 +176,7 @@ class CarbsResult extends StatelessWidget {
}
});
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital)));
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital, isDoctorSearchResult: false,)));
}
}
}).catchError((err) {

@ -176,7 +176,7 @@ class DeliveryDueResult extends StatelessWidget {
}
});
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital)));
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital, isDoctorSearchResult: false,)));
}
}
}).catchError((err) {

@ -214,7 +214,7 @@ class IdealBodyResult extends StatelessWidget {
BariatricsService service = new BariatricsService();
List<DoctorList> doctorsList = [];
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital =[];
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = [];
service.getCalculationDoctors(calculationID: 4).then((res) {
GifLoaderDialogUtils.hideDialog(context);
@ -253,7 +253,15 @@ class IdealBodyResult extends StatelessWidget {
}
});
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital)));
Navigator.push(
context,
FadePage(
page: SearchResults(
isLiveCareAppointment: false,
doctorsList: doctorsList,
patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital,
isDoctorSearchResult: false,
)));
}
}
}).catchError((err) {

@ -186,7 +186,7 @@ class OvulationResult extends StatelessWidget {
}
});
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital)));
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital, isDoctorSearchResult: false,)));
}
}
}).catchError((err) {

@ -27,7 +27,7 @@ class DentalComplaints extends StatefulWidget {
Function? onSelectedMethod;
bool isDoctorNameSearch;
DentalComplaints({required this.searchInfo, this.onSelectedMethod, this.isDoctorNameSearch = false});
DentalComplaints({required this.searchInfo, this.onSelectedMethod, this.isDoctorNameSearch = false});
@override
_DentalComplaintsState createState() => _DentalComplaintsState();
@ -243,8 +243,12 @@ class _DentalComplaintsState extends State<DentalComplaints> {
if (doctorByHospital.length != 0) {
patientDoctorAppointmentListHospital[patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element);
} else {
patientDoctorAppointmentListHospital
.add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element));
patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList(
filterName: element.projectName,
distanceInKMs: element.projectDistanceInKiloMeters.toString(),
projectTopName: element.projectTopName,
projectBottomName: element.projectBottomName,
patientDoctorAppointment: element));
}
});
} else {}

@ -9,6 +9,8 @@ import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.da
import 'package:diplomaticquarterapp/models/Clinics/ClinicListResponse.dart';
import 'package:diplomaticquarterapp/models/header_model.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/DentalComplaints.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/LaserBooking.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/components/LaserClinic.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/doctor_post_pre_images_page.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/waiting_appointment/waiting_appointment_info.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/SchedulePage.dart';
@ -539,6 +541,8 @@ class _DoctorProfileState extends State<DoctorProfile> with TickerProviderStateM
if (projectViewModel.isLogin) {
if (widget.isDoctorNameSearch && widget.doctor.clinicID == 17 && projectViewModel.user!.age! > 12) {
navigateToDentalComplaints(context);
} else if (widget.isDoctorNameSearch && widget.doctor.clinicID == 253) {
navigateToLaserClinic(context);
} else {
final timeSlot = DocAvailableAppointments.selectedAppoDateTime;
navigateToBookConfirm(context);
@ -560,6 +564,17 @@ class _DoctorProfileState extends State<DoctorProfile> with TickerProviderStateM
}
}
Future navigateToLaserClinic(BuildContext context) async {
HospitalsModel tempselectedHospital = new HospitalsModel();
tempselectedHospital.iD = widget.doctor.projectID;
Navigator.push(
context,
FadePage(
page: LaserClinic(selectedHospital: tempselectedHospital!),
),
);
}
Future navigateToDentalComplaints(BuildContext context) async {
HospitalsModel selectedHospital = new HospitalsModel();
selectedHospital.name = widget.doctor.projectName;

@ -17,6 +17,7 @@ class SearchResults extends StatelessWidget {
bool isObGyneAppointment;
bool isDoctorNameSearch;
OBGyneProcedureListResponse? obGyneProcedureListResponse;
bool isDoctorSearchResult;
SearchResults(
{required this.doctorsList,
@ -24,6 +25,7 @@ class SearchResults extends StatelessWidget {
this.isObGyneAppointment = false,
this.isDoctorNameSearch = false,
required this.isLiveCareAppointment,
required this.isDoctorSearchResult,
this.obGyneProcedureListResponse});
@override
@ -50,7 +52,16 @@ class SearchResults extends StatelessWidget {
title: (patientDoctorAppointmentListHospital[index].distanceInKMs != "0")
? patientDoctorAppointmentListHospital[index].filterName! + " - " + patientDoctorAppointmentListHospital[index].distanceInKMs! + " " + TranslationBase.of(context).km
: patientDoctorAppointmentListHospital[index].filterName,
projectTitleTop: patientDoctorAppointmentListHospital[index].projectTopName,
projectTitleBottom: (patientDoctorAppointmentListHospital[index].distanceInKMs != "0")
? patientDoctorAppointmentListHospital[index].projectBottomName.toString() +
" - " +
patientDoctorAppointmentListHospital[index].distanceInKMs! +
" " +
TranslationBase.of(context).km
: patientDoctorAppointmentListHospital[index].projectBottomName.toString(),
isTitleSingleLine: false,
isDoctorSearchResult: isDoctorSearchResult,
isExpand: patientDoctorAppointmentListHospital.length == 1 ? true : false,
bodyWidget: ListView.separated(
shrinkWrap: true,

@ -77,8 +77,9 @@ class _LaserClinicState extends State<LaserClinic> with SingleTickerProviderStat
res['Laser_GetBodyPartsByCategoryList'].forEach((v) {
_tempList.add(LaserBodyPart.fromJson(v));
});
if (_tempList[0].category == 1 || _tempList[0].category == 11 || _tempList[0].category == 2 || _tempList[0].category == 10) {
fullBody = _tempList[0];
// if (_tempList[0].category == 1 || _tempList[0].category == 11 || _tempList[0].category == 2 || _tempList[0].category == 10) {
if (_tempList[0].category == 2 || _tempList[0].category == 10) {
// fullBody = _tempList[0];
_tempList.removeAt(0);
}
laserBodyPartsList = _tempList;
@ -211,7 +212,7 @@ class _LaserClinicState extends State<LaserClinic> with SingleTickerProviderStat
List<String> arrDistance = [];
List<String> result;
int numAll;
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital =[];
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = [];
DoctorsListService service = new DoctorsListService();
projectViewModel.selectedBodyPartList = _selectedBodyPartList;
@ -234,8 +235,12 @@ class _LaserClinicState extends State<LaserClinic> with SingleTickerProviderStat
if (doctorByHospital.length != 0) {
_patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element);
} else {
_patientDoctorAppointmentListHospital
.add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element));
_patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList(
filterName: element.projectName,
distanceInKMs: element.projectDistanceInKiloMeters.toString(),
projectTopName: element.projectTopName,
projectBottomName: element.projectBottomName,
patientDoctorAppointment: element));
}
});
} else {}
@ -256,8 +261,15 @@ class _LaserClinicState extends State<LaserClinic> with SingleTickerProviderStat
}
Future navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) async {
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital)))
.then((value) {
Navigator.push(
context,
FadePage(
page: SearchResults(
isLiveCareAppointment: false,
doctorsList: docList,
patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital,
isDoctorSearchResult: true,
))).then((value) {
setState(() {
// dropdownValue = null;
});
@ -352,46 +364,47 @@ class _LaserClinicState extends State<LaserClinic> with SingleTickerProviderStat
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
if (fullBody != null)
Row(
children: [
SizedBox(
width: 22,
height: 22,
child: Theme(
data: Theme.of(context).copyWith(
unselectedWidgetColor: Color(0xffEAEAEA),
),
child: Checkbox(
value: _isFullBody,
onChanged: (value) {
setState(() {
if (value!) {
_selectedBodyPartList.clear();
_selectedBodyPartList.add(fullBody);
} else {
_selectedBodyPartList.clear();
}
_isFullBody = !_isFullBody;
});
},
activeColor: Color(0xffD02127),
),
),
),
SizedBox(width: 12),
Text(
projectViewModel.isArabic ? fullBody.bodyPartN! : fullBody.bodyPart!,
style: TextStyle(fontSize: 15, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.6, height: 21 / 14),
),
],
),
// if (fullBody != null)
// Row(
// children: [
// SizedBox(
// width: 22,
// height: 22,
// child: Theme(
// data: Theme.of(context).copyWith(
// unselectedWidgetColor: Color(0xffEAEAEA),
// ),
// child: Checkbox(
// value: _isFullBody,
// onChanged: (value) {
// setState(() {
// if (value!) {
// _selectedBodyPartList.clear();
// _selectedBodyPartList.add(fullBody);
// } else {
// _selectedBodyPartList.clear();
// }
// _isFullBody = !_isFullBody;
// });
// },
// activeColor: Color(0xffD02127),
// ),
// ),
// ),
// SizedBox(width: 12),
// Text(
// projectViewModel.isArabic ? fullBody.bodyPartN! : fullBody.bodyPart!,
// style: TextStyle(fontSize: 15, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.6, height: 21 / 14),
// ),
// ],
// ),
GridView.builder(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 85 / 107, crossAxisSpacing: 4, mainAxisSpacing: 21),
physics: NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemCount: laserBodyPartsList.length,
padding: fullBody != null ? EdgeInsets.only(top: 16) : EdgeInsets.zero,
// padding: fullBody != null ? EdgeInsets.only(top: 16) : EdgeInsets.zero,
padding: EdgeInsets.zero,
itemBuilder: (BuildContext context, int index) {
bool _isSelected = _selectedBodyPartList.any((file) => file.id == laserBodyPartsList[index].id);
return InkWell(
@ -406,7 +419,7 @@ class _LaserClinicState extends State<LaserClinic> with SingleTickerProviderStat
setState(() {});
return;
}
AppToast.showToast(message: TranslationBase.of(context).laserMaxLimitReach);
AppToast.showToast(message: TranslationBase.of(context).laserMaxLimitReach, timeInSeconds: 3);
return;
}
if (_isSelected) {

@ -657,8 +657,12 @@ class _SearchByClinicState extends State<SearchByClinic> {
if (doctorByHospital.length != 0) {
_patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element);
} else {
_patientDoctorAppointmentListHospital
.add(PatientDoctorAppointmentList(filterName: element.getProjectCompleteName(), distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element));
_patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList(
filterName: element.getProjectCompleteName(),
distanceInKMs: element.projectDistanceInKiloMeters.toString(),
projectTopName: element.projectTopName ?? "",
projectBottomName: element.projectBottomName ?? "",
patientDoctorAppointment: element));
}
});
} else {}
@ -707,7 +711,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
Future navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) async {
isProjectLoaded = false;
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital)))
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, isDoctorSearchResult: true,)))
.then((value) {
setState(() {
dropdownValue = "null";

@ -93,7 +93,7 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
List<DoctorList> doctorsList = [];
DoctorsListService service = new DoctorsListService();
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital =[];
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = [];
service.getDoctorsListByName(doctorNameController.text, languageID, context).then((res) {
// GifLoaderDialogUtils.hideDialog(context);
@ -105,13 +105,18 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
});
doctorsList.forEach((element) {
List<PatientDoctorAppointmentList> doctorByHospital = _patientDoctorAppointmentListHospital.where((elementClinic) => elementClinic.filterName == element.getProjectCompleteName()).toList();
List<PatientDoctorAppointmentList> doctorByHospital =
_patientDoctorAppointmentListHospital.where((elementClinic) => elementClinic.filterName == element.getProjectCompleteName()).toList();
if (doctorByHospital.length != 0) {
_patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element);
} else {
_patientDoctorAppointmentListHospital
.add(PatientDoctorAppointmentList(filterName: element.getProjectCompleteName(), distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element));
_patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList(
filterName: element.getProjectCompleteName(),
distanceInKMs: element.projectDistanceInKiloMeters.toString(),
projectTopName: element.projectTopName,
projectBottomName: element.projectBottomName,
patientDoctorAppointment: element));
}
});
} else {
@ -152,7 +157,8 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
}
navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) {
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, isDoctorNameSearch: true, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital)));
Navigator.push(context,
FadePage(page: SearchResults(isLiveCareAppointment: false, isDoctorNameSearch: true, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, isDoctorSearchResult: true,)));
}
Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String? prefix, bool isEnable = true, bool hasSelection = false}) {

@ -2,6 +2,7 @@ import 'dart:collection';
import 'package:auto_size_text/auto_size_text.dart';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/components/LaserClinic.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:flutter/material.dart';
@ -118,15 +119,11 @@ class _SearchByHospitalState extends State<SearchByHospital> {
child: DropdownButtonHideUnderline(
child: DropdownButton<HospitalsModel>(
key: projectDropdownKey,
hint: Text(
TranslationBase.of(context).selectHospital),
hint: Text(TranslationBase.of(context).selectHospital),
value: selectedHospital,
iconSize: 0,
isExpanded: true,
style: TextStyle(
fontSize: 14,
letterSpacing: -0.56,
color: Colors.black),
style: TextStyle(fontSize: 14, letterSpacing: -0.56, color: Colors.black),
items: projectsList.map((HospitalsModel item) {
return DropdownMenuItem<HospitalsModel>(
value: item,
@ -164,29 +161,16 @@ class _SearchByHospitalState extends State<SearchByHospital> {
mHeight(8),
InkWell(
onTap: () {
showClickListDialog(context, clinicIds ?? List.empty(),
onSelection: (ListClinicCentralized clincs) {
showClickListDialog(context, clinicIds ?? List.empty(), onSelection: (ListClinicCentralized clincs) {
selectedClinic = clincs;
Navigator.pop(context);
setState(() {
dropdownTitle = clincs.clinicDescription!;
dropdownValue = clincs.clinicID.toString() +
"-" +
clincs.isLiveCareClinicAndOnline.toString() +
"-" +
clincs.liveCareClinicID.toString() +
"-" +
clincs.liveCareServiceID.toString();
dropdownValue = clincs.clinicID.toString() + "-" + clincs.isLiveCareClinicAndOnline.toString() + "-" + clincs.liveCareClinicID.toString() + "-" + clincs.liveCareServiceID.toString();
});
getDoctorsList(context);
context
.read<ProjectViewModel>()
.analytics
.appointment
.book_appointment_select_clinic(
appointment_type: 'regular',
clinic: clincs.clinicDescription);
context.read<ProjectViewModel>().analytics.appointment.book_appointment_select_clinic(appointment_type: 'regular', clinic: clincs.clinicDescription);
});
},
child: Container(
@ -302,8 +286,7 @@ class _SearchByHospitalState extends State<SearchByHospital> {
});
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'];
@ -376,8 +359,7 @@ class _SearchByHospitalState extends State<SearchByHospital> {
super.dispose();
}
Future navigateToDentalComplaints(
BuildContext context, SearchInfo searchInfo) async {
Future navigateToDentalComplaints(BuildContext context, SearchInfo searchInfo) async {
Navigator.push(
context,
FadePage(
@ -401,20 +383,10 @@ class _SearchByHospitalState extends State<SearchByHospital> {
List<String> arrDistance = [];
List<String> result;
int numAll;
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital =
[];
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = [];
DoctorsListService service = new DoctorsListService();
service
.getDoctorsList(
clinicID,
selectedHospital?.mainProjectID.toString() != ""
? int.parse(selectedHospital?.mainProjectID.toString() ?? "-1")
: 0,
nearestAppo,
languageID,
null)
.then((res) {
service.getDoctorsList(clinicID, selectedHospital?.mainProjectID.toString() != "" ? int.parse(selectedHospital?.mainProjectID.toString() ?? "-1") : 0, nearestAppo, languageID, null).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {
@ -424,27 +396,17 @@ class _SearchByHospitalState extends State<SearchByHospital> {
doctorsList.add(DoctorList.fromJson(v));
});
doctorsList.forEach((element) {
List<PatientDoctorAppointmentList> doctorByHospital =
_patientDoctorAppointmentListHospital
.where(
(elementClinic) =>
elementClinic.filterName == element.getProjectCompleteName(),
)
.toList();
List<PatientDoctorAppointmentList> doctorByHospital = _patientDoctorAppointmentListHospital
.where(
(elementClinic) => elementClinic.filterName == element.getProjectCompleteName(),
)
.toList();
if (doctorByHospital.length != 0) {
_patientDoctorAppointmentListHospital[
_patientDoctorAppointmentListHospital
.indexOf(doctorByHospital[0])]
.patientDoctorAppointmentList!
.add(element);
_patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element);
} else {
_patientDoctorAppointmentListHospital.add(
PatientDoctorAppointmentList(
filterName: element.getProjectCompleteName(),
distanceInKMs:
element.projectDistanceInKiloMeters.toString(),
patientDoctorAppointment: element));
_patientDoctorAppointmentListHospital
.add(PatientDoctorAppointmentList(filterName: element.getProjectCompleteName(), distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element));
}
});
} else {}
@ -452,8 +414,7 @@ class _SearchByHospitalState extends State<SearchByHospital> {
result = LinkedHashSet<String>.from(arr).toList();
numAll = result.length;
navigateToSearchResults(
context, doctorsList, _patientDoctorAppointmentListHospital);
navigateToSearchResults(context, doctorsList, _patientDoctorAppointmentListHospital);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
@ -464,19 +425,9 @@ class _SearchByHospitalState extends State<SearchByHospital> {
});
}
Future navigateToSearchResults(
context,
List<DoctorList> docList,
List<PatientDoctorAppointmentList>
patientDoctorAppointmentListHospital) async {
Navigator.push(
context,
FadePage(
page: SearchResults(
isLiveCareAppointment: false,
doctorsList: docList,
patientDoctorAppointmentListHospital:
patientDoctorAppointmentListHospital)))
Future navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) async {
Navigator.push(context,
FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: docList, isDoctorSearchResult: false, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital)))
.then((value) {
print("navigation return ");
dropdownValue = null;
@ -492,7 +443,7 @@ class _SearchByHospitalState extends State<SearchByHospital> {
Navigator.push(
context,
FadePage(
page: LaserBooking(),
page: LaserClinic(selectedHospital: selectedHospital!),
),
).then((value) {
print("LaserBooking navigation return ");
@ -533,10 +484,7 @@ class _SearchByHospitalState extends State<SearchByHospital> {
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 ");

@ -64,7 +64,7 @@ class _DentalComplaintCardState extends State<DentalComplaintCard> {
getChiefComplaintsList() {
int languageID = Provider.of<ProjectViewModel>(context, listen: false).isArabic ? 1 : 2;
List<DoctorList> doctorsList = [];
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital =[];
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = [];
GifLoaderDialogUtils.showMyDialog(context);
ClinicListService service = new ClinicListService();
@ -88,8 +88,12 @@ class _DentalComplaintCardState extends State<DentalComplaintCard> {
if (doctorByHospital.length != 0) {
_patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element);
} else {
_patientDoctorAppointmentListHospital
.add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element));
_patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList(
filterName: element.projectName,
distanceInKMs: element.projectDistanceInKiloMeters.toString(),
projectTopName: element.projectTopName,
projectBottomName: element.projectBottomName,
patientDoctorAppointment: element));
}
});
navigateToSearchResults(context, doctorsList, _patientDoctorAppointmentListHospital);
@ -104,6 +108,6 @@ class _DentalComplaintCardState extends State<DentalComplaintCard> {
}
Future navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) async {
Navigator.push(context, FadePage(page: SearchResults(doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, isLiveCareAppointment: false)));
Navigator.push(context, FadePage(page: SearchResults(doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, isLiveCareAppointment: false, isDoctorSearchResult: true,)));
}
}

@ -85,7 +85,7 @@ class _EROnlineCheckInBookAppointmentState extends State<EROnlineCheckInBookAppo
items: projectsList.map((item) {
return new DropdownMenuItem<HospitalsModel>(
value: item,
child: new Text(item.name!),
child: new Text(item.name! + " - " + item.distanceInKilometers.toString() + " " + TranslationBase.of(context).km),
);
}).toList(),
onChanged: (newValue) async {

@ -1,6 +1,8 @@
import 'package:barcode_scan2/barcode_scan2.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/ErService/EROnlineCheckIn/EROnlineCheckInBookAppointment.dart';
import 'package:diplomaticquarterapp/pages/ErService/EROnlineCheckIn/EROnlineCheckInNFCQRCLocation.dart';
import 'package:diplomaticquarterapp/pages/ErService/EROnlineCheckIn/EROnlineCheckInPaymentDetails.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
@ -8,8 +10,10 @@ import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service
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/location_util.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/bottom_options/bottom_sheet.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/nfc/nfc_reader_sheet.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -31,8 +35,11 @@ class _EROnlineCheckInHomePageState extends State<EROnlineCheckInHomePage> with
bool _supportsNFC = false;
bool isPatientArrived = false;
late LocationUtils locationUtils;
@override
void initState() {
locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
WidgetsBinding.instance.addPostFrameCallback((_) {
// checkIfPatientHasArrived();
if (projectViewModel.isLogin) checkPatientERAdvanceBalance();
@ -86,26 +93,27 @@ class _EROnlineCheckInHomePageState extends State<EROnlineCheckInHomePage> with
),
mHeight(6),
Text(
"What is Online Check-In?",
TranslationBase.of(context).whatIsOnlineCheckIn,
maxLines: 1,
style: TextStyle(
fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24),
),
mHeight(12),
Text(
"online check-in lets patients fill out forms, share insurance details, and book appointments online, making their visit smoother and quicker.",
style: TextStyle(fontSize: 14, color: CustomColors.textDarkColor, letterSpacing: -1.44, height: 35 / 24),
TranslationBase.of(context).EROnlineCheckInDesc1,
style: TextStyle(fontSize: 13, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: CustomColors.textDarkColor, letterSpacing: -1.44, height: 35 / 24),
),
mHeight(16),
Text(
"How can i use Online Check-In?",
maxLines: 1,
style: TextStyle(
fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24),
),
Text(
"online check-in lets patients fill out forms, share insurance details, and book appointments online, making their visit smoother and quicker.",
style: TextStyle(fontSize: 14, color: CustomColors.textDarkColor, letterSpacing: -1.44, height: 35 / 24),
),
// Text(
// TranslationBase.of(context).EROnlineCheckInHow,
// maxLines: 1,
// style: TextStyle(
// fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24),
// ),
// Text(
// "Online check-in lets patients fill out forms, share insurance details, and book appointments online, making their visit smoother and quicker.",
// style: TextStyle(fontSize: 14, color: CustomColors.textDarkColor, letterSpacing: -1.44, height: 35 / 24),
// ),
],
),
),
@ -157,7 +165,7 @@ class _EROnlineCheckInHomePageState extends State<EROnlineCheckInHomePage> with
Padding(
padding: const EdgeInsets.only(left: 50, right: 50),
child: Text(
"Tap On",
TranslationBase.of(context).EROnlineCheckInTapOn,
maxLines: 1,
style: TextStyle(
fontSize: 20,
@ -171,8 +179,8 @@ class _EROnlineCheckInHomePageState extends State<EROnlineCheckInHomePage> with
Padding(
padding: const EdgeInsets.only(left: 50, right: 50),
child: Text(
"Tap on the check-in button within the app",
style: TextStyle(fontSize: 14, color: CustomColors.textDarkColor, letterSpacing: -1.44, height: 35 / 24),
TranslationBase.of(context).EROnlineCheckInTapOnCheckIn,
style: TextStyle(fontSize: 13, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w600, color: CustomColors.textDarkColor, letterSpacing: -1.44, height: 35 / 24),
),
),
mHeight(16),
@ -203,7 +211,7 @@ class _EROnlineCheckInHomePageState extends State<EROnlineCheckInHomePage> with
Padding(
padding: const EdgeInsets.only(left: 50, right: 50),
child: Text(
"Hold your phone",
TranslationBase.of(context).EROnlineCheckInHoldPhone,
maxLines: 1,
style: TextStyle(
fontSize: 20,
@ -217,8 +225,8 @@ class _EROnlineCheckInHomePageState extends State<EROnlineCheckInHomePage> with
Padding(
padding: const EdgeInsets.only(left: 50, right: 50),
child: Text(
"Hold the phone 1 to 2 cm from the NFC sign displayed on the board",
style: TextStyle(fontSize: 14, color: CustomColors.textDarkColor, letterSpacing: -1.44, height: 35 / 24),
TranslationBase.of(context).EROnlineCheckInHoldPhoneInstruction,
style: TextStyle(fontSize: 13, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w600, color: CustomColors.textDarkColor, letterSpacing: -1.44, height: 35 / 24),
),
),
mHeight(16),
@ -234,7 +242,7 @@ class _EROnlineCheckInHomePageState extends State<EROnlineCheckInHomePage> with
child: Center(
child: Text(
"3",
style: TextStyle(fontSize: 22, fontWeight: FontWeight.w700, color: CustomColors.white, letterSpacing: -1.44, height: 35 / 24),
style: TextStyle(fontSize: 22, fontWeight: FontWeight.w700, color: CustomColors.white, letterSpacing: -1.44, height: 35 / 24),
),
),
),
@ -249,7 +257,7 @@ class _EROnlineCheckInHomePageState extends State<EROnlineCheckInHomePage> with
Padding(
padding: const EdgeInsets.only(left: 50, right: 50),
child: Text(
"Wait your turn",
TranslationBase.of(context).EROnlineCheckInWaitTurn,
maxLines: 1,
style: TextStyle(
fontSize: 20,
@ -263,8 +271,8 @@ class _EROnlineCheckInHomePageState extends State<EROnlineCheckInHomePage> with
Padding(
padding: const EdgeInsets.only(left: 50, right: 50),
child: Text(
"Please wait in the waiting area until called by the nurse",
style: TextStyle(fontSize: 14, color: CustomColors.textDarkColor, letterSpacing: -1.44, height: 35 / 24),
TranslationBase.of(context).EROnlineCheckInWaitTurnInstruction,
style: TextStyle(fontSize: 13, color: CustomColors.textDarkColor, fontWeight: FontWeight.w600, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), letterSpacing: -1.44, height: 35 / 24),
),
),
],
@ -284,6 +292,60 @@ class _EROnlineCheckInHomePageState extends State<EROnlineCheckInHomePage> with
child: DefaultButton(
TranslationBase.of(context).arrived,
() {
// showMyBottomSheet(context,
// callBackFunc: () {},
// child: Padding(
// padding: const EdgeInsets.all(21.0),
// child: Column(
// children: [
// Text(TranslationBase.of(context).scanQRHospital,
// style: TextStyle(
// fontSize: 20,
// fontWeight: FontWeight.w600,
// letterSpacing: -0.48,
// )),
// mHeight(21),
// GridView(
// physics: const NeverScrollableScrollPhysics(),
// shrinkWrap: true,
// gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
// crossAxisCount: (MediaQuery.of(context).size.width < 550) ? 3 : 5, childAspectRatio: 1 / 1, crossAxisSpacing: 8, mainAxisSpacing: 12),
// children: [
// attendanceMethod(TranslationBase.of(context).scanNFC, "assets/images/nfc/contactless.svg", true, () {
// if (_supportsNFC) {
// Future.delayed(const Duration(milliseconds: 500), () {
// showNfcReader(context, onNcfScan: (String nfcId) {
// Future.delayed(const Duration(milliseconds: 100), () {
// print(nfcId);
// getProjectIDFromNFC(nfcId, true);
// // Navigator.push(context, FadePage(page: EROnlineCheckInPaymentDetails()));
// });
// }, onCancel: () {
// Navigator.of(context).pop();
// });
// });
// } else {
// //NFCNotSupported
// AppToast.showErrorToast(message: TranslationBase.of(context).NFCNotSupported);
// }
// }),
// attendanceMethod(TranslationBase.of(context).pharmaLiveCareScanQR, "assets/images/new/services/qr_code.svg", true, () async {
// String onlineCheckInQRCode = (await BarcodeScanner.scan().then((value) => value.rawContent));
// if (onlineCheckInQRCode != "") {
// print(onlineCheckInQRCode);
// getProjectIDFromNFC(onlineCheckInQRCode, true);
// // sendNfcCheckInRequest(onlineCheckInQRCode, 2);
// } else {}
// }),
// attendanceMethod(TranslationBase.of(context).checkInViaLocation, "assets/images/new/services/location.svg", true, () {})
// ],
// ),
// ],
// ),
// ));
// Navigator.push(context, FadePage(page: EROnlineCheckInNFCQRLocation(projectID: 15))).then((value) {});
if (_supportsNFC) {
Future.delayed(const Duration(milliseconds: 500), () {
showNfcReader(context, onNcfScan: (String nfcId) {
@ -306,31 +368,33 @@ class _EROnlineCheckInHomePageState extends State<EROnlineCheckInHomePage> with
)
: Row(
children: [
Expanded(
flex: 1,
child: DefaultButton(
TranslationBase.of(context).checkinOptions,
() {
if (_supportsNFC) {
Future.delayed(const Duration(milliseconds: 500), () {
showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () {
print(nfcId);
getProjectIDFromNFC(nfcId, false);
});
}, onCancel: () {
Navigator.of(context).pop();
});
});
} else {
//NFCNotSupported
AppToast.showErrorToast(message: TranslationBase.of(context).NFCNotSupported);
}
},
color: CustomColors.green,
),
),
mWidth(12),
// Expanded(
// flex: 1,
// child: DefaultButton(
// TranslationBase.of(context).checkinOptions,
// () {
// // Navigator.push(context, FadePage(page: EROnlineCheckInNFCQRLocation(projectID: 15))).then((value) {});
//
// if (_supportsNFC) {
// Future.delayed(const Duration(milliseconds: 500), () {
// showNfcReader(context, onNcfScan: (String nfcId) {
// Future.delayed(const Duration(milliseconds: 100), () {
// print(nfcId);
// getProjectIDFromNFC(nfcId, false);
// });
// }, onCancel: () {
// Navigator.of(context).pop();
// });
// });
// } else {
// //NFCNotSupported
// AppToast.showErrorToast(message: TranslationBase.of(context).NFCNotSupported, localContext: context);
// }
// },
// color: CustomColors.green,
// ),
// ),
// mWidth(12),
Expanded(
flex: 1,
child: DefaultButton(
@ -435,7 +499,48 @@ class _EROnlineCheckInHomePageState extends State<EROnlineCheckInHomePage> with
});
}
Widget markCheckInWidget() {
return GridView(
physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true,
padding: const EdgeInsets.only(bottom: 0, top: 21),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: (MediaQuery.of(context).size.width < 550) ? 3 : 5, childAspectRatio: 1 / 1, crossAxisSpacing: 8, mainAxisSpacing: 8),
children: [],
);
}
Widget attendanceMethod(String title, String image, bool isEnabled, VoidCallback onPress) => InkWell(
onTap: () {
Navigator.pop(context);
onPress();
},
child: Container(
decoration: containerColorRadiusBorderWidth(Colors.white, 15, CustomColors.darkGreyColor, 1),
clipBehavior: Clip.antiAlias,
padding: const EdgeInsets.only(left: 10, right: 10, top: 14, bottom: 14),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(child: SvgPicture.asset(image, color: Colors.black, alignment: Alignment.topLeft)),
Text(
title,
style: TextStyle(color: Colors.black, fontSize: 14, letterSpacing: -0.68, fontWeight: FontWeight.bold),
),
// title.toText17(isBold: true, color: Colors.white),
],
),
),
);
// .onPress(
// () {
// if (!isEnabled) return;
// onPress();
// },
// );
void checkPatientERAdvanceBalance() {
locationUtils.getCurrentLocation();
GifLoaderDialogUtils.showMyDialog(context);
ClinicListService ancillaryOrdersService = new ClinicListService();
ancillaryOrdersService.checkPatientERAdvanceBalance(10).then((response) {

@ -0,0 +1,374 @@
import 'dart:typed_data';
import 'package:barcode_scan2/barcode_scan2.dart';
import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/privilege/ProjectDetailListModel.dart';
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/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/header_model.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.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/location_util.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart';
import 'package:diplomaticquarterapp/widgets/nfc/nfc_reader_sheet.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_nfc_kit/flutter_nfc_kit.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
class EROnlineCheckInNFCQRLocation extends StatefulWidget {
// late PatientShareResponse? patientShareResponse;
// late AppoitmentAllHistoryResultList? appointment;
// late String? appoQR;
// AuthenticatedUser? authUser;
// AppSharedPreferences sharedPref = AppSharedPreferences();
int projectID;
EROnlineCheckInNFCQRLocation({required this.projectID});
@override
_EROnlineCheckInNFCQRLocationState createState() => _EROnlineCheckInNFCQRLocationState();
}
class _EROnlineCheckInNFCQRLocationState extends State<EROnlineCheckInNFCQRLocation> {
late Uint8List _bytes;
bool _supportsNFC = false;
late BuildContext _context;
late ProjectViewModel projectViewModel;
late LocationUtils locationUtils;
ProjectDetailListModel projectDetailListModel = ProjectDetailListModel();
@override
void initState() {
super.initState();
}
startNFCScan() {
Future.delayed(const Duration(milliseconds: 500), () {
showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () {
sendNfcCheckInRequest(nfcId, 2);
});
}, onCancel: () {
// Navigator.of(context).pop();
});
});
}
startQRCodeScan() async {
String onlineCheckInQRCode = (await BarcodeScanner.scan().then((value) => value.rawContent));
if (onlineCheckInQRCode != "") {
sendNfcCheckInRequest(onlineCheckInQRCode, 2);
} else {}
}
startLocationCheckIn() async {
GifLoaderDialogUtils.showMyDialog(context);
locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
locationUtils.getCurrentLocation(callBack: (value) {
projectDetailListModel = Utils.getProjectDetailObj(projectViewModel, widget.projectID);
double dist = Utils.distance(value.latitude, value.longitude, double.parse(projectDetailListModel.latitude!), double.parse(projectDetailListModel.longitude!)).ceilToDouble() * 1000;
print(dist);
if (dist <= projectDetailListModel.geofenceRadius!) {
sendNfcCheckInRequest(projectDetailListModel.checkInQrCode!, 2);
} else {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: TranslationBase.of(context).locationCheckInError);
}
});
}
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
_context = context;
FlutterNfcKit.nfcAvailability.then((value) {
_supportsNFC = (value == NFCAvailability.available);
});
List<Widget> checkInOptionsList = getCheckInOptionsList(context);
return AppScaffold(
appBarTitle: TranslationBase.of(context).onlineCheckIn,
isShowAppBar: true,
showNewAppBar: true,
showNewAppBarTitle: true,
body: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// DoctorHeader(
// headerModel: HeaderModel(
// widget.appointment!.doctorTitle! + " " + widget.appointment!.doctorNameObj!,
// widget.appointment!.doctorID ?? 0,
// widget.appointment!.doctorImageURL!,
// widget.appointment!.doctorSpeciality!,
// "",
// widget.appointment!.projectName!,
// DateUtil.convertStringToDate(widget.appointment!.appointmentDate!),
// widget.appointment!.isLiveCareAppointment!
// ? DateUtil.convertStringToDate(widget.appointment!.appointmentDate!).toString().split(" ")[1].substring(0, 5)
// : widget.appointment!.startTime!.substring(0, 5),
// "null",
// widget.appointment!.doctorRate,
// widget.appointment!.actualDoctorRate,
// widget.appointment!.noOfPatientsRate,
// "",
// ),
// isShowName: true,
// isNeedToShowButton: false,
// buttonTitle: '',
// onTap: () {},
// onRatingAndReviewTap: () {},
// ),
InkWell(
child: Container(
margin: EdgeInsets.only(top: 30.0),
padding: EdgeInsets.all(8),
child: SvgPicture.asset(
"assets/images/nfc/contactless.svg",
width: 80.0,
height: 80.0,
),
),
onTap: () {
showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () {
sendNfcCheckInRequest(nfcId, 2);
});
}, onCancel: () {
// Navigator.of(context).pop();
});
},
),
Row(
children: <Widget>[
Expanded(
child: Container(
width: double.infinity,
margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(TranslationBase.of(context).scanQRHospital,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
)),
),
),
],
),
mHeight(21),
Padding(
padding: EdgeInsets.only(left: 21, right: 21),
child: GridView.builder(
shrinkWrap: true,
primary: false,
physics: NeverScrollableScrollPhysics(),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12),
padding: EdgeInsets.zero,
itemCount: checkInOptionsList.length,
itemBuilder: (BuildContext context, int index) {
return checkInOptionsList[index];
},
),
),
],
),
),
// bottomSheet: Container(
// color: CustomColors.appBackgroudGreyColor,
// padding: EdgeInsets.all(21),
// // height: 45.0,
// child: Row(
// children: [
// Expanded(
// flex: 1,
// child: ButtonTheme(
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(10.0),
// ),
// height: 45.0,
// child: CustomTextButton(
// backgroundColor: CustomColors.green,
// elevation: 0,
// onPressed: () {
// startNFCScan();
// },
// child: Text(TranslationBase.of(context).scanNFC,
// style: TextStyle(
// fontSize: 18.0,
// color: Colors.white,
// )),
// ),
// ),
// ),
// ],
// ),
// ),
);
}
List<Widget> getCheckInOptionsList(BuildContext context) {
List<Widget> optionsList = [];
optionsList.add(
InkWell(
onTap: () {
if (projectViewModel.havePrivilege(102)) {
startLocationCheckIn();
}
},
child: MedicalProfileItem(
title: TranslationBase.of(context).checkInViaLocation,
imagePath: 'location.svg',
subTitle: "",
isEnable: projectViewModel.havePrivilege(102),
width: 70.0,
height: 70.0,
),
),
);
optionsList.add(
InkWell(
onTap: () {
if (projectViewModel.havePrivilege(79)) {
startQRCodeScan();
}
},
child: MedicalProfileItem(
title: TranslationBase.of(context).pharmaLiveCareScanQR,
imagePath: 'qr_code.svg',
subTitle: "",
isEnable: projectViewModel.havePrivilege(79),
width: 80.0,
height: 80.0,
),
),
);
optionsList.add(
InkWell(
onTap: () {
if (projectViewModel.havePrivilege(80) && _supportsNFC) {
startNFCScan();
} else {
Utils.showErrorToast(TranslationBase.of(context).NFCNotSupported);
}
},
child: MedicalProfileItem(
title: TranslationBase.of(context).scanNFC,
imagePath: 'contactless.svg',
subTitle: "",
isEnable: projectViewModel.havePrivilege(80),
width: 80.0,
height: 80.0,
),
),
);
return optionsList;
}
Future navigateToHome(context) async {
Navigator.of(context).pushNamed(HOME);
}
getPatientShare(context, String appointmentNo, int clinicID, int projectID, DoctorList docObject) {}
String getDate(String appoDate) {
var appoDateFormatted = "";
var dateObj = DateUtil.convertStringToDate(appoDate);
setState(() {
appoDateFormatted = DateUtil.getWeekDay(dateObj.weekday) +
", " +
dateObj.day.toString() +
" " +
DateUtil.getMonth(dateObj.month) +
" " +
dateObj.year.toString() +
", " +
dateObj.hour.toString() +
":" +
dateObj.minute.toString() +
":00";
});
return appoDateFormatted;
}
String getDoctorSpeciality(List<String> docSpecial) {
String docSpeciality = "";
if (docSpecial != null && docSpecial.length != 0) {
docSpecial.forEach((v) {
docSpeciality = docSpeciality + v + "\n";
});
}
return docSpeciality;
}
sendNfcCheckInRequest(String nfcId, int checkInBy) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
// service.sendCheckinNfcRequest(widget!.patientShareResponse!.appointmentNo!, nfcId, widget.patientShareResponse!.projectID!, checkInBy, widget.patientShareResponse!.clinicID!, context).then((res) {
// print(res);
//
// GifLoaderDialogUtils.hideDialog(context);
// _showMyDialog(res["SuccessMsg"], this.context);
// }).catchError((err) {
// GifLoaderDialogUtils.hideDialog(context);
// print(err);
// _showMyDialog(err, this.context);
// });
}
Future<void> _showMyDialog(String message, BuildContext context) async {
return showDialog<void>(
context: context,
barrierDismissible: true, // user must tap button!
builder: (BuildContext context) {
return AlertDialog(
title: const Text('Alert'),
content: SingleChildScrollView(
child: ListBody(
children: <Widget>[
Text(message),
],
),
),
actions: <Widget>[
TextButton(
child: const Text('OK'),
onPressed: () {
Navigator.of(context).pop();
Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route<dynamic> r) => false);
},
),
],
);
},
);
}
}

@ -521,9 +521,10 @@ class _EROnlineCheckInPaymentDetailsState extends State<EROnlineCheckInPaymentDe
GifLoaderDialogUtils.hideDialog(context);
if (widget.isERBookAppointment) {
AppToast.showSuccessToast(message: "Your appointment has been booked successfully. Please perform Check-In once you arrive at the hospital.");
Navigator.pop(context);
Navigator.pop(context);
Navigator.pop(context);
// Navigator.pop(context);
// Navigator.pop(context);
// Navigator.pop(context);
Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route<dynamic> r) => false);
} else {
autoGenerateInvoiceER(paymentRes);
}

@ -13,6 +13,7 @@ import 'package:flutter/services.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import 'package:provider/provider.dart';
import 'package:share_plus/share_plus.dart';
import 'package:url_launcher/url_launcher.dart';
class InPatientPendingAdvancePayment extends StatefulWidget {
InPatientAdvanceResponseModel inPatientAdvanceResponseModel;
@ -32,7 +33,7 @@ class _InPatientPendingAdvancePaymentState extends State<InPatientPendingAdvance
inAppWebViewGroupOptions: InAppWebViewGroupOptions(
crossPlatform: InAppWebViewOptions(useShouldOverrideUrlLoading: true, transparentBackground: false),
ios: IOSInAppWebViewOptions(applePayAPIEnabled: true, isFraudulentWebsiteWarningEnabled: false)),
crossPlatform: InAppBrowserOptions(hideUrlBar: true, toolbarTopBackgroundColor: Colors.black),
crossPlatform: InAppBrowserOptions(hideUrlBar: true, toolbarTopBackgroundColor: Colors.white),
android: AndroidInAppBrowserOptions(),
ios:
IOSInAppBrowserOptions(hideToolbarBottom: true, toolbarBottomBackgroundColor: Colors.white, closeButtonColor: Colors.white, presentationStyle: IOSUIModalPresentationStyle.OVER_FULL_SCREEN));
@ -254,17 +255,17 @@ class _InPatientPendingAdvancePaymentState extends State<InPatientPendingAdvance
int clinicID = projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.clinicID! : 17;
service
.getInPatientPaymentLink(
projectViewModel.inPatientProjectID,
// projectViewModel.getAdmissionInfoResponseModel.admissionNo!,
projectViewModel.inPatientProjectID,
// projectViewModel.getAdmissionInfoResponseModel.admissionNo!,
projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionRequestNo! : projectViewModel.getAdmissionRequestInfoResponseModel.admissionRequestNo!,
orderID,
projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!,
projectViewModel.user.emailAddress!,
widget.inPatientAdvanceResponseModel.responseInpatientAdvanceInfo![0].requestedAmount!,
projectViewModel.user.patientIdentificationNo!,
clinicID,
widget.inPatientAdvanceResponseModel.responseInpatientAdvanceInfo![0].paymentRequestID!,
)
orderID,
projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!,
projectViewModel.user.emailAddress!,
widget.inPatientAdvanceResponseModel.responseInpatientAdvanceInfo![0].requestedAmount!,
projectViewModel.user.patientIdentificationNo!,
clinicID,
widget.inPatientAdvanceResponseModel.responseInpatientAdvanceInfo![0].paymentRequestID!,
)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res["MessageStatus"] == 1) {
@ -273,7 +274,9 @@ class _InPatientPendingAdvancePaymentState extends State<InPatientPendingAdvance
if (isCopy) {
Share.share(paymentLink);
} else {
this.browser.openUrlRequest(urlRequest: URLRequest(url: WebUri.uri(Uri.parse(paymentLink))), options: _InAppBrowserOptions);
Uri uri = Uri.parse(paymentLink);
launchUrl(uri, mode: LaunchMode.externalApplication);
// this.browser.openUrlRequest(urlRequest: URLRequest(url: WebUri.uri(Uri.parse(paymentLink))), options: _InAppBrowserOptions);
}
} else {
AppToast.showErrorToast(message: res["endUserMessage"]);

@ -159,8 +159,13 @@ class _HelpPROState extends State<HelpPRO> {
(projectViewModel.user.firstNameN! + " " + projectViewModel.user.lastNameN!), projectViewModel.user.mobileNumber!, assistText.text, context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showSuccessToast(message: TranslationBase.of(context).successSendReport);
Navigator.of(context).pop();
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: TranslationBase.of(context).successSendReport);
Navigator.of(context).pop();
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage'], localContext: context);
Navigator.of(context).pop();
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);

@ -86,9 +86,9 @@ class _InPatientServicesHomeState extends State<InPatientServicesHome> {
openPatientGeneralConsent();
},
child: MedicalProfileItem(
title: TranslationBase.of(context).generalInstructionsTitle,
title: TranslationBase.of(context).generalConsentTitle,
imagePath: 'general_instructions.svg',
subTitle: TranslationBase.of(context).consent,
subTitle: TranslationBase.of(context).generalConsentSubTitle,
width: 50.0,
height: 40.0,
isInPatient: true,
@ -278,7 +278,6 @@ class _InPatientServicesHomeState extends State<InPatientServicesHome> {
ClinicListService service = new ClinicListService();
GifLoaderDialogUtils.showMyDialog(context);
service.getDischargeMedicationOrder(projectViewModel.getAdmissionInfoResponseModel).then((res) {
print(res["PatientHasDischargeMedicineList"].length);
setState(() {
if (res["PatientHasDischargeMedicineList"].length != 0) {
isReceivePrescriptionEnabled = true;
@ -308,13 +307,18 @@ class _InPatientServicesHomeState extends State<InPatientServicesHome> {
void openBirthNotificationsPage(BuildContext context) {
ClinicListService service = new ClinicListService();
GifLoaderDialogUtils.showMyDialog(context);
service.getBirthNotification(projectViewModel.user.patientID!, projectViewModel.isArabic ? 1 : 2, context).then((res) {
service
.getBirthNotification(
projectViewModel.user.patientID!,
projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.projectID! : projectViewModel.getAdmissionRequestInfoResponseModel.projectId!,
projectViewModel.isArabic ? 1 : 2,
context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res["MessageStatus"] == 1) {
print(res['birthNotification']);
Navigator.push(context, FadePage(page: BirthNotification()));
} else {
AppToast.showErrorToast(message: res["endUserMessage"]);
AppToast.showErrorToast(message: res["endUserMessage"], localContext: context);
}
}).catchError((err) {
print(err);
@ -335,7 +339,6 @@ class _InPatientServicesHomeState extends State<InPatientServicesHome> {
getGeneralInstructionsList.add(new GetGeneralInstructions.fromJson(v));
});
GifLoaderDialogUtils.hideDialog(context);
print(res['generalInstructions']);
Navigator.push(context, FadePage(page: GeneralInstructions(getGeneralInstructionsList: getGeneralInstructionsList)));
} else {
GifLoaderDialogUtils.hideDialog(context);
@ -356,7 +359,6 @@ class _InPatientServicesHomeState extends State<InPatientServicesHome> {
getMedicalInstructionsList.add(new GetMedicalInstructions.fromJson(v));
});
GifLoaderDialogUtils.hideDialog(context);
print(res['MedicalInstruction']);
Navigator.push(context, FadePage(page: MedicalInstructionsPage(getMedicalInstructionsList: getMedicalInstructionsList)));
} else {
GifLoaderDialogUtils.hideDialog(context);
@ -380,7 +382,7 @@ class _InPatientServicesHomeState extends State<InPatientServicesHome> {
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res["MessageStatus"] == 1) {
if (res['responseInpatient'] != null) {
if (res['responseInpatient'] != null && res['responseInpatient']['responseInpatientAdvanceInfo'] != null && res['responseInpatient']['responseInpatientAdvanceInfo'].length != 0) {
inPatientAdvanceResponseModel = InPatientAdvanceResponseModel.fromJson(res["responseInpatient"]);
Navigator.push(context,
FadePage(page: InPatientAdvancePayment(isHasData: inPatientAdvanceResponseModel.responseInpatientAdvanceInfo != null, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel)));
@ -398,8 +400,6 @@ class _InPatientServicesHomeState extends State<InPatientServicesHome> {
}
void checkCurrentTime(BuildContext context) {
print(DateTime.now().hour);
print(DateTime.now().minute);
if (DateTime.now().hour >= 7 && DateTime.now().hour <= 22) {
Navigator.push(context, FadePage(page: HelpPRO()));
} else {
@ -415,8 +415,6 @@ class _InPatientServicesHomeState extends State<InPatientServicesHome> {
}
bool checkAdmissionRequestDate() {
print(DateUtil.convertStringToDate(projectViewModel.getAdmissionRequestInfoResponseModel.expectedAdmissionDate));
print(DateUtil.convertStringToDate(projectViewModel.getAdmissionRequestInfoResponseModel.expectedAdmissionDate).difference(DateTime.now()).inHours);
if (DateUtil.convertStringToDate(projectViewModel.getAdmissionRequestInfoResponseModel.expectedAdmissionDate).difference(DateTime.now()).inHours > 24) {
return false;
}

@ -433,7 +433,8 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
FadePage(
page: AppointmentDetails(
appo: _appointmentResult,
parentIndex: _currentPage,
// parentIndex: _currentPage,
parentIndex: _appointmentResult.patientStatusType == 42 ? 1 : 0,
),
),
).then((value) {

@ -439,7 +439,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
FinalRadiology finalRadiology = new FinalRadiology();
service.getPatientRadOrders(widget.appo.appointmentNo.toString(), languageID, context).then((res) {
service.getPatientRadOrders(widget.appo.appointmentNo.toString(), widget.appo.projectID, languageID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['FinalRadiologyList'] != null) {
print(res['FinalRadiologyList']);

@ -902,6 +902,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
isLiveCareAppointment: false,
isObGyneAppointment: true,
doctorsList: docList,
isDoctorSearchResult: false,
patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital,
obGyneProcedureListResponse: obGyneProcedureListResponse)));
}

@ -57,10 +57,12 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
hmgServices.add(HmgServices(1, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin));
projectViewModel.isIndoorNavigationEnabled
? hmgServices.add(HmgServices(2, TranslationBase.of(context).hospitalNavigationTitle, TranslationBase.of(context).hospitalNavigationSubtitle, "assets/images/new/indoor_nav_home.svg", isLogin))
? hmgServices.add(HmgServices(2, TranslationBase.of(context).hospitalNavigationTitle, TranslationBase.of(context).hospitalNavigationSubtitle, "assets/images/new/indoor_nav_home.svg", isLogin,
isLocked: !projectViewModel.havePrivilege(107)))
: hmgServices.add(HmgServices(2, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin));
hmgServices.add(HmgServices(9, TranslationBase.of(context).emergency, TranslationBase.of(context).checkinOptions, "assets/images/new/emergency.svg", isLogin));
hmgServices.add(
HmgServices(9, TranslationBase.of(context).emergency, TranslationBase.of(context).checkinOptions, "assets/images/new/emergency.svg", isLogin, isLocked: !projectViewModel.havePrivilege(108)));
hmgServices.add(HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin));
hmgServices.add(HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin));
hmgServices.add(HmgServices(5, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin));
@ -76,10 +78,12 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
// hmgServices.add(new HmgServices(2, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin));
projectViewModel.isIndoorNavigationEnabled
? hmgServices.add(HmgServices(2, TranslationBase.of(context).hospitalNavigationTitle, TranslationBase.of(context).hospitalNavigationSubtitle, "assets/images/new/indoor_nav_home.svg", isLogin))
? hmgServices.add(HmgServices(2, TranslationBase.of(context).hospitalNavigationTitle, TranslationBase.of(context).hospitalNavigationSubtitle, "assets/images/new/indoor_nav_home.svg", isLogin,
isLocked: !projectViewModel.havePrivilege(107)))
: hmgServices.add(HmgServices(2, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin));
hmgServices.add(new HmgServices(9, TranslationBase.of(context).emergency, TranslationBase.of(context).checkinOptions, "assets/images/new/emergency.svg", isLogin));
hmgServices.add(new HmgServices(9, TranslationBase.of(context).emergency, TranslationBase.of(context).checkinOptions, "assets/images/new/emergency.svg", isLogin,
isLocked: !projectViewModel.havePrivilege(108)));
hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin));
hmgServices.add(new HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin));
@ -358,8 +362,9 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
itemCount: hmgServices.length,
padding: EdgeInsets.zero,
itemBuilder: (BuildContext context, int index) {
return ServicesView(hmgServices[index], index, true, projectViewModel,
isLocked: (hmgServices[index].action == 2 && projectViewModel.isIndoorNavigationEnabled) ? !projectViewModel.havePrivilege(107) : false);
// return ServicesView(hmgServices[index], index, true, projectViewModel,
// isLocked: (hmgServices[index].action == 2 && projectViewModel.isIndoorNavigationEnabled) ? !projectViewModel.havePrivilege(107) : false);
return ServicesView(hmgServices[index], index, true, projectViewModel, isLocked: hmgServices[index].isLocked);
},
),
),

@ -258,7 +258,7 @@ class ServicesView extends StatelessWidget {
Navigator.push(context, FadePage(page: InPatientServicesHome()));
locator<GAnalytics>().hmgServices.logServiceName('find us reach us');
} else if (hmgServices.action == 9) {
Navigator.push(context, FadePage(page: EROnlineCheckInHomePage()));
if (!isLocked) Navigator.push(context, FadePage(page: EROnlineCheckInHomePage()));
locator<GAnalytics>().hmgServices.logServiceName('ER Online CheckIn');
}
}

@ -965,7 +965,8 @@ class _clinic_listState extends State<ClinicList> {
}
Future navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) async {
Navigator.push(context, FadePage(page: SearchResults(doctorsList: docList, isLiveCareAppointment: false, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital)));
Navigator.push(context,
FadePage(page: SearchResults(doctorsList: docList, isLiveCareAppointment: false, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, isDoctorSearchResult: false)));
}
updateSelectedIndex(PatientERGetClinicsList patientERGetClinicsList) {

@ -151,7 +151,7 @@ class _Login extends State<Login> {
TranslationBase.of(context).login,
() {
if (isButtonDisabled) {
AppToast.showErrorToast(message: "National ID can only contain numbers");
AppToast.showErrorToast(message: TranslationBase.of(context).incorrectNationalId, localContext: context);
} else {
this.startLogin();
}

@ -1,6 +1,10 @@
import 'dart:convert';
import 'package:auto_size_text/auto_size_text.dart';
import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
@ -9,7 +13,9 @@ import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart' as checkActivation;
import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart';
import 'package:diplomaticquarterapp/models/Authentication/countries_list.dart';
import 'package:diplomaticquarterapp/models/Authentication/get_patient_occupation_list_response.dart';
import 'package:diplomaticquarterapp/models/Authentication/register_info_response.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/dialog/clinic_list_dialog.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart';
@ -84,11 +90,18 @@ class _RegisterInfo extends State<RegisterInfo> {
String gender = 'M';
String maritalStatus = 'M';
String nationality = 'SAU';
String selectedOccupationID = "";
// List<GetPatientOccupationListResponse> patientOccupationList = [];
// GetPatientOccupationListResponse? selectedPatientOccupation;
final GlobalKey projectDropdownKey = GlobalKey();
@override
void initState() {
if (widget.page == 1) {
getCountries();
// getPatientOccupationList();
}
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
getRegisterInfo();
@ -121,7 +134,7 @@ class _RegisterInfo extends State<RegisterInfo> {
Expanded(child: SizedBox())
],
),
SizedBox(height: 20),
SizedBox(height: 10),
(isDubai && page == 1)
? Column(
children: [
@ -232,13 +245,13 @@ class _RegisterInfo extends State<RegisterInfo> {
: (registerInfo.healthId != null && page == 1)
? Column(
children: [
SizedBox(height: 20),
SizedBox(height: 10),
getnameField(TranslationBase.of(context).identificationNumber, registerInfo.idNumber, TranslationBase.of(context).firstName,
registerInfo.firstNameEn == '-' ? registerInfo.firstNameAr : registerInfo.firstNameEn),
SizedBox(height: 20),
SizedBox(height: 10),
getnameField(TranslationBase.of(context).middleName, registerInfo.secondNameEn == '-' ? registerInfo.secondNameEn : registerInfo.secondNameEn,
TranslationBase.of(context).lastName, registerInfo.lastNameEn == '-' ? registerInfo.lastNameEn : registerInfo.lastNameEn),
SizedBox(height: 20),
SizedBox(height: 10),
getnameField(
TranslationBase.of(context).gender,
registerInfo.maritalStatusCode == 'U'
@ -248,17 +261,82 @@ class _RegisterInfo extends State<RegisterInfo> {
: 'Female',
TranslationBase.of(context).maritalStatus,
registerInfo.maritalStatus),
SizedBox(height: 20),
SizedBox(height: 10),
getnameField(TranslationBase.of(context).nationality, registerInfo.nationality, TranslationBase.of(context).mobileNumber, registerd_data.patientMobileNumber.toString()),
SizedBox(height: 20),
SizedBox(height: 10),
getnameField(TranslationBase.of(context).dateOfBirth, registerInfo.dateOfBirth, "", ""),
SizedBox(height: 20),
],
)
: widget.page == 2
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
// (!isDubai)
// ? Container(
// width: double.infinity,
// decoration: containerRadius(Colors.white, 12),
// padding: EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 12),
// child: Row(
// children: [
// Flexible(
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Text(
// TranslationBase.of(context).selectOccupation,
// style: TextStyle(
// fontSize: 11,
// letterSpacing: -0.44,
// fontWeight: FontWeight.w600,
// ),
// ),
// Container(
// height: 18,
// width: double.infinity,
// child: DropdownButtonHideUnderline(
// child: DropdownButton<GetPatientOccupationListResponse>(
// key: projectDropdownKey,
// hint: Text(TranslationBase.of(context).selectOccupation),
// value: selectedPatientOccupation,
// iconSize: 0,
// isExpanded: true,
// style: TextStyle(fontSize: 14, letterSpacing: -0.56, color: Colors.black),
// items: patientOccupationList.map((GetPatientOccupationListResponse item) {
// return DropdownMenuItem<GetPatientOccupationListResponse>(
// value: item,
// child: AutoSizeText(
// projectViewModel.isArabic ? item.descriptionN! : item.description!,
// maxLines: 1,
// minFontSize: 10,
// style: TextStyle(
// fontSize: SizeConfig.textMultiplier! * 1.6,
// fontWeight: FontWeight.w600,
// letterSpacing: -0.39,
// height: 0.8,
// ),
// ),
// // Text('${item.name!}'),
// );
// }).toList(),
// onChanged: (GetPatientOccupationListResponse? newValue) {
// setState(() {
// selectedPatientOccupation = newValue!;
// selectedOccupationID = selectedPatientOccupation!.occupationID!;
// registerInfo.occupationID = selectedOccupationID;
// });
// debugPrint("Selected Occupation ID: ${registerInfo.occupationID}");
// },
// ),
// ),
// ),
// ],
// ),
// ),
// Icon(Icons.keyboard_arrow_down),
// ],
// ))
// : SizedBox(),
mHeight(20),
Container(
width: double.infinity,
decoration: containerRadius(Colors.white, 12),
@ -407,6 +485,8 @@ class _RegisterInfo extends State<RegisterInfo> {
padding: EdgeInsets.all(10),
child: DefaultButton(TranslationBase.of(context).cancel, () {
Navigator.of(context).pop();
// widget.changePageViewIndex!(0);
// getPatientOccupationList();
locator<GAnalytics>().loginRegistration.registration_cancel(step: page == 1 ? 'personal info' : 'other details');
}, textColor: Colors.white, color: Color(0xffD02127))),
),
@ -432,6 +512,16 @@ class _RegisterInfo extends State<RegisterInfo> {
}
} else {
registerNow();
// if (isDubai) {
// registerNow();
// } else {
// if (selectedPatientOccupation != null) {
// registerNow();
// } else {
// AppToast.showErrorToast(message: TranslationBase.of(context).selectOccupationError);
// }
// }
}
}
@ -445,12 +535,15 @@ class _RegisterInfo extends State<RegisterInfo> {
registerNow() {
dynamic request;
if (isDubai)
request = getTempUserRequestDubai();
else
request = getTempUserRequest();
GifLoaderDialogUtils.showMyDialog(context, barrierDismissible: false);
print(request);
GifLoaderDialogUtils.showMyDialog(context, barrierDismissible: true);
dynamic res;
this
.authService
@ -503,7 +596,7 @@ class _RegisterInfo extends State<RegisterInfo> {
okFunction: () => {ConfirmDialog.closeAlertDialog(context)},
cancelFunction: () => {ConfirmDialog.closeAlertDialog(context)});
dialog.showAlertDialog(context);
projectViewModel.analytics.loginRegistration.registration_fail(errorType: err);
projectViewModel.analytics.loginRegistration.registration_fail(errorType: "");
});
}
@ -530,6 +623,16 @@ class _RegisterInfo extends State<RegisterInfo> {
if (isDubai) location = '2';
});
}
// try {
// var patientOccupationListVal = json.decode(await sharedPref.getString(PATIENT_OCCUPATION_LIST));
// patientOccupationListVal.forEach((v) {
// patientOccupationList.add(new GetPatientOccupationListResponse.fromJson(v));
// });
// setState(() {});
// } catch (ex) {
// print(ex.toString());
// }
}
getTempUserRequest() {
@ -559,6 +662,7 @@ class _RegisterInfo extends State<RegisterInfo> {
"EmailAddress": email,
"SourceType": location,
"PreferredLanguage": registerd_data.languageID.toString(),
// "OccupationID": registerInfo.occupationID,
"Marital": registerInfo.maritalStatusCode == 'U'
? '0'
: registerInfo.maritalStatusCode == 'M'
@ -718,7 +822,7 @@ class _RegisterInfo extends State<RegisterInfo> {
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(builder: (context) => LandingPage()),
(Route<dynamic> route) => false,
(Route<dynamic> route) => false,
);
Navigator.push(context, FadePage(page: InsuranceUpdate()));
},
@ -726,7 +830,7 @@ class _RegisterInfo extends State<RegisterInfo> {
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(builder: (context) => LandingPage()),
(Route<dynamic> route) => false,
(Route<dynamic> route) => false,
);
});
dialog.showAlertDialog(context);
@ -911,6 +1015,25 @@ class _RegisterInfo extends State<RegisterInfo> {
),
);
}
void openDropdown(GlobalKey key) {
GestureDetector? detector;
void searchForGestureDetector(BuildContext element) {
element.visitChildElements((element) {
if (element.widget != null && element.widget is GestureDetector) {
detector = element.widget as GestureDetector?;
// return false;
} else {
searchForGestureDetector(element);
}
// return true;
});
}
searchForGestureDetector(key.currentContext!);
assert(detector != null);
detector!.onTap!();
}
}
class Language {

@ -1,3 +1,5 @@
import 'dart:convert';
import 'package:diplomaticquarterapp/analytics/flows/login_registration.dart';
import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
@ -7,6 +9,7 @@ import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_user_status_reponse.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_user_status_req.dart';
import 'package:diplomaticquarterapp/models/Authentication/checkpatient_for_registration.dart';
import 'package:diplomaticquarterapp/models/Authentication/get_patient_occupation_list_response.dart';
import 'package:diplomaticquarterapp/pages/login/confirm-login.dart';
import 'package:diplomaticquarterapp/pages/login/login-type.dart';
import 'package:diplomaticquarterapp/pages/login/login.dart';
@ -54,6 +57,16 @@ class _Register extends State<Register> {
late bool isLoading;
List<GetPatientOccupationListResponse> patientOccupationList = [];
GetPatientOccupationListResponse? selectedPatientOccupation;
@override
void initState() {
getPatientOccupationList();
super.initState();
}
@override
Widget build(BuildContext context) {
return AppScaffold(
@ -357,14 +370,14 @@ class _Register extends State<Register> {
nRequest['forRegister'] = true;
nRequest['isRegister'] = true;
nRequest["PatientIdentificationID"] = nRequest["PatientIdentificationID"].toString();
nRequest['dob'] = isHijri == 1 ? dob.text : dateFormat.format(selectedDate);
nRequest['dob'] = isHijri == 1 ? dob.text : dateFormat.format(selectedDate);
nRequest['isHijri'] = isHijri;
sharedPref.setObject(REGISTER_DATA_FOR_LOGIIN, nRequest);
sharedPref.setString(LOGIN_TOKEN_ID, response['LogInTokenID']);
if(request.patientOutSA ==0 ) {
if (request.patientOutSA == 0) {
this.chekUserData(response['LogInTokenID']);
}else{
Navigator.of(context).push(FadePage(page: ConfirmLogin(changePageViewIndex: widget.changePageViewIndex, fromRegistration: true, isDubai:true)));
} else {
Navigator.of(context).push(FadePage(page: ConfirmLogin(changePageViewIndex: widget.changePageViewIndex, fromRegistration: true, isDubai: true)));
}
}
} else {
@ -405,6 +418,7 @@ class _Register extends State<Register> {
{
result = CheckUserStatusResponse.fromJson(result as Map<String, dynamic>),
sharedPref.setObject(NHIC_DATA, result),
// widget.changePageViewIndex!(1),
Navigator.of(context).push(FadePage(page: ConfirmLogin(changePageViewIndex: widget.changePageViewIndex, fromRegistration: true))),
}
else
@ -413,4 +427,13 @@ class _Register extends State<Register> {
}
});
}
getPatientOccupationList() async {
patientOccupationList.clear();
await authService.getPatientOccupationList().then((result) {
sharedPref.setString(PATIENT_OCCUPATION_LIST, json.encode(result['GetOccupationLst']));
}).catchError((err) {
AppToast.showErrorToast(message: err);
});
}
}

@ -20,6 +20,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:provider/provider.dart';
import 'package:webview_flutter/webview_flutter.dart';
class UserLoginAgreementPage extends StatefulWidget {
final String userAgreementText;
@ -38,6 +39,38 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
late ToDoCountProviderModel toDoProvider;
final authService = AuthProvider();
late final WebViewController _controller;
bool isPageLoaded = false;
@override
void initState() {
super.initState();
_controller = WebViewController()
..setJavaScriptMode(JavaScriptMode.unrestricted)
..setNavigationDelegate(
NavigationDelegate(
onProgress: (int progress) {
// Update loading bar.
},
onPageStarted: (String url) {},
onPageFinished: (String url) {
setState(() {
isPageLoaded = true;
});
},
onHttpError: (HttpResponseError error) {},
onWebResourceError: (WebResourceError error) {},
onNavigationRequest: (NavigationRequest request) {
if (request.url.startsWith('https://www.youtube.com/')) {
return NavigationDecision.prevent;
}
return NavigationDecision.navigate;
},
),
)
..loadRequest(Uri.parse("https://hmg.com/en/Pages/Privacy.aspx"));
}
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
@ -49,14 +82,15 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
showNewAppBar: true,
isShowDecPage: false,
appBarTitle: TranslationBase.of(context).userAgreement,
body: Padding(
padding: const EdgeInsets.all(8.0),
child: SingleChildScrollView(
child: Html(
data: widget.userAgreementText,
),
),
),
body: WebViewWidget(controller: _controller),
// Padding(
// padding: const EdgeInsets.all(8.0),
// child: SingleChildScrollView(child: WebViewWidget(controller: _controller)
// // Html(
// // data: widget.userAgreementText,
// // ),
// ),
// ),
bottomSheet: Container(
decoration: BoxDecoration(
color: Colors.white,
@ -101,9 +135,11 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
child: CustomTextButton(
backgroundColor: CustomColors.green,
elevation: 0,
onPressed: () {
addUsageAgreement();
},
onPressed: isPageLoaded
? () {
addUsageAgreement();
}
: null,
child: Text(TranslationBase.of(context).acceptLbl.toUpperCase(),
style: TextStyle(
fontSize: 18.0,
@ -123,14 +159,16 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
child: CustomTextButton(
backgroundColor: Color(0xffc5272d),
elevation: 0,
onPressed: () {
Navigator.pushAndRemoveUntil(
context,
FadePage(
page: LandingPage(),
),
(r) => false);
},
onPressed: isPageLoaded
? () {
Navigator.pushAndRemoveUntil(
context,
FadePage(
page: LandingPage(),
),
(r) => false);
}
: null,
child: Text(TranslationBase.of(context).declineLbl.toUpperCase(), style: TextStyle(fontSize: 18.0, color: Colors.white)),
),
),

@ -76,6 +76,7 @@ class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
details: model.patientLabSpecialResult.isEmpty ? null : getSpecialResults(model),
orderNo: widget.patientLabOrders!.orderNo,
patientLabOrder: widget.patientLabOrders,
projectName: widget.patientLabOrders!.projectName,
),
itemCount: 1,
),

@ -87,6 +87,9 @@ class LabsHomePage extends StatelessWidget {
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),
);
},

@ -39,9 +39,11 @@ class _InvoiceDetailState extends State<InvoiceDetail> {
dynamic grandTotal = 0;
late ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
projectViewModel = Provider.of(context);
generateInvoiceDetails();
return AppScaffold(
appBarTitle: widget.doctor.doctorTitle != null ? widget.doctor.doctorTitle.toString() : TranslationBase.of(context).dr + " " + widget.doctor.name.toString(),
@ -278,13 +280,13 @@ class _InvoiceDetailState extends State<InvoiceDetail> {
tableRow.add(
TableRow(children: [
Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation![i].procedureName}',
isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1)),
isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1), mProjectViewModel: projectViewModel),
Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation![i].quantity}',
isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1)),
isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1), mProjectViewModel: projectViewModel),
Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation![i].price.toString() + " " + TranslationBase.of(context).sar}',
isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1)),
isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1), mProjectViewModel: projectViewModel),
Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation![i].total.toString() + " " + TranslationBase.of(context).sar}',
isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1)),
isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1), mProjectViewModel: projectViewModel),
]),
);
}

@ -61,9 +61,11 @@ class PrescriptionItemsPage extends StatelessWidget {
prescriptions.name!,
DateUtil.convertStringToDate(prescriptions.appointmentDate!),
DateUtil.formatDateToTime(
model.prescriptionReportEnhList.length > 0 || model.prescriptionReportListINP.length > 0 ? DateUtil.convertStringToDate(
model.prescriptionReportEnhList.length > 0 ? model.prescriptionReportEnhList[0].orderDate! : model.prescriptionReportListINP[0].orderDate!,
) : DateTime.now(),
model.prescriptionReportEnhList.length > 0 || model.prescriptionReportListINP.length > 0
? DateUtil.convertStringToDate(
model.prescriptionReportEnhList.length > 0 ? model.prescriptionReportEnhList[0].orderDate! : model.prescriptionReportListINP[0].orderDate!,
)
: DateTime.now(),
),
prescriptions.nationalityFlagURL ?? "",
prescriptions.doctorRate,
@ -433,7 +435,10 @@ class PrescriptionItemsPage extends StatelessWidget {
doctorName: prescriptions.doctorName!,
doctorID: prescriptions.doctorID!,
mes: TranslationBase.of(context).sendSuc,
projectID: prescriptions.projectID!);
projectID: prescriptions.projectID!,
isInOutPatient: prescriptions.isInOutPatient!
);
},
),
);

@ -117,8 +117,8 @@ class _VitalSingChartAndDetialsState extends State<VitalSingChartAndDetials> {
children: [
Utils.tableColumnValue(
"${projectViewModel.isArabic ? DateUtil.getWeekDayArabic(labResultList[i].vitalSignDate!.weekday) : DateUtil.getWeekDay(labResultList[i].vitalSignDate!.weekday)}, ${labResultList[i].vitalSignDate!.day} ${projectViewModel.isArabic ? DateUtil.getMonthArabic(labResultList[i].vitalSignDate!.month) : DateUtil.getMonth(labResultList[i].vitalSignDate!.month)}, ${labResultList[i].vitalSignDate!.year}",
isLast: i == (labResultList.length - 1)),
Utils.tableColumnValue('${labResultList[i].toJson()[widget.viewKey]}', isLast: i == (labResultList.length - 1)),
isLast: i == (labResultList.length - 1), mProjectViewModel: projectViewModel),
Utils.tableColumnValue('${labResultList[i].toJson()[widget.viewKey]}', isLast: i == (labResultList.length - 1), mProjectViewModel: projectViewModel),
],
),
);

@ -113,9 +113,9 @@ class VitalSingChartBloodPressure extends StatelessWidget {
children: [
Utils.tableColumnValue(
"${projectViewModel.isArabic ? DateUtil.getWeekDayArabic(labResultList[i].vitalSignDate!.weekday) : DateUtil.getWeekDay(labResultList[i].vitalSignDate!.weekday)}, ${labResultList[i].vitalSignDate!.day} ${projectViewModel.isArabic ? DateUtil.getMonthArabic(labResultList[i].vitalSignDate!.month) : DateUtil.getMonth(labResultList[i].vitalSignDate!.month)}, ${labResultList[i].vitalSignDate!.year}",
isLast: i == (labResultList.length - 1)),
Utils.tableColumnValue('${labResultList[i].toJson()[viewKey1]}', isLast: i == (labResultList.length - 1)),
Utils.tableColumnValue('${labResultList[i].toJson()[viewKey2]}', isLast: i == (labResultList.length - 1)),
isLast: i == (labResultList.length - 1), mProjectViewModel: projectViewModel),
Utils.tableColumnValue('${labResultList[i].toJson()[viewKey1]}', isLast: i == (labResultList.length - 1), mProjectViewModel: projectViewModel),
Utils.tableColumnValue('${labResultList[i].toJson()[viewKey2]}', isLast: i == (labResultList.length - 1), mProjectViewModel: projectViewModel),
],
),
);

@ -1285,7 +1285,7 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> getPatientRadOrders(String appoNo, int languageID, BuildContext context) async {
Future<Map> getPatientRadOrders(String appoNo, int projectID, int languageID, 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));
@ -1295,6 +1295,7 @@ class DoctorsListService extends BaseService {
Request req = appGlobal.getPublicRequest();
request = {
"AppointmentNo": appoNo,
"ProjectID": projectID,
"VersionID": req.VersionID,
"Channel": req.Channel,
"IPAdress": req.IPAdress,

@ -1910,6 +1910,24 @@ class AuthProvider with ChangeNotifier {
}
}
Future getPatientOccupationList() async {
Map<String, dynamic> request = {"ProjectOutSA": false};
dynamic localRes;
try {
await new BaseAppClient().post(GET_PATIENT_OCCUPATION_LIST, onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
localRes = error;
return Future.value(error);
}, body: request);
// logout();
return Future.value(localRes);
} catch (error) {
throw error;
}
}
logout() async {
await sharedPref.remove(LOGIN_TOKEN_ID);
await sharedPref.remove(PHARMACY_CUSTOMER_ID);

@ -306,9 +306,9 @@ class ClinicListService extends BaseService {
return Future.value(localRes);
}
Future<Map> getBirthNotification(num motherMRN, int languageID, context) async {
Future<Map> getBirthNotification(num motherMRN, int projectID, int languageID, context) async {
Map<String, dynamic> request;
request = {"mothermrn": motherMRN, "LanguageID": languageID};
request = {"mothermrn": motherMRN, "LanguageID": languageID, "ProjectID": projectID};
dynamic localRes;

@ -12,6 +12,7 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/push-notification-handler.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:firebase_crashlytics/firebase_crashlytics.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:flutter_zoom_videosdk/native/zoom_videosdk.dart';
@ -85,7 +86,7 @@ class _SplashScreenState extends State<SplashScreen> {
// debugPrint("ALL SHARED PREFERENCES!!!!!");
// debugPrint(jsonEncode(value));
});
await FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true);
// if (!kDebugMode) await FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true);
// PushNotificationHandler(context).init(); // Asyncronously
}

@ -123,16 +123,10 @@ class CalendarUtils {
description: description,
);
ios.CalendarEvent iosCalEvent = ios.CalendarEvent(
eventId: eventId,
startDate: scheduleDateTimeUTZ,
endDate: scheduleDateTimeUTZ.add(Duration(minutes: 30)),
title: title,
description: description,
isAllDay: false
);
ios.CalendarEvent iosCalEvent =
ios.CalendarEvent(eventId: eventId, startDate: scheduleDateTimeUTZ, endDate: scheduleDateTimeUTZ.add(Duration(minutes: 30)), title: title, description: description, isAllDay: false);
if (Platform.isAndroid) {
if(Platform.isAndroid) {
Result<bool> result = await deviceCalendarPlugin.hasPermissions();
print(result);
await deviceCalendarPlugin.createOrUpdateEvent(event).catchError((e) {
@ -149,6 +143,10 @@ class CalendarUtils {
print("whenComplete Calender ID iOS " + eventId!);
});
}
}
deleteEvent(Calendar _calendar, Event _event) async {

@ -18,6 +18,7 @@ class LaserBodyParts {
}
Map<String, Widget> maleBodyMap = {
"1": imagePng("assets/images/new/body_parts/male/full_body_male.png"),
"40": imagePng("assets/images/new/body_parts/male/upper_arm.png"),
"41": imagePng("assets/images/new/body_parts/male/lower_arm.png"),
"42": imagePng("assets/images/new/body_parts/male/chest.png"),
@ -43,6 +44,7 @@ class LaserBodyParts {
};
Map<String, Widget> maleBodyRetouchMap = {
"50": imagePng("assets/images/new/body_parts/male/full_body_male.png"),
"51": imagePng("assets/images/new/body_parts/male/upper_arm.png"),
"52": imagePng("assets/images/new/body_parts/male/lower_arm.png"),
"53": imagePng("assets/images/new/body_parts/male/chest.png"),
@ -57,6 +59,7 @@ class LaserBodyParts {
};
Map<String, Widget> femaleBodyMap = {
"1": imagePng("assets/images/new/body_parts/female/full_body_female.png"),
"40": imagePng("assets/images/new/body_parts/female/upper_arm.png"),
"41": imagePng("assets/images/new/body_parts/female/lower_arm.png"),
"42": imagePng("assets/images/new/body_parts/female/chest.png"),
@ -89,6 +92,7 @@ class LaserBodyParts {
};
Map<String, Widget> femaleBodyRetouchMap = {
"50": imagePng("assets/images/new/body_parts/female/full_body_female.png"),
"51": imagePng("assets/images/new/body_parts/female/upper_arm.png"),
"52": imagePng("assets/images/new/body_parts/female/lower_arm.png"),
"53": imagePng("assets/images/new/body_parts/female/chest.png"),

@ -3024,6 +3024,23 @@ class TranslationBase {
String get continueAgreeTerms => localizedValues["continueAgreeTerms"][locale.languageCode];
String get agreeText => localizedValues["agreeText"][locale.languageCode];
String get ERCheckInSuccess => localizedValues["ERCheckInSuccess"][locale.languageCode];
String get generalConsentTitle => localizedValues["generalConsentTitle"][locale.languageCode];
String get generalConsentSubTitle => localizedValues["generalConsentSubTitle"][locale.languageCode];
String get incorrectNationalId => localizedValues["incorrectNationalId"][locale.languageCode];
String get resultStatus => localizedValues["resultStatus"][locale.languageCode];
String get labResultFlag => localizedValues["labResultFlag"][locale.languageCode];
String get selectOccupation => localizedValues["selectOccupation"][locale.languageCode];
String get selectOccupationError => localizedValues["selectOccupationError"][locale.languageCode];
String get whatIsOnlineCheckIn => localizedValues["whatIsOnlineCheckIn"][locale.languageCode];
String get EROnlineCheckInDesc1 => localizedValues["EROnlineCheckInDesc1"][locale.languageCode];
String get EROnlineCheckInHow => localizedValues["EROnlineCheckInHow"][locale.languageCode];
String get EROnlineCheckInTapOn => localizedValues["EROnlineCheckInTapOn"][locale.languageCode];
String get EROnlineCheckInTapOnCheckIn => localizedValues["EROnlineCheckInTapOnCheckIn"][locale.languageCode];
String get EROnlineCheckInHoldPhone => localizedValues["EROnlineCheckInHoldPhone"][locale.languageCode];
String get EROnlineCheckInHoldPhoneInstruction => localizedValues["EROnlineCheckInHoldPhoneInstruction"][locale.languageCode];
String get EROnlineCheckInWaitTurn => localizedValues["EROnlineCheckInWaitTurn"][locale.languageCode];
String get EROnlineCheckInWaitTurnInstruction => localizedValues["EROnlineCheckInWaitTurnInstruction"][locale.languageCode];
}

@ -39,6 +39,7 @@ import 'package:diplomaticquarterapp/pages/medical/reports/report_home_page.dart
import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart';
import 'package:diplomaticquarterapp/pages/vaccine/my_vaccines_screen.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart';
@ -823,7 +824,7 @@ class Utils {
);
}
static Widget tableColumnValue(String text, {bool isLast = false, bool isCapitable = true, ProjectViewModel? mProjectViewModel}) {
static Widget tableColumnValue(String text, {bool isLast = false, bool isCapitable = true, bool isHighLow = false, required ProjectViewModel mProjectViewModel}) {
ProjectViewModel projectViewModel = mProjectViewModel ?? Provider.of(AppGlobal.context);
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -831,12 +832,41 @@ class Utils {
children: [
SizedBox(height: 12),
Text(
// isCapitable && !projectViewModel.isArabic ? text.toLowerCase().capitalizeFirstofEach : text,
isCapitable && !projectViewModel.isArabic ? text.toLowerCase().capitalizeFirstofEach : text,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: isHighLow ? CustomColors.accentColor : Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
),
SizedBox(height: 12),
if (!isLast)
Divider(
height: 1,
color: Color(0xffEFEFEF),
thickness: 1,
)
],
);
}
static Widget tableColumnValueWithFlowChart(String text, String flowChartText, {bool isLast = false, bool isCapitable = true, ProjectViewModel? mProjectViewModel}) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(height: 12),
Text(
text,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
),
SizedBox(height: 8),
AutoSizeText(
flowChartText,
maxLines: 1,
minFontSize: 6,
style: TextStyle(decoration: TextDecoration.underline, fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xffD02127), letterSpacing: -0.48, height: 18 / 12),
),
SizedBox(height: 12),
if (!isLast)
Divider(

@ -0,0 +1,89 @@
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:flutter/material.dart';
void showMyBottomSheet(BuildContext context, {required Widget child, required VoidCallback callBackFunc, String? type}) {
showModalBottomSheet<String>(
context: context,
isScrollControlled: true,
backgroundColor: Colors.transparent,
builder: (BuildContext context) {
return Container(
constraints: BoxConstraints(
maxHeight: type =='CONTINUE_ACTION' ? MediaQuery.of(context).size.height *.75 : double.infinity,),
decoration: const BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topRight: Radius.circular(25),
topLeft: Radius.circular(25),
),
),
padding: MediaQuery.of(context).viewInsets,
clipBehavior: Clip.antiAlias,
child:SingleChildScrollView(child: Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
mHeight(13),
Container(
height: 6,
width: 60,
decoration: const BoxDecoration(
color: Color(0xff9A9A9A),
borderRadius: BorderRadius.all(
Radius.circular(20),
),
),
),
mHeight(8),
child,
],
)),
);
},
).then((value) {
// print("BACK FROM DELEGATE!!!!");
// print("value: $value");
if (value == "delegate_reload") {
callBackFunc();
}
});
}
class BottomSheetItem extends StatelessWidget {
final Function onTap;
final IconData icon;
final String title;
final Color color;
const BottomSheetItem({Key? key, required this.onTap, required this.title, required this.icon, this.color = Colors.black}) : super(key: key);
@override
Widget build(BuildContext context) {
return InkWell(
onTap: () {
if (onTap != null) {
Navigator.pop(context);
onTap();
}
},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 18.0, vertical: 18.0),
child: Row(
children: <Widget>[
if (icon != null)
Icon(
icon,
color: color,
size: 18.0,
),
if (icon != null) SizedBox(width: 24.0),
Text(
title ?? "",
style: TextStyle(color: color),
),
],
),
),
);
}
}

@ -160,8 +160,11 @@ class LabResultWidget extends StatelessWidget {
children: [
Utils.tableColumnTitle(TranslationBase.of(context).description, showDivider: false),
Utils.tableColumnTitle(TranslationBase.of(context).value, showDivider: false),
// Utils.tableColumnTitle(TranslationBase.of(context).unit, showDivider: false),
Utils.tableColumnTitle(TranslationBase.of(context).labResultFlag, showDivider: false),
Utils.tableColumnTitle(TranslationBase.of(context).range, showDivider: false),
Utils.tableColumnTitle("", showDivider: false),
// Utils.tableColumnTitle("", showDivider: false),
],
),
);
@ -185,8 +188,25 @@ class LabResultWidget extends StatelessWidget {
padding: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 12, right: projectViewModel.isArabic ? 12 : 0),
child: Utils.tableColumnValue(labResultList[i].description ?? "", isLast: true, mProjectViewModel: projectViewModel),
),
Utils.tableColumnValue(labResultList[i].resultValue! + " " + labResultList![i].uOM!, isLast: true, mProjectViewModel: projectViewModel),
Utils.tableColumnValue(labResultList[i]!.referanceRange!, isLast: true, isCapitable: false, mProjectViewModel: projectViewModel),
Utils.tableColumnValue(labResultList[i].resultValue! + " " + labResultList[i].uOM!,
isHighLow: ((labResultList[i].resultValueFlag ?? "").toLowerCase() == "h" || (labResultList[i].resultValueFlag ?? "").toLowerCase() == "l"),
isLast: true,
mProjectViewModel: projectViewModel),
Utils.tableColumnValue((labResultList[i].resultValueFlag ?? ""),
isHighLow: ((labResultList[i].resultValueFlag ?? "").toLowerCase() == "h" || (labResultList[i].resultValueFlag ?? "").toLowerCase() == "l"),
isLast: true,
isCapitable: false,
mProjectViewModel: projectViewModel),
// Utils.tableColumnValue((labResultList[i].referanceRange! ?? ""),
// // isHighLow: ((labResultList[i].resultValueFlag ?? "").toLowerCase() == "h" || (labResultList[i].resultValueFlag ?? "").toLowerCase() == "l"),
// isLast: true,
// isCapitable: false,
// mProjectViewModel: projectViewModel),
!checkIfCovidLab(patientLabResultList!)
? InkWell(
onTap: () {
@ -202,7 +222,8 @@ class LabResultWidget extends StatelessWidget {
},
child: Padding(
padding: EdgeInsets.only(left: !projectViewModel.isArabic ? 0 : 12, right: !projectViewModel.isArabic ? 12 : 0),
child: Utils.tableColumnValueWithUnderLine(TranslationBase.of(context).viewFlowChart, isLast: true, isCapitable: false),
child: Utils.tableColumnValueWithFlowChart(labResultList[i].referanceRange!, TranslationBase.of(context).viewFlowChart, isLast: true, isCapitable: false),
// child: Utils.tableColumnValueWithUnderLine(TranslationBase.of(context).viewFlowChart, isLast: true, isCapitable: false),
),
)
: Container(),

@ -19,9 +19,12 @@ class LabResultDetailsWidget extends StatefulWidget {
}
class _VitalSignDetailsWidgetState extends State<LabResultDetailsWidget> {
late ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
projectViewModel = Provider.of(context);
return Table(
columnWidths: {
0: FlexColumnWidth(2),
@ -46,8 +49,8 @@ class _VitalSignDetailsWidgetState extends State<LabResultDetailsWidget> {
tableRow.add(
TableRow(
children: [
Utils.tableColumnValue(DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(labOrderResultList![i].verifiedOnDateTime!)), isLast: i == (labOrderResultList.length - 1)),
Utils.tableColumnValue(labOrderResultList[i].resultValue!, isLast: i == (labOrderResultList.length - 1)),
Utils.tableColumnValue(DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(labOrderResultList![i].verifiedOnDateTime!)), isLast: i == (labOrderResultList.length - 1), mProjectViewModel: projectViewModel),
Utils.tableColumnValue(labOrderResultList[i].resultValue!, isLast: i == (labOrderResultList.length - 1), mProjectViewModel: projectViewModel),
],
),
);

@ -10,6 +10,7 @@ import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:flutter_widget_from_html/flutter_widget_from_html.dart';
import 'package:provider/provider.dart';
import 'LabResultWidget.dart';
@ -19,9 +20,10 @@ class LaboratoryResultWidget extends StatefulWidget {
final String? billNo;
final String? details;
final String? orderNo;
final String? projectName;
final PatientLabOrders? patientLabOrder;
const LaboratoryResultWidget({Key? key, this.onTap, this.billNo, this.details, this.orderNo, this.patientLabOrder}) : super(key: key);
const LaboratoryResultWidget({Key? key, this.onTap, this.billNo, this.details, this.orderNo, this.projectName, this.patientLabOrder}) : super(key: key);
@override
_LaboratoryResultWidgetState createState() => _LaboratoryResultWidgetState();
@ -178,12 +180,8 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
),
if (_isShowMore)
Container(
width: double.infinity,
// height: 450.0,
child: Html(
// data: widget.details ?? TranslationBase.of(context).noDataAvailable,
data: labSpecialResult,
),
width: MediaQuery.of(context).size.width * 0.9,
child: HtmlWidget(labSpecialResult),
),
],
),

@ -34,6 +34,9 @@ class DoctorCard extends StatelessWidget {
final bool isSickLeave;
final int sickLeaveStatus;
final int projectID;
final bool isLabOrderResult;
final int? resultStatus;
final String? resultStatusDesc;
DoctorCard(
{this.name,
@ -54,7 +57,10 @@ class DoctorCard extends StatelessWidget {
this.isParentAppointment = false,
this.isSickLeave = false,
this.sickLeaveStatus = 0,
this.projectID = 0});
this.projectID = 0,
this.isLabOrderResult = false,
this.resultStatus = 0,
this.resultStatusDesc = ""});
late ProjectViewModel projectViewModel;
@ -239,6 +245,8 @@ class DoctorCard extends StatelessWidget {
),
],
),
// if (isLabOrderResult)
// MyRichText(TranslationBase.of(context).resultStatus, resultStatusDesc ?? "", projectViewModel.isArabic, valueColor: getResultStatusColor(resultStatus!)),
],
),
),
@ -274,6 +282,22 @@ class DoctorCard extends StatelessWidget {
);
}
Color getResultStatusColor(int resultStatus) {
Color statusColor = Color(0xff2B353E);
if (resultStatus == 17 || resultStatus == 16) {
statusColor = CustomColors.green;
}
if (resultStatus == 45) {
statusColor = CustomColors.orange;
}
if (resultStatus == 44) {
statusColor = CustomColors.accentColor;
}
return statusColor;
}
String getStatusText(BuildContext context) {
String statusText = "";
if (sickLeaveStatus == 1) {

@ -40,7 +40,7 @@ class MyInAppBrowser extends InAppBrowser {
static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
// static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
// static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebL/ive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
// static String SERVICE_URL = 'https://uat.hmgwebservices.com/payfortforvidaplus/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL UAT VIDA PLUS

@ -4,19 +4,22 @@ class MyRichText extends StatelessWidget {
final String title;
final String value;
final bool isArabic;
MyRichText(this.title,this.value,this.isArabic,{Key? key}) : super(key: key);
final Color? valueColor;
// MyRichText(this.title, this.value, this.isArabic, {this.valueColor});
MyRichText(this.title, this.value, this.isArabic, {this.valueColor, Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return RichText(
maxLines: 1,
maxLines: 2,
text: TextSpan(
text: title,
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff575757), letterSpacing: -0.4, height: 18 / 10),
children: <TextSpan>[
TextSpan(
text: " $value",
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: valueColor ?? Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
)
]),
);

@ -24,6 +24,9 @@ class AppExpandableNotifier extends StatefulWidget {
var controller = new ExpandableController();
bool isTitleSingleLine;
bool isDisabled = false;
bool isDoctorSearchResult = false;
final String? projectTitleTop;
final String? projectTitleBottom;
AppExpandableNotifier(
{this.headerWidget,
@ -35,13 +38,15 @@ class AppExpandableNotifier extends StatefulWidget {
this.hasCounter = false,
this.counter = "0",
this.widgetColor = Colors.white,
this.isDisabled = false});
this.isDisabled = false,
this.isDoctorSearchResult = false,
this.projectTitleTop = "",
this.projectTitleBottom = ""});
_AppExpandableNotifier createState() => _AppExpandableNotifier();
}
class _AppExpandableNotifier extends State<AppExpandableNotifier> {
@override
void initState() {
setState(() {
@ -55,12 +60,19 @@ class _AppExpandableNotifier extends State<AppExpandableNotifier> {
@override
Widget build(BuildContext context) {
String _mainTitle = (widget.title ?? TranslationBase.of(context).details).trim();
String _title = _mainTitle.contains(" ") ? (context.read<ProjectViewModel>().isArabic ? (_mainTitle.split(" ").length < 1 ? _mainTitle : _mainTitle.split(" ")[1]) : _mainTitle.split(" ")[0]) : _mainTitle;
// String _title = _mainTitle.split(" ")[0];
String _subTitle = _mainTitle.replaceAll(_title, "").trim();
String _title = "";
String _subTitle = "";
if (widget.isDoctorSearchResult) {
_title = widget.projectTitleTop ?? (context.read<ProjectViewModel>().isArabic ? (_mainTitle.split(" ").length < 1 ? _mainTitle : _mainTitle.split(" ")[1]) : _mainTitle.split(" ")[0]);
_subTitle = widget.projectTitleBottom ?? _mainTitle.replaceAll(_title, "").trim();
} else {
_title =
_mainTitle.contains(" ") ? (context.read<ProjectViewModel>().isArabic ? (_mainTitle.split(" ").length < 1 ? _mainTitle : _mainTitle.split(" ")[1]) : _mainTitle.split(" ")[0]) : _mainTitle;
// String _title = _mainTitle.split(" ")[0];
_subTitle = _mainTitle.replaceAll(_title, "").trim();
}
if (_subTitle.length < 1) {
_subTitle = double.tryParse(_subTitle) != null ? _title : _title.toLowerCase().capitalizeFirstofEach;
_title = "";
@ -68,6 +80,7 @@ class _AppExpandableNotifier extends State<AppExpandableNotifier> {
_subTitle = double.tryParse(_subTitle) == null ? _subTitle : _subTitle.toLowerCase().capitalizeFirstofEach;
_title = double.tryParse(_subTitle) == null ? _title : _title.toLowerCase().capitalizeFirstofEach;
}
return ExpandableNotifier(
child: Container(
color: widget.widgetColor != null ? widget.widgetColor : Colors.white,
@ -80,7 +93,7 @@ class _AppExpandableNotifier extends State<AppExpandableNotifier> {
scrollOnExpand: true,
scrollOnCollapse: false,
child: ExpandablePanel(
// hasIcon: false,
// hasIcon: false,
theme: const ExpandableThemeData(
hasIcon: false,
headerAlignment: ExpandablePanelHeaderAlignment.center,

@ -1,7 +1,7 @@
name: diplomaticquarterapp
description: A new Flutter application.
version: 4.5.069+4050069
version: 4.5.074+4050074
environment:
sdk: ">=3.0.0 <3.13.0"
@ -51,6 +51,8 @@ dependencies:
# Flutter Html View
flutter_html: ^3.0.0-beta.2
flutter_widget_from_html: ^0.15.3
# Pagnation
pull_to_refresh: ^2.0.0
@ -258,6 +260,12 @@ 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-Regular/Cairo-Regular.ttf
# - asset: assets/fonts/ar/Cairo-Light/Cairo-Light.woff
weight: 400
- asset: assets/fonts/ar/Cairo-Bold/Cairo-Bold.eot
- asset: assets/fonts/ar/Cairo-Bold/Cairo-Bold.otf
- asset: assets/fonts/ar/Cairo-Bold/Cairo-Bold.ttf

Loading…
Cancel
Save