Merge branch 'dev_v3.13.6' of http://34.17.52.180/Haroon6138/diplomatic-quarter into dev_v3.13.6_CR_7211_Lab_report_changes

# Conflicts:
#	android/app/build.gradle
#	android/app/src/main/AndroidManifest.xml
#	android/build.gradle
#	android/gradle.properties
#	android/settings.gradle
#	lib/config/localized_values.dart
#	lib/pages/medical/labs/laboratory_result_page.dart
#	lib/uitl/translations_delegate_base.dart
#	lib/widgets/data_display/medical/LabResult/Lab_Result_details_wideget.dart
#	lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart
#	pubspec.yaml
merge-update-with-lab-changes
taha.alam 12 months ago
commit 9047ebf723

@ -58,6 +58,7 @@ android {
namespace = "com.ejada.hmg"
buildFeatures {
viewBinding true
dataBinding true
}
sourceSets {
@ -137,9 +138,8 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
jvmTarget = '1.8'
}
}
flutter {
@ -189,6 +189,10 @@ dependencies {
implementation 'com.squareup.okhttp3:okhttp:4.10.0'
implementation 'androidx.test.ext:junit:1.1.5'
implementation 'com.android.volley:volley:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
implementation 'androidx.navigation:navigation-fragment-ktx:2.8.5'
implementation 'androidx.navigation:navigation-ui-ktx:2.8.5'
implementation 'androidx.activity:activity:1.9.3'
def room_version = "2.4.0-alpha04"
implementation "androidx.room:room-runtime:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version"
@ -218,7 +222,10 @@ dependencies {
implementation 'com.google.android.material:material:1.9.0'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.22'
androidTestImplementation "androidx.test:core:1.4.0"
implementation 'com.airbnb.android:lottie:5.2.0'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.22'
// implementation 'com.airbnb.android:lottie:5.2.0'
// implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.22'
implementation 'com.whatsapp.otp:whatsapp-otp-android-sdk:0.1.0'
implementation 'com.whatsapp.otp:whatsapp-otp-android-sdk:0.1.0'
}

@ -1,51 +1,82 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.ejada.hmg">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
<!--
io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<uses-permission android:name="android.permission.ACTIVITY_RECOGNITION" tools:node="remove"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE" tools:node="remove"/>
<!-- <uses-permission android:name="android.permission.BLUETOOTH" tools:node="remove"/>-->
<!-- <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" tools:node="remove"/>-->
<!-- <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" tools:node="remove"/>-->
<!-- <uses-permission android:name="android.permission.BLUETOOTH_SCAN" tools:node="remove"/>-->
<uses-permission android:name="android.permission.BROADCAST_STICKY" tools:node="remove"/>
<uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove"/>
<!-- <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />-->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" tools:node="remove"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE" tools:node="remove"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_PHONE_CALL" tools:node="remove"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" tools:node="remove"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" tools:node="remove"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" tools:node="remove"/>
FlutterApplication and put your custom class here.
-->
<uses-permission
android:name="android.permission.ACTIVITY_RECOGNITION"
tools:node="remove" />
<uses-permission
android:name="android.permission.READ_PHONE_STATE"
tools:node="remove" /> <!-- <uses-permission android:name="android.permission.BLUETOOTH" tools:node="remove"/> -->
<!-- <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" tools:node="remove"/> -->
<!-- <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" tools:node="remove"/> -->
<!-- <uses-permission android:name="android.permission.BLUETOOTH_SCAN" tools:node="remove"/> -->
<uses-permission
android:name="android.permission.BROADCAST_STICKY"
tools:node="remove" />
<uses-permission
android:name="com.google.android.gms.permission.AD_ID"
tools:node="remove" /> <!-- <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> -->
<uses-permission
android:name="android.permission.FOREGROUND_SERVICE"
tools:node="remove" />
<uses-permission
android:name="android.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE"
tools:node="remove" />
<uses-permission
android:name="android.permission.FOREGROUND_SERVICE_PHONE_CALL"
tools:node="remove" />
<uses-permission
android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION"
tools:node="remove" />
<uses-permission
android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK"
tools:node="remove" />
<uses-permission
android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE"
tools:node="remove" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" tools:node="remove" />
<!-- <uses-permission android:name="android.permission.INTERNET" />-->
<!-- <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />-->
<uses-permission
android:name="android.permission.ACCESS_BACKGROUND_LOCATION"
tools:node="remove" /> <!-- <uses-permission android:name="android.permission.INTERNET" /> -->
<!-- <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.HIGH_SAMPLING_RATE_SENSORS" />
<uses-feature android:name="android.hardware.sensor.stepcounter" android:required="false" tools:node="replace"/>
<uses-feature android:name="android.hardware.sensor.stepdetector" android:required="false" tools:node="replace"/>
<uses-feature
android:name="android.hardware.sensor.stepcounter"
android:required="false"
tools:node="replace" />
<uses-feature
android:name="android.hardware.sensor.stepdetector"
android:required="false"
tools:node="replace" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.DISABLE_KEYGUARD"/>
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera.autofocus"/>
<uses-feature android:name="android.hardware.camera" android:required="true"/>
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-feature
android:name="android.hardware.camera"
android:required="true" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
@ -53,107 +84,146 @@
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-feature android:name="android.hardware.location.network" android:required="false" />
<uses-feature android:name="android.hardware.location.gps" android:required="false" />
<uses-permission android:name="com.huawei.appmarket.service.commondata.permission.GET_COMMON_DATA"/>
<!-- <uses-permission android:name="android.permission.HIGH_SAMPLING_RATE_SENSORS" />-->
<uses-feature
android:name="android.hardware.location.network"
android:required="false" />
<uses-feature
android:name="android.hardware.location.gps"
android:required="false" />
<!-- Wifi Permissions-->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
<!-- <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>-->
<!-- Detect Reboot Permission -->
<!-- <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>-->
<uses-permission android:name="com.huawei.appmarket.service.commondata.permission.GET_COMMON_DATA" /> <!-- <uses-permission android:name="android.permission.HIGH_SAMPLING_RATE_SENSORS" /> -->
<!-- Wifi Permissions -->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> <!-- <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/> -->
<!-- Detect Reboot Permission -->
<!-- <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> -->
<queries>
<intent>
<action android:name="android.speech.RecognitionService" />
</intent>
<package android:name="com.whatsapp" />
<package android:name="com.whatsapp.w4b" />
</queries>
<application
android:name=".Application"
android:label="Dr. Alhabib"
android:icon="@mipmap/ic_launcher_local"
android:usesCleartextTraffic="true"
android:showOnLockScreen="true"
android:screenOrientation="sensorPortrait"
android:allowBackup="false"
android:extractNativeLibs="true"
tools:replace="android:extractNativeLibs,android:label"
>
android:icon="@mipmap/ic_launcher_local"
android:label="Dr. Alhabib"
android:screenOrientation="sensorPortrait"
android:showOnLockScreen="true"
android:usesCleartextTraffic="true"
tools:replace="android:extractNativeLibs,android:label">
<activity
android:name=".WhatsAppCodeActivity"
android:exported="true"
android:enabled="true"
android:launchMode="standard"
>
<intent-filter>
<action android:name="com.whatsapp.otp.OTP_RETRIEVED" />
</intent-filter>
</activity>
<meta-data
android:name="push_kit_auto_init_enabled"
android:value="true" />
<meta-data android:name="push_kit_auto_init_enabled" android:value="true" />
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:enabled="true"
android:exported="true"
android:hardwareAccelerated="true"
android:launchMode="singleTop"
android:showOnLockScreen="true"
android:theme="@style/LaunchTheme"
android:exported="true"
tools:node="merge"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
android:windowSoftInputMode="adjustResize"
tools:node="merge">
<!--
Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
to determine the Window background behind the Flutter UI.
-->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" />
<!-- Displays an Android View that continues showing the launch screen
<!--
Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
Flutter's first frame.
-->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="FLUTTER_NOTIFICATION_CLICK" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</activity> <!-- <receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver" android:exported="true"> -->
<!-- <intent-filter> -->
<!-- <action android:name="android.intent.action.BOOT_COMPLETED"/> -->
<!-- <action android:name="android.intent.action.MY_PACKAGE_REPLACED"/> -->
<!-- </intent-filter> -->
<!-- </receiver> -->
<!-- Geofencing -->
<service
android:name=".geofence.intent_receivers.GeofenceTransitionsJobIntentService"
android:exported="true"
android:permission="android.permission.BIND_JOB_SERVICE" />
<!-- <receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver" android:exported="true">-->
<!-- <intent-filter>-->
<!-- <action android:name="android.intent.action.BOOT_COMPLETED"/>-->
<!-- <action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>-->
<!-- </intent-filter>-->
<!-- </receiver>-->
<!-- Geofencing -->
<service android:name=".geofence.intent_receivers.GeofenceTransitionsJobIntentService" android:exported="true" android:permission="android.permission.BIND_JOB_SERVICE" />
<receiver android:name=".geofence.intent_receivers.GeofenceBroadcastReceiver" android:enabled="true" android:exported="false" />
<receiver android:name=".geofence.intent_receivers.GeofencingRebootBroadcastReceiver" android:enabled="true" android:exported="false">
<receiver
android:name=".geofence.intent_receivers.GeofenceBroadcastReceiver"
android:enabled="true"
android:exported="false" />
<receiver
android:name=".geofence.intent_receivers.GeofencingRebootBroadcastReceiver"
android:enabled="true"
android:exported="false">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
</intent-filter>
</receiver>
<receiver android:name=".geofence.intent_receivers.LocationProviderChangeReceiver" android:exported="false">
<receiver
android:name=".geofence.intent_receivers.LocationProviderChangeReceiver"
android:exported="false">
<intent-filter>
<action android:name="android.location.PROVIDERS_CHANGED"/>
<action android:name="android.location.PROVIDERS_CHANGED" />
</intent-filter>
</receiver>
<service android:name=".geofence.intent_receivers.ReregisterGeofenceJobService" android:exported="true" android:permission="android.permission.BIND_JOB_SERVICE" />
<!-- Geofencing -->
<service
android:name=".geofence.intent_receivers.ReregisterGeofenceJobService"
android:exported="true"
android:permission="android.permission.BIND_JOB_SERVICE" /> <!-- Geofencing -->
<!--
Huawei Push Notifications
Set push kit auto enable to true (for obtaining the token on initialize)
-->
<!-- <meta-data-->
<!-- android:name="push_kit_auto_init_enabled"-->
<!-- android:value="true" />-->
<!-- <meta-data -->
<!-- android:name="push_kit_auto_init_enabled" -->
<!-- android:value="true" /> -->
<!-- These receivers are for sending scheduled local notifications -->
<receiver android:name="com.huawei.hms.flutter.push.receiver.local.HmsLocalNotificationBootEventReceiver" android:exported="false">
<receiver
android:name="com.huawei.hms.flutter.push.receiver.local.HmsLocalNotificationBootEventReceiver"
android:exported="false">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
@ -169,26 +239,17 @@
<intent-filter>
<action android:name="com.huawei.hms.flutter.push.receiver.BACKGROUND_REMOTE_MESSAGE" />
</intent-filter>
</receiver>
<!-- Huawei Push Notifications -->
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8"/>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
</receiver> <!-- Huawei Push Notifications -->
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8" />
<!--
Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java
-->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
<!-- <uses-permission android:name="android.permission.INTERNET" />-->
<!-- <uses-permission android:name="android.permission.USE_FINGERPRINT" />-->
<!-- <uses-permission android:name="android.permission.READ_CALENDAR" />-->
<!-- <uses-permission android:name="android.permission.WRITE_CALENDAR" />-->
</manifest>
</manifest>

@ -1,4 +1,5 @@
package com.ejada.hmg
import android.app.PendingIntent
import android.content.Intent
import android.content.pm.PackageManager
import android.os.Build
@ -7,10 +8,14 @@ import android.view.WindowManager
import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi
import com.cloud.diplomaticquarterapp.PenguinInPlatformBridge
import com.cloud.diplomaticquarterapp.whatsapp.AppSignatureRetriever
import com.ejada.hmg.utils.*
import io.flutter.embedding.android.FlutterFragmentActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugins.GeneratedPluginRegistrant
import com.cloud.diplomaticquarterapp.whatsapp.WhatsApp
import com.cloud.diplomaticquarterapp.whatsapp.WhatsAppOtpPlatformBridge
class MainActivity: FlutterFragmentActivity() {
@RequiresApi(Build.VERSION_CODES.O)
@ -22,8 +27,9 @@ class MainActivity: FlutterFragmentActivity() {
PlatformBridge(flutterEngine, this).create()
OpenTokPlatformBridge(flutterEngine, this).create()
PenguinInPlatformBridge(flutterEngine, this).create()
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
WhatsAppOtpPlatformBridge(flutterEngine, this).invoke()
AppSignatureRetriever().logSignatures(this)
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {x
// val mChannel = NotificationChannel("video_call_noti", "video call", NotificationManager.IMPORTANCE_HIGH)
// val soundUri = Uri.parse("android.resource://" + getApplicationContext()
// .getPackageName() + "/" + R.raw.alert)

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

@ -0,0 +1,81 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
package com.cloud.diplomaticquarterapp.whatsapp;
import static java.sql.DriverManager.println;
import android.content.Context;
import android.content.ContextWrapper;
import android.content.pm.PackageManager;
import android.content.pm.Signature;
import android.util.Base64;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
import java.util.Collection;
import java.util.stream.Collectors;
public class AppSignatureRetriever {
private static final String HASH_TYPE = "SHA-256";
public static final int NUM_HASHED_BYTES = 9;
public static final int NUM_BASE64_CHAR = 11;
public void logSignatures(Context context) {
Collection<String> appSignatures = getAppSignatures(context);
appSignatures.forEach(signature -> println("Signature: " + signature));
}
/**
* Get all the app signatures for the current package.
*
* @return signatures for current app
*/
public Collection<String> getAppSignatures(Context context) {
try {
// Get all package signatures for the current package
String packageName = context.getPackageName();
println("Package name: " + packageName);
PackageManager packageManager = context.getPackageManager();
Signature[] signatures = packageManager.getPackageInfo(packageName,
PackageManager.GET_SIGNATURES).signatures;
// For each signature create a compatible hash
Collection<String> appCodes = Arrays.stream(signatures)
.map(signature -> hash(packageName, signature.toCharsString()))
.collect(Collectors.toList());
return appCodes;
} catch (PackageManager.NameNotFoundException e) {
println("Unable to find package to obtain hash.");
throw new RuntimeException("Unable to find package to obtain hash.", e);
}
}
private String hash(String packageName, String signature) {
String appInfo = packageName + " " + signature;
try {
MessageDigest messageDigest = MessageDigest.getInstance(HASH_TYPE);
messageDigest.update(appInfo.getBytes(StandardCharsets.UTF_8));
byte[] hashSignature = messageDigest.digest();
// truncated into NUM_HASHED_BYTES
hashSignature = Arrays.copyOfRange(hashSignature, 0, NUM_HASHED_BYTES);
// encode into Base64
String base64Hash = Base64.encodeToString(hashSignature, Base64.NO_PADDING | Base64.NO_WRAP);
base64Hash = base64Hash.substring(0, NUM_BASE64_CHAR);
println(String.format("pkg: %s -- hash: %s", packageName, base64Hash));
return base64Hash;
} catch (NoSuchAlgorithmException e) {
throw new RuntimeException("Unable to generate hash for application", e);
}
}
}

@ -0,0 +1,31 @@
package com.cloud.diplomaticquarterapp.whatsapp
import android.content.Context
import android.content.Intent
import com.whatsapp.otp.android.sdk.WhatsAppOtpHandler
import com.whatsapp.otp.android.sdk.WhatsAppOtpIncomingIntentHandler
import java.lang.ref.WeakReference
object WhatsApp {
val whatsAppOtpHandler = WhatsAppOtpHandler()
inline fun handleOTP ( intent: Intent, crossinline validateOTP:(code: String )-> Unit) =
WhatsAppOtpIncomingIntentHandler().processOtpCode(
intent,
// call your function to validate
{code -> validateOTP(code) },
{error,exception->
println("the error is ${error.name}")
println("the exception stacktrace is ${exception.message}")
println("the exception is cause ${exception.cause}")
})
fun performHandShake(context : WeakReference<Context>) = whatsAppOtpHandler.sendOtpIntentToWhatsApp(context.get()!!)
fun isWhatsAppInstalled(context : WeakReference<Context>) : Boolean = whatsAppOtpHandler.isWhatsAppInstalled(context.get()!!)
}

@ -0,0 +1,17 @@
package com.ejada.hmg
import android.app.PendingIntent
import android.content.Intent
import android.os.Bundle
import com.cloud.diplomaticquarterapp.whatsapp.WhatsApp
import com.cloud.diplomaticquarterapp.whatsapp.WhatsAppOtpPlatformBridge
import io.flutter.embedding.android.FlutterFragmentActivity
class WhatsAppCodeActivity : FlutterFragmentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
WhatsApp.handleOTP(intent){code ->
WhatsAppOtpPlatformBridge.result?.success(code);
finish()
}
}
}

@ -0,0 +1,52 @@
package com.cloud.diplomaticquarterapp.whatsapp
import android.os.Build
import android.util.Log
import androidx.annotation.RequiresApi
import com.cloud.diplomaticquarterapp.penguin.PenguinView
import com.ejada.hmg.MainActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel
import java.lang.ref.WeakReference
class WhatsAppOtpPlatformBridge(
private var flutterEngine: FlutterEngine,
private var mainActivity: MainActivity
) {
private lateinit var channel: MethodChannel
companion object {
private const val CHANNEL = "whats_app_otp"
var result: MethodChannel.Result? = null
}
fun invoke() {
channel = MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL)
channel.setMethodCallHandler { call: MethodCall, result: MethodChannel.Result ->
when (call.method) {
"isWhatsAppInstalled" -> {
val isAppInstalled =
WhatsApp.isWhatsAppInstalled(WeakReference(mainActivity))
result.success(isAppInstalled)
}
"performHandShake" -> {
WhatsApp.performHandShake(WeakReference(mainActivity))
}
"startListening" -> {
WhatsAppOtpPlatformBridge.result = result
}
else -> {
result.notImplemented()
}
}
}
}
}

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".WhatsAppCodeActivity">
</androidx.constraintlayout.widget.ConstraintLayout>

@ -1,23 +1,23 @@
<resources>
<string name="app_name">HMG Patient App</string>
<string name="app_name">HMG Patient App</string>
<string name="geofence_unknown_error">
<string name="geofence_unknown_error">
Unknown error: the Geofence service is not available now.
</string>
<string name="geofence_not_available">
<string name="geofence_not_available">
Geofence service is not available now. Go to Settings>Location>Mode and choose High accuracy.
</string>
<string name="geofence_too_many_geofences">
<string name="geofence_too_many_geofences">
Your app has registered too many geofences.
</string>
<string name="geofence_too_many_pending_intents">
<string name="geofence_too_many_pending_intents">
You have provided too many PendingIntents to the addGeofences() call.
</string>
<string name="GEOFENCE_INSUFFICIENT_LOCATION_PERMISSION">
<string name="GEOFENCE_INSUFFICIENT_LOCATION_PERMISSION">
App do not have permission to access location service.
</string>
<string name="GEOFENCE_REQUEST_TOO_FREQUENT">
<string name="GEOFENCE_REQUEST_TOO_FREQUENT">
Geofence requests happened too frequently.
</string>
<string name="mapbox_access_token" translatable="false">sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg</string>
<string name="mapbox_access_token" translatable="false">sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg</string>
</resources>

@ -21,7 +21,7 @@ buildscript {
credentials {
username = 'mapbox'
password = "sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg"
password = "sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg"
// password = "pk.eyJ1IjoicndhaWQiLCJhIjoiY2x5cGo4aHNjMGNsbTJyc2djempobGQxaSJ9.RCaC6WrUt4A4YnZNfxnONQ"
if (password == null || password == "") {
throw new GradleException("MAPBOX_DOWNLOADS_TOKEN isn't set. Set it to the project properties or to the enviroment variables.")

@ -5,6 +5,6 @@ android.enableJetifier=true
android.defaults.buildfeatures.buildconfig=true
android.suppressUnsupportedCompileSdk=33
MAPBOX_USER_NAME = "mapbox"
MAPBOX_DOWNLOADS_TOKEN="sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg"
#MAPBOX_DOWNLOADS_TOKEN="pk.eyJ1IjoicndhaWQiLCJhIjoiY2x5cGo4aHNjMGNsbTJyc2djempobGQxaSJ9.RCaC6WrUt4A4YnZNfxnONQ"
kotlin.jvm.target.validation.mode=IGNORE
#MAPBOX_DOWNLOADS_TOKEN="sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg"
MAPBOX_DOWNLOADS_TOKEN="pk.eyJ1IjoicndhaWQiLCJhIjoiY2x5cGo4aHNjMGNsbTJyc2djempobGQxaSJ9.RCaC6WrUt4A4YnZNfxnONQ"

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

@ -33,7 +33,8 @@ target 'Runner' do
pod 'OpenTok', '~> 2.22.0'
pod 'VTO2Lib'
pod 'MapboxMaps', '10.18.2'
pod 'MapboxMaps', '10.19.0'
pod 'MapboxNavigation', '2.19.0'
pod 'FLAnimatedImage'
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))

@ -14,15 +14,16 @@
306FE6C8271D790C002D6EFC /* OpenTokPlatformBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 306FE6C7271D790C002D6EFC /* OpenTokPlatformBridge.swift */; };
306FE6CB271D8B73002D6EFC /* OpenTok.swift in Sources */ = {isa = PBXBuildFile; fileRef = 306FE6CA271D8B73002D6EFC /* OpenTok.swift */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
47C935002C91766800981BA7 /* Penguin.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 47C934FC2C91766400981BA7 /* Penguin.xcframework */; };
47C935012C91766800981BA7 /* Penguin.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 47C934FC2C91766400981BA7 /* Penguin.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
47C935022C91766900981BA7 /* PenguinINRenderer.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 47C934FA2C91766400981BA7 /* PenguinINRenderer.xcframework */; };
47C935032C91766900981BA7 /* PenguinINRenderer.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 47C934FA2C91766400981BA7 /* PenguinINRenderer.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
47C935042C91766A00981BA7 /* PenNavUI.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 47C934FB2C91766400981BA7 /* PenNavUI.xcframework */; };
47C935052C91766A00981BA7 /* PenNavUI.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 47C934FB2C91766400981BA7 /* PenNavUI.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
55DE18989C1F69DC483B9FB6 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C56AF9B31AA04A5292EEA39F /* Pods_Runner.framework */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
762D738E274E42650063CE73 /* ring_30Sec.caf in Resources */ = {isa = PBXBuildFile; fileRef = 762D738C274E42650063CE73 /* ring_30Sec.caf */; };
762D738F274E42650063CE73 /* ring_30Sec.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 762D738D274E42650063CE73 /* ring_30Sec.mp3 */; };
7651B82F2D3E9CA40066B33A /* PenguinINRenderer.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7651B82C2D3E9CA40066B33A /* PenguinINRenderer.xcframework */; };
7651B8302D3E9CA40066B33A /* PenguinINRenderer.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 7651B82C2D3E9CA40066B33A /* PenguinINRenderer.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
7651B8312D3E9CA40066B33A /* Penguin.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7651B82D2D3E9CA40066B33A /* Penguin.xcframework */; };
7651B8322D3E9CA40066B33A /* Penguin.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 7651B82D2D3E9CA40066B33A /* Penguin.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
7651B8332D3E9CA40066B33A /* PenNavUI.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7651B82E2D3E9CA40066B33A /* PenNavUI.xcframework */; };
7651B8342D3E9CA40066B33A /* PenNavUI.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 7651B82E2D3E9CA40066B33A /* PenNavUI.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
76815B27275F381C00E66E94 /* HealthKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76815B26275F381C00E66E94 /* HealthKit.framework */; };
76962ECE28AE5C10004EAE09 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 76962ECD28AE5C10004EAE09 /* GoogleService-Info.plist */; };
76D71B672C6B7F9C00DAFB84 /* HMGPenguinInPlatformBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76D71B662C6B7F9C00DAFB84 /* HMGPenguinInPlatformBridge.swift */; };
@ -51,19 +52,18 @@
E9C8C136256BACDA00EFFB62 /* HMG_Guest.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C8C135256BACDA00EFFB62 /* HMG_Guest.swift */; };
E9E27168256E3A4000F49B69 /* LocalizedFromFlutter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9E27167256E3A4000F49B69 /* LocalizedFromFlutter.swift */; };
E9F7623B25922BCE00FB5CCF /* FlutterConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9F7623A25922BCE00FB5CCF /* FlutterConstants.swift */; };
FD7241B0D73FB24C87572FAC /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E413842321D0D624872E9BE /* Pods_Runner.framework */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
768D81742C6DF6E4005C655F /* Embed Frameworks */ = {
7651B8352D3E9CA50066B33A /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
buildActionMask = 12;
dstPath = "";
dstSubfolderSpec = 10;
files = (
47C935032C91766900981BA7 /* PenguinINRenderer.xcframework in Embed Frameworks */,
47C935012C91766800981BA7 /* Penguin.xcframework in Embed Frameworks */,
47C935052C91766A00981BA7 /* PenNavUI.xcframework in Embed Frameworks */,
7651B8322D3E9CA40066B33A /* Penguin.xcframework in Embed Frameworks */,
7651B8302D3E9CA40066B33A /* PenguinINRenderer.xcframework in Embed Frameworks */,
7651B8342D3E9CA40066B33A /* PenNavUI.xcframework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
@ -71,6 +71,7 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
02C0468611167F0E858967A9 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
29631B9D2C96C7F600DF5916 /* PenguinNavigator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PenguinNavigator.swift; sourceTree = "<group>"; };
@ -79,10 +80,6 @@
306FE6C7271D790C002D6EFC /* OpenTokPlatformBridge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenTokPlatformBridge.swift; sourceTree = "<group>"; };
306FE6CA271D8B73002D6EFC /* OpenTok.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenTok.swift; sourceTree = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
47C934FA2C91766400981BA7 /* PenguinINRenderer.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = PenguinINRenderer.xcframework; path = Frameworks/PenguinINRenderer.xcframework; sourceTree = "<group>"; };
47C934FB2C91766400981BA7 /* PenNavUI.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = PenNavUI.xcframework; path = Frameworks/PenNavUI.xcframework; sourceTree = "<group>"; };
47C934FC2C91766400981BA7 /* Penguin.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Penguin.xcframework; path = Frameworks/Penguin.xcframework; sourceTree = "<group>"; };
6EE8819867EC2775AB578377 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
762D738C274E42650063CE73 /* ring_30Sec.caf */ = {isa = PBXFileReference; lastKnownFileType = file; name = ring_30Sec.caf; path = ../../assets/sounds/ring_30Sec.caf; sourceTree = "<group>"; };
@ -90,6 +87,9 @@
7643E4042BE0D0B400BD2F25 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/Main_Custom.strings; sourceTree = "<group>"; };
7643E4052BE0D0B400BD2F25 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/Main.strings; sourceTree = "<group>"; };
7643E4062BE0D0B400BD2F25 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/LaunchScreen.strings; sourceTree = "<group>"; };
7651B82C2D3E9CA40066B33A /* PenguinINRenderer.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = PenguinINRenderer.xcframework; path = Frameworks/PenguinINRenderer.xcframework; sourceTree = "<group>"; };
7651B82D2D3E9CA40066B33A /* Penguin.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Penguin.xcframework; path = Frameworks/Penguin.xcframework; sourceTree = "<group>"; };
7651B82E2D3E9CA40066B33A /* PenNavUI.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = PenNavUI.xcframework; path = Frameworks/PenNavUI.xcframework; sourceTree = "<group>"; };
76815B26275F381C00E66E94 /* HealthKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = HealthKit.framework; path = System/Library/Frameworks/HealthKit.framework; sourceTree = SDKROOT; };
76962ECD28AE5C10004EAE09 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
76D71B662C6B7F9C00DAFB84 /* HMGPenguinInPlatformBridge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HMGPenguinInPlatformBridge.swift; sourceTree = "<group>"; };
@ -99,8 +99,6 @@
76D71B6F2C6B81EA00DAFB84 /* PenguinViewFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PenguinViewFactory.swift; sourceTree = "<group>"; };
76F2556027F1FFED0062C1CD /* PassKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PassKit.framework; path = System/Library/Frameworks/PassKit.framework; sourceTree = SDKROOT; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
838788A2BEDC4910F4B029A6 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
8E413842321D0D624872E9BE /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
@ -108,6 +106,9 @@
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
9E4A8F0312C6AED5D3DC152C /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
C56AF9B31AA04A5292EEA39F /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D72A14381E2E5999FC41D0A8 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
E91B538D256AAA6500E96549 /* GlobalHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GlobalHelper.swift; sourceTree = "<group>"; };
E91B538E256AAA6500E96549 /* Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = "<group>"; };
E91B538F256AAA6500E96549 /* API.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = API.swift; sourceTree = "<group>"; };
@ -126,7 +127,6 @@
E9C8C135256BACDA00EFFB62 /* HMG_Guest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMG_Guest.swift; sourceTree = "<group>"; };
E9E27167256E3A4000F49B69 /* LocalizedFromFlutter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalizedFromFlutter.swift; sourceTree = "<group>"; };
E9F7623A25922BCE00FB5CCF /* FlutterConstants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlutterConstants.swift; sourceTree = "<group>"; };
F2C7D3C4718A1DED85DA3AD4 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -134,13 +134,13 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
7651B8312D3E9CA40066B33A /* Penguin.xcframework in Frameworks */,
76F2556127F1FFED0062C1CD /* PassKit.framework in Frameworks */,
76815B27275F381C00E66E94 /* HealthKit.framework in Frameworks */,
E9620805255C2ED100D3A35D /* NetworkExtension.framework in Frameworks */,
47C935042C91766A00981BA7 /* PenNavUI.xcframework in Frameworks */,
47C935002C91766800981BA7 /* Penguin.xcframework in Frameworks */,
47C935022C91766900981BA7 /* PenguinINRenderer.xcframework in Frameworks */,
FD7241B0D73FB24C87572FAC /* Pods_Runner.framework in Frameworks */,
7651B8332D3E9CA40066B33A /* PenNavUI.xcframework in Frameworks */,
7651B82F2D3E9CA40066B33A /* PenguinINRenderer.xcframework in Frameworks */,
55DE18989C1F69DC483B9FB6 /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -160,13 +160,13 @@
555EAAA626EFB641859EF0BE /* Frameworks */ = {
isa = PBXGroup;
children = (
47C934FC2C91766400981BA7 /* Penguin.xcframework */,
47C934FA2C91766400981BA7 /* PenguinINRenderer.xcframework */,
47C934FB2C91766400981BA7 /* PenNavUI.xcframework */,
7651B82D2D3E9CA40066B33A /* Penguin.xcframework */,
7651B82C2D3E9CA40066B33A /* PenguinINRenderer.xcframework */,
7651B82E2D3E9CA40066B33A /* PenNavUI.xcframework */,
76F2556027F1FFED0062C1CD /* PassKit.framework */,
76815B26275F381C00E66E94 /* HealthKit.framework */,
E9620804255C2ED100D3A35D /* NetworkExtension.framework */,
8E413842321D0D624872E9BE /* Pods_Runner.framework */,
C56AF9B31AA04A5292EEA39F /* Pods_Runner.framework */,
);
name = Frameworks;
sourceTree = "<group>";
@ -174,9 +174,9 @@
605039E5DDF72C245F9765FE /* Pods */ = {
isa = PBXGroup;
children = (
F2C7D3C4718A1DED85DA3AD4 /* Pods-Runner.debug.xcconfig */,
838788A2BEDC4910F4B029A6 /* Pods-Runner.release.xcconfig */,
6EE8819867EC2775AB578377 /* Pods-Runner.profile.xcconfig */,
D72A14381E2E5999FC41D0A8 /* Pods-Runner.debug.xcconfig */,
02C0468611167F0E858967A9 /* Pods-Runner.release.xcconfig */,
9E4A8F0312C6AED5D3DC152C /* Pods-Runner.profile.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
@ -293,15 +293,15 @@
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
6D0B2FE51DC05E2D0395E861 /* [CP] Check Pods Manifest.lock */,
BEE88E0BBD555ACCD7E82B57 /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
768D81742C6DF6E4005C655F /* Embed Frameworks */,
7651B8352D3E9CA50066B33A /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
487FDD6493EB9AE7D8E39485 /* [CP] Embed Pods Frameworks */,
4671D3CD126F6635F4B75A6E /* [CP] Copy Pods Resources */,
191312D8478950EB12CBDD28 /* [CP] Embed Pods Frameworks */,
4CC68CB45B720A365C7CF7DC /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@ -368,6 +368,23 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
191312D8478950EB12CBDD28 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
@ -384,7 +401,7 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin\n";
};
4671D3CD126F6635F4B75A6E /* [CP] Copy Pods Resources */ = {
4CC68CB45B720A365C7CF7DC /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@ -401,24 +418,22 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
487FDD6493EB9AE7D8E39485 /* [CP] Embed Pods Frameworks */ = {
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
name = "Run Script";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n";
};
6D0B2FE51DC05E2D0395E861 /* [CP] Check Pods Manifest.lock */ = {
BEE88E0BBD555ACCD7E82B57 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@ -440,21 +455,6 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Run Script";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@ -583,12 +583,13 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = 3A359E86ZF;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
"$(SRCROOT)/Frameworks",
);
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
@ -600,7 +601,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 4.5.991;
MARKETING_VERSION = 4.5.999;
PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -734,12 +735,13 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = 3A359E86ZF;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
"$(SRCROOT)/Frameworks",
);
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
@ -751,7 +753,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 4.5.991;
MARKETING_VERSION = 4.5.999;
PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -777,12 +779,13 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = 3A359E86ZF;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
"$(SRCROOT)/Frameworks",
);
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
@ -794,7 +797,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 4.5.991;
MARKETING_VERSION = 4.5.999;
PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";

@ -20,17 +20,14 @@ 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 = 'https://hmgwebservices.com/';
// var BASE_URL = 'http://10.20.200.111:1010/';
// var BASE_URL = 'http://10.50.100.198:2018/';
// var BASE_URL = 'https://uat.hmgwebservices.com/';
// var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'https://orash.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidamergeuat.cloudsolutions.com.sa/';
// var BASE_URL = 'https://webservices.hmg.com/';
var BASE_URL = 'https://webservices.hmg.com/';
// var BASE_URL = 'http://10.50.100.198:4422/';
@ -105,6 +102,7 @@ var GET_Patient_LAB_ORDERS_RESULT = 'Services/Patients.svc/REST/GetPatientLabOrd
var SEND_COVID_LAB_RESULT_EMAIL = 'Services/Notifications.svc/REST/GenerateCOVIDReport';
var COVID_PASSPORT_UPDATE = 'Services/Patients.svc/REST/Covid19_Certificate_PassportUpdate';
var GET_PATIENT_PASSPORT_NUMBER = 'Services/Patients.svc/REST/Covid19_Certificate_GetPassport';
var SEND_LAB_RESULT_EMAIL_NEW = 'ReportsAPI/api/reports/labReport';
var UPDATE_WORKPLACE_NAME = 'Services/Patients.svc/REST/ActivateSickLeave_FromVida';
var GET_SICKLEAVE_STATUS_ADMISSION_NO = 'Services/ChatBot_Service.svc/REST/GetSickLeaveStatusByAdmissionNo';
@ -355,7 +353,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.4;
var SETUP_ID = '91877';
var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0;
@ -695,6 +693,10 @@ 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';
var IS_DOCTOR_AVAILABLE_BY_CALENDAR_SCHEDULE = 'Services/OUTPs.svc/REST/HIS_IsDoctorAvailableByCalendarSchedule';
//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": "يرجى التأكد من تواجدك داخل موقع المستشفى لإجراء تسجيل الوصول عبر الإنترنت."},
@ -2015,47 +2018,53 @@ const Map localizedValues = {
"howToUseVerificationMethod": {"en": "How to use verification methods?", "ar": "كيفية استخدام طرق التحقق؟"},
"addToWaitingList": {"en": "Add to waiting list", "ar": "اضافه الى قائمة الانتظار"},
"searchClinic": {"en": "Search Clinic", "ar": "بحث العيادة"},
"enterMobileNumber": {"en": "Enter Mobile Number", "ar": "أدخل رقم الجوال"},
"videoCall": {"en": "Video Call", "ar": "اتصال فيديو"},
"audioCall": {"en": "Audio Call", "ar": "اتصال صوتية"},
"phoneCall": {"en": "Phone Call", "ar": "اتصال هاتفية"},
"selectCallType": {"en": "Select Call Type", "ar": "حدد نوع المكالمة"},
"selectedCallType": {"en": "Selected Call Type", "ar": "نوع المكالمة المحدد"},
"selectBranch": {"en": "Select Branch", "ar": "اختر الفرع"},
"searchByBranch": {"en": "Search By Branch Name", "ar": "البحث عن طريق اسم الفرع"},
"hospitalNavigationTitle": {"en": "Hospital", "ar": "الملاحة"},
"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": {
"en":
"I authorize the Hospital and their staff to conduct any diagnostic examinations, test (including, but not limited to, HIV, HBsAg and any other as the clinician may deem fit), procedures and to provide any medications, treatments or therapy necessary to effectively assess and maintain my health, and to assess, diagnose and treat my illness or injuries. I understand that it is the responsibility of my health care providers to explain the patient's condition and thereby reasons for any particular diagnostic examination, test or procedure, the available treatment options, the common risks, anticipated benefits associated with these options, alternative courses of treatment and possible outcomes of non-treatment.",
"I authorize the Hospital and their staff to conduct any diagnostic examinations, test (including, but not limited to, HIV, HBsAg and any other as the clinician may deem fit), procedures and to provide any medications, treatments or therapy necessary to effectively assess and maintain my health, and to assess, diagnose and treat my illness or injuries. I understand that it is the responsibility of my health care providers to explain the patient's condition and thereby reasons for any particular diagnostic examination, test or procedure, the available treatment options, the common risks, anticipated benefits associated with these options, alternative courses of treatment and possible outcomes of non-treatment.",
"ar":
"أفوض المستشفى وموظفيه بإجراء أية فحوصات واختبارات وإجراءات تشخيصية (بما في ذلك مثالاً وليس حصراً فحوصات أمراض الكبد الوبائية أو نقص المناعة المكتسبة أو أي فحوصات أخرى يرى الطبيب المعالج (مناسبتها وتقديم أية أدوية أو علاج ضروري لتقييم . صحتي والمحافظة عليها بفاعلية والتقييم وتشخيص ومعالجة مرضي او الإصابات اللاحقة بي، وأدرك بأنه من مسؤولية مقدمي الرعاية الصحية بيان أسباب أي فحص أو إختبار أو إجراء تشخيصي محدد وخيارات العلاج المتوفرة والمخاطرة الشائعة والمنافع المتوقعة المرتبطة بهذه الخيارات والعلاج البديل والنتائج المحتملة لرفض العلاج."
"أفوض المستشفى وموظفيه بإجراء أية فحوصات واختبارات وإجراءات تشخيصية (بما في ذلك مثالاً وليس حصراً فحوصات أمراض الكبد الوبائية أو نقص المناعة المكتسبة أو أي فحوصات أخرى يرى الطبيب المعالج (مناسبتها وتقديم أية أدوية أو علاج ضروري لتقييم . صحتي والمحافظة عليها بفاعلية والتقييم وتشخيص ومعالجة مرضي او الإصابات اللاحقة بي، وأدرك بأنه من مسؤولية مقدمي الرعاية الصحية بيان أسباب أي فحص أو إختبار أو إجراء تشخيصي محدد وخيارات العلاج المتوفرة والمخاطرة الشائعة والمنافع المتوقعة المرتبطة بهذه الخيارات والعلاج البديل والنتائج المحتملة لرفض العلاج."
},
"hospitalRules": {"en": "HOSPITAL RULES: ", "ar": "أنظمة المستشفى: "},
"generalConsent2": {
"en":
"Agree to be obliged to adhere to the Hospital rules, and to ensure compliance by all visitors. In the event of any severe violations of the rules, the hospital reserves the right to take the necessary measures according to the applicable Laws.",
"Agree to be obliged to adhere to the Hospital rules, and to ensure compliance by all visitors. In the event of any severe violations of the rules, the hospital reserves the right to take the necessary measures according to the applicable Laws.",
"ar":
"أوافق على التقيد بقواعد وأنظمة المستشفى، وأضمن التزام جميع الزوار بذلك ، في حالة حدوث أي إنتهاكات جسيمة لقواعد وأنظمة المستشفى، يحتفظ المستشفى بالحق في إتخاذ جميع الاجراءات النظامية المكفولة."
"أوافق على التقيد بقواعد وأنظمة المستشفى، وأضمن التزام جميع الزوار بذلك ، في حالة حدوث أي إنتهاكات جسيمة لقواعد وأنظمة المستشفى، يحتفظ المستشفى بالحق في إتخاذ جميع الاجراءات النظامية المكفولة."
},
"communicationConsent": {"en": "COMMUNICATION VIA EMAIL, TEXT MESSAGES AND PHONE CALLS: ", "ar": "الاتصال عبر البريد الإلكتروني والرسائل النصية والمكالمات الهاتفية: "},
"generalConsent3": {
"en":
"I understand that the contact number or Email that I have provided on registration will be used for communication by the Hospital. I hereby agree to be notified by the Hospital through SMS, Email, phone calls or any other method, for appointments notifications, special promotions, new features or products, current HMG's medical services, and of any services introduced by the Hospital or any third party in the future or any modifications made to the services offered by the Hospital. And these messages may be submitted as evidence where the Hospital has the right to use at any time whatsoever and as it sees fit. I understand the risks of communicating by email and text messages, in particular the privacy risks. I understand that the Hospital cannot guarantee the security and confidentiality of email or text communication. The Hospital will not be responsible for messages that are not received or delivered due to technical failure, or for disclosure of confidential information unless caused by intentional misconduct.",
"I understand that the contact number or Email that I have provided on registration will be used for communication by the Hospital. I hereby agree to be notified by the Hospital through SMS, Email, phone calls or any other method, for appointments notifications, special promotions, new features or products, current HMG's medical services, and of any services introduced by the Hospital or any third party in the future or any modifications made to the services offered by the Hospital. And these messages may be submitted as evidence where the Hospital has the right to use at any time whatsoever and as it sees fit. I understand the risks of communicating by email and text messages, in particular the privacy risks. I understand that the Hospital cannot guarantee the security and confidentiality of email or text communication. The Hospital will not be responsible for messages that are not received or delivered due to technical failure, or for disclosure of confidential information unless caused by intentional misconduct.",
"ar":
"المستشفى أدرك بأن رقم الجوال الهاتف أو البريد الإلكتروني الذي قدمته في نموذج التسجيل سيستخدم كوسيلة اتصال بيني وبين | وأقر بموافقتي على قيام المستشفى بإخطاري عن طريق رسائل البريد أو الرسائل القصيرة أو البريد الإلكتروني أو المكالمات الهاتفية أو أي طريقة أخرى بالمواعيد والعروض الترويجية أو المميزات والمنتجات الخاصة بالمستشفى أو) خاصة بأي طرف خارجي) وبأي خدمات طبية تقدمها المجموعة أو قد يطرحها المستشفى في المستقبل أو أي تعديلات قد تطرأ على الخدمات المقدمة من قبل المستشفى. وتعتبر هذه الرسائل دليل إثبات يحق للمستشفى استخدامه في اي وقت يشاء. أفهم مخاطر التواصل عبر البريد الإلكتروني والرسائل النصية خاصة مخاطر الخصوصية وأدرك أن المستشفى لا يمكنه ضمان أمن وسرية البريد الإلكتروني أو الرسائل النصية ولن يكون المستشفى مسؤول عن الرسائل التي لم يتم استلامها أو تسليمها بسبب الفشل التقني أو الكشف عن المعلومات السرية ما لم يكن سببها سوء سلوك متعمد."
"المستشفى أدرك بأن رقم الجوال الهاتف أو البريد الإلكتروني الذي قدمته في نموذج التسجيل سيستخدم كوسيلة اتصال بيني وبين | وأقر بموافقتي على قيام المستشفى بإخطاري عن طريق رسائل البريد أو الرسائل القصيرة أو البريد الإلكتروني أو المكالمات الهاتفية أو أي طريقة أخرى بالمواعيد والعروض الترويجية أو المميزات والمنتجات الخاصة بالمستشفى أو) خاصة بأي طرف خارجي) وبأي خدمات طبية تقدمها المجموعة أو قد يطرحها المستشفى في المستقبل أو أي تعديلات قد تطرأ على الخدمات المقدمة من قبل المستشفى. وتعتبر هذه الرسائل دليل إثبات يحق للمستشفى استخدامه في اي وقت يشاء. أفهم مخاطر التواصل عبر البريد الإلكتروني والرسائل النصية خاصة مخاطر الخصوصية وأدرك أن المستشفى لا يمكنه ضمان أمن وسرية البريد الإلكتروني أو الرسائل النصية ولن يكون المستشفى مسؤول عن الرسائل التي لم يتم استلامها أو تسليمها بسبب الفشل التقني أو الكشف عن المعلومات السرية ما لم يكن سببها سوء سلوك متعمد."
},
"releaseConsent": {"en": "RELEASE OF PERSONAL AND MEDICAL INFORMATION: ", "ar": "الإفصاح عن المعلومات الشخصية والطبية: "},
"generalConsent4": {
"en":
"On completion of this consent I hereby authorize the hospital to provide any information of whatever nature concerning my treatment, including but not limited to, current conditions/co-morbidities to my insurance carrier or third party payer, for the purpose of determining benefit entitlement and to process payment, therefore taking responsibility for the financial settlement of my medical bills.",
"On completion of this consent I hereby authorize the hospital to provide any information of whatever nature concerning my treatment, including but not limited to, current conditions/co-morbidities to my insurance carrier or third party payer, for the purpose of determining benefit entitlement and to process payment, therefore taking responsibility for the financial settlement of my medical bills.",
"ar":
"عند تعبئة هذا النموذج ، أصرح بموجبه للمستشفي بتقديم أية معلومات أياً كانت طبيعتها بخصوص حالتي الصحية وعلاجي لشركة التأمين أو لأي طرف آخر مسؤول عن الدفع لأغراض تحديد حق الاستفادة والقيام بالدفع وبالتالي تحمل المسؤولية عن التسوية المالية للفواتير الطبية الخاصة بي."
"عند تعبئة هذا النموذج ، أصرح بموجبه للمستشفي بتقديم أية معلومات أياً كانت طبيعتها بخصوص حالتي الصحية وعلاجي لشركة التأمين أو لأي طرف آخر مسؤول عن الدفع لأغراض تحديد حق الاستفادة والقيام بالدفع وبالتالي تحمل المسؤولية عن التسوية المالية للفواتير الطبية الخاصة بي."
},
"generalConsent5": {
"en":
"The Hospital is obliged by local and government regulations to submit certain patient information and I hereby give consent for the disclosure or use of my information as per statutory requirement. I also acknowledge that this consent is subject to the laws and jurisdiction of the country in which the Hospital is located.",
"The Hospital is obliged by local and government regulations to submit certain patient information and I hereby give consent for the disclosure or use of my information as per statutory requirement. I also acknowledge that this consent is subject to the laws and jurisdiction of the country in which the Hospital is located.",
"ar":
" إن المستشفى ملزم بموجب الأنظمة المحلية وأنظمة الدولة بتقديم بعض المعلومات المتعلقة بالمريض وأوافق بموجبه على إفصاح أو استخدام المستشفى للمعلومات الخاصة بي حسبما هو مطلوب نظاماً، وأن هذا الإقرار خاضع للأنظمة والقوانين والاختصاص القضائي للدولة حيث يقع المستشفى."
" إن المستشفى ملزم بموجب الأنظمة المحلية وأنظمة الدولة بتقديم بعض المعلومات المتعلقة بالمريض وأوافق بموجبه على إفصاح أو استخدام المستشفى للمعلومات الخاصة بي حسبما هو مطلوب نظاماً، وأن هذا الإقرار خاضع للأنظمة والقوانين والاختصاص القضائي للدولة حيث يقع المستشفى."
},
"valuables": {"en": "VALUABLES: ", "ar": "الممتلكات الثمينة: "},
"generalConsent6": {
@ -2065,29 +2074,29 @@ const Map localizedValues = {
"financialConsent": {"en": "FINANCIAL AGREEMENT: ", "ar": "الموافقة المالية: "},
"generalConsent7": {
"en":
"Within the expected time frame during their hospital visit or stay, patients/relatives are required to take personal responsibility and meet any financial obligation towards the Hospital regardless of the mode and source of payment (i.e. self-paying, insurance company, sponsoring company & others). I understand that for credit cases (Insurance covered or corporate patients) approval letter is essential at the time of admission. In case the approval letter is not available, I, the undersigned, agree to be treated as cash patient and advance deposit shall be made. Once approval is obtained the amount paid as advance shall be refunded to me / patient and if there is no approval till discharge the bill shall be settled in full by me/patient.",
"Within the expected time frame during their hospital visit or stay, patients/relatives are required to take personal responsibility and meet any financial obligation towards the Hospital regardless of the mode and source of payment (i.e. self-paying, insurance company, sponsoring company & others). I understand that for credit cases (Insurance covered or corporate patients) approval letter is essential at the time of admission. In case the approval letter is not available, I, the undersigned, agree to be treated as cash patient and advance deposit shall be made. Once approval is obtained the amount paid as advance shall be refunded to me / patient and if there is no approval till discharge the bill shall be settled in full by me/patient.",
"ar":
"يتوجب علي ضمن الاطار الزمني المتوقع أثناء زيارة المستشفى أو الإقامة فيها تحمل المسؤولية الشخصية والوفاء بأي التزام مالي تجاه المستشفى بغض النظر عن طريقة ومصدر الدفع (أي: الدفع الذاتي أو شركة التأمين أو صاحب العمل أو غيره، وأن الموافقة المسبقة ضرورية قبل دخول المستشفى في حالة التغطية المالية من قبل شركة التأمين أو شركة الكفالة في الحالات التي يتم فيها تأخر الموافقة أتعهد أنا الموقع أدناه بالموافقة على العلاج كمريض دفع ذاتي ويجب إيداع مبلغ تحت الحساب يتم استرداده بعد الحصول على موافقة التأمين، ويجب دفع الحساب بالكامل في حالة عدم الحصول على موافقة التأمين حتى موعد الخروج."
"يتوجب علي ضمن الاطار الزمني المتوقع أثناء زيارة المستشفى أو الإقامة فيها تحمل المسؤولية الشخصية والوفاء بأي التزام مالي تجاه المستشفى بغض النظر عن طريقة ومصدر الدفع (أي: الدفع الذاتي أو شركة التأمين أو صاحب العمل أو غيره، وأن الموافقة المسبقة ضرورية قبل دخول المستشفى في حالة التغطية المالية من قبل شركة التأمين أو شركة الكفالة في الحالات التي يتم فيها تأخر الموافقة أتعهد أنا الموقع أدناه بالموافقة على العلاج كمريض دفع ذاتي ويجب إيداع مبلغ تحت الحساب يتم استرداده بعد الحصول على موافقة التأمين، ويجب دفع الحساب بالكامل في حالة عدم الحصول على موافقة التأمين حتى موعد الخروج."
},
"dataSharingConsent": {"en": "DATA SHARING AND INQUIRY: ", "ar": "تبادل المعلومات والاستفسارات: "},
"generalConsent8": {
"en":
"Hereby, I, the undersigned, agree to provide the Hospital with any information that it requires for the establishing and/or auditing and/or administering my accounts and facilities therewith and I authorize it to obtain and collect any information as it deems necessary or in need for regarding me, my accounts and facilities therewith, from the Saudi Credit Bureau (SIMAH) or to any other agency approved by Saudi Arabian Monetary Agency (SAMA) and to disclose and share (inclusive of Data Pooling) that information to the said company (SIMAH) or to any other agency approved by Saudi Arabian Monetary Agency (SAMA) in accordance with the Membership Agreement and Code of Conduct approved. I agree and acknowledge that the delay in payment or non-payment of Hospital dues is a failure and as a result, SIMAH and/or any other agency approved by will be provided with my name and information to be added to the lists at SIMAH. These lists are accessed by other parties, and I will not be removed from these lists until I pay all of the outstanding amounts.",
"Hereby, I, the undersigned, agree to provide the Hospital with any information that it requires for the establishing and/or auditing and/or administering my accounts and facilities therewith and I authorize it to obtain and collect any information as it deems necessary or in need for regarding me, my accounts and facilities therewith, from the Saudi Credit Bureau (SIMAH) or to any other agency approved by Saudi Arabian Monetary Agency (SAMA) and to disclose and share (inclusive of Data Pooling) that information to the said company (SIMAH) or to any other agency approved by Saudi Arabian Monetary Agency (SAMA) in accordance with the Membership Agreement and Code of Conduct approved. I agree and acknowledge that the delay in payment or non-payment of Hospital dues is a failure and as a result, SIMAH and/or any other agency approved by will be provided with my name and information to be added to the lists at SIMAH. These lists are accessed by other parties, and I will not be removed from these lists until I pay all of the outstanding amounts.",
"ar":
"بهذا أنا الموقع أدناه أوافق على تزويد المستشفى بأي معلومات أو بيانات يطلبها مني لتأسيس ملفي لدى المستشفى و/أو لمراجعته و/ أو لإدارته وأفوض المستشفى بأن يحصل على ما يلزم أو يحتاج إليه من معلومات تخصني من الشركة السعودية للمعلومات الائتمانية (سمة) واو اي جهة أخرى معتمدة من مؤسسة النقد العربي السعودي (ساما). كما أوافق على أن يفصح المستشفى عن المعلومات الخاصة بي لدى المستشفى للشركة السعودية للمعلومات الائتمانية (سمة) واو اي جهة أخرى معتمدة من مؤسسة النقد العربي السعودي (ساما) من خلال إتفاقية العضوية المبرمة وقواعد العمل المقرة والخاصة بتبادل المعلومات. كما أوافق وأقر بان التأخير في السداد أو عدم السداد لمستحقات المستشفى يعتبر تقصيراً وإخلالاً مني ونتيجة لذلك سيتم تزويد الشركة السعودية للمعلومات الائتمانية (سمه) و/أو أي جهة أخرى توافق عليها مؤسسة النقد العربي السعودي (ساما) بإسمي ومعلوماتي الإضافتها على القوائم لديها هذه القوائم يتم الوصول اليها والإطلاع عليها من قبل جهات أخرى، ولن يتم رفع اسمي من تلك القوائم إلا بعد أداء كافة ما علي من مبالغ مستحقة."
"بهذا أنا الموقع أدناه أوافق على تزويد المستشفى بأي معلومات أو بيانات يطلبها مني لتأسيس ملفي لدى المستشفى و/أو لمراجعته و/ أو لإدارته وأفوض المستشفى بأن يحصل على ما يلزم أو يحتاج إليه من معلومات تخصني من الشركة السعودية للمعلومات الائتمانية (سمة) واو اي جهة أخرى معتمدة من مؤسسة النقد العربي السعودي (ساما). كما أوافق على أن يفصح المستشفى عن المعلومات الخاصة بي لدى المستشفى للشركة السعودية للمعلومات الائتمانية (سمة) واو اي جهة أخرى معتمدة من مؤسسة النقد العربي السعودي (ساما) من خلال إتفاقية العضوية المبرمة وقواعد العمل المقرة والخاصة بتبادل المعلومات. كما أوافق وأقر بان التأخير في السداد أو عدم السداد لمستحقات المستشفى يعتبر تقصيراً وإخلالاً مني ونتيجة لذلك سيتم تزويد الشركة السعودية للمعلومات الائتمانية (سمه) و/أو أي جهة أخرى توافق عليها مؤسسة النقد العربي السعودي (ساما) بإسمي ومعلوماتي الإضافتها على القوائم لديها هذه القوائم يتم الوصول اليها والإطلاع عليها من قبل جهات أخرى، ولن يتم رفع اسمي من تلك القوائم إلا بعد أداء كافة ما علي من مبالغ مستحقة."
},
"permissionLeaveConsent": {"en": "PERMISSION TO LEAVE THE HOSPITAL: ", "ar": "قواعد المستشفى: "},
"generalConsent9": {
"en":
"Fully understand that, at no time, patient can leave the Hospital without prior consent and approval of treating doctor. In case I insist on leaving the Hospital, I must sign an undertaking of my responsibility on leaving the Hospital against the medical advice.",
"Fully understand that, at no time, patient can leave the Hospital without prior consent and approval of treating doctor. In case I insist on leaving the Hospital, I must sign an undertaking of my responsibility on leaving the Hospital against the medical advice.",
"ar": "اتفهم انه ليس بإمكاني مغادرة المستشفى في أي وقت شئت دون أخذ إذن طبيبي المعالج. وفي حالة إصراري على مغادرة المستشفى يتعين علي توقيع اقرار مغادرتي ضد النصيحة الطبية وعلى مسؤوليتي."
},
"observeConsent": {"en": "CONSENT TO OBSERVE: ", "ar": "قواعد المستشفى: "},
"generalConsent10": {
"en":
"Observers will be allowed according to the Hospital policy as will the taking of pictures of medical or surgical procedures and the use of same for internal staff education or process improvement purposes. Observation and photography or medical or surgical procedures may be done with the approval of the Hospital and in accordance with the Hospital's policy and related laws. I, the undersigned, fully understand that electronically-transmitted information may be used and/or shared by the Hospital with other hospitals for my diagnosis, therapy, follow-up and/or patient education, and may include patient medical records, medical images, interactive audio, video, and/or data communications, output data from medical devices, sound and video files etc. for betterment of patient care.",
"Observers will be allowed according to the Hospital policy as will the taking of pictures of medical or surgical procedures and the use of same for internal staff education or process improvement purposes. Observation and photography or medical or surgical procedures may be done with the approval of the Hospital and in accordance with the Hospital's policy and related laws. I, the undersigned, fully understand that electronically-transmitted information may be used and/or shared by the Hospital with other hospitals for my diagnosis, therapy, follow-up and/or patient education, and may include patient medical records, medical images, interactive audio, video, and/or data communications, output data from medical devices, sound and video files etc. for betterment of patient care.",
"ar":
"وفقاً لسياسة المستشفى، سيتم السماح للمراقبين بمتابعة الإجراءات الطبية والجراحية وسيتم استخدامها لتعليم الموظفين الداخليين أو لأغراض التحسين والتطوير ويمكن إجراء المراقبة والتصوير الفوتوغرافي أو الإجراءات الطبية أو الجراحية بموافقة المستشفى ووفقاً لسياسة المستشفى والانظمة ذات العلاقة. أنا الموقع ادناه أتفهم انه قد يتم الكترونياً إرسال معلومات متعلقة بالتشخيص الطبي لي، العلاج المتابعة وتثقيف المريض، والتي قد تتضمن ملف المريض الطبي النتائج الإشعاعية، التسجيلات الصوتية والمرئية، وذلك بين المستشفى ومستشفيات أخرى بهدف تقديم رعاية صحية أفضل."
"وفقاً لسياسة المستشفى، سيتم السماح للمراقبين بمتابعة الإجراءات الطبية والجراحية وسيتم استخدامها لتعليم الموظفين الداخليين أو لأغراض التحسين والتطوير ويمكن إجراء المراقبة والتصوير الفوتوغرافي أو الإجراءات الطبية أو الجراحية بموافقة المستشفى ووفقاً لسياسة المستشفى والانظمة ذات العلاقة. أنا الموقع ادناه أتفهم انه قد يتم الكترونياً إرسال معلومات متعلقة بالتشخيص الطبي لي، العلاج المتابعة وتثقيف المريض، والتي قد تتضمن ملف المريض الطبي النتائج الإشعاعية، التسجيلات الصوتية والمرئية، وذلك بين المستشفى ومستشفيات أخرى بهدف تقديم رعاية صحية أفضل."
},
"noGuaranteeConsent": {"en": "NO GUARENTEE OF THE RESULTS OF TREATMENT OR EXAMINATION: ", "ar": "لا ضمان لنتائج العلاج أو الفحوصات: "},
"generalConsent11": {
@ -2097,23 +2106,40 @@ const Map localizedValues = {
"disputeConsent": {"en": "GOVERNING LAWS AND DISPUTE RESOLUTION: ", "ar": "النظام الحاكم وحل النزاعات: "},
"generalConsent12": {
"en":
"This General Consent and Conditions of Admissions is governed by and shall be construed in accordance with the laws of the Kingdom of Saudi Arabia. Any dispute which arises during the execution of it, in which the parties have failed to resolve amicably, will be referred to the concerned judicial authorities in the city of Riyadh, Kingdom of Saudi Arabia.",
"This General Consent and Conditions of Admissions is governed by and shall be construed in accordance with the laws of the Kingdom of Saudi Arabia. Any dispute which arises during the execution of it, in which the parties have failed to resolve amicably, will be referred to the concerned judicial authorities in the city of Riyadh, Kingdom of Saudi Arabia.",
"ar":
"تخضع وتفسر هذه الموافقة العامة وشروط القبول للأنظمة المعمول بها في المملكة العربية السعودية. كل خلاف ينشأ عن تنفيذها ولا يتوصل إلى تسويته بين الطرفين وديا يحال إلى الجهة القضائية المختصة بالفصل في النزاع في مدينة الرياض، المملكة العربية السعودية."
"تخضع وتفسر هذه الموافقة العامة وشروط القبول للأنظمة المعمول بها في المملكة العربية السعودية. كل خلاف ينشأ عن تنفيذها ولا يتوصل إلى تسويته بين الطرفين وديا يحال إلى الجهة القضائية المختصة بالفصل في النزاع في مدينة الرياض، المملكة العربية السعودية."
},
"patientsRightsConsent": {"en": "ACKNOWLEDGEMENT OF NOTICE OF PATIENT RIGHTS AND RESPONSIBILITIES: ", "ar": "الإقرار بحقوق ومسؤوليات المرضى: "},
"generalConsent13": {
"en":
"I, the undersigned, acknowledge that I have been provided with a copy of the Patients' Bill of Right and Responsibilities and the admission staff has explained to me Patients' Bill of Right and Responsibilities.",
"I, the undersigned, acknowledge that I have been provided with a copy of the Patients' Bill of Right and Responsibilities and the admission staff has explained to me Patients' Bill of Right and Responsibilities.",
"ar": "أنا الموقع أدناه أقر بانه تم تزويدي بـ وثيقة حقوق ومسؤوليات المرضى وقام الموظف المختص بشرح وثيقة حقوق ومسؤوليات المرضى لي."
},
"acknowledgementConsent": {"en": "ACKNOWLEDGEMENTS: ", "ar": "الإقرارات: "},
"generalConsent14": {
"en":
"I, the undersigned, acknowledge that I have been provided with a copy of the Patients' Bill of Right and Responsibilities and the admission staff has explained to me Patients' Bill of Right and Responsibilities.",
"I, the undersigned, acknowledge that I have been provided with a copy of the Patients' Bill of Right and Responsibilities and the admission staff has explained to me Patients' Bill of Right and Responsibilities.",
"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": "اضغط على زر تسجيل الدخول داخل التطبيق"},
"download": {"en": "Download", "ar": "تحميل"},
"share": {"en": "Share", "ar": "يشارك"},
"readMore": {"en": "Read More", "ar": "اقرأ أكثر"},
"showLess": {"en": "Show Less", "ar": "عرض أقل"},
"change": {"en": "Change", "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'] = 5185584; //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");

@ -29,6 +29,25 @@ class AskDoctorService extends BaseService {
return Future.value(localRes);
}
Future isDoctorAvailable({int? projectId, int? doctorId, int? clinicId}) async {
hasError = false;
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
body['DoctorID'] = doctorId;
body['ProjectID'] = projectId;
body['ClinicID'] = clinicId;
dynamic localRes;
await baseAppClient.post(IS_DOCTOR_AVAILABLE_BY_CALENDAR_SCHEDULE, onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
return Future.value(localRes);
}
Future getCallRequestTypeLOV() async {
hasError = false;
Map<String, dynamic> body = Map();

@ -42,7 +42,7 @@ class LabsService extends BaseService {
_requestPatientLabSpecialResult.invoiceNo = isVidaPlus! ? "0" : invoiceNo;
_requestPatientLabSpecialResult.invoiceNoVP = isVidaPlus ? invoiceNo : "0";
_requestPatientLabSpecialResult.invoiceType = invoiceType!;
_requestPatientLabSpecialResult.invoiceType = invoiceType ?? "";
_requestPatientLabSpecialResult.orderNo = orderNo;
_requestPatientLabSpecialResult.setupID = setupID;
@ -231,7 +231,8 @@ class LabsService extends BaseService {
_requestSendLabReportEmail.doctorID = patientLabOrder.doctorID;
_requestSendLabReportEmail.languageID = 1;
await baseAppClient.post(SEND_LAB_RESULT_EMAIL, onSuccess: (dynamic response, int statusCode) {
// await baseAppClient.post(SEND_LAB_RESULT_EMAIL, onSuccess: (dynamic response, int statusCode) {
await baseAppClient.post(SEND_LAB_RESULT_EMAIL_NEW, onSuccess: (dynamic response, int statusCode) {
if (isDownload) {
labReportPDF = response['LabReportsPDFContent'];
}

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

@ -14,6 +14,8 @@ import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart';
import 'package:diplomaticquarterapp/uitl/navigation_service.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_crashlytics/firebase_crashlytics.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:provider/provider.dart';
@ -27,8 +29,19 @@ import 'pages/pharmacies/compare-list.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
// Pass all uncaught "fatal" errors from the framework to Crashlytics
// 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) {
// if (!kDebugMode) FirebaseCrashlytics.instance.recordError(error, stack, fatal: true);
// return true;
// };
setupLocator();
HttpOverrides.global = MyHttpOverrides();
runApp(MyApp());
}
@ -55,8 +68,6 @@ class _MyApp extends State<MyApp> {
//0567184134 mobile
//246305493
// checkForUpdate() {
// // todo need to verify 'imp'
// InAppUpdate.checkForUpdate().then((info) {
@ -140,14 +151,12 @@ class _MyApp extends State<MyApp> {
],
child: Consumer<ProjectViewModel>(
builder: (context, projectProvider, child) => MaterialApp(
builder: (_, mchild) {
return MediaQuery(
data: MediaQuery.of(context).copyWith(
textScaler: TextScaler.linear(1.0),
), //set desired text scale factor here
child: mchild!
);
data: MediaQuery.of(context).copyWith(
textScaler: TextScaler.linear(1.0),
), //set desired text scale factor here
child: mchild!);
// Container(
// color: Colors.blue,
// ));

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

@ -670,8 +670,8 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async {
GifLoaderDialogUtils.hideDialog(context);
log("failureResult: ${failureResult.toString()}");
AppToast.showErrorToast(message: failureResult.toString());
log("failureResult: ${failureResult.message.toString()}");
AppToast.showErrorToast(message: failureResult.message.toString());
},
onSuccess: (successResult) async {
log("Payfort: ${successResult.responseMessage}");

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

@ -459,8 +459,9 @@ class _BookConfirmState extends State<BookConfirm> {
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async {
log("failureResult: ${failureResult.toString()}");
AppToast.showErrorToast(message: failureResult.toString());
GifLoaderDialogUtils.hideDialog(context);
log("failureResult: ${failureResult.message.toString()}");
AppToast.showErrorToast(message: failureResult.message.toString());
},
onSuccess: (successResult) async {
log("Payfort: ${successResult.responseMessage}");

@ -712,8 +712,8 @@ class _BookSuccessState extends State<BookSuccess> {
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async {
GifLoaderDialogUtils.hideDialog(context);
log("failureResult: ${failureResult.toString()}");
AppToast.showErrorToast(message: failureResult.toString());
log("failureResult: ${failureResult.message.toString()}");
AppToast.showErrorToast(message: failureResult.message.toString());
},
onSuccess: (successResult) async {
log("Payfort: ${successResult.responseMessage}");

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

@ -389,7 +389,6 @@ class _QRCodeState extends State<QRCode> {
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) {

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

@ -83,7 +83,7 @@ class _NotificationsDetailsPageState extends State<NotificationsDetailsPage> {
),
SizedBox(height: 18),
Text(
widget.notification!.message!.trim(),
widget.notification.message ?? "",
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,

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

@ -423,8 +423,9 @@ class _EROnlineCheckInPaymentDetailsState extends State<EROnlineCheckInPaymentDe
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async {
log("failureResult: ${failureResult.toString()}");
AppToast.showErrorToast(message: failureResult.toString());
GifLoaderDialogUtils.hideDialog(context);
log("failureResult: ${failureResult.message.toString()}");
AppToast.showErrorToast(message: failureResult.message.toString());
},
onSuccess: (successResult) async {
log("Payfort: ${successResult.responseMessage}");
@ -521,9 +522,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,18 @@ class _InPatientPendingAdvancePaymentState extends State<InPatientPendingAdvance
int clinicID = projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.clinicID! : 17;
service
.getInPatientPaymentLink(
projectViewModel.inPatientProjectID,
// projectViewModel.getAdmissionInfoResponseModel.admissionNo!,
widget.inPatientAdvanceResponseModel.responseInpatientAdvanceInfo![0].paymentRequestID!,
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 +275,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);

@ -514,7 +514,8 @@ class InPatientGeneralConsent extends StatelessWidget {
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res["MessageStatus"] == 1) {
AppToast.showErrorToast(message: res["SuccessMsg"]);
AppToast.showSuccessToast(message: res["SuccessMsg"] ?? TranslationBase.of(context).success);
Navigator.of(context);
} else {
AppToast.showErrorToast(message: res["endUserMessage"]);
}

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

@ -105,7 +105,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
widget.appo.doctorImageURL!,
widget.appo.doctorSpeciality!,
"",
widget.appo.projectName!,
widget.appo.projectName ?? "",
DateUtil.convertStringToDate(widget.appo.appointmentDate!),
widget.appo.isLiveCareAppointment! ? DateUtil.convertStringToDate(widget.appo.appointmentDate!).toString().split(" ")[1].substring(0, 5) : widget.appo.startTime!.substring(0, 5),
"",

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

@ -131,8 +131,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
.parse(DateUtil.formatDateToDate(DateUtil.convertStringToDate(widget.appo.appointmentDate!), widget.projectViewModel!.isArabic) + " " + widget.appo.startTime!),
//DateUtil.convertStringToDate(widget.appo.appointmentDate),
widget.appo.doctorNameObj!,
"",
widget.appo.appointmentNo.toString(),
DateUtil.formatDateToDate(DateUtil.convertStringToDate(widget.appo.appointmentDate!), widget.projectViewModel!.isArabic),
// DateUtil.formatDateToTime(DateUtil.convertStringToDate(widget.appo.appointmentDate)),
widget.appo.startTime!,
@ -410,6 +409,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
if (res['ListLabResultsByAppNo'] != null) {
patientLabOrders.orderNo = res['ListLabResultsByAppNo'][0]['OrderNo'].toString();
patientLabOrders.invoiceNo = res['ListLabResultsByAppNo'][0]['InvoiceNo'].toString();
patientLabOrders.invoiceType = res['ListLabResultsByAppNo'][0]['InvoiceType'].toString();
patientLabOrders.clinicID = widget.appo.clinicID;
patientLabOrders.clinicDescription = widget.appo.clinicName;
patientLabOrders.projectID = widget.appo.projectID.toString();
@ -440,7 +440,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)));
}
@ -1530,8 +1531,8 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async {
GifLoaderDialogUtils.hideDialog(context);
log("failureResult: ${failureResult.toString()}");
AppToast.showErrorToast(message: failureResult.toString());
log("failureResult: ${failureResult.message.toString()}");
AppToast.showErrorToast(message: failureResult.message.toString());
},
onSuccess: (successResult) async {
log("Payfort: ${successResult.responseMessage}");

@ -80,7 +80,7 @@ class _CallScreenState extends State<CallScreen> {
try {
Map<String, bool> SDKaudioOptions = {"connect": true, "mute": false, "autoAdjustSpeakerVolume": false};
Map<String, bool> SDKvideoOptions = {
"localVideoOn": true,
"localVideoOn": args.callType == 1 ? true : false,
};
JoinSessionConfig joinSession = JoinSessionConfig(
sessionName: args.sessionName,
@ -1588,8 +1588,9 @@ class CallArguments {
final String displayName;
final String sessionIdleTimeoutMins;
final String role;
final int callType;
CallArguments(this.sessionName, this.sessionPwd, this.displayName, this.sessionIdleTimeoutMins, this.role, this.isJoin);
CallArguments(this.sessionName, this.sessionPwd, this.displayName, this.sessionIdleTimeoutMins, this.role, this.isJoin, this.callType);
}
class JoinArguments {

@ -171,17 +171,17 @@ class _InsuranceCardState extends State<InsuranceCard> {
SizedBox(
height: 8.5,
),
if (model.insurance[index].isActive == true)
Container(
color: Colors.transparent,
child: DefaultButton(
TranslationBase.of(context).seeDetails,
() => {
getDetails(model.insurance[index]),
},
),
width: double.infinity,
),
// if (model.insurance[index].isActive == true)
// Container(
// color: Colors.transparent,
// child: DefaultButton(
// TranslationBase.of(context).seeDetails,
// () => {
// getDetails(model.insurance[index]),
// },
// ),
// width: double.infinity,
// ),
],
),
),

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

@ -10,6 +10,7 @@ import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:firebase_crashlytics/firebase_crashlytics.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
@ -55,7 +56,7 @@ class _HomePageState2 extends State<HomePage2> {
model,
onLoginClick: () {
widget.onLoginClick!();
// FirebaseCrashlytics.instance.crash();
// Navigator.pushNamed(
// context,
// "zoom_call_page",

@ -41,6 +41,7 @@ import 'package:diplomaticquarterapp/uitl/penguin_method_channel.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/vital_signs/vital_sign.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/covid_consent_dialog.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/location_selection_dialog.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/radio_selection_dialog.dart';
@ -229,6 +230,9 @@ class ServicesView extends StatelessWidget {
} else if (hmgServices.action == 1) {
openLiveCare(context);
} else if (hmgServices.action == 2) {
//todo for temporary basis
// Navigator.push(context, FadePage(page: VitalSigns()));
// initPenguinSDK();
if (projectViewModel.isIndoorNavigationEnabled) {
if (!isLocked) openNavigationProjectSelection(context);
@ -258,7 +262,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');
}
}

@ -223,7 +223,7 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
Navigator.pushReplacementNamed(
context,
"zoom_call_page",
arguments: CallArguments(widget.incomingCallData!.sessionId!, "123", "Patient", "40", "0", false),
arguments: CallArguments(widget.incomingCallData!.sessionId!, "123", "Patient", "40", "0", false, int.parse(widget.incomingCallData!.appointmentNo!)),
);
} else {
// OpenTok Call Page

@ -1,5 +1,7 @@
import 'dart:io';
import 'package:auto_size_text/auto_size_text.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/LiveCare/ERAppointmentFeesResponse.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
@ -28,8 +30,10 @@ class LiveCarePatmentPage extends StatefulWidget {
String clinicName;
bool isPharmaLiveCare;
String pharmaLiveCareClientID;
int selectedCallType;
LiveCarePatmentPage({required this.getERAppointmentFeesList, required this.waitingTime, required this.clinicName, this.isPharmaLiveCare = false, this.pharmaLiveCareClientID = ""});
LiveCarePatmentPage(
{required this.getERAppointmentFeesList, required this.waitingTime, required this.clinicName, this.isPharmaLiveCare = false, this.pharmaLiveCareClientID = "", required this.selectedCallType});
@override
_LiveCarePatmentPageState createState() => _LiveCarePatmentPageState();
@ -225,8 +229,9 @@ class _LiveCarePatmentPageState extends State<LiveCarePatmentPage> {
],
),
),
mHeight(32.0),
Container(
margin: EdgeInsets.only(top: 10.0),
margin: EdgeInsets.only(top: 16.0),
child: Row(
children: <Widget>[
Radio(
@ -265,6 +270,36 @@ class _LiveCarePatmentPageState extends State<LiveCarePatmentPage> {
],
),
),
AutoSizeText(
TranslationBase.of(context).selectedCallType,
maxLines: 1,
minFontSize: 12,
style: TextStyle(
fontSize: SizeConfig.textMultiplier! * 2.0,
fontWeight: FontWeight.w600,
letterSpacing: -0.39,
height: 0.8,
),
),
mHeight(12.0),
Row(
children: <Widget>[
SvgPicture.asset(
getCallTypeImagePath(),
width: 18,
height: 18,
),
mWidth(10),
Text(
getCallTypeText(),
style: TextStyle(
fontSize: 14.0,
letterSpacing: -0.4,
fontWeight: FontWeight.w600,
),
),
],
),
mFlex(1),
Text(
TranslationBase.of(context).upComingPayOption,
@ -375,6 +410,38 @@ class _LiveCarePatmentPageState extends State<LiveCarePatmentPage> {
);
}
String getCallTypeImagePath() {
String callTypeImagePath = "";
switch (widget.selectedCallType) {
case 1:
callTypeImagePath = "assets/images/new/services/video_call.svg";
break;
case 2:
callTypeImagePath = "assets/images/new/services/audio_call.svg";
break;
case 3:
callTypeImagePath = "assets/images/new/services/phone_call.svg";
break;
}
return callTypeImagePath;
}
String getCallTypeText() {
String callTypeText = "";
switch (widget.selectedCallType) {
case 1:
callTypeText = TranslationBase.of(context).videoCall;
break;
case 2:
callTypeText = TranslationBase.of(context).audioCall;
break;
case 3:
callTypeText = TranslationBase.of(context).phoneCall;
break;
}
return callTypeText;
}
@override
void dispose() {
// cancelAPI();

@ -0,0 +1,145 @@
import 'package:auto_size_text/auto_size_text.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.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/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class LiveCareCallTypeSelectPage extends StatefulWidget {
Function onSelectedMethod;
LiveCareCallTypeSelectPage({required this.onSelectedMethod});
@override
State<LiveCareCallTypeSelectPage> createState() => _LiveCareCallTypeSelectPageState();
}
class _LiveCareCallTypeSelectPageState extends State<LiveCareCallTypeSelectPage> {
int selectedCallType = 1;
String mobileNo = "";
String countryCode = '966';
late ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of<ProjectViewModel>(context);
mobileNo = Utils.getPhoneNumberWithoutZero(projectViewModel.authenticatedUserObject.user.mobileNumber!);
return AppScaffold(
appBarTitle: TranslationBase.of(context).selectCallType,
isShowAppBar: true,
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: CustomColors.appBackgroudGrey2Color,
body: Padding(
padding: EdgeInsets.all(21),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
GridView(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12),
physics: NeverScrollableScrollPhysics(),
shrinkWrap: true,
children: [
InkWell(
onTap: () {
setState(() {
selectedCallType = 1;
});
},
child: MedicalProfileItem(
title: TranslationBase.of(context).videoCall,
imagePath: 'video_call.svg',
subTitle: "",
isPngImage: false,
isShowBorder: selectedCallType == 1,
),
),
InkWell(
onTap: () {
setState(() {
selectedCallType = 2;
});
},
child: MedicalProfileItem(
title: TranslationBase.of(context).audioCall,
imagePath: 'audio_call.svg',
subTitle: "",
isPngImage: false,
isShowBorder: selectedCallType == 2,
),
),
InkWell(
onTap: () {
setState(() {
selectedCallType = 3;
});
},
child: MedicalProfileItem(
title: TranslationBase.of(context).phoneCall,
imagePath: 'phone_call.svg',
subTitle: "",
isPngImage: false,
isShowBorder: selectedCallType == 3,
),
),
],
),
if (selectedCallType == 3)
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
mHeight(32.0),
AutoSizeText(
TranslationBase.of(context).mobileNumber,
maxLines: 1,
minFontSize: 12,
style: TextStyle(
fontSize: SizeConfig.textMultiplier! * 2.0,
fontWeight: FontWeight.w600,
letterSpacing: -0.39,
height: 0.8,
),
),
mHeight(16.0),
PhoneNumberSelectorWidget(
onNumberChange: (value) => {
mobileNo = value,
},
onCountryChange: (value) => {
countryCode = value,
},
mobileNo: this.mobileNo,
isLiveCareTypeSelect: true,
),
],
),
],
),
),
bottomSheet: Container(
color: CustomColors.white,
padding: EdgeInsets.fromLTRB(12.0, 1.0, 12.0, 25.0),
child: DefaultButton(
TranslationBase.of(context).next,
() {
if (mobileNo.isNotEmpty) {
widget.onSelectedMethod(selectedCallType, mobileNo);
Navigator.pop(context, [selectedCallType, mobileNo]);
} else {
AppToast.showErrorToast(message: TranslationBase.of(context).enterMobileNumber);
}
},
color: CustomColors.accentColor,
),
),
);
}
}

@ -17,6 +17,7 @@ import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_call_type_select.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_scheduling/schedule_clinic_card.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_type_select.dart';
@ -37,6 +38,7 @@ import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/dragable_sheet.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
@ -95,6 +97,9 @@ class _clinic_listState extends State<ClinicList> {
String? transID;
BuildContext? localContext;
int selectedCallType = 0;
String selectedMobileNumber = "";
@override
void initState() {
liveCareClinicsListResponse = new LiveCareClinicsListResponse();
@ -128,28 +133,7 @@ class _clinic_listState extends State<ClinicList> {
}
void startLiveCare() {
int languageID = projectViewModel.isArabic ? 1 : 2;
bool isError = false;
LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
ERAppointmentFeesResponse erAppointmentFeesResponse = new ERAppointmentFeesResponse();
service.getERAppointmentFees(selectedClinicID, widget.isPharmacyLiveCare, languageID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['HasAppointment'] == true) {
isError = true;
showLiveCareCancelDialog(res['ErrorEndUserMessage'], res);
} else {
erAppointmentFeesResponse = ERAppointmentFeesResponse.fromJson(res as Map<String, dynamic>);
isError = false;
}
if (!isError) getERAppointmentTime(erAppointmentFeesResponse.getERAppointmentFeesList!);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
isError = true;
AppToast.showErrorToast(message: err, localContext: context);
});
projectViewModel.analytics.liveCare.livecare_immediate_consultation_clinic(clinic: selectedClinicName);
makePayment();
}
showLiveCareCancelDialog(String msg, res) {
@ -263,6 +247,7 @@ class _clinic_listState extends State<ClinicList> {
navigateTo(
context,
LiveCarePatmentPage(
selectedCallType: this.selectedCallType,
getERAppointmentFeesList: getERAppointmentFeesList,
waitingTime: waitingTime,
clinicName: selectedClinicName,
@ -270,22 +255,12 @@ class _clinic_listState extends State<ClinicList> {
pharmaLiveCareClientID: widget.pharmacyLiveCareQRCode))
.then(
(value) {
if (value) {
if (value != null && value) {
if (getERAppointmentFeesList.total == "0" || getERAppointmentFeesList.total == "0.0") {
addNewCallForPatientER(projectViewModel.user!.patientID.toString() + "" + DateTime.now().millisecondsSinceEpoch.toString());
} else {
navigateToPaymentMethod(getERAppointmentFeesList, context);
}
// askVideoCallPermission().then((value) {
// if (value) {
// if (getERAppointmentFeesList.total == "0" || getERAppointmentFeesList.total == "0.0") {
// addNewCallForPatientER(projectViewModel.user.patientID.toString() + "" + DateTime.now().millisecondsSinceEpoch.toString());
// } else {
// navigateToPaymentMethod(getERAppointmentFeesList, context);
// }
// }
// });
} else {
Navigator.pop(context);
}
@ -293,6 +268,42 @@ class _clinic_listState extends State<ClinicList> {
);
}
makePayment() {
showDraggableDialog(
context,
LiveCareCallTypeSelectPage(
onSelectedMethod: (int selectedCallType, String mobileNumber) {
print(selectedCallType);
print(mobileNumber);
this.selectedCallType = selectedCallType;
selectedMobileNumber = mobileNumber;
int languageID = projectViewModel.isArabic ? 1 : 2;
bool isError = false;
LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
ERAppointmentFeesResponse erAppointmentFeesResponse = new ERAppointmentFeesResponse();
service.getERAppointmentFees(selectedClinicID, widget.isPharmacyLiveCare, languageID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['HasAppointment'] == true) {
isError = true;
showLiveCareCancelDialog(res['ErrorEndUserMessage'], res);
} else {
erAppointmentFeesResponse = ERAppointmentFeesResponse.fromJson(res as Map<String, dynamic>);
isError = false;
}
if (!isError) getERAppointmentTime(erAppointmentFeesResponse.getERAppointmentFeesList!);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
isError = true;
AppToast.showErrorToast(message: err, localContext: context);
});
projectViewModel.analytics.liveCare.livecare_immediate_consultation_clinic(clinic: selectedClinicName);
},
),
);
}
Future<bool> askVideoCallPermission() async {
if (!(await Permission.camera.request().isGranted) || !(await Permission.microphone.request().isGranted)) {
return false;
@ -475,9 +486,9 @@ class _clinic_listState extends State<ClinicList> {
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async {
log("failureResult: ${failureResult.toString()}");
GifLoaderDialogUtils.hideDialog(localContext!);
AppToast.showErrorToast(message: failureResult.toString());
GifLoaderDialogUtils.hideDialog(context);
log("failureResult: ${failureResult.message.toString()}");
AppToast.showErrorToast(message: failureResult.message.toString());
},
onSuccess: (successResult) async {
GifLoaderDialogUtils.hideDialog(localContext!);
@ -507,7 +518,7 @@ class _clinic_listState extends State<ClinicList> {
browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart, context: context);
transID = Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo, isAddMilliseconds: false);
selectedPaymentMethod = paymentMethod[0]!;
selectedInstallmentPlan = paymentMethod[1]!;
selectedInstallmentPlan = paymentMethod[1] ?? "0";
this.amount = amount.toString();
browser.openPaymentBrowser(amount, "LiveCare Payment", widget.isPharmacyLiveCare ? widget.pharmacyLiveCareQRCode! : transID!, "12", authenticatedUser.emailAddress!, paymentMethod[0]!,
@ -646,7 +657,7 @@ class _clinic_listState extends State<ClinicList> {
LiveCareService service = new LiveCareService();
int languageID = projectViewModel.isArabic ? 1 : 2;
GifLoaderDialogUtils.showMyDialog(context);
service.addNewCallForPatientER(selectedClinicID, clientRequestID, languageID, widget.isPharmacyLiveCare, context).then((res) {
service.addNewCallForPatientER(selectedClinicID, clientRequestID, selectedCallType, languageID, widget.isPharmacyLiveCare, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showSuccessToast(message: "New Call has been added successfully");
widget.getLiveCareHistory();
@ -954,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) {

@ -30,6 +30,7 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/whatsapp_method_channel.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -344,7 +345,18 @@ class _ConfirmLogin extends State<ConfirmLogin> {
sharedPref.setInt(LAST_LOGIN, this.selectedOption); //this.cs.sharedService.setStorage(this.selectedOption, AuthenticationService.LAST_LOGIN);
}
loginWithSMS(type) {
loginWithSMS(type) async {
if (type == 4) {
var channel = WhatsappMethodChannel();
// var whatsappStatus = await channel.isWhatsAppInstalled();
// if(whatsappStatus) {
// print("whatapp is installed");
channel.handleHandShake();
// }else{
// print("whatapp is not installed");
// }
}
//if (!el.disabled) {
if (this.user != null && this.registerd_data == null) {
this.checkUserAuthentication(type);
@ -697,37 +709,37 @@ class _ConfirmLogin extends State<ConfirmLogin> {
}
checkIfUserAgreedBefore(CheckActivationCode result) {
// 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,
// ),
// ),
// (r) => false);
// }).catchError((err) {
// GifLoaderDialogUtils.hideDialog(context);
// print(err);
// });
// }
// }).catchError((err) {
// GifLoaderDialogUtils.hideDialog(context);
// print(err);
// });
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,
),
),
(r) => false);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
// if (result.isNeedUserAgreement == true) {
//move to agreement page.
// // move to agreement page.
// } else {
goToHome();
// goToHome();
// }
}

@ -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();
}
@ -362,12 +362,12 @@ class _Login extends State<Login> {
projectViewModel.setPrivilege(privilegeList: result);
result = CheckActivationCode.fromJson(result);
result.list.isFamily = false;
this.sharedPref.setString(BLOOD_TYPE,
await this.sharedPref.setString(BLOOD_TYPE,
result.patientBloodType != null ? result.patientBloodType : "");
this.sharedPref.setObject(USER_PROFILE, result.list);
this.sharedPref.setObject(MAIN_USER, result.list);
this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID);
this.sharedPref.setString(TOKEN, result.authenticationTokenID);
await this.sharedPref.setObject(USER_PROFILE, result.list);
await this.sharedPref.setObject(MAIN_USER, result.list);
await this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID);
await this.sharedPref.setString(TOKEN, result.authenticationTokenID);
await authenticatedUserObject.getUser(getUser: true);
authenticatedUserObject.isLogin = true;
appointmentRateViewModel.isLogin = true;

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

@ -80,21 +80,23 @@ class AskDoctorPage extends StatelessWidget {
doctor: doctorList,
isLiveCareAppointment: false,
isShowFlag: false,
onTap: () {
GifLoaderDialogUtils.showMyDialog(context);
service.getCallInfoHoursResult(doctorId: _doctor.doctorID, projectId: _doctor.projectID).then((res) {
GifLoaderDialogUtils.hideDialog(context);
Navigator.push(
context,
FadePage(
page: RequestTypePage(doctorList: _doctor),
),
);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
if (err != null) AppToast.showErrorToast(message: err.toString());
print(err);
});
onTap: () async {
if (await checkIfDoctorAvailable(_doctor, context)) {
GifLoaderDialogUtils.showMyDialog(context);
service.getCallInfoHoursResult(doctorId: _doctor.doctorID, projectId: _doctor.projectID).then((res) {
GifLoaderDialogUtils.hideDialog(context);
Navigator.push(
context,
FadePage(
page: RequestTypePage(doctorList: _doctor),
),
);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
if (err != null) AppToast.showErrorToast(message: err.toString());
print(err);
});
}
},
);
},
@ -106,6 +108,27 @@ class AskDoctorPage extends StatelessWidget {
);
}
Future<bool> checkIfDoctorAvailable(DoctorList _doctor, BuildContext context) {
bool isAvailable = false;
GifLoaderDialogUtils.showMyDialog(context);
service.isDoctorAvailable(doctorId: _doctor.doctorID, projectId: _doctor.projectID, clinicId: _doctor.clinicID).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res['IsDoctorAvailable']);
if (res['IsDoctorAvailable']) {
isAvailable = true;
} else {
isAvailable = false;
AppToast.showErrorToast(message: res['endUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
if (err != null) AppToast.showErrorToast(message: err.toString());
print(err);
});
return Future.value(isAvailable);
}
String getDate(String date) {
DateTime dateObj = DateUtil.convertStringToDate(date);
return DateUtil.getWeekDay(dateObj.weekday) +

@ -330,8 +330,8 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
currency: projectViewModel.authenticatedUserObject.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async {
GifLoaderDialogUtils.hideDialog(context);
log("failureResult: ${failureResult.toString()}");
AppToast.showErrorToast(message: failureResult.toString());
log("failureResult: ${failureResult.message.toString()}");
AppToast.showErrorToast(message: failureResult.message.toString());
},
onSuccess: (successResult) async {
log("Payfort: ${successResult.responseMessage}");

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

@ -24,6 +24,7 @@ import 'package:flutter_rating_bar/flutter_rating_bar.dart';
import 'package:open_filex/open_filex.dart';
import 'package:path_provider/path_provider.dart';
import 'package:provider/provider.dart';
import 'package:share_plus/share_plus.dart';
class ReportListWidget extends StatelessWidget {
final List<Reports> reportList;
@ -131,31 +132,48 @@ class ReportListWidget extends StatelessWidget {
if (reportList[index].status == 2)
Row(
children: [
// InkWell(
// onTap: () {
// getMedicalReportPDF(report);
// },
// child: Padding(
// padding: const EdgeInsets.only(right: 11.0, left: 11.0),
// child: Text(TranslationBase.of(context).viewReport,
// style: TextStyle(
// fontSize: 12,
// fontWeight: FontWeight.w600,
// fontStyle: FontStyle.italic,
// color: CustomColors.accentColor,
// letterSpacing: -0.48,
// height: 18 / 12,
// decoration: TextDecoration.underline)),
// ),
// ),
IconButton(
icon: Icon(Icons.email),
color: Color(0xff28323A),
constraints: BoxConstraints(),
padding: EdgeInsets.zero,
onPressed: () {
showConfirmMessage(reportList[index]);
})
InkWell(
onTap: () {
getMedicalReportPDF(report, false);
},
child: Padding(
padding: const EdgeInsets.only(right: 11.0, left: 11.0),
child: Text(TranslationBase.of(context).download,
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
fontStyle: FontStyle.italic,
color: CustomColors.accentColor,
letterSpacing: -0.48,
height: 18 / 12,
decoration: TextDecoration.underline)),
),
),
InkWell(
onTap: () {
getMedicalReportPDF(report, true);
},
child: Padding(
padding: const EdgeInsets.only(right: 11.0, left: 11.0),
child: Text(TranslationBase.of(context).share,
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
fontStyle: FontStyle.italic,
color: CustomColors.accentColor,
letterSpacing: -0.48,
height: 18 / 12,
decoration: TextDecoration.underline)),
),
),
// IconButton(
// icon: Icon(Icons.email),
// color: Color(0xff28323A),
// constraints: BoxConstraints(),
// padding: EdgeInsets.zero,
// onPressed: () {
// showConfirmMessage(reportList[index]);
// })
],
),
],
@ -187,7 +205,7 @@ class ReportListWidget extends StatelessWidget {
);
}
void getMedicalReportPDF(Reports report) {
void getMedicalReportPDF(Reports report, bool isShare) {
GifLoaderDialogUtils.showMyDialog(AppGlobal.context);
ReportsService _reportsService = locator<ReportsService>();
_reportsService
@ -195,11 +213,15 @@ class ReportListWidget extends StatelessWidget {
DateUtil.convertDateToString(report.requestDate!), report.setupId!)
.then((value) async {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
try {
String path = await _createFileFromString(value["MedicalReportBase64"], "pdf");
OpenFilex.open(path);
} catch (ex) {
AppToast.showErrorToast(message: "Cannot open file.");
String path = await _createFileFromString(value["MedicalReportBase64"], "pdf");
if (isShare) {
Share.shareXFiles([XFile(path)], text: "Medical Report");
} else {
try {
OpenFilex.open(path);
} catch (ex) {
AppToast.showErrorToast(message: "Cannot open file.");
}
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);

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

@ -1777,7 +1777,7 @@ class AuthProvider with ChangeNotifier {
Future<dynamic> checkIfUserAgreed() async {
Map<String, dynamic> request;
request = {"Region": 1};
request = {"Region": 1, "SessionID": SESSION_ID};
dynamic localRes;
try {
await new BaseAppClient().post(CHECK_USAGE_AGREEMENT, onSuccess: (dynamic response, int statusCode) {
@ -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);

@ -184,12 +184,13 @@ class ClinicListService extends BaseService {
return Future.value(localRes);
}
Future<Map> getInPatientPaymentLink(int projectID, int admissionNo, int orderID, String name, String email, num amount, String nationalID, int clinicID, context) async {
Future<Map> getInPatientPaymentLink(int paymentRequestID, int projectID, int admissionNo, int orderID, String name, String email, num amount, String nationalID, int clinicID, context) async {
Map<String, dynamic> request;
// request = {"ProjectID": projectID, "AdmissionReqNo": admissionReqNo, "AdmissionNo": admissionNo};
request = {
"ProjectID": projectID,
"PaymentRequestId": paymentRequestID,
"ClientOrderID": orderID,
"OrderDescription": "InPatient Advance Payment",
"CustomerName": name,
@ -306,9 +307,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;

@ -209,7 +209,7 @@ class LiveCareService extends BaseService {
return Future.value(localRes);
}
Future<Map> addNewCallForPatientER(int serviceID, String clientRequestID, int languageID, bool isPharma, BuildContext context) async {
Future<Map> addNewCallForPatientER(int serviceID, String clientRequestID, int callTypeID, int languageID, bool isPharma, BuildContext context) async {
Map<String, dynamic> request;
String? deviceToken;
@ -240,7 +240,8 @@ class LiveCareService extends BaseService {
"PatientID": authUser.patientID != null ? authUser.patientID : 0,
"Gender": authUser.gender != null ? authUser.gender : 0,
"LanguageID": languageID,
"IsVoip": Platform.isIOS ? true : false
"IsVoip": Platform.isIOS ? true : false,
"CallTypeID": callTypeID
};
dynamic localRes;

@ -11,6 +11,8 @@ import 'package:diplomaticquarterapp/uitl/LocalNotification.dart';
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';
@ -84,6 +86,7 @@ class _SplashScreenState extends State<SplashScreen> {
// debugPrint("ALL SHARED PREFERENCES!!!!!");
// debugPrint(jsonEncode(value));
});
// if (!kDebugMode) await FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true);
// PushNotificationHandler(context).init(); // Asyncronously
}

@ -5,6 +5,7 @@ import 'dart:ui';
import 'package:device_calendar/device_calendar.dart';
import 'package:manage_calendar_events/manage_calendar_events.dart' as ios;
import 'package:timezone/data/latest.dart' as tzl;
final DeviceCalendarPlugin deviceCalendarPlugin = DeviceCalendarPlugin();
final ios.CalendarPlugin _myPlugin = ios.CalendarPlugin();
@ -44,6 +45,7 @@ class CalendarUtils {
// }
static Future<CalendarUtils> getInstance() async {
tzl.initializeTimeZones();
if (_completer != null) {
return _completer!.future;
}
@ -65,6 +67,7 @@ class CalendarUtils {
}
Future createOrUpdateEvents({List<DateTime>? scheduleList, String? title, String? description, List<DateTime>? scheduleDateTime, List<DayOfWeek>? daysOfWeek}) async {
tzl.initializeTimeZones();
List<Event> events = [];
Location _currentLocation;
if (DateTime.now().timeZoneName == "+04")
@ -108,10 +111,10 @@ class CalendarUtils {
TZDateTime scheduleDateTimeUTZ = TZDateTime.from(scheduleDateTime!, _currentLocation);
print("writableCalendars-name: " + writableCalendars.name);
print("writableCalendars-Id: " + writableCalendars.id);
print("writableCalendarsToString: " + writableCalendars.toString());
print("writableCalendarsToString: " + writableCalendars!.id!);
print("writableCalendars-name: " + writableCalendars.name);
print("writableCalendars-Id: " + writableCalendars.id);
print("writableCalendarsToString: " + writableCalendars.toString());
print("writableCalendarsToString: " + writableCalendars!.id!);
Event event = Event(
writableCalendars!.id,
start: scheduleDateTimeUTZ,
@ -120,6 +123,8 @@ 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);
if(Platform.isAndroid) {
Result<bool> result = await deviceCalendarPlugin.hasPermissions();
@ -129,6 +134,14 @@ class CalendarUtils {
}).whenComplete(() {
print("whenComplete Calender ID " + eventId!);
});
} else {
// Result<bool> result = await deviceCalendarPlugin.hasPermissions();
// print(result);
await _myPlugin.createEvent(calendarId: writableCalendars.id!, event: iosCalEvent).catchError((e) {
print("catchError " + e.toString());
}).whenComplete(() {
print("whenComplete Calender ID iOS " + eventId!);
});
}

@ -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"),

@ -22,6 +22,7 @@ import 'package:firebase_messaging/firebase_messaging.dart' as fir;
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
// import 'package:flutter_ios_voip_kit/call_state_type.dart';
// import 'package:flutter_ios_voip_kit/flutter_ios_voip_kit.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
@ -393,7 +394,8 @@ class PushNotificationHandler {
if (remoteMessage.data['is_call'] == 'true' || remoteMessage.data['is_call'] == true) {
_incomingCall(remoteMessage.data);
// showCallkitIncoming(remoteMessage.data);
}if(remoteMessage.data['is_navigation'] == 'true' || remoteMessage.data['is_navigation'] == true ){
}
else if (remoteMessage.data['is_navigation'] == 'true' || remoteMessage.data['is_navigation'] == true) {
NavigationClinicDetails data = NavigationClinicDetails();
data.clinicId = remoteMessage.data['clinic_Id'];
data.patientId = remoteMessage.data['patient_Id'];

@ -3004,6 +3004,12 @@ class TranslationBase {
String get howToUseVerificationMethod => localizedValues["howToUseVerificationMethod"][locale.languageCode];
String get addToWaitingList => localizedValues["addToWaitingList"][locale.languageCode];
String get searchClinic => localizedValues["searchClinic"][locale.languageCode];
String get enterMobileNumber => localizedValues["enterMobileNumber"][locale.languageCode];
String get videoCall => localizedValues["videoCall"][locale.languageCode];
String get audioCall => localizedValues["audioCall"][locale.languageCode];
String get phoneCall => localizedValues["phoneCall"][locale.languageCode];
String get selectCallType => localizedValues["selectCallType"][locale.languageCode];
String get selectedCallType => localizedValues["selectedCallType"][locale.languageCode];
String get selectBranch => localizedValues["selectBranch"][locale.languageCode];
String get searchByBranch => localizedValues["searchByBranch"][locale.languageCode];
String get existingPackage => localizedValues["existingPackage"][locale.languageCode];
@ -3018,6 +3024,13 @@ 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 readMore => localizedValues["readMore"][locale.languageCode];
@ -3036,6 +3049,18 @@ class TranslationBase {
String get criticalLow => localizedValues["criticalLow"][locale.languageCode];
String get high => localizedValues["high"][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];
String get download => localizedValues["download"][locale.languageCode];
String get share => localizedValues["share"][locale.languageCode];
String get normal => localizedValues["normal"][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(

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save