Merge remote-tracking branch 'origin/master'

# Conflicts:
#	lib/core/service/client/base_app_client.dart
#	lib/pages/BookAppointment/BookingOptions.dart
#	lib/pages/medical/allergies_page.dart
master
mobileteam 2 weeks ago
commit 6a87b61c35

@ -2,24 +2,18 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CLIENT_ID</key>
<string>815750722565-da8p56le8bd6apsbm9eft0jjl1rtpgkt.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.815750722565-da8p56le8bd6apsbm9eft0jjl1rtpgkt</string>
<key>ANDROID_CLIENT_ID</key>
<string>815750722565-m14h8mkosm7cnq6uh6rhqr54dn02d705.apps.googleusercontent.com</string>
<key>API_KEY</key>
<string>AIzaSyDiXnCO00li4V7Ioa2YZ_M4ECxRsu_P9tA</string>
<string>AIzaSyBSlC2DpoYFRS7N99Sm31kUj_Ikezsz2e8</string>
<key>GCM_SENDER_ID</key>
<string>815750722565</string>
<string>768176874884</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.HMG.HMG-Smartphone</string>
<string>com.redseaglobal.redseahealth</string>
<key>PROJECT_ID</key>
<string>api-project-815750722565</string>
<string>red-sea-health---patient</string>
<key>STORAGE_BUCKET</key>
<string>api-project-815750722565.appspot.com</string>
<string>red-sea-health---patient.firebasestorage.app</string>
<key>IS_ADS_ENABLED</key>
<false></false>
<key>IS_ANALYTICS_ENABLED</key>
@ -31,8 +25,6 @@
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:815750722565:ios:328ec247a81a2ca23c186c</string>
<key>DATABASE_URL</key>
<string>https://api-project-815750722565.firebaseio.com</string>
<string>1:768176874884:ios:e981d28ce58399b9dca9d1</string>
</dict>
</plist>

@ -64,7 +64,7 @@ post_install do |installer|
File.open(xcconfig_path, "w") { |file| file << xcconfig_mod }
if build_configuration.build_settings['WRAPPER_EXTENSION'] == 'bundle'
build_configuration.build_settings['DEVELOPMENT_TEAM'] = '3A359E86ZF'
build_configuration.build_settings['DEVELOPMENT_TEAM'] = '64C4BL5J6N'
end
if target.name == 'MapboxMobileEvents'
`xcrun -sdk iphoneos bitcode_strip -r Pods/MapboxMobileEvents/MapboxMobileEvents.xcframework/ios-arm64_armv7/MapboxMobileEvents.framework/MapboxMobileEvents -o Pods/MapboxMobileEvents/MapboxMobileEvents.xcframework/ios-arm64_armv7/MapboxMobileEvents.framework/MapboxMobileEvents`

@ -2,37 +2,29 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CLIENT_ID</key>
<string>815750722565-da8p56le8bd6apsbm9eft0jjl1rtpgkt.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.815750722565-da8p56le8bd6apsbm9eft0jjl1rtpgkt</string>
<key>ANDROID_CLIENT_ID</key>
<string>815750722565-m14h8mkosm7cnq6uh6rhqr54dn02d705.apps.googleusercontent.com</string>
<key>API_KEY</key>
<string>AIzaSyDiXnCO00li4V7Ioa2YZ_M4ECxRsu_P9tA</string>
<string>AIzaSyBSlC2DpoYFRS7N99Sm31kUj_Ikezsz2e8</string>
<key>GCM_SENDER_ID</key>
<string>815750722565</string>
<string>768176874884</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.HMG.HMG-Smartphone</string>
<string>com.redseaglobal.redseahealth</string>
<key>PROJECT_ID</key>
<string>api-project-815750722565</string>
<string>red-sea-health---patient</string>
<key>STORAGE_BUCKET</key>
<string>api-project-815750722565.appspot.com</string>
<string>red-sea-health---patient.firebasestorage.app</string>
<key>IS_ADS_ENABLED</key>
<false/>
<false></false>
<key>IS_ANALYTICS_ENABLED</key>
<false/>
<false></false>
<key>IS_APPINVITE_ENABLED</key>
<true/>
<true></true>
<key>IS_GCM_ENABLED</key>
<true/>
<true></true>
<key>IS_SIGNIN_ENABLED</key>
<true/>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:815750722565:ios:328ec247a81a2ca23c186c</string>
<key>DATABASE_URL</key>
<string>https://api-project-815750722565.firebaseio.com</string>
<string>1:768176874884:ios:e981d28ce58399b9dca9d1</string>
</dict>
</plist>

@ -96,6 +96,7 @@ var PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList_Async';
var GET_PRESCRIPTIONS_ALL_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
var GET_PRESCRIPTION_REPORT = 'Services/Patients.svc/REST/INP_GetPrescriptionReport';
var SEND_PRESCRIPTION_EMAIL = 'Services/Notifications.svc/REST/SendPrescriptionEmail';
var SEND_PRESCRIPTION_EMAIL_NEW = 'Services/Notifications.svc/REST/SendPrescriptionEmail_New';
var GET_PRESCRIPTION_REPORT_ENH = 'Services/Patients.svc/REST/GetPrescriptionReport_enh';
///Lab Order
@ -706,7 +707,8 @@ var IS_DOCTOR_AVAILABLE_BY_CALENDAR_SCHEDULE = 'Services/OUTPs.svc/REST/HIS_IsDo
var getPayFortProjectDetails = "Services/PayFort_Serv.svc/REST/GetPayFortProjectDetails";
var addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse";
var payFortEnvironment = FortEnvironment.production;
var applePayMerchantId = "merchant.com.hmgwebservices";
// var applePayMerchantId = "merchant.com.hmgwebservices";
var applePayMerchantId = "merchant.com.rsgwebservices.hmg.redseahealth";
// var payFortEnvironment = FortEnvironment.test;
// var applePayMerchantId = "merchant.com.hmgwebservices.uat";

@ -2291,7 +2291,6 @@ const Map localizedValues = {
"liveCareTermsConditions28": {"en": "5.5 Telehealth Services is intended only for your own personal use and the use of your children under your supervision. You must not share your user access details (log-in name, password etc.) with any other person and must take reasonable steps to maintain the security of such details. Our services are delivered on the basis that we have certain information about the user, which may be connected to or obtained from your account details (age, gender, medical history etc.). We accept no responsibility whatsoever to you or any other person if our services are delivered via a user account to a person other than the registered user. This is particularly important for telehealth services, where the practitioner will need to assess the information, the patient provides during the consultation in the context of the patient’s medical file and history.", "ar": "5-5 خدمات الرعاية الصحية عن بُعد مخصصة فقط لاستخدامك الشخصي واستخدام أطفالك تحت إشرافك. يتعين عليك ألا تشارك بيانات تسجيل الدخول الخاصة بك (اسم المستخدم وكلمة المرور وما إلى ذلك) مع أي شخص آخر ويجب أن تتخذ خطوات معقولة للحفاظ على أمان هذه البيانات. يتم تقديم خدماتنا على أساس أن لدينا معلومات معينة حول المستخدم، والتي قد تكون مرتبطة أو تم الحصول عليها من تفاصيل حسابك (العمر والجنس والتاريخ الطبي وما إلى ذلك). نحن لا نتحمل أي مسؤولية من أي نوع تجاهك أو تجاه أي شخص آخر إذا تم تقديم خدماتنا عبر حساب مستخدم إلى شخص آخر غير المستخدم المسجل. هذا مهم بشكل خاص لخدمات الرعاية الصحية عن بعد، حيث سيحتاج الممارس الصحي إلى تقييم المعلومات التي يقدمها المريض أثناء الاستشارة في سياق الملف الطبي للمريض وتاريخه."},
"liveCareTermsConditions29": {"en": "5.6 You are responsible for ensuring you have a device connected to the internet and capable of transmitting and receiving video and sound. We are not responsible for any failure of a Telehealth Services session caused by your device or your internet connection. You are responsible for all costs associated with your own internet connection and use.", "ar": "5-6 أنت مسؤول عن التأكد من أن لديك جهازاً متصلاً بالإنترنت وقادراً على إرسال واستقبال الفيديو والصوت. نحن لسنا مسؤولين عن أي انقطاع في جلسة خدمات الرعاية الصحية عن بعد بسبب ناجم عن جهازك أو اتصالك بالإنترنت. أنت مسؤول عن جميع التكاليف المرتبطة باتصالك بالإنترنت واستخدامك لها."},
"liveCareTermsConditions30": {"en": "5.7 From time to time we may release updates to our Application and or the Website. You should ensure that you are running the latest version of the Application. Use of old versions of the Application may lead to technical errors in your use of the Telehealth Services and may expose you to additional security risks.", "ar": "5-7 قد نقوم من وقت لآخر بإصدار تحديثات لتطبيقنا و/أو موقع الويب الخاص بنا. يجب عليك التأكد من أنك تقوم بتشغيل أحدث إصدار من التطبيق. قد يؤدي استخدام الإصدارات القديمة من التطبيق إلى حدوث أخطاء فنية أثناء استخدامك لخدمات الرعاية الصحية عن بُعد وقد يعرضك ذلك لمخاطر أمنية إضافية."},
"liveCareTermsHeading8": {"en": "6. TELEHEALTH SERVICES", "ar": "6. خدمات الرعاية الصحية عن بُعد"},
"liveCareTermsConditions31": {"en": "Our Telehealth Services will be for specific medical specialties or follow-up or medication refill appointments.", "ar": "خدمات الرعاية الصحية عن بُعد الخاصة بنا سوف تكون لتخصصات طبية محددة أو لمواعيد المتابعة أو إعادة صرف الدواء. "},
"liveCareTermsHeading9": {"en": "7. CHARGES AND PAYMENT", "ar": "7. الأجور والسداد"},

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

@ -231,9 +231,11 @@ class LabsService extends BaseService {
_requestSendLabReportEmail.languageID = languageID;
// await baseAppClient.post(SEND_LAB_RESULT_EMAIL, onSuccess: (dynamic response, int statusCode) {
await baseAppClient.post(isVidaPlus ? SEND_LAB_RESULT_EMAIL : SEND_LAB_RESULT_EMAIL_NEW, onSuccess: (dynamic response, int statusCode) {
// await baseAppClient.post(isVidaPlus ? SEND_LAB_RESULT_EMAIL : SEND_LAB_RESULT_EMAIL_NEW, onSuccess: (dynamic response, int statusCode) {
await baseAppClient.post(SEND_LAB_RESULT_EMAIL_NEW, onSuccess: (dynamic response, int statusCode) {
if (isDownload) {
labReportPDF = isVidaPlus ? response['LabReportsPDFContent'] : response['PdfContent'];
// labReportPDF = response['PdfContent'];
}
}, onFailure: (String error, int statusCode) {
hasError = true;

@ -123,34 +123,80 @@ class PrescriptionsService extends BaseService {
isDentalAllowedBackend: false,
);
Future sendPrescriptionEmail(String appointmentDate, int patientID, String clinicName, String doctorName, int doctorID, int projectID, bool isInOutPatient, bool isDownload) async {
_requestSendPrescriptionEmail.listPrescriptions = prescriptionReportList;
_requestSendPrescriptionEmail.listPrescriptionsINP = prescriptionReportListINP;
_requestSendPrescriptionEmail.appointmentDate = appointmentDate;
_requestSendPrescriptionEmail.patientID = patientID;
_requestSendPrescriptionEmail.clinicName = clinicName;
_requestSendPrescriptionEmail.doctorName = doctorName;
_requestSendPrescriptionEmail.projectID = projectID;
_requestSendPrescriptionEmail.to = user.emailAddress;
_requestSendPrescriptionEmail.dateofBirth = user.dateofBirth;
_requestSendPrescriptionEmail.patientIditificationNum = user.patientIdentificationNo;
_requestSendPrescriptionEmail.patientMobileNumber = user.mobileNumber;
_requestSendPrescriptionEmail.doctorID = doctorID;
_requestSendPrescriptionEmail.patientName = user.firstName! + " " + user.lastName!;
_requestSendPrescriptionEmail.setupID = user.setupID;
_requestSendPrescriptionEmail.to = user.emailAddress;
_requestSendPrescriptionEmail.isDownload = isDownload;
Future sendPrescriptionEmail(Prescriptions prescriptions, bool isDownload) async {
// _requestSendPrescriptionEmail.listPrescriptions = prescriptionReportList;
// _requestSendPrescriptionEmail.listPrescriptionsINP = prescriptionReportListINP;
// _requestSendPrescriptionEmail.appointmentDate = appointmentDate;
// _requestSendPrescriptionEmail.patientID = patientID;
// _requestSendPrescriptionEmail.clinicName = clinicName;
// _requestSendPrescriptionEmail.doctorName = doctorName;
// _requestSendPrescriptionEmail.projectID = projectID;
// _requestSendPrescriptionEmail.to = user.emailAddress;
// _requestSendPrescriptionEmail.dateofBirth = user.dateofBirth;
// _requestSendPrescriptionEmail.patientIditificationNum = user.patientIdentificationNo;
// _requestSendPrescriptionEmail.patientMobileNumber = user.mobileNumber;
// _requestSendPrescriptionEmail.doctorID = doctorID;
// _requestSendPrescriptionEmail.patientName = user.firstName! + " " + user.lastName!;
// _requestSendPrescriptionEmail.setupID = user.setupID;
// _requestSendPrescriptionEmail.to = user.emailAddress;
// _requestSendPrescriptionEmail.isDownload = isDownload;
Map<String, dynamic> mapDevice = {
"AppointmentNo": prescriptions.appointmentNo,
"SetupID": prescriptions.setupID,
"EpisodeNo": prescriptions.episodeID,
"ClinicID": prescriptions.clinicID,
"ProjectID": prescriptions.projectID,
"DischargeNo": prescriptions.dischargeNo,
"IsDownload": true,
"To": user.emailAddress,
// "To": "amjad.haroon@cloudsolutions.com.sa",
"ClinicName": prescriptions.clinicDescription,
"DoctorName": prescriptions.doctorName,
};
hasError = false;
await baseAppClient.post(SEND_PRESCRIPTION_EMAIL, onSuccess: (response, statusCode) {
// await baseAppClient.post(SEND_PRESCRIPTION_EMAIL, onSuccess: (response, statusCode) {
await baseAppClient.post(SEND_PRESCRIPTION_EMAIL_NEW, onSuccess: (response, statusCode) {
if (isDownload) {
prescriptionReportPDF = response["Base64Data"];
}
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _requestSendPrescriptionEmail.toJson());
// }, body: _requestSendPrescriptionEmail.toJson());
}, body: mapDevice);
}
// Future sendPrescriptionEmail(String appointmentDate, int patientID, String clinicName, String doctorName, int doctorID, int projectID, bool isInOutPatient, bool isDownload) async {
// _requestSendPrescriptionEmail.listPrescriptions = prescriptionReportList;
// _requestSendPrescriptionEmail.listPrescriptionsINP = prescriptionReportListINP;
// _requestSendPrescriptionEmail.appointmentDate = appointmentDate;
// _requestSendPrescriptionEmail.patientID = patientID;
// _requestSendPrescriptionEmail.clinicName = clinicName;
// _requestSendPrescriptionEmail.doctorName = doctorName;
// _requestSendPrescriptionEmail.projectID = projectID;
// _requestSendPrescriptionEmail.to = user.emailAddress;
// _requestSendPrescriptionEmail.dateofBirth = user.dateofBirth;
// _requestSendPrescriptionEmail.patientIditificationNum = user.patientIdentificationNo;
// _requestSendPrescriptionEmail.patientMobileNumber = user.mobileNumber;
// _requestSendPrescriptionEmail.doctorID = doctorID;
// _requestSendPrescriptionEmail.patientName = user.firstName! + " " + user.lastName!;
// _requestSendPrescriptionEmail.setupID = user.setupID;
// _requestSendPrescriptionEmail.to = user.emailAddress;
// _requestSendPrescriptionEmail.isDownload = isDownload;
//
// hasError = false;
// await baseAppClient.post(SEND_PRESCRIPTION_EMAIL, onSuccess: (response, statusCode) {
// if (isDownload) {
// prescriptionReportPDF = response["Base64Data"];
// }
// }, onFailure: (String error, int statusCode) {
// hasError = true;
// super.error = error;
// }, body: _requestSendPrescriptionEmail.toJson());
// }
RequestGetListPharmacyForPrescriptions requestGetListPharmacyForPrescriptions = RequestGetListPharmacyForPrescriptions(
latitude: 0,
longitude: 0,

@ -122,17 +122,19 @@ class PrescriptionsViewModel extends BaseViewModel {
}
sendPrescriptionEmail(
{required String appointmentDate,
required int patientID,
required String clinicName,
required String doctorName,
required int doctorID,
required String mes,
required int projectID,
required bool isInOutPatient,
required bool isDownload}) async {
// {required String appointmentDate,
// required int patientID,
// required String clinicName,
// required String doctorName,
// required int doctorID,
// required String mes,
// required int projectID,
// required bool isInOutPatient,
// required bool isDownload}) async
{required Prescriptions prescriptions, required bool isDownload}) async {
setState(ViewState.BusyLocal);
await _prescriptionsService.sendPrescriptionEmail(appointmentDate, patientID, clinicName, doctorName, doctorID, projectID, isInOutPatient, isDownload);
// await _prescriptionsService.sendPrescriptionEmail(appointmentDate, patientID, clinicName, doctorName, doctorID, projectID, isInOutPatient, isDownload);
await _prescriptionsService.sendPrescriptionEmail(prescriptions, isDownload);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error!;
setState(ViewState.ErrorLocal);
@ -148,7 +150,7 @@ class PrescriptionsViewModel extends BaseViewModel {
}
}
} else {
AppToast.showSuccessToast(message: mes);
AppToast.showSuccessToast(message: "");
}
// AppToast.showSuccessToast(message: mes);
setState(ViewState.Idle);

@ -120,7 +120,7 @@ class _MyApp extends State<MyApp> {
@override
Widget build(BuildContext context) {
PlatformBridge.init(context);
AppGlobal.context = context;
// Don't set AppGlobal.context here - it's set after MultiProvider is created
// SystemChrome.setPreferredOrientations([
// DeviceOrientation.portraitUp,
@ -174,6 +174,7 @@ class _MyApp extends State<MyApp> {
child: Consumer<ProjectViewModel>(
builder: (context, projectProvider, child) => MaterialApp(
builder: (context, mchild) {
AppGlobal.context = context; // Set context here after MultiProvider
AppGlobal.projectViewModelContext = context;
return MediaQuery(
data: MediaQuery.of(context).copyWith(

@ -19,11 +19,11 @@ class _BookingOptionsState extends State<BookingOptions> {
@override
void initState() {
locationUtils = new LocationUtils(
//locationUtils =// new LocationUtils(
isShowConfirmDialog: false,
isShowLocationTimeoutDialog: false,
context: context);
WidgetsBinding.instance.addPostFrameCallback((_) =>
//WidgetsBinding.instance//.addPostFrameCallback((_) =>
locationUtils.getCurrentLocation(
isShowConfirmDialog: false, isShowLocationTimeoutDialog: false));

@ -70,7 +70,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
@override
void initState() {
locationUtils = new LocationUtils(isShowConfirmDialog: true, isShowLocationTimeoutDialog: false, context: context);
// locationUtils = new LocationUtils(isShowConfirmDialog: true, isShowLocationTimeoutDialog: false, context: context);
WidgetsBinding.instance.addPostFrameCallback((_) => getClinicsList());
checkPVM();
super.initState();

@ -25,9 +25,9 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
@override
void initState() {
super.initState();
locationUtils =
new LocationUtils(isShowConfirmDialog: true, context: context);
locationUtils.getCurrentLocation();
// locationUtils =
// new LocationUtils(isShowConfirmDialog: true, context: context);
// locationUtils.getCurrentLocation();
_isButtonDisabled = true;
}

@ -51,8 +51,8 @@ class _SearchByHospitalState extends State<SearchByHospital> {
@override
void initState() {
WidgetsBinding.instance.addPostFrameCallback((_) {
locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
locationUtils.getCurrentLocation();
// locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
// locationUtils.getCurrentLocation();
getProjectsList();
});
}
@ -303,13 +303,13 @@ class _SearchByHospitalState extends State<SearchByHospital> {
GifLoaderDialogUtils.hideDialog(context);
} else {}
GifLoaderDialogUtils.hideDialog(context);
locationUtils.getCurrentLocation();
// locationUtils.getCurrentLocation();
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
locationUtils.getCurrentLocation();
// locationUtils.getCurrentLocation();
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
locationUtils.getCurrentLocation();
// locationUtils.getCurrentLocation();
print(err);
});
}

@ -631,6 +631,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
break;
case 20:
getPatientShare(context, appo);
// getAppoQR(context, appo);
// checkPatientNphiesEligibility(context, appo);
break;
case 30:
@ -1211,7 +1212,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
"Appointment check in",
transID!,
appo.projectID.toString(),
authenticatedUser.emailAddress!,
authenticatedUser.emailAddress ?? "Cust_${authenticatedUser.patientID}@HMG.com",
paymentMethod[0]!,
authenticatedUser.patientType,
authenticatedUser.firstName!,

@ -40,7 +40,7 @@ class InsurancePage extends StatelessWidget {
onTap: () {
getDetails(
setupID: '010266',
projectID: 15,
projectID: 425,
patientIdentificationID: projectViewModel.user!.patientIdentificationNo!,
//model.user.patientIdentificationNo,
patientID: projectViewModel.user!.patientID!,
@ -99,7 +99,7 @@ class InsurancePage extends StatelessWidget {
? InkWell(
onTap: () {
getDetails(
projectID: 15,
projectID: 425,
patientIdentificationID: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList![index].patientIdenficationNumber!,
setupID: '010266',
patientID: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList![index].responseID!,

@ -54,7 +54,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
hmgServices.clear();
hmgServices.add(HmgServices(0, TranslationBase.of(context).book, TranslationBase.of(context).appointmentLabel, "assets/images/new/book appointment.svg", isLogin));
hmgServices.add(HmgServices(1, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin));
// 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,

@ -180,7 +180,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
// user!.editedOn != null
// ? DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(user!.editedOn!))
// :
user!.createdOn != null ? DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(user!.createdOn!)) : '--',
user!.createdOn != null && user!.createdOn !='null'? DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(user!.createdOn!)) : '--',
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48),
),
],
@ -709,37 +709,37 @@ class _ConfirmLogin extends State<ConfirmLogin> {
}
checkIfUserAgreedBefore(CheckActivationCode result) {
if (projectViewModel.havePrivilege(109)) {
this.authService.checkIfUserAgreed().then((result) {
if (result['IsPatientAlreadyAgreed']) {
goToHome();
} else {
this.authService.getUserAgreementContent().then((result) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
Navigator.pushAndRemoveUntil(
context,
FadePage(
page: UserLoginAgreementPage(
userAgreementText: result['UserAgreementContent'],
authenticatedUserObject: authenticatedUserObject,
appointmentRateViewModel: appointmentRateViewModel,
selectedOption: selectedOption,
isArabic: projectViewModel.isArabic,
),
),
(r) => false);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
} else {
// if (projectViewModel.havePrivilege(109)) {
// this.authService.checkIfUserAgreed().then((result) {
// if (result['IsPatientAlreadyAgreed']) {
// goToHome();
// } else {
// this.authService.getUserAgreementContent().then((result) {
// GifLoaderDialogUtils.hideDialog(AppGlobal.context);
// Navigator.pushAndRemoveUntil(
// context,
// FadePage(
// page: UserLoginAgreementPage(
// userAgreementText: result['UserAgreementContent'],
// authenticatedUserObject: authenticatedUserObject,
// appointmentRateViewModel: appointmentRateViewModel,
// selectedOption: selectedOption,
// isArabic: projectViewModel.isArabic,
// ),
// ),
// (r) => false);
// }).catchError((err) {
// GifLoaderDialogUtils.hideDialog(context);
// print(err);
// });
// }
// }).catchError((err) {
// GifLoaderDialogUtils.hideDialog(context);
// print(err);
// });
// } else {
goToHome();
}
// }
// if (result.isNeedUserAgreement == true) {
// // move to agreement page.

@ -134,8 +134,10 @@ class PrescriptionDetailsPageINP extends StatelessWidget {
),
TableRow(
children: [
Utils.tableColumnValue(prescriptionReport?.routeN ?? '', isLast: true, mProjectViewModel: projectViewModel),
Utils.tableColumnValue(prescriptionReport?.frequencyN ?? '', isLast: true, mProjectViewModel: projectViewModel),
// Utils.tableColumnValue(prescriptionReport?.routeN ?? '', isLast: true, mProjectViewModel: projectViewModel),
Utils.tableColumnValue(prescriptionReport?.route ?? '', isLast: true, mProjectViewModel: projectViewModel),
// Utils.tableColumnValue(prescriptionReport?.frequencyN ?? '', isLast: true, mProjectViewModel: projectViewModel),
Utils.tableColumnValue(prescriptionReport?.frequency ?? '', isLast: true, mProjectViewModel: projectViewModel),
Utils.tableColumnValue(prescriptionReport?.doseDailyQuantity.toString() ?? '', isLast: true, mProjectViewModel: projectViewModel),
Utils.tableColumnValue(prescriptionReport?.days.toString() ?? '', isLast: true, mProjectViewModel: projectViewModel),
],

@ -83,14 +83,15 @@ class PrescriptionItemsPage extends StatelessWidget {
// showConfirmMessage(context, model);
GifLoaderDialogUtils.showMyDialog(context);
await model.sendPrescriptionEmail(
appointmentDate: prescriptions.appointmentDate!,
patientID: prescriptions.patientID!,
clinicName: prescriptions.companyName!,
doctorName: prescriptions.doctorName!,
doctorID: prescriptions.doctorID!,
mes: TranslationBase.of(context).sendSuc,
projectID: prescriptions.projectID!,
isInOutPatient: prescriptions.isInOutPatient!,
prescriptions: prescriptions,
// appointmentDate: prescriptions.appointmentDate!,
// patientID: prescriptions.patientID!,
// clinicName: prescriptions.companyName!,
// doctorName: prescriptions.doctorName!,
// doctorID: prescriptions.doctorID!,
// mes: TranslationBase.of(context).sendSuc,
// projectID: prescriptions.projectID!,
// isInOutPatient: prescriptions.isInOutPatient!,
isDownload: true);
GifLoaderDialogUtils.hideDialog(context);
},
@ -445,14 +446,15 @@ class PrescriptionItemsPage extends StatelessWidget {
email: projectViewModel.user!.emailAddress!,
onTapSendEmail: () {
model.sendPrescriptionEmail(
appointmentDate: prescriptions.appointmentDate!,
patientID: prescriptions.patientID!,
clinicName: prescriptions.companyName!,
doctorName: prescriptions.doctorName!,
doctorID: prescriptions.doctorID!,
mes: TranslationBase.of(context).sendSuc,
projectID: prescriptions.projectID!,
isInOutPatient: prescriptions.isInOutPatient!,
prescriptions: prescriptions,
// appointmentDate: prescriptions.appointmentDate!,
// patientID: prescriptions.patientID!,
// clinicName: prescriptions.companyName!,
// doctorName: prescriptions.doctorName!,
// doctorID: prescriptions.doctorID!,
// mes: TranslationBase.of(context).sendSuc,
// projectID: prescriptions.projectID!,
// isInOutPatient: prescriptions.isInOutPatient!,
isDownload: true);
},
),

@ -11,7 +11,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:flutter/material.dart';
import 'package:health/health.dart';
// import 'package:health/health.dart';
class syncHealthDataButton extends StatefulWidget {
syncHealthDataButton();
@ -21,7 +21,7 @@ class syncHealthDataButton extends StatefulWidget {
}
class _syncHealthDataButtonState extends State<syncHealthDataButton> {
List<HealthDataPoint> _healthDataList = [];
// List<HealthDataPoint> _healthDataList = [];
List<healthData> Med_InsertTransactionsInputsList = [];
List<healthData> Med_InsertTransactionsInputsList2 = [];
@ -35,7 +35,7 @@ class _syncHealthDataButtonState extends State<syncHealthDataButton> {
int MedCategoryID = 0;
// HealthFactory health = HealthFactory();
List<HealthDataType> types = [HealthDataType.STEPS, HealthDataType.HEART_RATE, Platform.isAndroid ? HealthDataType.DISTANCE_DELTA : HealthDataType.DISTANCE_WALKING_RUNNING];
// List<HealthDataType> types = [HealthDataType.STEPS, HealthDataType.HEART_RATE, Platform.isAndroid ? HealthDataType.DISTANCE_DELTA : HealthDataType.DISTANCE_WALKING_RUNNING];
@override
void initState() {
@ -91,32 +91,32 @@ class _syncHealthDataButtonState extends State<syncHealthDataButton> {
// _healthDataList = HealthFactory.removeDuplicates(_healthDataList);
_healthDataList.forEach((x) {
if (x.type == HealthDataType.STEPS) {
Med_InsertTransactionsInputsList.add(healthData(
MedCategoryID: 6,
MedSubCategoryID: MedSubCategoryID,
MachineDate: DateUtil.convertDateToString(x.dateFrom),
Value: double.tryParse(x.value.toString()),
TransactionsListID: TransactionsListID++));
}
if (x.type == HealthDataType.HEART_RATE) {
Med_InsertTransactionsInputsList.add(healthData(
MedCategoryID: 3,
MedSubCategoryID: MedSubCategoryID,
MachineDate: DateUtil.convertDateToString(x.dateFrom),
Value: double.tryParse(x.value.toString()),
TransactionsListID: TransactionsListID++));
}
if (x.type == HealthDataType.DISTANCE_DELTA || x.type == HealthDataType.DISTANCE_WALKING_RUNNING) {
Med_InsertTransactionsInputsList.add(healthData(
MedCategoryID: 7,
MedSubCategoryID: MedSubCategoryID,
MachineDate: DateUtil.convertDateToString(x.dateFrom),
Value: double.tryParse(x.value.toString()),
TransactionsListID: TransactionsListID++));
}
});
// _healthDataList.forEach((x) {
// if (x.type == HealthDataType.STEPS) {
// Med_InsertTransactionsInputsList.add(healthData(
// MedCategoryID: 6,
// MedSubCategoryID: MedSubCategoryID,
// MachineDate: DateUtil.convertDateToString(x.dateFrom),
// Value: double.tryParse(x.value.toString()),
// TransactionsListID: TransactionsListID++));
// }
// if (x.type == HealthDataType.HEART_RATE) {
// Med_InsertTransactionsInputsList.add(healthData(
// MedCategoryID: 3,
// MedSubCategoryID: MedSubCategoryID,
// MachineDate: DateUtil.convertDateToString(x.dateFrom),
// Value: double.tryParse(x.value.toString()),
// TransactionsListID: TransactionsListID++));
// }
// if (x.type == HealthDataType.DISTANCE_DELTA || x.type == HealthDataType.DISTANCE_WALKING_RUNNING) {
// Med_InsertTransactionsInputsList.add(healthData(
// MedCategoryID: 7,
// MedSubCategoryID: MedSubCategoryID,
// MachineDate: DateUtil.convertDateToString(x.dateFrom),
// Value: double.tryParse(x.value.toString()),
// TransactionsListID: TransactionsListID++));
// }
// });
getAllHealthDataLists();
}

@ -149,6 +149,7 @@ class LineChartCurvedBloodPressure extends StatelessWidget {
titlesData: FlTitlesData(
bottomTitles: AxisTitles(
sideTitles: SideTitles(
showTitles: true,
getTitlesWidget: (value, title) {
TextStyle style = TextStyle(
@ -189,6 +190,16 @@ class LineChartCurvedBloodPressure extends StatelessWidget {
// margin: 22,
),
),
topTitles: AxisTitles(
sideTitles: SideTitles(
showTitles: false,
),
),
rightTitles: AxisTitles(
sideTitles: SideTitles(
showTitles: false,
),
),
leftTitles: AxisTitles(
sideTitles: SideTitles(
showTitles: true,
@ -197,6 +208,16 @@ class LineChartCurvedBloodPressure extends StatelessWidget {
// fontWeight: FontWeight.bold,
// fontSize: 10,
// ),
getTitlesWidget: (cxt, value) {
var style = TextStyle(
color: Colors.black,
fontSize: 9,
);
return Text(
"${value.formattedValue}",
style: style,
);
},
interval: getMaxY() - getMinY() <= 500
? 50
: getMaxY() - getMinY() <= 1000
@ -277,7 +298,7 @@ class LineChartCurvedBloodPressure extends StatelessWidget {
spots: spots,
isCurved: true,
color: Colors.red,
barWidth: 1.5,
barWidth: 3,
isStrokeCapRound: true,
dotData: FlDotData(
show: false,
@ -290,7 +311,7 @@ class LineChartCurvedBloodPressure extends StatelessWidget {
spots: spots2,
isCurved: true,
color: Theme.of(context).primaryColor,
barWidth: 1.5,
barWidth: 3,
isStrokeCapRound: true,
dotData: FlDotData(
show: false,

@ -336,13 +336,19 @@ class ClinicListService extends BaseService {
}
Future<Map> getCurrentWeekIDAndDay(BuildContext context) async {
Map<String, dynamic> request;
// request = {"ProjectID": projectID, "MealScheduleID": patientID};
request = {};
dynamic localRes;
await baseAppClient.get(GET_CURRENT_WEEKID_WEEKDAY, isExternal: false, isRCService: false, onSuccess: (response, statusCode) async {
await baseAppClient.post(GET_CURRENT_WEEKID_WEEKDAY, isExternal: false, isRCService: false, onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
});
return localRes;
}, body: request);
// return localRes;
return Future.value(localRes);
}
Future<Map> getMealsOfScheduleID(int projectID, int admissionNo, int dietType, int weekID, int weekDay, context) async {

@ -173,7 +173,8 @@ class PayfortService extends BaseService {
customerName: customerName!,
customerEmail: customerEmail!,
// orderDescription: orderDescription!,
orderDescription: "Dr. Sulaiman Al Habib Hospital",
// orderDescription: "Dr. Sulaiman Al Habib Hospital",
orderDescription: "Red Sea Health",
sdkToken: sdkTokenResponse?.sdkToken ?? '',
merchantReference: merchantReference!,
currency: currency,

@ -7,11 +7,10 @@ import 'package:permission_handler/permission_handler.dart';
import 'package:geolocator/geolocator.dart' as geo;
class PermissionService extends BaseService {
late LocalStorage storage;
PermissionService(){
initLocalStorage();
storage = localStorage;
}
LocalStorage? storage;
geo.LocationPermission? locationPermission;
AppGlobal appGlobal = new AppGlobal();

@ -170,11 +170,10 @@ class ShowChart extends StatelessWidget {
getTitlesWidget: (cxt, value) {
var style = TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 10,
fontSize: 9,
);
return Text(
"",
"${value.formattedValue}",
style: style,
);
},

@ -217,7 +217,7 @@ class _AppDrawerState extends State<AppDrawer> {
children: <Widget>[
(user!.isFamily == null || user!.isFamily == false)
? InkWell(
child: DrawerItem(TranslationBase.of(context).family, SvgPicture.asset("assets/images/new/family_files.svg"),
child: DrawerItem(TranslationBase.of(context).family, SvgPicture.asset("assets/images/new/family_files.svg", width: 20, height: 20),
isImageIcon: true,
bottomLine: false,
textColor: CustomColors.black,
@ -259,7 +259,7 @@ class _AppDrawerState extends State<AppDrawer> {
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Expanded(
child: SvgPicture.asset("assets/images/new/family_files.svg"),
child: SvgPicture.asset("assets/images/new/family_files.svg", width: 20, height: 20),
),
Expanded(
flex: 7,
@ -389,7 +389,7 @@ class _AppDrawerState extends State<AppDrawer> {
children: [
DrawerItem(
TranslationBase.of(context).notification,
SvgPicture.asset("assets/images/new/notifications.svg"),
SvgPicture.asset("assets/images/new/notifications.svg", width: 20, height: 20),
isImageIcon: true,
bottomLine: false,
letterSpacing: -0.84,
@ -430,7 +430,7 @@ class _AppDrawerState extends State<AppDrawer> {
),
if (projectProvider!.havePrivilege(3))
InkWell(
child: DrawerItem(TranslationBase.of(context).appsetting, SvgPicture.asset("assets/images/new/app_setting.svg"),
child: DrawerItem(TranslationBase.of(context).appsetting, SvgPicture.asset("assets/images/new/app_setting.svg", width: 20, height: 20),
isImageIcon: true, bottomLine: false, letterSpacing: -0.84, fontSize: 14, projectProvider: projectProvider),
onTap: () {
Navigator.of(context).pushNamed(
@ -452,7 +452,7 @@ class _AppDrawerState extends State<AppDrawer> {
},
),
InkWell(
child: DrawerItem(TranslationBase.of(context).logout, SvgPicture.asset("assets/images/new/logout.svg"),
child: DrawerItem(TranslationBase.of(context).logout, SvgPicture.asset("assets/images/new/logout.svg", width: 20, height: 20),
isImageIcon: true, bottomLine: false, letterSpacing: -0.84, fontSize: 14, projectProvider: projectProvider),
onTap: () {
logout();
@ -461,7 +461,7 @@ class _AppDrawerState extends State<AppDrawer> {
],
)
: InkWell(
child: DrawerItem(TranslationBase.of(context).loginregister, SvgPicture.asset("assets/images/new/logout.svg"),
child: DrawerItem(TranslationBase.of(context).loginregister, SvgPicture.asset("assets/images/new/logout.svg", width: 20, height: 20),
isImageIcon: true, letterSpacing: -0.84, fontSize: 14, bottomLine: false, projectProvider: projectProvider),
onTap: () {
login();

@ -40,7 +40,9 @@ 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/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
// static String SERVICE_URL = 'https://rsgwebservices.hmg.com/Payment/pages/RsgSendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
static String SERVICE_URL = 'https://rsgpayment.hmg.com/pages/RsgSendPayFortRequest.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

@ -32,6 +32,8 @@ class SMSOTP {
static bool? _loading;
bool _isDialogActive = false;
SMSOTP(
this.context,
this.type,
@ -90,7 +92,12 @@ class SMSOTP {
// }
return showDialog(
// Reset state for fresh dialog
_isDialogActive = true;
remainingTime = 120;
displayTime = '';
var result = await showDialog(
context: context,
barrierColor: Colors.black.withOpacity(0.63),
builder: (context) {
@ -129,7 +136,10 @@ class SMSOTP {
icon: Icon(Icons.close),
constraints: BoxConstraints(),
onPressed: () {
Navigator.pop(context);
_isDialogActive = false;
if (Navigator.canPop(context)) {
Navigator.pop(context);
}
this.onFailure();
},
@ -186,6 +196,11 @@ class SMSOTP {
}),
);
});
// Clean up when dialog is dismissed
_isDialogActive = false;
return result;
}
TextStyle buildTextStyle() {
@ -263,27 +278,38 @@ class SMSOTP {
}
startTimer(setState) {
if (!_isDialogActive) return; // Don't proceed if dialog is no longer active
this.remainingTime--;
setState(() {
displayTime = this.getSecondsAsDigitalClock(this.remainingTime);
});
// Check again before calling setState to ensure dialog is still active
if (_isDialogActive) {
setState(() {
displayTime = this.getSecondsAsDigitalClock(this.remainingTime);
});
}
timer = Future.delayed(Duration(seconds: 1), () {
if (this.remainingTime > 0) {
if (_isDialogActive && this.remainingTime > 0) {
startTimer(setState);
} else {
Navigator.pop(context);
} else if (_isDialogActive && this.remainingTime <= 0) {
_isDialogActive = false;
if (Navigator.canPop(context)) {
Navigator.pop(context);
}
}
});
}
static void hideSMSBox(context) {
Navigator.pop(context);
if (Navigator.canPop(context)) {
Navigator.pop(context);
}
}
_onOtpCallBack(String otpCode, bool isAutofill) {
if (otpCode.length == 4) {
_isDialogActive = false; // Stop the timer when OTP is entered
onSuccess(otpCode);
}
}

@ -1,8 +1,8 @@
name: diplomaticquarterapp
description: A new Flutter application.
#version: 4.6.030+1
version: 4.6.0984+40500984
version: 0.0.1+1
#version: 4.6.0984+40500984
environment:
# sdk: ">=3.0.0 <3.13.0"
@ -95,7 +95,7 @@ dependencies:
jiffy: ^6.2.1
#Flutter WebRTC
screen_brightness: ^2.1.5
# screen_brightness: ^2.1.5
map_launcher: ^3.0.1
flutter_countdown_timer: ^4.1.0
carousel_slider: ^5.0.0

Loading…
Cancel
Save