diff --git a/GoogleService-Info.plist b/GoogleService-Info.plist
deleted file mode 100644
index 0c093a2a..00000000
--- a/GoogleService-Info.plist
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
- CLIENT_ID
- 864393916058-ekeb4s8tgfo58dutv0l54399t7ivr06r.apps.googleusercontent.com
- REVERSED_CLIENT_ID
- com.googleusercontent.apps.864393916058-ekeb4s8tgfo58dutv0l54399t7ivr06r
- API_KEY
- AIzaSyA_6ayGCk4fly7o7eTVBrj9kuHBYHMAOfs
- GCM_SENDER_ID
- 864393916058
- PLIST_VERSION
- 1
- BUNDLE_ID
- com.cloud.diplomaticquarterapp
- PROJECT_ID
- diplomaticquarter-d2385
- STORAGE_BUCKET
- diplomaticquarter-d2385.appspot.com
- IS_ADS_ENABLED
-
- IS_ANALYTICS_ENABLED
-
- IS_APPINVITE_ENABLED
-
- IS_GCM_ENABLED
-
- IS_SIGNIN_ENABLED
-
- GOOGLE_APP_ID
- 1:864393916058:ios:13f787bbfe6051f8b97923
- DATABASE_URL
- https://diplomaticquarter-d2385.firebaseio.com
-
-
\ No newline at end of file
diff --git a/android/app/build.gradle b/android/app/build.gradle
index 11e99a2a..336e8e53 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -39,7 +39,8 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
- applicationId "com.cloud.diplomaticquarterapp"
+// applicationId "com.cloud.diplomaticquarterapp"
+ applicationId "com.ejada.hmg.uat"
minSdkVersion 21
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
diff --git a/android/app/google-services.json b/android/app/google-services.json
index a4655794..6d1d75a9 100644
--- a/android/app/google-services.json
+++ b/android/app/google-services.json
@@ -1,37 +1,39 @@
{
"project_info": {
- "project_number": "864393916058",
- "firebase_url": "https://diplomaticquarter-d2385.firebaseio.com",
- "project_id": "diplomaticquarter-d2385",
- "storage_bucket": "diplomaticquarter-d2385.appspot.com"
+ "project_number": "815750722565",
+ "firebase_url": "https://api-project-815750722565.firebaseio.com",
+ "project_id": "api-project-815750722565",
+ "storage_bucket": "api-project-815750722565.appspot.com"
},
"client": [
{
"client_info": {
- "mobilesdk_app_id": "1:864393916058:android:5b5a65cd6d8c18b4b97923",
+ "mobilesdk_app_id": "1:815750722565:android:62281cd3e5df4063",
"android_client_info": {
- "package_name": "com.cloud.diplomaticquarterapp"
+ "package_name": "com.ejada.hmg.uat"
}
},
"oauth_client": [
{
- "client_id": "864393916058-tphjrn8j39ntevt32ekcvmll8aue7qql.apps.googleusercontent.com",
+ "client_id": "815750722565-3a0gc7neins0eoahdrimrfksk0sqice8.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
- "current_key": "AIzaSyBdV3mos1BPhUzNKCj2KANJtiO3o2zh9IM"
+ "current_key": "AIzaSyDUfg6AKM1-00WyzpvLImUBC46wFrq9-qw"
}
],
"services": {
+ "analytics_service": {
+ "status": 1
+ },
"appinvite_service": {
- "other_platform_oauth_client": [
- {
- "client_id": "864393916058-tphjrn8j39ntevt32ekcvmll8aue7qql.apps.googleusercontent.com",
- "client_type": 3
- }
- ]
+ "status": 1,
+ "other_platform_oauth_client": []
+ },
+ "ads_service": {
+ "status": 2
}
}
}
diff --git a/android/app/gradle/wrapper/gradle-wrapper.properties b/android/app/gradle/wrapper/gradle-wrapper.properties
index 8fc3bbec..a2c20300 100644
--- a/android/app/gradle/wrapper/gradle-wrapper.properties
+++ b/android/app/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,5 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
+#distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index 1a3d4cfe..63f94294 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -5,6 +5,7 @@
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. -->
+
@@ -29,12 +30,16 @@
-
+
+
+
+
+
+ android:label="Dr. Alhabib">
+
+
+
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
index db77bb4b..348b5116 100644
Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
index 17987b79..410b1b1e 100644
Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
index 09d43914..bb9943af 100644
Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
index d5f1c8d3..0b9d9359 100644
Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
index 4d6372ee..aaa9808d 100644
Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/android/build.gradle b/android/build.gradle
index 32bda0b1..c0fc03b3 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -9,16 +9,17 @@ buildscript {
}
dependencies {
- classpath 'com.android.tools.build:gradle:4.0.1'
+ classpath 'com.android.tools.build:gradle:3.5.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
- classpath 'com.google.gms:google-services:4.3.4'
+ classpath 'com.google.gms:google-services:4.3.8'
}
}
allprojects {
repositories {
google()
- jcenter()
+// jcenter()
+ mavenCentral()
}
}
diff --git a/android/google-services.json b/android/google-services.json
index a4655794..dd4038cf 100644
--- a/android/google-services.json
+++ b/android/google-services.json
@@ -1,37 +1,39 @@
{
"project_info": {
- "project_number": "864393916058",
- "firebase_url": "https://diplomaticquarter-d2385.firebaseio.com",
- "project_id": "diplomaticquarter-d2385",
- "storage_bucket": "diplomaticquarter-d2385.appspot.com"
+ "project_number": "815750722565",
+ "firebase_url": "https://api-project-815750722565.firebaseio.com",
+ "project_id": "api-project-815750722565",
+ "storage_bucket": "api-project-815750722565.appspot.com"
},
"client": [
{
"client_info": {
- "mobilesdk_app_id": "1:864393916058:android:5b5a65cd6d8c18b4b97923",
+ "mobilesdk_app_id": "1:815750722565:android:62281cd3e5df4063",
"android_client_info": {
- "package_name": "com.cloud.diplomaticquarterapp"
+ "package_name": "com.ejada.hmg"
}
},
"oauth_client": [
{
- "client_id": "864393916058-tphjrn8j39ntevt32ekcvmll8aue7qql.apps.googleusercontent.com",
+ "client_id": "815750722565-3a0gc7neins0eoahdrimrfksk0sqice8.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
- "current_key": "AIzaSyBdV3mos1BPhUzNKCj2KANJtiO3o2zh9IM"
+ "current_key": "AIzaSyDUfg6AKM1-00WyzpvLImUBC46wFrq9-qw"
}
],
"services": {
+ "analytics_service": {
+ "status": 1
+ },
"appinvite_service": {
- "other_platform_oauth_client": [
- {
- "client_id": "864393916058-tphjrn8j39ntevt32ekcvmll8aue7qql.apps.googleusercontent.com",
- "client_type": 3
- }
- ]
+ "status": 1,
+ "other_platform_oauth_client": []
+ },
+ "ads_service": {
+ "status": 2
}
}
}
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
index 1f9de82f..6fdb0e44 100644
--- a/android/gradle/wrapper/gradle-wrapper.properties
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Thu Sep 03 16:26:30 EEST 2020
+#Wed Jul 14 15:55:18 AST 2021
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
diff --git a/assets/images/1.png b/assets/images/1.png
new file mode 100644
index 00000000..c90aa190
Binary files /dev/null and b/assets/images/1.png differ
diff --git a/assets/images/2.png b/assets/images/2.png
new file mode 100644
index 00000000..48891b32
Binary files /dev/null and b/assets/images/2.png differ
diff --git a/assets/images/3.png b/assets/images/3.png
new file mode 100644
index 00000000..721f6e6c
Binary files /dev/null and b/assets/images/3.png differ
diff --git a/assets/images/4.png b/assets/images/4.png
new file mode 100644
index 00000000..6d61b45f
Binary files /dev/null and b/assets/images/4.png differ
diff --git a/assets/images/5.png b/assets/images/5.png
new file mode 100644
index 00000000..e45f432c
Binary files /dev/null and b/assets/images/5.png differ
diff --git a/assets/images/AlHabibMedicalService/health_calculator/bmi.png b/assets/images/AlHabibMedicalService/health_calculator/bmi.png
new file mode 100644
index 00000000..6df6c9f9
Binary files /dev/null and b/assets/images/AlHabibMedicalService/health_calculator/bmi.png differ
diff --git a/assets/images/AlHabibMedicalService/health_calculator/bmr.png b/assets/images/AlHabibMedicalService/health_calculator/bmr.png
new file mode 100644
index 00000000..db31ed43
Binary files /dev/null and b/assets/images/AlHabibMedicalService/health_calculator/bmr.png differ
diff --git a/assets/images/AlHabibMedicalService/health_calculator/body-fat.png b/assets/images/AlHabibMedicalService/health_calculator/body-fat.png
new file mode 100644
index 00000000..97b05df3
Binary files /dev/null and b/assets/images/AlHabibMedicalService/health_calculator/body-fat.png differ
diff --git a/assets/images/bc_parking.png b/assets/images/bc_parking.png
new file mode 100644
index 00000000..64633516
Binary files /dev/null and b/assets/images/bc_parking.png differ
diff --git a/assets/images/new-design/pending.svg b/assets/images/new-design/pending.svg
new file mode 100644
index 00000000..2c26afbd
--- /dev/null
+++ b/assets/images/new-design/pending.svg
@@ -0,0 +1,6 @@
+
diff --git a/assets/images/new-design/verification_check.svg b/assets/images/new-design/verification_check.svg
new file mode 100644
index 00000000..1b3cdcca
--- /dev/null
+++ b/assets/images/new-design/verification_check.svg
@@ -0,0 +1,8 @@
+
diff --git a/assets/images/new/hmg_logo.png b/assets/images/new/hmg_logo.png
new file mode 100644
index 00000000..2555cfa9
Binary files /dev/null and b/assets/images/new/hmg_logo.png differ
diff --git a/assets/images/nfc/ic_done.png b/assets/images/nfc/ic_done.png
new file mode 100644
index 00000000..5b802855
Binary files /dev/null and b/assets/images/nfc/ic_done.png differ
diff --git a/assets/images/nfc/ic_nfc.png b/assets/images/nfc/ic_nfc.png
new file mode 100644
index 00000000..274e1b8c
Binary files /dev/null and b/assets/images/nfc/ic_nfc.png differ
diff --git a/assets/images/powerd-by.jpg b/assets/images/powerd-by.jpg
index 93bdbb18..eda1688c 100644
Binary files a/assets/images/powerd-by.jpg and b/assets/images/powerd-by.jpg differ
diff --git a/assets/images/powerd-by2.jpg b/assets/images/powerd-by2.jpg
new file mode 100644
index 00000000..93bdbb18
Binary files /dev/null and b/assets/images/powerd-by2.jpg differ
diff --git a/assets/payment_options/payment_options.png b/assets/payment_options/payment_options.png
new file mode 100644
index 00000000..4bb83fec
Binary files /dev/null and b/assets/payment_options/payment_options.png differ
diff --git a/google-services.json b/google-services_DQ.json
similarity index 100%
rename from google-services.json
rename to google-services_DQ.json
diff --git a/google-services_HMG.json b/google-services_HMG.json
new file mode 100644
index 00000000..dd4038cf
--- /dev/null
+++ b/google-services_HMG.json
@@ -0,0 +1,42 @@
+{
+ "project_info": {
+ "project_number": "815750722565",
+ "firebase_url": "https://api-project-815750722565.firebaseio.com",
+ "project_id": "api-project-815750722565",
+ "storage_bucket": "api-project-815750722565.appspot.com"
+ },
+ "client": [
+ {
+ "client_info": {
+ "mobilesdk_app_id": "1:815750722565:android:62281cd3e5df4063",
+ "android_client_info": {
+ "package_name": "com.ejada.hmg"
+ }
+ },
+ "oauth_client": [
+ {
+ "client_id": "815750722565-3a0gc7neins0eoahdrimrfksk0sqice8.apps.googleusercontent.com",
+ "client_type": 3
+ }
+ ],
+ "api_key": [
+ {
+ "current_key": "AIzaSyDUfg6AKM1-00WyzpvLImUBC46wFrq9-qw"
+ }
+ ],
+ "services": {
+ "analytics_service": {
+ "status": 1
+ },
+ "appinvite_service": {
+ "status": 1,
+ "other_platform_oauth_client": []
+ },
+ "ads_service": {
+ "status": 2
+ }
+ }
+ }
+ ],
+ "configuration_version": "1"
+}
\ No newline at end of file
diff --git a/hms-plugins/flutter-hms-location/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java b/hms-plugins/flutter-hms-location/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
new file mode 100644
index 00000000..975e9019
--- /dev/null
+++ b/hms-plugins/flutter-hms-location/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
@@ -0,0 +1,25 @@
+package io.flutter.plugins;
+
+import io.flutter.plugin.common.PluginRegistry;
+import com.huawei.hms.flutter.location.LocationPlugin;
+
+/**
+ * Generated file. Do not edit.
+ */
+public final class GeneratedPluginRegistrant {
+ public static void registerWith(PluginRegistry registry) {
+ if (alreadyRegisteredWith(registry)) {
+ return;
+ }
+ LocationPlugin.registerWith(registry.registrarFor("com.huawei.hms.flutter.location.LocationPlugin"));
+ }
+
+ private static boolean alreadyRegisteredWith(PluginRegistry registry) {
+ final String key = GeneratedPluginRegistrant.class.getCanonicalName();
+ if (registry.hasPlugin(key)) {
+ return true;
+ }
+ registry.registrarFor(key);
+ return false;
+ }
+}
diff --git a/hms-plugins/flutter-hms-location/android/local.properties b/hms-plugins/flutter-hms-location/android/local.properties
new file mode 100644
index 00000000..c6cb6fc0
--- /dev/null
+++ b/hms-plugins/flutter-hms-location/android/local.properties
@@ -0,0 +1,2 @@
+sdk.dir=C:\\Users\\sultan.khan\\AppData\\Local\\Android\\Sdk
+flutter.sdk=C:\\Program Files\\flutter
\ No newline at end of file
diff --git a/hms-plugins/flutter-hms-location/ios/Flutter/Generated.xcconfig b/hms-plugins/flutter-hms-location/ios/Flutter/Generated.xcconfig
new file mode 100644
index 00000000..4527e66e
--- /dev/null
+++ b/hms-plugins/flutter-hms-location/ios/Flutter/Generated.xcconfig
@@ -0,0 +1,14 @@
+// This is a generated file; do not edit or check into version control.
+FLUTTER_ROOT=C:\Program Files\flutter
+FLUTTER_APPLICATION_PATH=C:\Projects\DQ\hms-plugins\flutter-hms-location
+FLUTTER_TARGET=lib\main.dart
+FLUTTER_BUILD_DIR=build
+SYMROOT=${SOURCE_ROOT}/../build\ios
+OTHER_LDFLAGS=$(inherited) -framework Flutter
+FLUTTER_FRAMEWORK_DIR=C:\Program Files\flutter\bin\cache\artifacts\engine\ios
+FLUTTER_BUILD_NAME=5.0.0
+FLUTTER_BUILD_NUMBER=301
+DART_OBFUSCATION=false
+TRACK_WIDGET_CREATION=false
+TREE_SHAKE_ICONS=false
+PACKAGE_CONFIG=.packages
diff --git a/hms-plugins/flutter-hms-location/ios/Flutter/flutter_export_environment.sh b/hms-plugins/flutter-hms-location/ios/Flutter/flutter_export_environment.sh
new file mode 100644
index 00000000..87c35592
--- /dev/null
+++ b/hms-plugins/flutter-hms-location/ios/Flutter/flutter_export_environment.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+# This is a generated file; do not edit or check into version control.
+export "FLUTTER_ROOT=C:\Program Files\flutter"
+export "FLUTTER_APPLICATION_PATH=C:\Projects\DQ\hms-plugins\flutter-hms-location"
+export "FLUTTER_TARGET=lib\main.dart"
+export "FLUTTER_BUILD_DIR=build"
+export "SYMROOT=${SOURCE_ROOT}/../build\ios"
+export "OTHER_LDFLAGS=$(inherited) -framework Flutter"
+export "FLUTTER_FRAMEWORK_DIR=C:\Program Files\flutter\bin\cache\artifacts\engine\ios"
+export "FLUTTER_BUILD_NAME=5.0.0"
+export "FLUTTER_BUILD_NUMBER=301"
+export "DART_OBFUSCATION=false"
+export "TRACK_WIDGET_CREATION=false"
+export "TREE_SHAKE_ICONS=false"
+export "PACKAGE_CONFIG=.packages"
diff --git a/hms-plugins/flutter-hms-location/ios/Runner/GeneratedPluginRegistrant.h b/hms-plugins/flutter-hms-location/ios/Runner/GeneratedPluginRegistrant.h
new file mode 100644
index 00000000..ed9a5c61
--- /dev/null
+++ b/hms-plugins/flutter-hms-location/ios/Runner/GeneratedPluginRegistrant.h
@@ -0,0 +1,17 @@
+//
+// Generated file. Do not edit.
+//
+
+#ifndef GeneratedPluginRegistrant_h
+#define GeneratedPluginRegistrant_h
+
+#import
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface GeneratedPluginRegistrant : NSObject
++ (void)registerWithRegistry:(NSObject*)registry;
+@end
+
+NS_ASSUME_NONNULL_END
+#endif /* GeneratedPluginRegistrant_h */
diff --git a/hms-plugins/flutter-hms-location/ios/Runner/GeneratedPluginRegistrant.m b/hms-plugins/flutter-hms-location/ios/Runner/GeneratedPluginRegistrant.m
new file mode 100644
index 00000000..60dfa42b
--- /dev/null
+++ b/hms-plugins/flutter-hms-location/ios/Runner/GeneratedPluginRegistrant.m
@@ -0,0 +1,12 @@
+//
+// Generated file. Do not edit.
+//
+
+#import "GeneratedPluginRegistrant.h"
+
+@implementation GeneratedPluginRegistrant
+
++ (void)registerWithRegistry:(NSObject*)registry {
+}
+
+@end
diff --git a/ios/Podfile b/ios/Podfile
index d68afba2..89424e2a 100644
--- a/ios/Podfile
+++ b/ios/Podfile
@@ -3,6 +3,7 @@
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
+$FirebaseAnalyticsWithoutAdIdSupport = true
project 'Runner', {
'Debug' => :debug,
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
index d36b1fab..e83c3bf5 100644
--- a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
+++ b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -1,122 +1,128 @@
{
- "images" : [
- {
- "size" : "20x20",
- "idiom" : "iphone",
- "filename" : "Icon-App-20x20@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "20x20",
- "idiom" : "iphone",
- "filename" : "Icon-App-20x20@3x.png",
- "scale" : "3x"
- },
- {
- "size" : "29x29",
- "idiom" : "iphone",
- "filename" : "Icon-App-29x29@1x.png",
- "scale" : "1x"
- },
- {
- "size" : "29x29",
- "idiom" : "iphone",
- "filename" : "Icon-App-29x29@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "29x29",
- "idiom" : "iphone",
- "filename" : "Icon-App-29x29@3x.png",
- "scale" : "3x"
- },
- {
- "size" : "40x40",
- "idiom" : "iphone",
- "filename" : "Icon-App-40x40@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "40x40",
- "idiom" : "iphone",
- "filename" : "Icon-App-40x40@3x.png",
- "scale" : "3x"
- },
- {
- "size" : "60x60",
- "idiom" : "iphone",
- "filename" : "Icon-App-60x60@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "60x60",
- "idiom" : "iphone",
- "filename" : "Icon-App-60x60@3x.png",
- "scale" : "3x"
- },
- {
- "size" : "20x20",
- "idiom" : "ipad",
- "filename" : "Icon-App-20x20@1x.png",
- "scale" : "1x"
- },
- {
- "size" : "20x20",
- "idiom" : "ipad",
- "filename" : "Icon-App-20x20@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "29x29",
- "idiom" : "ipad",
- "filename" : "Icon-App-29x29@1x.png",
- "scale" : "1x"
- },
- {
- "size" : "29x29",
- "idiom" : "ipad",
- "filename" : "Icon-App-29x29@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "40x40",
- "idiom" : "ipad",
- "filename" : "Icon-App-40x40@1x.png",
- "scale" : "1x"
- },
- {
- "size" : "40x40",
- "idiom" : "ipad",
- "filename" : "Icon-App-40x40@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "76x76",
- "idiom" : "ipad",
- "filename" : "Icon-App-76x76@1x.png",
- "scale" : "1x"
- },
- {
- "size" : "76x76",
- "idiom" : "ipad",
- "filename" : "Icon-App-76x76@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "83.5x83.5",
- "idiom" : "ipad",
- "filename" : "Icon-App-83.5x83.5@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "1024x1024",
- "idiom" : "ios-marketing",
- "filename" : "Icon-App-1024x1024@1x.png",
- "scale" : "1x"
+ "images":[
+ {
+ "idiom":"iphone",
+ "size":"20x20",
+ "scale":"2x",
+ "filename":"Icon-App-20x20@2x.png"
+ },
+ {
+ "idiom":"iphone",
+ "size":"20x20",
+ "scale":"3x",
+ "filename":"Icon-App-20x20@3x.png"
+ },
+ {
+ "idiom":"iphone",
+ "size":"29x29",
+ "scale":"1x",
+ "filename":"Icon-App-29x29@1x.png"
+ },
+ {
+ "idiom":"iphone",
+ "size":"29x29",
+ "scale":"2x",
+ "filename":"Icon-App-29x29@2x.png"
+ },
+ {
+ "idiom":"iphone",
+ "size":"29x29",
+ "scale":"3x",
+ "filename":"Icon-App-29x29@3x.png"
+ },
+ {
+ "idiom":"iphone",
+ "size":"40x40",
+ "scale":"2x",
+ "filename":"Icon-App-40x40@2x.png"
+ },
+ {
+ "idiom":"iphone",
+ "size":"40x40",
+ "scale":"3x",
+ "filename":"Icon-App-40x40@3x.png"
+ },
+ {
+ "idiom":"iphone",
+ "size":"60x60",
+ "scale":"2x",
+ "filename":"Icon-App-60x60@2x.png"
+ },
+ {
+ "idiom":"iphone",
+ "size":"60x60",
+ "scale":"3x",
+ "filename":"Icon-App-60x60@3x.png"
+ },
+ {
+ "idiom":"iphone",
+ "size":"76x76",
+ "scale":"2x",
+ "filename":"Icon-App-76x76@2x.png"
+ },
+ {
+ "idiom":"ipad",
+ "size":"20x20",
+ "scale":"1x",
+ "filename":"Icon-App-20x20@1x.png"
+ },
+ {
+ "idiom":"ipad",
+ "size":"20x20",
+ "scale":"2x",
+ "filename":"Icon-App-20x20@2x.png"
+ },
+ {
+ "idiom":"ipad",
+ "size":"29x29",
+ "scale":"1x",
+ "filename":"Icon-App-29x29@1x.png"
+ },
+ {
+ "idiom":"ipad",
+ "size":"29x29",
+ "scale":"2x",
+ "filename":"Icon-App-29x29@2x.png"
+ },
+ {
+ "idiom":"ipad",
+ "size":"40x40",
+ "scale":"1x",
+ "filename":"Icon-App-40x40@1x.png"
+ },
+ {
+ "idiom":"ipad",
+ "size":"40x40",
+ "scale":"2x",
+ "filename":"Icon-App-40x40@2x.png"
+ },
+ {
+ "idiom":"ipad",
+ "size":"76x76",
+ "scale":"1x",
+ "filename":"Icon-App-76x76@1x.png"
+ },
+ {
+ "idiom":"ipad",
+ "size":"76x76",
+ "scale":"2x",
+ "filename":"Icon-App-76x76@2x.png"
+ },
+ {
+ "idiom":"ipad",
+ "size":"83.5x83.5",
+ "scale":"2x",
+ "filename":"Icon-App-83.5x83.5@2x.png"
+ },
+ {
+ "size" : "1024x1024",
+ "idiom" : "ios-marketing",
+ "scale" : "1x",
+ "filename" : "ItunesArtwork@2x.png"
+ }
+ ],
+ "info":{
+ "version":1,
+ "author":"easyappicon"
}
- ],
- "info" : {
- "version" : 1,
- "author" : "xcode"
- }
}
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
index 28c6bf03..0e65243a 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
index 2ccbfd96..2e4c7963 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
index f091b6b0..59435c76 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
index 4cde1211..20855aad 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
index d0ef06e7..11d35da4 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
index dcdc2306..93523cbe 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
index 2ccbfd96..2e4c7963 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
index c8f9ed8f..00bb8dbd 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
index a6d6b860..3eaa1fb6 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
index a6d6b860..3eaa1fb6 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
index 75b2d164..fd80aa41 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
index c4df70d3..39c7958d 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
index 6a84f41e..47a96a43 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
index d0e1f585..8c4ca7b0 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ
diff --git a/ios/Runner/GoogleService-Info.plist b/ios/Runner/GoogleService-Info.plist
index 0c093a2a..633037cb 100644
--- a/ios/Runner/GoogleService-Info.plist
+++ b/ios/Runner/GoogleService-Info.plist
@@ -3,21 +3,23 @@
CLIENT_ID
- 864393916058-ekeb4s8tgfo58dutv0l54399t7ivr06r.apps.googleusercontent.com
+ 815750722565-da8p56le8bd6apsbm9eft0jjl1rtpgkt.apps.googleusercontent.com
REVERSED_CLIENT_ID
- com.googleusercontent.apps.864393916058-ekeb4s8tgfo58dutv0l54399t7ivr06r
+ com.googleusercontent.apps.815750722565-da8p56le8bd6apsbm9eft0jjl1rtpgkt
+ ANDROID_CLIENT_ID
+ 815750722565-m14h8mkosm7cnq6uh6rhqr54dn02d705.apps.googleusercontent.com
API_KEY
- AIzaSyA_6ayGCk4fly7o7eTVBrj9kuHBYHMAOfs
+ AIzaSyDiXnCO00li4V7Ioa2YZ_M4ECxRsu_P9tA
GCM_SENDER_ID
- 864393916058
+ 815750722565
PLIST_VERSION
1
BUNDLE_ID
- com.cloud.diplomaticquarterapp
+ com.HMG.HMG-Smartphone
PROJECT_ID
- diplomaticquarter-d2385
+ api-project-815750722565
STORAGE_BUCKET
- diplomaticquarter-d2385.appspot.com
+ api-project-815750722565.appspot.com
IS_ADS_ENABLED
IS_ANALYTICS_ENABLED
@@ -29,8 +31,8 @@
IS_SIGNIN_ENABLED
GOOGLE_APP_ID
- 1:864393916058:ios:13f787bbfe6051f8b97923
+ 1:815750722565:ios:328ec247a81a2ca23c186c
DATABASE_URL
- https://diplomaticquarter-d2385.firebaseio.com
+ https://api-project-815750722565.firebaseio.com
\ No newline at end of file
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
index ae084167..72bd4ac9 100644
--- a/ios/Runner/Info.plist
+++ b/ios/Runner/Info.plist
@@ -11,7 +11,7 @@
CFBundleInfoDictionaryVersion
6.0
CFBundleName
- diplomaticquarterapp
+ Dr. Alhabib
CFBundlePackageType
APPL
CFBundleShortVersionString
diff --git a/lib/analytics/analytic-events.dart b/lib/analytics/analytic-events.dart
new file mode 100644
index 00000000..3e107d95
--- /dev/null
+++ b/lib/analytics/analytic-events.dart
@@ -0,0 +1,69 @@
+import 'package:diplomaticquarterapp/uitl/utils.dart';
+
+class _Event{
+ String name;
+ String description;
+ bool active;
+ _Event(dynamic map){
+ name = map['name'];
+ description = map['description'];
+ active = map['active'];
+ }
+
+ flutterName() => 'f: $name';
+}
+
+class AnalyticEvents{
+ static _Event get(String key) {
+ var e = _Event(mapping[key]);
+ if(e == null){
+ var label = labelFrom(className: key); // Convert Class Name in to Label (HomeCare -> Home Care)
+ e = _Event({"name": label, "active":true, "description":key});
+ }
+ return e;
+ }
+
+ static var mapping = const {
+ "HomeHealthCarePage" : {
+ "active" : true,
+ "name" : "Home Health Care Page",
+ "description" : "",
+ },
+ "SplashScreen" : {
+ "active" : true,
+ "name" : "Splash Screen",
+ "description" : "",
+ },
+ "LandingPage" : {
+ "active" : true,
+ "name" : "Landing Page",
+ "description" : "",
+ },
+ "WelcomeLogin" : {
+ "active" : true,
+ "name" : "Welcome Login",
+ "description" : "",
+ },
+ "LoginType" : {
+ "active" : true,
+ "name" : "Login Type",
+ "description" : "",
+ },
+ "Login" : {
+ "active" : true,
+ "name" : "Login",
+ "description" : "",
+ },
+ "ForgotPassword" : {
+ "active" : true,
+ "name" : "Forgot Password",
+ "description" : "",
+ },
+ "" : {
+ "active" : true,
+ "name" : "",
+ "description" : "",
+ },
+ };
+}
+
diff --git a/lib/analytics/google-analytics.dart b/lib/analytics/google-analytics.dart
new file mode 100644
index 00000000..f4bf8b72
--- /dev/null
+++ b/lib/analytics/google-analytics.dart
@@ -0,0 +1,85 @@
+import 'package:diplomaticquarterapp/analytics/analytic-events.dart';
+import 'package:diplomaticquarterapp/routes.dart';
+import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
+import 'package:firebase_analytics/firebase_analytics.dart';
+import 'package:firebase_analytics/observer.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+
+class Singleton {
+ const Singleton(); //Constant constructor
+
+ void hello() { print('Hello world'); }
+}
+
+var analytics = FirebaseAnalytics();
+
+class GAnalytics{
+ const GAnalytics();
+ static GAnalytics shared = const GAnalytics();
+ NavObserver navObserver() => NavObserver();
+}
+// adb shell setprop debug.firebase.analytics.app com.ejada.hmg -> Android
+class NavObserver extends RouteObserver>{
+
+ _sendScreenView(PageRoute route) async{
+
+
+ log(String className){
+ var event = AnalyticEvents.get(className);
+ if(event.active){
+ analytics.setCurrentScreen(screenName: event.flutterName(), screenClassOverride: className).catchError( (Object error) {
+ debugPrint('$FirebaseAnalyticsObserver: $error');
+ },
+ test: (Object error) {
+ return error is PlatformException;
+ },
+ );
+ }
+ }
+
+ if(route.settings.name != null && route.settings.name.isNotEmpty && route.settings.name != "null"){
+ var class_ = routes[route.settings.name](0);
+ if(class_ != null)
+ log(class_.toStringShort());
+
+ }else if(route is FadePage){
+ var class_ = route.page;
+ if(class_ != null)
+ log(class_.toStringShort());
+
+ }else if(route is MaterialPageRoute){
+ var class_ = route.builder(null);
+ if (class_ != null)
+ log(class_.toStringShort());
+
+ }else{
+ print("");
+ }
+
+ }
+
+ @override
+ void didPush(Route route, Route previousRoute) {
+ super.didPush(route, previousRoute);
+ if (route is PageRoute) {
+ _sendScreenView(route);
+ }
+ }
+
+ @override
+ void didReplace({Route newRoute, Route oldRoute}) {
+ super.didReplace(newRoute: newRoute, oldRoute: oldRoute);
+ if (newRoute is PageRoute) {
+ _sendScreenView(newRoute);
+ }
+ }
+
+ @override
+ void didPop(Route route, Route previousRoute) {
+ super.didPop(route, previousRoute);
+ // if (previousRoute is PageRoute && route is PageRoute) {
+ // _sendScreenView(previousRoute);
+ // }
+ }
+}
\ No newline at end of file
diff --git a/lib/config/config.dart b/lib/config/config.dart
index f87b7628..1a5278d4 100644
--- a/lib/config/config.dart
+++ b/lib/config/config.dart
@@ -14,15 +14,15 @@ const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items';
const PACKAGES_ORDERS = '/api/orders';
const BASE_URL = 'https://uat.hmgwebservices.com/';
-//const BASE_URL = 'https://hmgwebservices.com/';
+// const BASE_URL = 'https://hmgwebservices.com/';
// Pharmacy UAT URLs
const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
// Pharmacy Production URLs
-// const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/';
-// const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/';
+//const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/';
+//const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/';
const PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity';
@@ -33,8 +33,7 @@ const GET_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_GetAllPoints';
const LOG_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_InsertPatientFileInfo';
// Delivery Driver
-const DRIVER_LOCATION =
- 'Services/Patients.svc/REST/PatientER_GetDriverLocation';
+const DRIVER_LOCATION = 'Services/Patients.svc/REST/PatientER_GetDriverLocation';
//weather
const WEATHER_INDICATOR = 'Services/Weather.svc/REST/GetCityInfo';
@@ -42,51 +41,36 @@ const WEATHER_INDICATOR = 'Services/Weather.svc/REST/GetCityInfo';
const GET_PRIVILEGE = 'Services/Patients.svc/REST/Service_Privilege';
// Wifi Credentials
-const WIFI_CREDENTIALS =
- "Services/Patients.svc/Hmg_SMS_Get_By_ProjectID_And_PatientID";
+const WIFI_CREDENTIALS = "Services/Patients.svc/Hmg_SMS_Get_By_ProjectID_And_PatientID";
///Doctor
-const GET_MY_DOCTOR =
- 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
+const GET_MY_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
const GET_DOCTOR_PROFILE = 'Services/Doctors.svc/REST/GetDocProfiles';
-const GET_DOCTOR_RATING_NOTES =
- 'Services/Doctors.svc/REST/dr_GetNotesDoctorRating';
-const GET_DOCTOR_RATING_DETAILS =
- 'Services/Doctors.svc/REST/dr_GetDoctorRatingDetails';
+const GET_DOCTOR_RATING_NOTES = 'Services/Doctors.svc/REST/dr_GetNotesDoctorRating';
+const GET_DOCTOR_RATING_DETAILS = 'Services/Doctors.svc/REST/dr_GetDoctorRatingDetails';
const GET_DOCTOR_RATING = 'Services/Doctors.svc/REST/dr_GetAvgDoctorRating';
///Prescriptions
const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList';
-const GET_PRESCRIPTIONS_ALL_ORDERS =
- 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
-const GET_PRESCRIPTION_REPORT =
- 'Services/Patients.svc/REST/INP_GetPrescriptionReport';
-const SEND_PRESCRIPTION_EMAIL =
- 'Services/Notifications.svc/REST/SendPrescriptionEmail';
-const GET_PRESCRIPTION_REPORT_ENH =
- 'Services/Patients.svc/REST/GetPrescriptionReport_enh';
+const GET_PRESCRIPTIONS_ALL_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
+const GET_PRESCRIPTION_REPORT = 'Services/Patients.svc/REST/INP_GetPrescriptionReport';
+const SEND_PRESCRIPTION_EMAIL = 'Services/Notifications.svc/REST/SendPrescriptionEmail';
+const GET_PRESCRIPTION_REPORT_ENH = 'Services/Patients.svc/REST/GetPrescriptionReport_enh';
///Lab Order
const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders';
-const GET_Patient_LAB_SPECIAL_RESULT =
- 'Services/Patients.svc/REST/GetPatientLabSpecialResults';
-const SEND_LAB_RESULT_EMAIL =
- 'Services/Notifications.svc/REST/SendLabReportEmail';
-const GET_Patient_LAB_RESULT =
- 'Services/Patients.svc/REST/GetPatientLabResults';
-const GET_Patient_LAB_ORDERS_RESULT =
- 'Services/Patients.svc/REST/GetPatientLabOrdersResults';
+const GET_Patient_LAB_SPECIAL_RESULT = 'Services/Patients.svc/REST/GetPatientLabSpecialResults';
+const SEND_LAB_RESULT_EMAIL = 'Services/Notifications.svc/REST/SendLabReportEmail';
+const GET_Patient_LAB_RESULT = 'Services/Patients.svc/REST/GetPatientLabResults';
+const GET_Patient_LAB_ORDERS_RESULT = 'Services/Patients.svc/REST/GetPatientLabOrdersResults';
///
const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders';
-const GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT =
- 'Services/Patients.svc/REST/GetPatientLabResultsByAppointmentNo';
+const GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT = 'Services/Patients.svc/REST/GetPatientLabResultsByAppointmentNo';
-const GET_PATIENT_ORDERS_DETAILS =
- 'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead';
+const GET_PATIENT_ORDERS_DETAILS = 'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead';
const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL';
-const SEND_RAD_REPORT_EMAIL =
- 'Services/Notifications.svc/REST/SendRadReportEmail';
+const SEND_RAD_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendRadReportEmail';
///Feedback
const SEND_FEEDBACK = 'Services/COCWS.svc/REST/InsertCOCItemInSPList';
@@ -95,32 +79,27 @@ const GET_PATIENT_AppointmentHistory = 'Services'
'/Doctors.svc/REST/PateintHasAppoimentHistory';
///VITAL SIGN
-const GET_PATIENT_VITAL_SIGN =
- 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign';
+const GET_PATIENT_VITAL_SIGN = 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign';
///Er Nearest
-const GET_NEAREST_HOSPITAL =
- 'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime';
+const GET_NEAREST_HOSPITAL = 'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime';
///ED Online
-const ER_GET_VISUAL_TRIAGE_QUESTIONS =
- "services/Doctors.svc/REST/ER_GetVisualTriageQuestions";
-const ER_SAVE_TRIAGE_INFORMATION =
- "services/Doctors.svc/REST/ER_SaveTriageInformation";
+const ER_GET_VISUAL_TRIAGE_QUESTIONS = "services/Doctors.svc/REST/ER_GetVisualTriageQuestions";
+const ER_SAVE_TRIAGE_INFORMATION = "services/Doctors.svc/REST/ER_SaveTriageInformation";
const ER_GetPatientPaymentInformationForERClinic =
"services/Doctors.svc/REST/ER_GetPatientPaymentInformationForERClinic";
///Er Nearest
-const GET_AMBULANCE_REQUEST =
- 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod';
-const GET_PATIENT_ALL_PRES_ORDERS =
- 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
-const GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID =
- 'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID';
-const UPDATE_PRESS_ORDER =
- 'Services/Patients.svc/REST/PatientER_UpdatePresOrder';
-const INSERT_ER_INERT_PRES_ORDER =
- 'Services/Patients.svc/REST/PatientER_InsertPresOrder';
+const GET_AMBULANCE_REQUEST = 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod';
+const GET_PATIENT_ALL_PRES_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
+const GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID = 'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID';
+const UPDATE_PRESS_ORDER = 'Services/Patients.svc/REST/PatientER_UpdatePresOrder';
+const INSERT_ER_INERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder';
+
+/// ER RRT
+const GET_ALL_RC_TRANSPORTATION = 'rc/api/Transportation/getalltransportation';
+const GET_ALL_RRT_QUESTIONS = 'Services/Patients.svc/REST/PatientER_RRT_GetAllQuestions';
///FindUs
const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations';
@@ -129,15 +108,13 @@ const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations';
const GET_LIVECHAT_REQUEST = 'Services/Patients.svc/REST/GetPatientICProjects';
///babyInformation
-const GET_BABYINFORMATION_REQUEST =
- 'Services/Community.svc/REST/GetBabyByUserID';
+const GET_BABYINFORMATION_REQUEST = 'Services/Community.svc/REST/GetBabyByUserID';
///Get Baby By User ID
const GET_BABY_BY_USER_ID = 'Services/Community.svc/REST/GetBabyByUserID';
///userInformation
-const GET_USERINFORMATION_REQUEST =
- 'Services/Community.svc/REST/GetUserInformation_New';
+const GET_USERINFORMATION_REQUEST = 'Services/Community.svc/REST/GetUserInformation_New';
///Update email
const UPDATE_PATENT_EMAIL = 'Services/Patients.svc/REST/UpdatePateintEmail';
@@ -159,29 +136,21 @@ const GET_TABLE_REQUEST = 'Services/Community.svc/REST/CreateVaccinationTable';
const GET_CITIES_REQUEST = 'Services/Lists.svc/REST/GetAllCities';
///BloodDetails
-const GET_BLOOD_REQUEST =
- 'services/PatientVarification.svc/REST/BloodDonation_GetBloodGroupDetails';
+const GET_BLOOD_REQUEST = 'services/PatientVarification.svc/REST/BloodDonation_GetBloodGroupDetails';
-const SAVE_BLOOD_REQUEST =
- 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType';
+const SAVE_BLOOD_REQUEST = 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType';
-const GET_BLOOD_AGREEMENT =
- 'Services/PatientVarification.svc/REST/CheckUserAgreementForBloodDonation';
-const SAVE_BLOOD_AGREEMENT =
- 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation';
+const GET_BLOOD_AGREEMENT = 'Services/PatientVarification.svc/REST/CheckUserAgreementForBloodDonation';
+const SAVE_BLOOD_AGREEMENT = 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation';
///Reports
const REPORTS = 'Services/Doctors.svc/REST/GetPatientMedicalReportStatusInfo';
-const INSERT_REQUEST_FOR_MEDICAL_REPORT =
- 'Services/Doctors.svc/REST/InsertRequestForMedicalReport';
-const SEND_MEDICAL_REPORT_EMAIL =
- 'Services/Notifications.svc/REST/SendMedicalReportEmail';
+const INSERT_REQUEST_FOR_MEDICAL_REPORT = 'Services/Doctors.svc/REST/InsertRequestForMedicalReport';
+const SEND_MEDICAL_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendMedicalReportEmail';
///Rate
-const IS_LAST_APPOITMENT_RATED =
- 'Services/Doctors.svc/REST/IsLastAppoitmentRated';
-const GET_APPOINTMENT_DETAILS_BY_NO =
- 'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo';
+const IS_LAST_APPOITMENT_RATED = 'Services/Doctors.svc/REST/IsLastAppoitmentRated';
+const GET_APPOINTMENT_DETAILS_BY_NO = 'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo';
const GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID';
@@ -193,8 +162,7 @@ const GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID';
const GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized";
//URL to get active appointment list
-const GET_ACTIVE_APPOINTMENTS_LIST_URL =
- "Services/Doctors.svc/Rest/Dr_GetAppointmentActiveNumber";
+const GET_ACTIVE_APPOINTMENTS_LIST_URL = "Services/Doctors.svc/Rest/Dr_GetAppointmentActiveNumber";
//URL to get projects list
const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject';
@@ -203,115 +171,87 @@ const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject';
const GET_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/SearchDoctorsByTime";
//URL to dental doctors list
-const GET_DENTAL_DOCTORS_LIST_URL =
- "Services/Doctors.svc/REST/Dental_DoctorChiefComplaintMapping";
+const GET_DENTAL_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/Dental_DoctorChiefComplaintMapping";
//URL to get doctor free slots
const GET_DOCTOR_FREE_SLOTS = "Services/Doctors.svc/REST/GetDoctorFreeSlots";
//URL to insert appointment
-const INSERT_SPECIFIC_APPOINTMENT =
- "Services/Doctors.svc/REST/InsertSpecificAppointment";
+const INSERT_SPECIFIC_APPOINTMENT = "Services/Doctors.svc/REST/InsertSpecificAppointment";
//URL to get patient share
-const GET_PATIENT_SHARE =
- "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO";
+const GET_PATIENT_SHARE = "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO";
//URL to get patient appointment history
-const GET_PATIENT_APPOINTMENT_HISTORY =
- "Services/Doctors.svc/REST/PateintHasAppoimentHistory";
+const GET_PATIENT_APPOINTMENT_HISTORY = "Services/Doctors.svc/REST/PateintHasAppoimentHistory";
-const SEND_REPORT_EYE_EMAIL =
- "Services/Notifications.svc/REST/SendGlassesPrescriptionEmail";
+const SEND_REPORT_EYE_EMAIL = "Services/Notifications.svc/REST/SendGlassesPrescriptionEmail";
-const SEND_CONTACT_LENS_PRESCRIPTION_EMAIL =
- "Services/Notifications.svc/REST/SendContactLensPrescriptionEmail";
+const SEND_CONTACT_LENS_PRESCRIPTION_EMAIL = "Services/Notifications.svc/REST/SendContactLensPrescriptionEmail";
//URL to get patient appointment curfew history
-const GET_PATIENT_APPOINTMENT_CURFEW_HISTORY =
- "Services/Doctors.svc/REST/AppoimentHistoryForCurfew";
+const GET_PATIENT_APPOINTMENT_CURFEW_HISTORY = "Services/Doctors.svc/REST/AppoimentHistoryForCurfew";
//URL to confirm appointment
-const CONFIRM_APPOINTMENT =
- "Services/MobileNotifications.svc/REST/ConfirmAppointment";
+const CONFIRM_APPOINTMENT = "Services/MobileNotifications.svc/REST/ConfirmAppointment";
-const INSERT_VIDA_REQUEST =
- "Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart";
+const INSERT_VIDA_REQUEST = "Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart";
//URL to cancel appointment
const CANCEL_APPOINTMENT = "Services/Doctors.svc/REST/CancelAppointment";
//URL get appointment QR
-const GENERATE_QR_APPOINTMENT =
- "Services/Doctors.svc/REST/GenerateQRAppointmentNo";
+const GENERATE_QR_APPOINTMENT = "Services/Doctors.svc/REST/GenerateQRAppointmentNo";
//URL send email appointment QR
-const EMAIL_QR_APPOINTMENT =
- "Services/Notifications.svc/REST/sendEmailForOnLineCheckin";
+const EMAIL_QR_APPOINTMENT = "Services/Notifications.svc/REST/sendEmailForOnLineCheckin";
//URL check payment status
-const CHECK_PAYMENT_STATUS =
- "Services/PayFort_Serv.svc/REST/GetRequestStatusByRequestID";
+const CHECK_PAYMENT_STATUS = "Services/PayFort_Serv.svc/REST/GetRequestStatusByRequestID";
//URL create advance payment
const CREATE_ADVANCE_PAYMENT = "Services/Doctors.svc/REST/CreateAdvancePayment";
-const HIS_CREATE_ADVANCE_PAYMENT =
- "Services/Patients.svc/REST/HIS_CreateAdvancePayment";
+const HIS_CREATE_ADVANCE_PAYMENT = "Services/Patients.svc/REST/HIS_CreateAdvancePayment";
-const ADD_ADVANCE_NUMBER_REQUEST =
- 'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest';
+const ADD_ADVANCE_NUMBER_REQUEST = 'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest';
-const IS_ALLOW_ASK_DOCTOR =
- 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
-const GET_CALL_REQUEST_TYPE =
- 'Services/Doctors.svc/REST/GetCallRequestType_LOV';
-const ADD_VIDA_REQUEST =
- 'Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart';
+const IS_ALLOW_ASK_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
+const GET_CALL_REQUEST_TYPE = 'Services/Doctors.svc/REST/GetCallRequestType_LOV';
+const ADD_VIDA_REQUEST = 'Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart';
const SEND_CALL_REQUEST = 'Services/Doctors.svc/REST/InsertCallInfo';
-const GET_LIVECARE_CLINICS =
- 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinics';
+const GET_LIVECARE_CLINICS = 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinics';
-const GET_LIVECARE_SCHEDULE_CLINICS =
- 'Services/Doctors.svc/REST/PatientER_GetClinicsHaveSchedule';
+const GET_LIVECARE_SCHEDULE_CLINICS = 'Services/Doctors.svc/REST/PatientER_GetClinicsHaveSchedule';
-const GET_LIVECARE_SCHEDULE_CLINIC_DOCTOR_LIST =
- 'Services/Doctors.svc/REST/PatientER_GetDoctorByClinicID';
+const GET_LIVECARE_SCHEDULE_CLINIC_DOCTOR_LIST = 'Services/Doctors.svc/REST/PatientER_GetDoctorByClinicID';
-const GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS =
- 'Services/Doctors.svc/REST/PatientER_GetDoctorFreeSlots';
+const GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS = 'Services/Doctors.svc/REST/PatientER_GetDoctorFreeSlots';
-const INSERT_LIVECARE_SCHEDULE_APPOINTMENT =
- 'Services/Doctors.svc/REST/InsertSpecificAppoitmentForSchedule';
+const INSERT_LIVECARE_SCHEDULE_APPOINTMENT = 'Services/Doctors.svc/REST/InsertSpecificAppoitmentForSchedule';
const GET_PATIENT_SHARE_LIVECARE =
"Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNOForLiveCare";
-const GET_LIVECARE_CLINIC_TIMING =
- 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinicsServiceTimingsSchedule';
+const GET_LIVECARE_CLINIC_TIMING = 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinicsServiceTimingsSchedule';
-const GET_ER_APPOINTMENT_FEES =
- 'Services/DoctorApplication.svc/REST/GetERAppointmentFees';
+const GET_ER_APPOINTMENT_FEES = 'Services/DoctorApplication.svc/REST/GetERAppointmentFees';
const GET_ER_APPOINTMENT_TIME = 'Services/ER_VirtualCall.svc/REST/GetRestTime';
-const ADD_NEW_CALL_FOR_PATIENT_ER =
- 'Services/DoctorApplication.svc/REST/NewCallForPatientER';
+const ADD_NEW_CALL_FOR_PATIENT_ER = 'Services/DoctorApplication.svc/REST/NewCallForPatientER';
-const GET_LIVECARE_HISTORY =
- 'Services/ER_VirtualCall.svc/REST/GetPatientErVirtualHistory';
-const CANCEL_LIVECARE_REQUEST =
- 'Services/ER_VirtualCall.svc/REST/DeleteErRequest';
-const SEND_LIVECARE_INVOICE_EMAIL =
- 'Services/Notifications.svc/REST/SendInvoiceForLiveCare';
+const GET_LIVECARE_HISTORY = 'Services/ER_VirtualCall.svc/REST/GetPatientErVirtualHistory';
+const CANCEL_LIVECARE_REQUEST = 'Services/ER_VirtualCall.svc/REST/DeleteErRequest';
+const SEND_LIVECARE_INVOICE_EMAIL = 'Services/Notifications.svc/REST/SendInvoiceForLiveCare';
const GET_USER_TERMS = 'Services/Patients.svc/REST/GetUserTermsAndConditions';
-const UPDATE_HEALTH_TERMS =
- 'services/Patients.svc/REST/UpdatePateintHealthSummaryReport';
+const UPDATE_HEALTH_TERMS = 'services/Patients.svc/REST/UpdatePateintHealthSummaryReport';
+
+const GET_PATIENT_HEALTH_STATS = 'Services/Patients.svc/REST/Med_GetTransactionsSts';
-const GET_PATIENT_HEALTH_STATS =
- 'Services/Patients.svc/REST/Med_GetTransactionsSts';
+const SEND_CHECK_IN_NFC_REQUEST = 'Services/Patients.svc/REST/Patient_CheckAppointmentValidation_ForNFC';
//URL to get medicine and pharmacies list
const CHANNEL = 3;
@@ -332,21 +272,16 @@ var DeviceTypeID = Platform.isIOS ? 1 : 2;
const LANGUAGE_ID = 2;
const GET_PHARMCY_ITEMS = "Services/Lists.svc/REST/GetPharmcyItems_Region";
const GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList";
-const GET_PAtIENTS_INSURANCE =
- "Services/Patients.svc/REST/Get_PatientInsuranceDetails";
-const GET_PAtIENTS_INSURANCE_UPDATED =
- "Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory";
+const GET_PAtIENTS_INSURANCE = "Services/Patients.svc/REST/Get_PatientInsuranceDetails";
+const GET_PAtIENTS_INSURANCE_UPDATED = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory";
const INSURANCE_DETAILS = "Services/Patients.svc/REST/Get_InsuranceCheckList";
-const GET_PATIENT_INSURANCE_DETAILS =
- "Services/Patients.svc/REST/PatientER_GetPatientInsuranceDetails";
-const UPLOAD_INSURANCE_CARD =
- 'Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate';
+const GET_PATIENT_INSURANCE_DETAILS = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceDetails";
+const UPLOAD_INSURANCE_CARD = 'Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate';
const GET_VACCINES = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID";
const GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail";
-const GET_PAtIENTS_INSURANCE_APPROVALS =
- "Services/Patients.svc/REST/GetApprovalStatus";
+const GET_PAtIENTS_INSURANCE_APPROVALS = "Services/Patients.svc/REST/GetApprovalStatus";
const SEARCH_BOT = 'HabibiChatBotApi/BotInterface/GetVoiceCommandResponse';
const GET_VACCINATIONS_ITEMS = "/Services/ERP.svc/REST/GET_VACCINATIONS_ITEMS";
@@ -356,81 +291,57 @@ const GET_PATIENT_SICK_LEAVE = 'Services/Patients.svc/REST/GetPatientSickLeave';
const SendSickLeaveEmail = 'Services/Notifications.svc/REST/SendSickLeaveEmail';
-const GET_PATIENT_AdVANCE_BALANCE_AMOUNT =
- 'Services/Patients.svc/REST/GetPatientAdvanceBalanceAmount';
-const GET_PATIENT_INFO_BY_ID =
- 'Services/Doctors.svc/REST/GetPatientInfoByPatientID';
+const GET_PATIENT_AdVANCE_BALANCE_AMOUNT = 'Services/Patients.svc/REST/GetPatientAdvanceBalanceAmount';
+const GET_PATIENT_INFO_BY_ID = 'Services/Doctors.svc/REST/GetPatientInfoByPatientID';
const GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER =
'Services/Patients.svc/REST/AP_GetPatientInfoByPatientIDandMobileNumber';
-const SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT =
- 'Services/Authentication.svc/REST/SendActivationCodeForAdvancePayment';
+const SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = 'Services/Authentication.svc/REST/SendActivationCodeForAdvancePayment';
const CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT =
'Services/Authentication.svc/REST/CheckActivationCodeForAdvancePayment';
-const GET_COVID_DRIVETHRU_PROJECT_LIST =
- 'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter';
+const GET_COVID_DRIVETHRU_PROJECT_LIST = 'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter';
+
+const GET_COVID_DRIVETHRU_PAYMENT_INFO = 'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation';
-const GET_COVID_DRIVETHRU_PAYMENT_INFO =
- 'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation';
+const GET_COVID_DRIVETHRU_FREE_SLOTS = 'Services/Doctors.svc/REST/COVID19_GetFreeSlots';
-const GET_COVID_DRIVETHRU_FREE_SLOTS =
- 'Services/Doctors.svc/REST/COVID19_GetFreeSlots';
+const GET_COVID_DRIVETHRU_PROCEDURES_LIST =
+ 'Services/Doctors.svc/REST/COVID19_GetTestProcedures';
///Smartwatch Integration Services
-const GET_PATIENT_LAST_RECORD =
- 'Services/Patients.svc/REST/Med_GetPatientLastRecord';
+const GET_PATIENT_LAST_RECORD = 'Services/Patients.svc/REST/Med_GetPatientLastRecord';
///My Trackers
-const GET_DIABETIC_RESULT_AVERAGE =
- 'Services/Patients.svc/REST/Patient_GetDiabeticResultAverage';
-const GET_DIABTEC_RESULT =
- 'Services/Patients.svc/REST/Patient_GetDiabtecResults';
-const ADD_DIABTEC_RESULT =
- 'Services/Patients.svc/REST/Patient_AddDiabtecResult';
-
-const GET_BLOOD_PRESSURE_RESULT_AVERAGE =
- 'Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage';
-const GET_BLOOD_PRESSURE_RESULT =
- 'Services/Patients.svc/REST/Patient_GetBloodPressureResult';
-const ADD_BLOOD_PRESSURE_RESULT =
- 'Services/Patients.svc/REST/Patient_AddBloodPressureResult';
-
-const GET_WEIGHT_PRESSURE_RESULT_AVERAGE =
- 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResultAverage';
-const GET_WEIGHT_PRESSURE_RESULT =
- 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResult';
-const ADD_WEIGHT_PRESSURE_RESULT =
- 'Services/Patients.svc/REST/Patient_AddWeightMeasurementResult';
+const GET_DIABETIC_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetDiabeticResultAverage';
+const GET_DIABTEC_RESULT = 'Services/Patients.svc/REST/Patient_GetDiabtecResults';
+const ADD_DIABTEC_RESULT = 'Services/Patients.svc/REST/Patient_AddDiabtecResult';
+
+const GET_BLOOD_PRESSURE_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage';
+const GET_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_GetBloodPressureResult';
+const ADD_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_AddBloodPressureResult';
+
+const GET_WEIGHT_PRESSURE_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResultAverage';
+const GET_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResult';
+const ADD_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_AddWeightMeasurementResult';
const ADD_ACTIVE_PRESCRIPTIONS_REPORT_BY_PATIENT_ID =
'Services/Patients.svc/Rest/GetActivePrescriptionReportByPatientID';
-const GET_CALL_INFO_HOURS_RESULT =
- 'Services/Doctors.svc/REST/GetCallInfoHoursResult';
-const GET_CALL_REQUEST_TYPE_LOV =
- 'Services/Doctors.svc/REST/GetCallRequestType_LOV';
-
-const UPDATE_DIABETIC_RESULT =
- 'Services/Patients.svc/REST/Patient_UpdateDiabeticResult';
-
-const SEND_AVERAGE_BLOOD_SUGAR_REPORT =
- 'Services/Notifications.svc/REST/SendAverageBloodSugarReport';
-const DEACTIVATE_DIABETIC_STATUS =
- 'services/Patients.svc/REST/Patient_DeactivateDiabeticStatus';
-const DEACTIVATE_BLOOD_PRESSURES_STATUS =
- 'services/Patients.svc/REST/Patient_DeactivateBloodPressureStatus';
-
-const UPDATE_BLOOD_PRESSURE_RESULT =
- 'Services/Patients.svc/REST/Patient_UpdateBloodPressureResult';
-const SEND_AVERAGE_BLOOD_WEIGHT_REPORT =
- 'Services/Notifications.svc/REST/SendAverageBodyWeightReport';
-const SEND_AVERAGE_BLOOD_PRESSURE_REPORT =
- 'Services/Notifications.svc/REST/SendAverageBloodPressureReport';
-
-const UPDATE_WEIGHT_PRESSURE_RESULT =
- 'Services/Patients.svc/REST/Patient_UpdateWeightMeasurementResult';
-const DEACTIVATE_WEIGHT_PRESSURE_RESULT =
- 'services/Patients.svc/REST/Patient_DeactivateWeightMeasurementStatus';
+const GET_CALL_INFO_HOURS_RESULT = 'Services/Doctors.svc/REST/GetCallInfoHoursResult';
+const GET_CALL_REQUEST_TYPE_LOV = 'Services/Doctors.svc/REST/GetCallRequestType_LOV';
+
+const UPDATE_DIABETIC_RESULT = 'Services/Patients.svc/REST/Patient_UpdateDiabeticResult';
+
+const SEND_AVERAGE_BLOOD_SUGAR_REPORT = 'Services/Notifications.svc/REST/SendAverageBloodSugarReport';
+const DEACTIVATE_DIABETIC_STATUS = 'services/Patients.svc/REST/Patient_DeactivateDiabeticStatus';
+const DEACTIVATE_BLOOD_PRESSURES_STATUS = 'services/Patients.svc/REST/Patient_DeactivateBloodPressureStatus';
+
+const UPDATE_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_UpdateBloodPressureResult';
+const SEND_AVERAGE_BLOOD_WEIGHT_REPORT = 'Services/Notifications.svc/REST/SendAverageBodyWeightReport';
+const SEND_AVERAGE_BLOOD_PRESSURE_REPORT = 'Services/Notifications.svc/REST/SendAverageBloodPressureReport';
+
+const UPDATE_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_UpdateWeightMeasurementResult';
+const DEACTIVATE_WEIGHT_PRESSURE_RESULT = 'services/Patients.svc/REST/Patient_DeactivateWeightMeasurementStatus';
const GET_DOCTOR_RESPONSE = 'Services/Patients.svc/REST/GetDoctorResponse';
const UPDATE_READ_STATUS = 'Services/Patients.svc/REST/UpdateReadStatus';
const INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo';
@@ -438,39 +349,31 @@ const INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo';
const GET_PATIENT_ALLERGIES = 'Services/Patients.svc/REST/GetPatientAllergies';
// H2O
-const H2O_GET_USER_PROGRESS =
- "Services/H2ORemainder.svc/REST/H2O_GetUserProgress";
-const H2O_INSERT_USER_ACTIVITY =
- "Services/H2ORemainder.svc/REST/H2O_InsertUserActivity";
-const H2O_GET_USER_DETAIL =
- "Services/H2ORemainder.svc/REST/H2O_GetUserDetails_New";
-const H2O_UPDATE_USER_DETAIL =
- "Services/H2ORemainder.svc/REST/H2O_UpdateUserDetails_New";
-const H2O_UNDO_USER_ACTIVITY =
- "Services/H2ORemainder.svc/REST/H2o_UndoUserActivity";
+const H2O_GET_USER_PROGRESS = "Services/H2ORemainder.svc/REST/H2O_GetUserProgress";
+const H2O_INSERT_USER_ACTIVITY = "Services/H2ORemainder.svc/REST/H2O_InsertUserActivity";
+const H2O_GET_USER_DETAIL = "Services/H2ORemainder.svc/REST/H2O_GetUserDetails_New";
+const H2O_UPDATE_USER_DETAIL = "Services/H2ORemainder.svc/REST/H2O_UpdateUserDetails_New";
+const H2O_UNDO_USER_ACTIVITY = "Services/H2ORemainder.svc/REST/H2o_UndoUserActivity";
//E_Referral Services
-const GET_ALL_RELATIONSHIP_TYPES =
- "Services/Patients.svc/REST/GetAllRelationshipTypes";
-const SEND_ACTIVATION_CODE_FOR_E_REFERRAL =
- 'Services/Authentication.svc/REST/SendActivationCodeForEReferral';
-const CHECK_ACTIVATION_CODE_FOR_E_REFERRAL =
- 'Services/Authentication.svc/REST/CheckActivationCodeForEReferral';
+const GET_ALL_RELATIONSHIP_TYPES = "Services/Patients.svc/REST/GetAllRelationshipTypes";
+const SEND_ACTIVATION_CODE_FOR_E_REFERRAL = 'Services/Authentication.svc/REST/SendActivationCodeForEReferral';
+const CHECK_ACTIVATION_CODE_FOR_E_REFERRAL = 'Services/Authentication.svc/REST/CheckActivationCodeForEReferral';
const GET_ALL_CITIES = 'services/Lists.svc/rest/GetAllCities';
const CREATE_E_REFERRAL = "Services/Patients.svc/REST/CreateEReferral";
const GET_E_REFERRALS = "Services/Patients.svc/REST/GetEReferrals";
// Encillary Orders
-const GET_ANCILLARY_ORDERS =
- 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderList';
+const GET_ANCILLARY_ORDERS = 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderList';
-const GET_ANCILLARY_ORDERS_DETAILS =
- 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderProcList';
+const GET_ANCILLARY_ORDERS_DETAILS = 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderProcList';
//Pharmacy wishlist
// const GET_WISHLIST = "http://swd-pharapp-01:7200/api/shopping_cart_items/";
+const GET_DOCTOR_LIST_BY_TIME = "Services/Doctors.svc/REST/SearchDoctorsByTime";
+
// pharmacy
const PHARMACY_AUTORZIE_CUSTOMER = "AutorizeCustomer";
const PHARMACY_VERIFY_CUSTOMER = "VerifyCustomer";
@@ -496,50 +399,34 @@ const GET_SHIPPING_OPTIONS = "get_shipping_option/";
const DELETE_SHOPPING_CART = "delete_shopping_cart_items/";
const DELETE_SHOPPING_CART_ALL = "delete_shopping_cart_item_by_customer/";
const ORDER_SHOPPING_CART = "orders";
-const GET_LACUM_ACCOUNT_INFORMATION =
- "Services/Patients.svc/REST/GetLakumAccountInformation";
-const GET_LACUM_GROUP_INFORMATION =
- "Services/Patients.svc/REST/GetlakumInQueryInfoGrouping";
-const LACUM_ACCOUNT_ACTIVATE =
- "Services/Patients.svc/REST/LakumAccountActivation";
-const LACUM_ACCOUNT_DEACTIVATE =
- "Services/Patients.svc/REST/LakumAccountDeactivation";
-const CREATE_LAKUM_ACCOUNT =
- "Services/Patients.svc/REST/PHR_CreateLakumAccount";
-const TRANSFER_YAHALA_LOYALITY_POINTS =
- "Services/Patients.svc/REST/TransferYaHalaLoyaltyPoints";
-const LAKUM_GET_USER_TERMS_AND_CONDITIONS =
- "Services/ERP.svc/REST/GetUserTermsAndConditionsForEPharmcy";
+const GET_LACUM_ACCOUNT_INFORMATION = "Services/Patients.svc/REST/GetLakumAccountInformation";
+const GET_LACUM_GROUP_INFORMATION = "Services/Patients.svc/REST/GetlakumInQueryInfoGrouping";
+const LACUM_ACCOUNT_ACTIVATE = "Services/Patients.svc/REST/LakumAccountActivation";
+const LACUM_ACCOUNT_DEACTIVATE = "Services/Patients.svc/REST/LakumAccountDeactivation";
+const CREATE_LAKUM_ACCOUNT = "Services/Patients.svc/REST/PHR_CreateLakumAccount";
+const TRANSFER_YAHALA_LOYALITY_POINTS = "Services/Patients.svc/REST/TransferYaHalaLoyaltyPoints";
+const LAKUM_GET_USER_TERMS_AND_CONDITIONS = "Services/ERP.svc/REST/GetUserTermsAndConditionsForEPharmcy";
const PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList';
const GET_RECOMMENDED_PRODUCT = 'alsoProduct/';
const GET_MOST_VIEWED_PRODUCTS = "mostview?";
const GET_NEW_PRODUCTS = "newproducts?";
// Home Health Care
-const HHC_GET_ALL_SERVICES =
- "Services/Patients.svc/REST/PatientER_HHC_GetAllServices";
-const HHC_GET_ALL_CMC_SERVICES =
- "Services/Patients.svc/REST/PatientER_CMC_GetAllServices";
-const PATIENT_ER_UPDATE_PRES_ORDER =
- "Services/Patients.svc/REST/PatientER_UpdatePresOrder";
-const GET_ORDER_DETAIL_BY_ID =
- "Services/Patients.svc/REST/PatientER_HHC_GetTransactionsForOrder";
-const GET_CMC_ORDER_DETAIL_BY_ID =
- "Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder";
+const HHC_GET_ALL_SERVICES = "Services/Patients.svc/REST/PatientER_HHC_GetAllServices";
+const HHC_GET_ALL_CMC_SERVICES = "Services/Patients.svc/REST/PatientER_CMC_GetAllServices";
+const PATIENT_ER_UPDATE_PRES_ORDER = "Services/Patients.svc/REST/PatientER_UpdatePresOrder";
+const GET_ORDER_DETAIL_BY_ID = "Services/Patients.svc/REST/PatientER_HHC_GetTransactionsForOrder";
+const GET_CMC_ORDER_DETAIL_BY_ID = "Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder";
const GET_CHECK_UP_ITEMS = "Services/Patients.svc/REST/GetCheckUpItems";
const PUSH_NOTIFICATION_GET_ALL_NOTIFICATIONS =
'Services/MobileNotifications.svc/REST/PushNotification_GetAllNotifications';
const PUSH_NOTIFICATION_SET_MESSAGES_FROM_POOL_AS_READ =
'Services/MobileNotifications.svc/REST/PushNotification_SetMessagesFromPoolAsRead';
-const GET_PATIENT_ALL_PRES_ORD =
- 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
-const PATIENT_ER_INSERT_PRES_ORDER =
- 'Services/Patients.svc/REST/PatientER_InsertPresOrder';
+const GET_PATIENT_ALL_PRES_ORD = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
+const PATIENT_ER_INSERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder';
const PHARMACY_MAKE_REVIEW = 'epharmacy/api/insertreviews';
-const BLOOD_DONATION_REGISTER_BLOOD_TYPE =
- 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType';
-const ADD_USER_AGREEMENT_FOR_BLOOD_DONATION =
- 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation';
+const BLOOD_DONATION_REGISTER_BLOOD_TYPE = 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType';
+const ADD_USER_AGREEMENT_FOR_BLOOD_DONATION = 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation';
//Pharmacy wishlist
const GET_WISHLIST = "shopping_cart_items/";
@@ -572,8 +459,7 @@ const GET_SUB_PRODUCTS = 'products?categoryid=';
const GET_FINAL_PRODUCTS =
'products?fields=id,reviews,discount_ids,name,namen,localized_names,display_order,short_description,full_description,full_descriptionn,sku,order_minimum_quantity,order_maximum_quantity,price,old_price,images,is_rx,rx_message,rx_messagen,discount_name,discount_namen,approved_rating_sum,approved_total_reviews,allow_back_in_stock_subscriptions,stock_quantity,stock_availability,stock_availabilityn,discount_percentage&CategoryId=';
const GET_CLINIC_CATEGORY = 'Services/Doctors.svc/REST/DP_GetClinicCategory';
-const GET_DISEASE_BY_CLINIC_ID =
- 'Services/Doctors.svc/REST/DP_GetDiseasesByClinicID';
+const GET_DISEASE_BY_CLINIC_ID = 'Services/Doctors.svc/REST/DP_GetDiseasesByClinicID';
const SEARCH_DOCTOR_BY_TIME = 'Services/Doctors.svc/REST/SearchDoctorsByTime';
const TIMER_MIN = 10;
@@ -589,6 +475,8 @@ const SCAN_QR_CODE = 'productbysku/';
const FILTERED_PRODUCTS = 'products?categoryids=';
+const GET_DOCTOR_LIST_CALCULATION = "Services/Doctors.svc/REST/GetCallculationDoctors";
+
class AppGlobal {
static var context;
diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart
index 8c044739..46a9ff4f 100644
--- a/lib/config/localized_values.dart
+++ b/lib/config/localized_values.dart
@@ -97,30 +97,29 @@ const Map localizedValues = {
'payment': {'en': 'Payment', 'ar': 'الدفع'},
'cancel-nocaps': {'en': 'Cancel', 'ar': 'الغاء'},
'set-reminder': {'en': 'Set Reminder', 'ar': 'تعيين تذكير'},
-
+ "national-id-number": {"en": "National ID Number", "ar": "رقم الهوية الوطنيةالاقامة"},
+ "medical-file-number": {"en": "Medical File Number", "ar": "رقم الملف الطبي"},
'login': {'en': 'Login', 'ar': 'تسجيل الدخول'},
'loginregister': {'en': 'Login / Register', 'ar': 'تسجيل الدخول'},
'poweredBy': {'en': 'Powered By', 'ar': 'مشغل بواسطة'},
"welcome": {"en": "Welcome", "ar": "مرحبا"},
"welcome-to": {"en": "Welcome to", "ar": "مرحبا بك في"},
- "dr-sulaiman-text": {"en": "Dr. Sulaiman Al Habib", "ar": "د. سليمان الحبيب"},
"patient-app": {"en": "Patient App", "ar": "تطبيق المريض"},
"welcome_text": {"en": "Dr. Sulaiman Al Habib Mobile Application", "ar": "الدكتور سليمان الحبيب لتطبيقات الهاتف المتحرك"},
+ "dr-sulaiman-text": {"en": "Dr. Sulaiman Al Habib", "ar": "د. سليمان الحبيب"},
'welcome_text2': {'en': 'Have you visited AlHabib Medical Group before? ', 'ar': 'هل قمت بزيارة مجموعة الحبيب الطبية من قبل؟'},
'yes': {'en': 'Yes', 'ar': 'نعم'},
'no': {'en': 'No', 'ar': 'لا'},
"logintyperadio": {"en": "Choose from below options to login to your medical file.", "ar": "اختر من الخيارات أدناه لتسجيل الدخول إلى ملفك الطبي."},
"registernow": {"en": "Register Now", "ar": "تسجيل الان"},
"nationalID": {"en": "Enter the Identification Number", "ar": "أدخل رقم الهوية الوطنية او الاقامة"},
- "national-id-number": {"en": "National ID Number", "ar": "رقم الهوية الوطنيةالاقامة"},
- "medical-file-number": {"en": "Medical File Number", "ar": "رقم الملف الطبي"},
"national-id": {"en": "National ID", "ar": "رقم الهوية"},
"fileNo": {"en": "File Number", "ar": "رقم الملف"},
"fileno": {"en": "File No", "ar": "رقم الملف"},
"forgotFileNo": {"en": "Forgot file Number?", "ar": "نسيت رقم الملف الطبي؟"},
"forgotFileNoTitle": {"en": "Forgot medical file", "ar": "نسيت رقم الملف"},
- "enter-national-id": {"en": "Please Enter Mobile Number and National ID Number", "ar": "الرجاء إدخال رقم الجوال ورقم الهوية"},
+ "enter-national-id": {"en": "Please enter mobile number and identification number", "ar": "الرجاء إدخال رقم الجوال ورقم الهوية"},
"profile-info": {"en": "Please enter profile information", "ar": "الرجاء إدخال معلومات الملف الشخصي"},
"submit": {"en": "Submit", "ar": "ارسال"},
"forgot-desc": {"en": "Enter the mobile number to receive the Medical file Number via SMS", "ar": "أدخل رقم الجوال المسجل لاستلام رقم الملف عن طريق الرسائل النصية"},
@@ -133,10 +132,8 @@ const Map localizedValues = {
"verify-with-faceid": {"en": "Face ID", "ar": "معرف الوجه"},
"verify-with-sms": {"en": "SMS", "ar": "الرسائل القصيرة"},
"verify-with-whatsapp": {"en": "Whatsapp", "ar": " الواتس اب"},
- "verify-through": {"en": "Verify Through", "ar": " تحقق من خلال"},
- "last-login": {"en": "Last Login Details:", "ar": "آخر تسجيل دخول"},
- "last-login-with": {"en": "Verification Type:", "ar": "نوع التحقق:"},
- "please-verify": {"en": "Please Verify", "ar": "ارجوك تحقق:"},
+ "last-login": {"en": "LAST LOGIN AT:", "ar": "آخر تسجيل دخول"},
+ "last-login-with": {"en": "VERIFICATION TYPE:", "ar": "نوع التحقق:"},
"verify-fingerprint": {
"en": "To activate the fingerprint login service, please verify data by using one of the following options.",
"ar": "لتفعيل خدمة الدخول بالبصمة، يرجى اختيار احدى القنوات التالية للتحقق من البيانات"
@@ -184,7 +181,7 @@ const Map localizedValues = {
'askDocNotAllowed': {'en': 'This service will be available for last 15 days doctor Visit only', 'ar': 'هذه الخدمة متاحة للزيارات خلال اخر 15 يوم فقط'},
"more-verify": {"en": "More Verification Options", "ar": "المزيد من خيارات التحقق"},
"welcome-back": {"en": "Welcome back!", "ar": "مرحبا بعودتك!"},
- "account-info": {"en": "Would you like to login with current Username?", "ar": "هل ترغب في تسجيل الدخول باسم المستخدم الحالي؟"},
+ "account-info": {"en": "Would you like to login with current username?", "ar": "هل ترغب في تسجيل الدخول باسم المستخدم الحالي؟"},
"another-acc": {"en": "Use Another Account", "ar": "استخدم حسابا آخر"},
"next": {"en": "Next", "ar": 'التالى'},
"first-name": {"en": "First Name", "ar": "الاسم الأول"},
@@ -281,6 +278,13 @@ const Map localizedValues = {
"ar":
" خدمة المواقف، تتيح هذه الخدمة للمستخدم معلومات عن موقف السيارة ليسهل عليه العودة لها لاحقاً ، 1- بالضغط على زر(قراءة الكود) تستطيع حفظ البيانات الخاصة بالموقف. 2-بالضغط على زر(عرض موقف سيارتي) يعرض لك موقع السيارة في خرائط قوقل. 3- لإعادة قراءة موقف آخرعن طريق الضغط على زر(مسح بيانات الموقف). "
},
+ "parkingDescription": {
+ "en":
+ "Parking service is for you to scan the car location so you can find it easy on you way out. click on (scan parking) button to save the parking location, then (show my park) button will appear to show you the way for the parking. if you want to rescan parking QR just click on (Clear My Data).",
+ "ar":
+ "خدمة المواقف، تتيح هذه الخدمة للمستخدم معلومات عن موقف السيارة ليسهل عليه العودة لها لاحقاً ، 1- بالضغط على زر(قراءة الكود) تستطيع حفظ البيانات الخاصة بالموقف. 2-بالضغط على زر(عرض موقف سيارتي) يعرض لك موقع السيارة في خرائط قوقل. 3- لإعادة قراءة موقف آخرعن طريق الضغط على زر(مسح بيانات الموقف)."
+ },
+ "checkinOption": {"en": "Check-In Options", "ar": "تحقق في الخيارات"},
"readBarcode": {"en": "Read Barcode", "ar": "قراءة الكود"},
"showMyPark": {"en": "Show My Park", "ar": "عرض بارك"},
"clearMyData": {"en": "clear My Data", "ar": "امسح البيانات"},
@@ -746,7 +750,7 @@ const Map localizedValues = {
"HealthTipsBasedOnCurrentWeather": {"en": "Health Tips Based On Current Weather", 'ar': ' نصائح صحية على أساس الطقس الحالي '},
"MoreDetails": {"en": "More details", "ar": " المزيد من التفاصيل "},
"SendCopy": {"en": "Send Copy", "ar": "ارسال نسخة"},
- "ResendOrder": {"en": "Resend order & deliver", "ar": "إعادة طلب و توصيل"},
+ "ResendOrder": {"en": "Refill Order & Delivery", "ar": "إعادة طلب و توصيل"},
"Ports": {"en": "Ports", "ar": "المنافذ"},
"Way": {"en": "Way", "ar": "الطزيقة"},
"Average": {"en": "Average", "ar": "المعدل"},
@@ -780,6 +784,7 @@ const Map localizedValues = {
"complain-without-appo": {"en": "Complaint without appointment", "ar": "شكوى بدون موعد"},
"question": {"en": "Question", "ar": "سؤال"},
"message-type": {"en": "Message Type", "ar": "نوع الرسالة"},
+ "feedback-type": {"en": "Feedback Type", "ar": "نوع الرسالة"},
"compliment": {"en": "compliment", "ar": "ثناء"},
"suggestion": {"en": "Suggestion", "ar": "إقتراح"},
"your-feedback": {"en": "Your feedback was sent", "ar": "لقد تم ارسال اقراحك شكرا لك"},
@@ -791,6 +796,10 @@ const Map localizedValues = {
"YouCanFind": {"en": "You Can Find ", "ar": "باستطاعتك العثور على "},
"ItemInSearch": {"en": " Item In Search", "ar": " عنصر في البحث "},
"blood-donation": {"en": "Blood Donation", "ar": "التبرع بالدم"},
+ "blood-donation-info": {
+ "en": "Through this service, you can register your name as a blood donor where the blood bank in the Habib Medical Group will communicate you in case of need for blood type.",
+ "ar": "عن طريق هذه الخدمة تستطيع تسجيل اسمك كمتبرع بالدم حيث سيتم التواصل معك عن طريق بنك الدم في مجموعة الحبيب الطبية في حال الحاجة الى فصيلة الدم ."
+ },
"blood-instruction": {"en": "Enter the required information, In order to register for Blood Donation Service", "ar": "ادخل المعلومات المطلوبة للتسجيل بخدمة التبرع بالدم"},
"view-terms": {"en": "To view the terms and conditions", "ar": "عرض الشروط والأحكام"},
"wantConnectHmgNetwork": {
@@ -842,6 +851,7 @@ const Map localizedValues = {
},
"RRT-transport-heading": {"en": "Select Transportation Method", "ar": "حدد طريقة النقل"},
"RRT-direction-heading": {"en": "Select Direction", "ar": "حدد الاتجاه"},
+ "RRT-way-heading": {"en": "Select Way", "ar": "حدد الطريق"},
"to-hospital": {"en": "To Hospital", "ar": "الى المستشفى"},
"from-hospital": {"en": "From Hospital", "ar": "من المستشفى"},
"one-direc": {"en": "One Way", "ar": "ذهاب"},
@@ -863,6 +873,20 @@ const Map localizedValues = {
"stretcher": {"en": "Stretcher", "ar": "نقالة"},
"none": {"en": "None", "ar": "لا شيء"},
"RRT-Summary": {"en": "Summary", "ar": "ملخص الطلب"},
+ "AmountBeforeTax": {"en": "Amount Before Tax:", "ar": "Amount Before Tax:"},
+ "ApproximateServiceFee": {"en": "Approximate Service Fee", "ar": "Approximate Service Fee"},
+ "TaxAmount": {"en": "Tax Amount:", "ar": "Tax Amount:"},
+ "TotalAmountPayable": {"en": "Total Amount Payable:", "ar": "Total Amount Payable:"},
+ "iAcceptTermsConditions": {"en": "I Accept the Terms And Conditions", "ar": "You can pay by the following options:"},
+ "YouCanPayByTheFollowingOptions": {"en": "You can pay by the following options:", "ar": "I Accept the Terms And Conditions"},
+ "RRTDDetails": {
+ "en":
+ "The RRT service provides medical services urgent and stable cases, not life-threatening situation or extremities and the service includes providing medical care from a copmplete medical team at home",
+ "ar":
+ "The RRT service provides medical services urgent and stable cases, not life-threatening situation or extremities and the service includes providing medical care from a copmplete medical team at home"
+ },
+ "Rapid-Response-Team": {"en": "Rapid Response Team", "ar": "فريق الاستجابة السريع"},
+ "rrtService": {"en": "RRT Service", "ar": "خدمة RRT"},
"bill-amount": {"en": "Bill Amount", "ar": "مبلغ الفاتورة"},
"transport-method": {"en": "Transportation Method", "ar": "طريقة النقل"},
"directions": {"en": "Directions", "ar": "الاتجاهات"},
@@ -1047,7 +1071,7 @@ const Map localizedValues = {
"updated-email": {"en": "Updated email successfully", "ar": "تم تحديث البريد الالكتروني"},
"view-list-children": {"en": "View List of Children", "ar": "عرض قائمة الأطفال"},
- "covidTest": {"en": "COVID TEST", "ar": "فحص كورونا"},
+ "covidTest": {"en": "COVID-19 TEST", "ar": "فحص كورونا"},
"driveThru": {"en": "Drive-Thru", "ar": "من السيارة"},
"trackDeliveryDriver": {"en": "Track Delivery Driver", "ar": "trackDeliveryDriver"},
@@ -1210,7 +1234,7 @@ const Map localizedValues = {
"drinking": {"en": "Drinkning", "ar": "الشرب"},
"remaining": {"en": "Remaining", "ar": "المتبقي"},
"taken": {"en": "Taken", "ar": " مأخوذ"},
- "ml": {"en": "ml", "ar": "مل"},
+ "ml": {"en": "ML", "ar": "مل"},
"l": {"en": "L", "ar": "لتر"},
"custom-label": {"en": "Enter amount", "ar": "أدخل كمية الماء"},
"custom-label-in-litres": {"en": "Enter amount in liters", "ar": "أدخل الكمية باللتر"},
@@ -1297,10 +1321,21 @@ const Map localizedValues = {
"expectedArrivalTime": {"en": "Expected arrival time", "ar": "الوقت المتوقع للوصول"},
"add-address": {"en": "Add new address", "ar": "اضف عنوان جديد"},
"enter-file": {"en": "Please Enter Mobile Number and Medical File Number", "ar": "الرجاء إدخال رقم الجوال ورقم الملف الطبي"},
+ "allow": {"en": "Allow", "ar": "السماح"},
+ "reject": {"en": "Reject", "ar": "رفض"},
"referralRequesterInformation": {"en": "Referral requester information", "ar": "معلومات طالب الإحالة"},
"enterReferralRequesterName": {"en": "Enter Referral Requester Name*", "ar": "أدخل اسم مقدم طلب الإحالة *"},
"selectRelationship": {"en": "Select Relationship", "ar": "حدد العلاقة"},
"requesterRelationship": {"en": "Requester Relationship", "ar": "علاقة الطالب"},
"newReferral": {"en": "New Referral", "ar": "إحالة جديدة"},
- "searchForReferrals": {"en": "Search For Referrals", "ar": "ابحث عن الإحالات"}
+ "searchForReferrals": {"en": "Search For Referrals", "ar": "ابحث عن الإحالات"},
+ "covid-select-procedure": {"en": "Please select the procedure:", "ar": "الرجاء تحديد الإجراء:"},
+ "online-consultation": {"en": "Online Consultation", "ar": "استشارة مباشرة"},
+ "expected-weiting": {"en": "Waiting time to start LiveCare consultation ", "ar": "وقت الانتظار المتوقع لبدء استشارة لايف كير"},
+ "er-consult-fee": {"en": "Consultation Fee", "ar": "رسوم الاستشارة"},
+ "insured-patient": {"en": "If you're Insurance patient, you have only have to pay the co-payment", "ar": "إذا كنت مريضًا في مجال التأمين ، فليس عليك سوى دفع المبلغ المشترك"},
+ "i-accept-terms": {"en": "I Accept the Terms And Conditions", "ar": "أوافق على الشروط والأحكام"},
+ "upcoming-pay-options": {"en": "You can pay by the following Options:", "ar": "يمكنك الدفع عن طريق الخيارات التالية:"},
+
+ "please-accept-terms": {"en": "Please accept terms & conditions to continue", "ar": "يرجى قبول الشروط والأحكام للمتابعة"},
};
diff --git a/lib/config/shared_pref_kay.dart b/lib/config/shared_pref_kay.dart
index caada21f..703f5e3c 100644
--- a/lib/config/shared_pref_kay.dart
+++ b/lib/config/shared_pref_kay.dart
@@ -29,3 +29,5 @@ const BLOOD_TYPE = 'blood-type';
const NOTIFICATION_COUNT = 'notification-count';
const PHARMACY_SELECTED_ADDRESS = 'selected-address';
const PHARMACY_AUTORZIE_TOKEN = 'PHARMACY_AUTORZIE_TOKEN';
+const H2O_UNIT = 'H2O_UNIT';
+const H2O_REMINDER = 'H2O_REMINDER';
diff --git a/lib/core/model/AlHabibMedicalService/H2O/user_detail_model.dart b/lib/core/model/AlHabibMedicalService/H2O/user_detail_model.dart
index bb100219..2f4ec9f0 100644
--- a/lib/core/model/AlHabibMedicalService/H2O/user_detail_model.dart
+++ b/lib/core/model/AlHabibMedicalService/H2O/user_detail_model.dart
@@ -49,6 +49,7 @@ class UserDetailModel {
this.isNotificationON});
UserDetailModel.fromJson(Map json) {
+ if(json==null) return;
userID = json['UserID'];
patientID = json['PatientID'];
patientType = json['PatientType'];
diff --git a/lib/core/model/active_medications/ActivePrescriptionReport.dart b/lib/core/model/active_medications/ActivePrescriptionReport.dart
index 866cb728..1917a6c8 100644
--- a/lib/core/model/active_medications/ActivePrescriptionReport.dart
+++ b/lib/core/model/active_medications/ActivePrescriptionReport.dart
@@ -23,7 +23,7 @@ class ActivePrescriptionReport {
dynamic patientName;
dynamic phoneOffice1;
dynamic prescriptionQR;
- int prescriptionTimes;
+ double prescriptionTimes;
dynamic productImage;
String productImageBase64;
String productImageString;
diff --git a/lib/core/model/health_calcolator/get_doctor_by_time_model.dart b/lib/core/model/health_calcolator/get_doctor_by_time_model.dart
new file mode 100644
index 00000000..02c4a6ca
--- /dev/null
+++ b/lib/core/model/health_calcolator/get_doctor_by_time_model.dart
@@ -0,0 +1,198 @@
+class DoctorListByTimeModel {
+ dynamic clinicID;
+ String clinicName;
+ String doctorTitle;
+ dynamic iD;
+ String name;
+ dynamic projectID;
+ String projectName;
+ dynamic actualDoctorRate;
+ dynamic clinicRoomNo;
+ dynamic date;
+ dynamic dayName;
+ double decimalDoctorRate;
+ dynamic doctorAvailability;
+ dynamic doctorID;
+ String doctorImageURL;
+ dynamic doctorProfile;
+ dynamic doctorProfileInfo;
+ dynamic doctorRate;
+ dynamic doctorStarsRate;
+ dynamic gender;
+ String genderDescription;
+ bool isAllowWaitList;
+ bool isAppointmentAllowed;
+ bool isDoctorAllowVedioCall;
+ bool isDoctorDummy;
+ bool isDoctorHasPrePostImages;
+ bool isLiveCare;
+ String latitude;
+ String longitude;
+ String nationalityFlagURL;
+ String nationalityID;
+ String nationalityName;
+ dynamic nearestFreeSlot;
+ dynamic noOfPatientsRate;
+ dynamic originalClinicID;
+ dynamic personRate;
+ dynamic projectDistanceInKiloMeters;
+ String qR;
+ dynamic qRString;
+ dynamic rateNumber;
+ dynamic serviceID;
+ String setupID;
+ List speciality;
+ dynamic workingHours;
+
+ DoctorListByTimeModel(
+ {this.clinicID,
+ this.clinicName,
+ this.doctorTitle,
+ this.iD,
+ this.name,
+ this.projectID,
+ this.projectName,
+ this.actualDoctorRate,
+ this.clinicRoomNo,
+ this.date,
+ this.dayName,
+ this.decimalDoctorRate,
+ this.doctorAvailability,
+ this.doctorID,
+ this.doctorImageURL,
+ this.doctorProfile,
+ this.doctorProfileInfo,
+ this.doctorRate,
+ this.doctorStarsRate,
+ this.gender,
+ this.genderDescription,
+ this.isAllowWaitList,
+ this.isAppointmentAllowed,
+ this.isDoctorAllowVedioCall,
+ this.isDoctorDummy,
+ this.isDoctorHasPrePostImages,
+ this.isLiveCare,
+ this.latitude,
+ this.longitude,
+ this.nationalityFlagURL,
+ this.nationalityID,
+ this.nationalityName,
+ this.nearestFreeSlot,
+ this.noOfPatientsRate,
+ this.originalClinicID,
+ this.personRate,
+ this.projectDistanceInKiloMeters,
+ this.qR,
+ this.qRString,
+ this.rateNumber,
+ this.serviceID,
+ this.setupID,
+ this.speciality,
+ this.workingHours});
+
+ DoctorListByTimeModel.fromJson(Map json) {
+ clinicID = json['ClinicID'];
+ clinicName = json['ClinicName'];
+ doctorTitle = json['DoctorTitle'];
+ iD = json['ID'];
+ name = json['Name'];
+ projectID = json['ProjectID'];
+ projectName = json['ProjectName'];
+ actualDoctorRate = json['ActualDoctorRate'];
+ clinicRoomNo = json['ClinicRoomNo'];
+ date = json['Date'];
+ dayName = json['DayName'];
+ decimalDoctorRate = json['DecimalDoctorRate'];
+ doctorAvailability = json['DoctorAvailability'];
+ doctorID = json['DoctorID'];
+ doctorImageURL = json['DoctorImageURL'];
+ doctorProfile = json['DoctorProfile'];
+ doctorProfileInfo = json['DoctorProfileInfo'];
+ doctorRate = json['DoctorRate'];
+ doctorStarsRate = json['DoctorStarsRate'];
+ gender = json['Gender'];
+ genderDescription = json['GenderDescription'];
+ isAllowWaitList = json['IsAllowWaitList'];
+ isAppointmentAllowed = json['IsAppointmentAllowed'];
+ isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall'];
+ isDoctorDummy = json['IsDoctorDummy'];
+ isDoctorHasPrePostImages = json['IsDoctorHasPrePostImages'];
+ isLiveCare = json['IsLiveCare'];
+ latitude = json['Latitude'];
+ longitude = json['Longitude'];
+ nationalityFlagURL = json['NationalityFlagURL'];
+ nationalityID = json['NationalityID'];
+ nationalityName = json['NationalityName'];
+ nearestFreeSlot = json['NearestFreeSlot'];
+ noOfPatientsRate = json['NoOfPatientsRate'];
+ originalClinicID = json['OriginalClinicID'];
+ personRate = json['PersonRate'];
+ projectDistanceInKiloMeters = json['ProjectDistanceInKiloMeters'];
+ qR = json['QR'];
+ qRString = json['QRString'];
+ rateNumber = json['RateNumber'];
+ serviceID = json['ServiceID'];
+ setupID = json['SetupID'];
+ speciality = json['Speciality'].cast();
+ workingHours = json['WorkingHours'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['ClinicID'] = this.clinicID;
+ data['ClinicName'] = this.clinicName;
+ data['DoctorTitle'] = this.doctorTitle;
+ data['ID'] = this.iD;
+ data['Name'] = this.name;
+ data['ProjectID'] = this.projectID;
+ data['ProjectName'] = this.projectName;
+ data['ActualDoctorRate'] = this.actualDoctorRate;
+ data['ClinicRoomNo'] = this.clinicRoomNo;
+ data['Date'] = this.date;
+ data['DayName'] = this.dayName;
+ data['DecimalDoctorRate'] = this.decimalDoctorRate;
+ data['DoctorAvailability'] = this.doctorAvailability;
+ data['DoctorID'] = this.doctorID;
+ data['DoctorImageURL'] = this.doctorImageURL;
+ data['DoctorProfile'] = this.doctorProfile;
+ data['DoctorProfileInfo'] = this.doctorProfileInfo;
+ data['DoctorRate'] = this.doctorRate;
+ data['DoctorStarsRate'] = this.doctorStarsRate;
+ data['Gender'] = this.gender;
+ data['GenderDescription'] = this.genderDescription;
+ data['IsAllowWaitList'] = this.isAllowWaitList;
+ data['IsAppointmentAllowed'] = this.isAppointmentAllowed;
+ data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall;
+ data['IsDoctorDummy'] = this.isDoctorDummy;
+ data['IsDoctorHasPrePostImages'] = this.isDoctorHasPrePostImages;
+ data['IsLiveCare'] = this.isLiveCare;
+ data['Latitude'] = this.latitude;
+ data['Longitude'] = this.longitude;
+ data['NationalityFlagURL'] = this.nationalityFlagURL;
+ data['NationalityID'] = this.nationalityID;
+ data['NationalityName'] = this.nationalityName;
+ data['NearestFreeSlot'] = this.nearestFreeSlot;
+ data['NoOfPatientsRate'] = this.noOfPatientsRate;
+ data['OriginalClinicID'] = this.originalClinicID;
+ data['PersonRate'] = this.personRate;
+ data['ProjectDistanceInKiloMeters'] = this.projectDistanceInKiloMeters;
+ data['QR'] = this.qR;
+ data['QRString'] = this.qRString;
+ data['RateNumber'] = this.rateNumber;
+ data['ServiceID'] = this.serviceID;
+ data['SetupID'] = this.setupID;
+ data['Speciality'] = this.speciality;
+ data['WorkingHours'] = this.workingHours;
+ return data;
+ }
+}
+
+class DoctorsListTime {
+ List doctorsByTimeList = List();
+ String filterName = "";
+
+ DoctorsListTime({filterName, DoctorListByTimeModel doctor}) {
+ doctorsByTimeList.add(doctor);
+ this.filterName = filterName;
+ }
+}
diff --git a/lib/core/model/health_calcolator/get_doctor_by_time_request_model.dart b/lib/core/model/health_calcolator/get_doctor_by_time_request_model.dart
new file mode 100644
index 00000000..cf9b2004
--- /dev/null
+++ b/lib/core/model/health_calcolator/get_doctor_by_time_request_model.dart
@@ -0,0 +1,80 @@
+class DoctorListByTimeRequestModel {
+ int clinicID;
+ bool isGetNearAppointment;
+ bool continueDentalPlan;
+ bool isSearchAppointmnetByClinicID;
+ int patientID;
+ int latitude;
+ int longitude;
+ bool license;
+ double versionID;
+ int channel;
+ int languageID;
+ String iPAdress;
+ String generalid;
+ int patientOutSA;
+ dynamic sessionID;
+ bool isDentalAllowedBackend;
+ int deviceTypeID;
+
+ DoctorListByTimeRequestModel(
+ {this.clinicID,
+ this.isGetNearAppointment,
+ this.continueDentalPlan,
+ this.isSearchAppointmnetByClinicID,
+ this.patientID,
+ this.latitude,
+ this.longitude,
+ this.license,
+ this.versionID,
+ this.channel,
+ this.languageID,
+ this.iPAdress,
+ this.generalid,
+ this.patientOutSA,
+ this.sessionID,
+ this.isDentalAllowedBackend,
+ this.deviceTypeID});
+
+ DoctorListByTimeRequestModel.fromJson(Map json) {
+ clinicID = json['ClinicID'];
+ isGetNearAppointment = json['IsGetNearAppointment'];
+ continueDentalPlan = json['ContinueDentalPlan'];
+ isSearchAppointmnetByClinicID = json['IsSearchAppointmnetByClinicID'];
+ patientID = json['PatientID'];
+ latitude = json['Latitude'];
+ longitude = json['Longitude'];
+ license = json['License'];
+ versionID = json['VersionID'];
+ channel = json['Channel'];
+ languageID = json['LanguageID'];
+ iPAdress = json['IPAdress'];
+ generalid = json['generalid'];
+ patientOutSA = json['PatientOutSA'];
+ sessionID = json['SessionID'];
+ isDentalAllowedBackend = json['isDentalAllowedBackend'];
+ deviceTypeID = json['DeviceTypeID'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['ClinicID'] = this.clinicID;
+ data['IsGetNearAppointment'] = this.isGetNearAppointment;
+ data['ContinueDentalPlan'] = this.continueDentalPlan;
+ data['IsSearchAppointmnetByClinicID'] = this.isSearchAppointmnetByClinicID;
+ data['PatientID'] = this.patientID;
+ data['Latitude'] = this.latitude;
+ data['Longitude'] = this.longitude;
+ data['License'] = this.license;
+ data['VersionID'] = this.versionID;
+ data['Channel'] = this.channel;
+ data['LanguageID'] = this.languageID;
+ data['IPAdress'] = this.iPAdress;
+ data['generalid'] = this.generalid;
+ data['PatientOutSA'] = this.patientOutSA;
+ data['SessionID'] = this.sessionID;
+ data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
+ data['DeviceTypeID'] = this.deviceTypeID;
+ return data;
+ }
+}
diff --git a/lib/core/model/health_calcolator/get_doctor_list_calcolation_model.dart b/lib/core/model/health_calcolator/get_doctor_list_calcolation_model.dart
new file mode 100644
index 00000000..409cab60
--- /dev/null
+++ b/lib/core/model/health_calcolator/get_doctor_list_calcolation_model.dart
@@ -0,0 +1,64 @@
+class GetDoctorListModel {
+ int calcID;
+ int projectID;
+ int clinicID;
+ String clinicName;
+ int doctorID;
+ String doctorImageURL;
+ String doctorName;
+ String doctorTitle;
+ int gender;
+ String genderDescription;
+ String nationality;
+ String nationalityFlagURL;
+ String projectName;
+
+ GetDoctorListModel(
+ {this.calcID,
+ this.projectID,
+ this.clinicID,
+ this.clinicName,
+ this.doctorID,
+ this.doctorImageURL,
+ this.doctorName,
+ this.doctorTitle,
+ this.gender,
+ this.genderDescription,
+ this.nationality,
+ this.nationalityFlagURL,
+ this.projectName});
+
+ GetDoctorListModel.fromJson(Map json) {
+ calcID = json['CalcID'];
+ projectID = json['ProjectID'];
+ clinicID = json['ClinicID'];
+ clinicName = json['ClinicName'];
+ doctorID = json['DoctorID'];
+ doctorImageURL = json['DoctorImageURL'];
+ doctorName = json['DoctorName'];
+ doctorTitle = json['DoctorTitle'];
+ gender = json['Gender'];
+ genderDescription = json['GenderDescription'];
+ nationality = json['Nationality'];
+ nationalityFlagURL = json['NationalityFlagURL'];
+ projectName = json['ProjectName'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['CalcID'] = this.calcID;
+ data['ProjectID'] = this.projectID;
+ data['ClinicID'] = this.clinicID;
+ data['ClinicName'] = this.clinicName;
+ data['DoctorID'] = this.doctorID;
+ data['DoctorImageURL'] = this.doctorImageURL;
+ data['DoctorName'] = this.doctorName;
+ data['DoctorTitle'] = this.doctorTitle;
+ data['Gender'] = this.gender;
+ data['GenderDescription'] = this.genderDescription;
+ data['Nationality'] = this.nationality;
+ data['NationalityFlagURL'] = this.nationalityFlagURL;
+ data['ProjectName'] = this.projectName;
+ return data;
+ }
+}
diff --git a/lib/core/model/health_calcolator/get_doctor_list_calcolation_request_model.dart b/lib/core/model/health_calcolator/get_doctor_list_calcolation_request_model.dart
new file mode 100644
index 00000000..80002341
--- /dev/null
+++ b/lib/core/model/health_calcolator/get_doctor_list_calcolation_request_model.dart
@@ -0,0 +1,52 @@
+class GetDoctorListRequestModel {
+ int calculationID;
+ double versionID;
+ int channel;
+ int languageID;
+ String iPAdress;
+ String generalid;
+ int patientOutSA;
+ String sessionID;
+ bool isDentalAllowedBackend;
+ int deviceTypeID;
+
+ GetDoctorListRequestModel(
+ {this.calculationID,
+ this.versionID,
+ this.channel,
+ this.languageID,
+ this.iPAdress,
+ this.generalid,
+ this.patientOutSA,
+ this.sessionID,
+ this.isDentalAllowedBackend,
+ this.deviceTypeID});
+
+ GetDoctorListRequestModel.fromJson(Map json) {
+ calculationID = json['CalculationID'];
+ versionID = json['VersionID'];
+ channel = json['Channel'];
+ languageID = json['LanguageID'];
+ iPAdress = json['IPAdress'];
+ generalid = json['generalid'];
+ patientOutSA = json['PatientOutSA'];
+ sessionID = json['SessionID'];
+ isDentalAllowedBackend = json['isDentalAllowedBackend'];
+ deviceTypeID = json['DeviceTypeID'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['CalculationID'] = this.calculationID;
+ data['VersionID'] = this.versionID;
+ data['Channel'] = this.channel;
+ data['LanguageID'] = this.languageID;
+ data['IPAdress'] = this.iPAdress;
+ data['generalid'] = this.generalid;
+ data['PatientOutSA'] = this.patientOutSA;
+ data['SessionID'] = this.sessionID;
+ data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
+ data['DeviceTypeID'] = this.deviceTypeID;
+ return data;
+ }
+}
diff --git a/lib/core/model/insurance/ReauestInsuranceApprovalModel.dart b/lib/core/model/insurance/ReauestInsuranceApprovalModel.dart
index 5f41f878..26bf567a 100644
--- a/lib/core/model/insurance/ReauestInsuranceApprovalModel.dart
+++ b/lib/core/model/insurance/ReauestInsuranceApprovalModel.dart
@@ -1,4 +1,4 @@
-class ReauestInsuranceApprovalModel {
+class RequestInsuranceApprovalModel {
double versionID;
int channel;
int languageID;
@@ -15,7 +15,7 @@ class ReauestInsuranceApprovalModel {
int eXuldAPPNO;
int projectID;
- ReauestInsuranceApprovalModel(
+ RequestInsuranceApprovalModel(
{this.versionID,
this.channel,
this.languageID,
@@ -32,7 +32,7 @@ class ReauestInsuranceApprovalModel {
this.eXuldAPPNO,
this.projectID});
- ReauestInsuranceApprovalModel.fromJson(Map json) {
+ RequestInsuranceApprovalModel.fromJson(Map json) {
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
diff --git a/lib/core/model/insurance/insurance_approval.dart b/lib/core/model/insurance/insurance_approval.dart
index 894fad46..27911267 100644
--- a/lib/core/model/insurance/insurance_approval.dart
+++ b/lib/core/model/insurance/insurance_approval.dart
@@ -1,140 +1,465 @@
-class InsuranceApprovalDetails {
- String procedureName;
- String status;
- String isInvoicedDesc;
-
- InsuranceApprovalDetails({
- this.procedureName,
- this.status,
- this.isInvoicedDesc,
- });
-
- InsuranceApprovalDetails.fromJson(Map json) {
- try {
- isInvoicedDesc = json['IsInvoicedDesc'];
- status = json['Status'];
- procedureName = json['ProcedureName'];
- } catch (e) {
- print(e);
- }
- }
-}
-
class InsuranceApprovalModel {
- InsuranceApprovalDetails approvalDetails;
- double versionID;
- int channel;
- int languageID;
- String iPAdress;
- String generalid;
- int patientOutSA;
- String sessionID;
- bool isDentalAllowedBackend;
- int deviceTypeID;
- int patientID;
- String tokenID;
- int patientTypeID;
- int patientType;
- int eXuldAPPNO;
+ String setupID;
int projectID;
- String doctorName;
- String clinicName;
- String patientDescription;
int approvalNo;
- String approvalStatusDescption;
- int unUsedCount;
-
- //String companyName;
+ String approvalDate;
+ int patientType;
+ int patientID;
+ int companyID;
+ int subCategoryID;
+ int doctorID;
+ int clinicID;
+ int approvalType;
+ String inpatientApprovalSubType;
+ String validFrom;
+ String vaildDays;
+ String validTo;
+ bool isApprovalOnGross;
+ bool isPackage;
+ int requestedAmount;
+ int actualApprovedAmount;
+ int aviliableAmount;
+ String companyApprovalNo;
+ int progNoteOrderNo;
+ String submitOn;
+ String receiptOn;
+ String remarks1;
+ String remarks2;
+ int status;
+ String feedbackStatusBy;
+ String feedbackStatus;
+ String feedbackStatusOn;
+ int authorizerID;
String expiryDate;
- String rceiptOn;
int appointmentNo;
+ int admissionNo;
+ int admissionRequestNo;
+ int createdBy;
+ String createdOn;
+ int editedBy;
+ String editedOn;
+ String rowVer;
+ bool isAddlDiscApplied;
+ int inProgressReasonID;
+ String extendedBy;
+ String extendedOn;
+ int subPolicyNo;
+ int noOrderAuthorizerID;
+ bool isVerbalApproval;
+ String subStatus;
+ bool isNotificationSend;
+ String eApprovalStatus;
+ String eApprovalRemarks;
+ bool isEmailSentOnDelayApproval;
+ int eAuthorizationID;
+ InsuranceApprovalDetails apporvalDetails;
+ String approvalStatusDescption;
+ String clinicName;
+ String clinicNameN;
+ String companyName;
+ String doctorImageURL;
+ String doctorName;
+ String doctorNameN;
+ int doctorRate;
+ String doctorTitle;
+ int gender;
+ String genderDescription;
+ bool isActiveDoctorProfile;
+ bool isExecludeDoctor;
+ bool isInOutPatient;
+ String isInOutPatientDescription;
+ String isInOutPatientDescriptionN;
+ bool isLiveCareAppointment;
+ String projectName;
+ String projectNameN;
+ String qR;
+ List speciality;
+ String strApprovalDate;
+ String strExpiryDate;
+ String strSubmitDate;
+ int totaUnUsedCount;
+ int unUsedCount;
InsuranceApprovalModel(
- {this.versionID,
- this.channel,
- this.languageID,
- this.iPAdress,
- this.generalid,
- this.patientOutSA,
- this.sessionID,
- this.isDentalAllowedBackend,
- this.deviceTypeID,
- this.patientID,
- this.tokenID,
- this.patientTypeID,
- this.patientType,
- this.eXuldAPPNO,
+ {this.setupID,
this.projectID,
- this.doctorName,
- this.clinicName,
- this.patientDescription,
this.approvalNo,
- this.approvalStatusDescption,
- this.unUsedCount,
- //this.companyName,
+ this.approvalDate,
+ this.patientType,
+ this.patientID,
+ this.companyID,
+ this.subCategoryID,
+ this.doctorID,
+ this.clinicID,
+ this.approvalType,
+ this.inpatientApprovalSubType,
+ this.validFrom,
+ this.vaildDays,
+ this.validTo,
+ this.isApprovalOnGross,
+ this.isPackage,
+ this.requestedAmount,
+ this.actualApprovedAmount,
+ this.aviliableAmount,
+ this.companyApprovalNo,
+ this.progNoteOrderNo,
+ this.submitOn,
+ this.receiptOn,
+ this.remarks1,
+ this.remarks2,
+ this.status,
+ this.feedbackStatusBy,
+ this.feedbackStatus,
+ this.feedbackStatusOn,
+ this.authorizerID,
this.expiryDate,
- this.rceiptOn,
- this.approvalDetails,
- this.appointmentNo});
-
- InsuranceApprovalDetails x = InsuranceApprovalDetails();
+ this.appointmentNo,
+ this.admissionNo,
+ this.admissionRequestNo,
+ this.createdBy,
+ this.createdOn,
+ this.editedBy,
+ this.editedOn,
+ this.rowVer,
+ this.isAddlDiscApplied,
+ this.inProgressReasonID,
+ this.extendedBy,
+ this.extendedOn,
+ this.subPolicyNo,
+ this.noOrderAuthorizerID,
+ this.isVerbalApproval,
+ this.subStatus,
+ this.isNotificationSend,
+ this.eApprovalStatus,
+ this.eApprovalRemarks,
+ this.isEmailSentOnDelayApproval,
+ this.eAuthorizationID,
+ this.apporvalDetails,
+ this.approvalStatusDescption,
+ this.clinicName,
+ this.clinicNameN,
+ this.companyName,
+ this.doctorImageURL,
+ this.doctorName,
+ this.doctorNameN,
+ this.doctorRate,
+ this.doctorTitle,
+ this.gender,
+ this.genderDescription,
+ this.isActiveDoctorProfile,
+ this.isExecludeDoctor,
+ this.isInOutPatient,
+ this.isInOutPatientDescription,
+ this.isInOutPatientDescriptionN,
+ this.isLiveCareAppointment,
+ this.projectName,
+ this.projectNameN,
+ this.qR,
+ this.speciality,
+ this.strApprovalDate,
+ this.strExpiryDate,
+ this.strSubmitDate,
+ this.totaUnUsedCount,
+ this.unUsedCount});
InsuranceApprovalModel.fromJson(Map json) {
- try {
- rceiptOn = json['ReceiptOn'];
- expiryDate = json['ExpiryDate'];
- //companyName = json['CompanyName'];
- unUsedCount = json['TotaUnUsedCount'];
- approvalStatusDescption = json['ApprovalStatusDescption'];
- approvalNo = json['ApprovalNo'];
- patientDescription = json['IsInOutPatientDescription'];
- versionID = json['VersionID'];
- channel = json['Channel'];
- languageID = json['LanguageID'];
- iPAdress = json['IPAdress'];
- generalid = json['generalid'];
- patientOutSA = json['PatientOutSA'];
- sessionID = json['SessionID'];
- isDentalAllowedBackend = json['isDentalAllowedBackend'];
- deviceTypeID = json['DeviceTypeID'];
- patientID = json['PatientID'];
- tokenID = json['TokenID'];
- patientTypeID = json['PatientTypeID'];
- patientType = json['PatientType'];
- eXuldAPPNO = json['EXuldAPPNO'];
- projectID = json['ProjectID'];
- doctorName = json['DoctorName'];
- clinicName = json['ClinicName'];
- approvalDetails =
- InsuranceApprovalDetails.fromJson(json['ApporvalDetails'][0]);
- appointmentNo = json['AppointmentNo'];
- } catch (e) {
- print(e);
+ setupID = json['SetupID'];
+ projectID = json['ProjectID'];
+ approvalNo = json['ApprovalNo'];
+ approvalDate = json['ApprovalDate'];
+ patientType = json['PatientType'];
+ patientID = json['PatientID'];
+ companyID = json['CompanyID'];
+ subCategoryID = json['SubCategoryID'];
+ doctorID = json['DoctorID'];
+ clinicID = json['ClinicID'];
+ approvalType = json['ApprovalType'];
+ inpatientApprovalSubType = json['InpatientApprovalSubType'];
+ validFrom = json['ValidFrom'];
+ vaildDays = json['VaildDays'];
+ validTo = json['ValidTo'];
+ isApprovalOnGross = json['IsApprovalOnGross'];
+ isPackage = json['IsPackage'];
+ requestedAmount = json['RequestedAmount'];
+ actualApprovedAmount = json['ActualApprovedAmount'];
+ aviliableAmount = json['AviliableAmount'];
+ companyApprovalNo = json['CompanyApprovalNo'];
+ progNoteOrderNo = json['ProgNoteOrderNo'];
+ submitOn = json['SubmitOn'];
+ receiptOn = json['ReceiptOn'];
+ remarks1 = json['Remarks1'];
+ remarks2 = json['Remarks2'];
+ status = json['Status'];
+ feedbackStatusBy = json['FeedbackStatusBy'];
+ feedbackStatus = json['FeedbackStatus'];
+ feedbackStatusOn = json['FeedbackStatusOn'];
+ authorizerID = json['AuthorizerID'];
+ expiryDate = json['ExpiryDate'];
+ appointmentNo = json['AppointmentNo'];
+ admissionNo = json['AdmissionNo'];
+ admissionRequestNo = json['AdmissionRequestNo'];
+ createdBy = json['CreatedBy'];
+ createdOn = json['CreatedOn'];
+ editedBy = json['EditedBy'];
+ editedOn = json['EditedOn'];
+ rowVer = json['RowVer'];
+ isAddlDiscApplied = json['IsAddlDiscApplied'];
+ inProgressReasonID = json['InProgressReasonID'];
+ extendedBy = json['ExtendedBy'];
+ extendedOn = json['ExtendedOn'];
+ subPolicyNo = json['SubPolicyNo'];
+ noOrderAuthorizerID = json['NoOrderAuthorizerID'];
+ isVerbalApproval = json['isVerbalApproval'];
+ subStatus = json['SubStatus'];
+ isNotificationSend = json['IsNotificationSend'];
+ eApprovalStatus = json['EApprovalStatus'];
+ eApprovalRemarks = json['EApprovalRemarks'];
+ isEmailSentOnDelayApproval = json['IsEmailSentOnDelayApproval'];
+ eAuthorizationID = json['EAuthorizationID'];
+ if (json['ApporvalDetails'] != null) {
+ apporvalDetails = InsuranceApprovalDetails.fromJson(json['ApporvalDetails'][0]);
}
+ approvalStatusDescption = json['ApprovalStatusDescption'];
+ clinicName = json['ClinicName'];
+ clinicNameN = json['ClinicNameN'];
+ companyName = json['CompanyName'];
+ doctorImageURL = json['DoctorImageURL'];
+ doctorName = json['DoctorName'];
+ doctorNameN = json['DoctorNameN'];
+ doctorRate = json['DoctorRate'];
+ doctorTitle = json['DoctorTitle'];
+ gender = json['Gender'];
+ genderDescription = json['GenderDescription'];
+ isActiveDoctorProfile = json['IsActiveDoctorProfile'];
+ isExecludeDoctor = json['IsExecludeDoctor'];
+ isInOutPatient = json['IsInOutPatient'];
+ isInOutPatientDescription = json['IsInOutPatientDescription'];
+ isInOutPatientDescriptionN = json['IsInOutPatientDescriptionN'];
+ isLiveCareAppointment = json['IsLiveCareAppointment'];
+ projectName = json['ProjectName'];
+ projectNameN = json['ProjectNameN'];
+ qR = json['QR'];
+ speciality = json['Speciality'].cast();
+ strApprovalDate = json['StrApprovalDate'];
+ strExpiryDate = json['StrExpiryDate'];
+ strSubmitDate = json['StrSubmitDate'];
+ totaUnUsedCount = json['TotaUnUsedCount'];
+ unUsedCount = json['UnUsedCount'];
}
Map toJson() {
final Map data = new Map();
- data['VersionID'] = this.versionID;
- data['Channel'] = this.channel;
- data['LanguageID'] = this.languageID;
- data['IPAdress'] = this.iPAdress;
- data['generalid'] = this.generalid;
- data['PatientOutSA'] = this.patientOutSA;
- data['SessionID'] = this.sessionID;
- data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
- data['DeviceTypeID'] = this.deviceTypeID;
- data['PatientID'] = this.patientID;
- data['TokenID'] = this.tokenID;
- data['PatientTypeID'] = this.patientTypeID;
+ data['SetupID'] = this.setupID;
+ data['ProjectID'] = this.projectID;
+ data['ApprovalNo'] = this.approvalNo;
+ data['ApprovalDate'] = this.approvalDate;
data['PatientType'] = this.patientType;
- if (appointmentNo == null) {
- data['EXuldAPPNO'] = this.eXuldAPPNO;
- data['ProjectID'] = this.projectID;
- }
- if (appointmentNo != null) {
- data['AppointmentNo'] = this.appointmentNo;
+ data['PatientID'] = this.patientID;
+ data['CompanyID'] = this.companyID;
+ data['SubCategoryID'] = this.subCategoryID;
+ data['DoctorID'] = this.doctorID;
+ data['ClinicID'] = this.clinicID;
+ data['ApprovalType'] = this.approvalType;
+ data['InpatientApprovalSubType'] = this.inpatientApprovalSubType;
+ data['ValidFrom'] = this.validFrom;
+ data['VaildDays'] = this.vaildDays;
+ data['ValidTo'] = this.validTo;
+ data['IsApprovalOnGross'] = this.isApprovalOnGross;
+ data['IsPackage'] = this.isPackage;
+ data['RequestedAmount'] = this.requestedAmount;
+ data['ActualApprovedAmount'] = this.actualApprovedAmount;
+ data['AviliableAmount'] = this.aviliableAmount;
+ data['CompanyApprovalNo'] = this.companyApprovalNo;
+ data['ProgNoteOrderNo'] = this.progNoteOrderNo;
+ data['SubmitOn'] = this.submitOn;
+ data['ReceiptOn'] = this.receiptOn;
+ data['Remarks1'] = this.remarks1;
+ data['Remarks2'] = this.remarks2;
+ data['Status'] = this.status;
+ data['FeedbackStatusBy'] = this.feedbackStatusBy;
+ data['FeedbackStatus'] = this.feedbackStatus;
+ data['FeedbackStatusOn'] = this.feedbackStatusOn;
+ data['AuthorizerID'] = this.authorizerID;
+ data['ExpiryDate'] = this.expiryDate;
+ data['AppointmentNo'] = this.appointmentNo;
+ data['AdmissionNo'] = this.admissionNo;
+ data['AdmissionRequestNo'] = this.admissionRequestNo;
+ data['CreatedBy'] = this.createdBy;
+ data['CreatedOn'] = this.createdOn;
+ data['EditedBy'] = this.editedBy;
+ data['EditedOn'] = this.editedOn;
+ data['RowVer'] = this.rowVer;
+ data['IsAddlDiscApplied'] = this.isAddlDiscApplied;
+ data['InProgressReasonID'] = this.inProgressReasonID;
+ data['ExtendedBy'] = this.extendedBy;
+ data['ExtendedOn'] = this.extendedOn;
+ data['SubPolicyNo'] = this.subPolicyNo;
+ data['NoOrderAuthorizerID'] = this.noOrderAuthorizerID;
+ data['isVerbalApproval'] = this.isVerbalApproval;
+ data['SubStatus'] = this.subStatus;
+ data['IsNotificationSend'] = this.isNotificationSend;
+ data['EApprovalStatus'] = this.eApprovalStatus;
+ data['EApprovalRemarks'] = this.eApprovalRemarks;
+ data['IsEmailSentOnDelayApproval'] = this.isEmailSentOnDelayApproval;
+ data['EAuthorizationID'] = this.eAuthorizationID;
+ if (this.apporvalDetails != null) {
+ data['ApporvalDetails'] = this.apporvalDetails.toJson;
}
+ data['ApprovalStatusDescption'] = this.approvalStatusDescption;
+ data['ClinicName'] = this.clinicName;
+ data['ClinicNameN'] = this.clinicNameN;
+ data['CompanyName'] = this.companyName;
+ data['DoctorImageURL'] = this.doctorImageURL;
+ data['DoctorName'] = this.doctorName;
+ data['DoctorNameN'] = this.doctorNameN;
+ data['DoctorRate'] = this.doctorRate;
+ data['DoctorTitle'] = this.doctorTitle;
+ data['Gender'] = this.gender;
+ data['GenderDescription'] = this.genderDescription;
+ data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile;
+ data['IsExecludeDoctor'] = this.isExecludeDoctor;
+ data['IsInOutPatient'] = this.isInOutPatient;
+ data['IsInOutPatientDescription'] = this.isInOutPatientDescription;
+ data['IsInOutPatientDescriptionN'] = this.isInOutPatientDescriptionN;
+ data['IsLiveCareAppointment'] = this.isLiveCareAppointment;
+ data['ProjectName'] = this.projectName;
+ data['ProjectNameN'] = this.projectNameN;
+ data['QR'] = this.qR;
+ data['Speciality'] = this.speciality;
+ data['StrApprovalDate'] = this.strApprovalDate;
+ data['StrExpiryDate'] = this.strExpiryDate;
+ data['StrSubmitDate'] = this.strSubmitDate;
+ data['TotaUnUsedCount'] = this.totaUnUsedCount;
+ data['UnUsedCount'] = this.unUsedCount;
+ return data;
+ }
+}
+
+class InsuranceApprovalDetails {
+ int setupID;
+ int projectID;
+ int approvalNo;
+ int lineItemNo;
+ int orderType;
+ int procedureID;
+ int toothNo;
+ int price;
+ int approvedAmount;
+ String unapprovedPatientShare;
+ int waivedAmount;
+ String discountType;
+ int discountValue;
+ String shareType;
+ String patientShareTypeValue;
+ String companyShareTypeValue;
+ String patientShare;
+ String companyShare;
+ int deductableAmount;
+ String disapprovedRemarks;
+ int progNoteOrderNo;
+ int progNoteLineItemNo;
+ String invoiceTransactionType;
+ int invoiceNo;
+ String procedureName;
+ String procedureNameN;
+ String status;
+ bool isInvoiced;
+ String isInvoicedDesc;
+
+ InsuranceApprovalDetails(
+ {this.setupID,
+ this.projectID,
+ this.approvalNo,
+ this.lineItemNo,
+ this.orderType,
+ this.procedureID,
+ this.toothNo,
+ this.price,
+ this.approvedAmount,
+ this.unapprovedPatientShare,
+ this.waivedAmount,
+ this.discountType,
+ this.discountValue,
+ this.shareType,
+ this.patientShareTypeValue,
+ this.companyShareTypeValue,
+ this.patientShare,
+ this.companyShare,
+ this.deductableAmount,
+ this.disapprovedRemarks,
+ this.progNoteOrderNo,
+ this.progNoteLineItemNo,
+ this.invoiceTransactionType,
+ this.invoiceNo,
+ this.procedureName,
+ this.procedureNameN,
+ this.status,
+ this.isInvoiced,
+ this.isInvoicedDesc});
+
+ InsuranceApprovalDetails.fromJson(Map json) {
+ setupID = json['SetupID'];
+ projectID = json['ProjectID'];
+ approvalNo = json['ApprovalNo'];
+ lineItemNo = json['LineItemNo'];
+ orderType = json['OrderType'];
+ procedureID = json['ProcedureID'];
+ toothNo = json['ToothNo'];
+ price = json['Price'];
+ approvedAmount = json['ApprovedAmount'];
+ unapprovedPatientShare = json['UnapprovedPatientShare'];
+ waivedAmount = json['WaivedAmount'];
+ discountType = json['DiscountType'];
+ discountValue = json['DiscountValue'];
+ shareType = json['ShareType'];
+ patientShareTypeValue = json['PatientShareTypeValue'];
+ companyShareTypeValue = json['CompanyShareTypeValue'];
+ patientShare = json['PatientShare'];
+ companyShare = json['CompanyShare'];
+ deductableAmount = json['DeductableAmount'];
+ disapprovedRemarks = json['DisapprovedRemarks'];
+ progNoteOrderNo = json['ProgNoteOrderNo'];
+ progNoteLineItemNo = json['ProgNoteLineItemNo'];
+ invoiceTransactionType = json['InvoiceTransactionType'];
+ invoiceNo = json['InvoiceNo'];
+ procedureName = json['ProcedureName'];
+ procedureNameN = json['ProcedureNameN'];
+ status = json['Status'];
+ isInvoiced = json['IsInvoiced'];
+ isInvoicedDesc = json['IsInvoicedDesc'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['SetupID'] = this.setupID;
+ data['ProjectID'] = this.projectID;
+ data['ApprovalNo'] = this.approvalNo;
+ data['LineItemNo'] = this.lineItemNo;
+ data['OrderType'] = this.orderType;
+ data['ProcedureID'] = this.procedureID;
+ data['ToothNo'] = this.toothNo;
+ data['Price'] = this.price;
+ data['ApprovedAmount'] = this.approvedAmount;
+ data['UnapprovedPatientShare'] = this.unapprovedPatientShare;
+ data['WaivedAmount'] = this.waivedAmount;
+ data['DiscountType'] = this.discountType;
+ data['DiscountValue'] = this.discountValue;
+ data['ShareType'] = this.shareType;
+ data['PatientShareTypeValue'] = this.patientShareTypeValue;
+ data['CompanyShareTypeValue'] = this.companyShareTypeValue;
+ data['PatientShare'] = this.patientShare;
+ data['CompanyShare'] = this.companyShare;
+ data['DeductableAmount'] = this.deductableAmount;
+ data['DisapprovedRemarks'] = this.disapprovedRemarks;
+ data['ProgNoteOrderNo'] = this.progNoteOrderNo;
+ data['ProgNoteLineItemNo'] = this.progNoteLineItemNo;
+ data['InvoiceTransactionType'] = this.invoiceTransactionType;
+ data['InvoiceNo'] = this.invoiceNo;
+ data['ProcedureName'] = this.procedureName;
+ data['ProcedureNameN'] = this.procedureNameN;
+ data['Status'] = this.status;
+ data['IsInvoiced'] = this.isInvoiced;
+ data['IsInvoicedDesc'] = this.isInvoicedDesc;
return data;
}
}
diff --git a/lib/core/model/prescriptions/prescription_report.dart b/lib/core/model/prescriptions/prescription_report.dart
index 8c18df62..5545b25b 100644
--- a/lib/core/model/prescriptions/prescription_report.dart
+++ b/lib/core/model/prescriptions/prescription_report.dart
@@ -134,7 +134,7 @@ class PrescriptionReport {
frequencyID = json['frequencyID'];
routeID = json['routeID'];
name = json['name'];
- itemDescriptionN = json['itemDescriptionN'];
+ itemDescriptionN = json['ItemDescriptionN'];
routeN = json['routeN'];
frequencyN = json['frequencyN'];
}
diff --git a/lib/core/model/prescriptions/prescription_report_enh.dart b/lib/core/model/prescriptions/prescription_report_enh.dart
index 203eaaff..01a34c47 100644
--- a/lib/core/model/prescriptions/prescription_report_enh.dart
+++ b/lib/core/model/prescriptions/prescription_report_enh.dart
@@ -15,6 +15,7 @@ class PrescriptionReportEnh {
String imageThumbUrl;
String isCovered;
String itemDescription;
+ String itemDescriptionN;
int itemID;
String orderDate;
int patientID;
@@ -35,38 +36,39 @@ class PrescriptionReportEnh {
PrescriptionReportEnh(
{this.address,
- this.appointmentNo,
- this.clinic,
- this.companyName,
- this.days,
- this.doctorName,
- this.doseDailyQuantity,
- this.frequency,
- this.frequencyNumber,
- this.image,
- this.imageExtension,
- this.imageSRCUrl,
- this.imageString,
- this.imageThumbUrl,
- this.isCovered,
- this.itemDescription,
- this.itemID,
- this.orderDate,
- this.patientID,
- this.patientName,
- this.phoneOffice1,
- this.prescriptionQR,
- this.prescriptionTimes,
- this.productImage,
- this.productImageBase64,
- this.productImageString,
- this.projectID,
- this.projectName,
- this.remarks,
- this.route,
- this.sKU,
- this.scaleOffset,
- this.startDate});
+ this.appointmentNo,
+ this.clinic,
+ this.companyName,
+ this.days,
+ this.doctorName,
+ this.doseDailyQuantity,
+ this.frequency,
+ this.frequencyNumber,
+ this.image,
+ this.imageExtension,
+ this.imageSRCUrl,
+ this.imageString,
+ this.imageThumbUrl,
+ this.isCovered,
+ this.itemDescription,
+ this.itemDescriptionN,
+ this.itemID,
+ this.orderDate,
+ this.patientID,
+ this.patientName,
+ this.phoneOffice1,
+ this.prescriptionQR,
+ this.prescriptionTimes,
+ this.productImage,
+ this.productImageBase64,
+ this.productImageString,
+ this.projectID,
+ this.projectName,
+ this.remarks,
+ this.route,
+ this.sKU,
+ this.scaleOffset,
+ this.startDate});
PrescriptionReportEnh.fromJson(Map json) {
address = json['Address'];
@@ -85,6 +87,7 @@ class PrescriptionReportEnh {
imageThumbUrl = json['ImageThumbUrl'];
isCovered = json['IsCovered'];
itemDescription = json['ItemDescription'];
+ itemDescriptionN = json['ItemDescriptionN'];
itemID = json['ItemID'];
orderDate = json['OrderDate'];
patientID = json['PatientID'];
@@ -122,6 +125,7 @@ class PrescriptionReportEnh {
data['ImageThumbUrl'] = this.imageThumbUrl;
data['IsCovered'] = this.isCovered;
data['ItemDescription'] = this.itemDescription;
+ data['ItemDescriptionN'] = this.itemDescriptionN;
data['ItemID'] = this.itemID;
data['OrderDate'] = this.orderDate;
data['PatientID'] = this.patientID;
diff --git a/lib/core/model/prescriptions/prescription_report_inp.dart b/lib/core/model/prescriptions/prescription_report_inp.dart
new file mode 100644
index 00000000..b802337b
--- /dev/null
+++ b/lib/core/model/prescriptions/prescription_report_inp.dart
@@ -0,0 +1,124 @@
+class PrescriptionReportINP {
+ int patientID;
+ String patientName;
+ String patientAge;
+ String patientGender;
+ String address;
+ String phoneOffice;
+ String itemDescription;
+ int doseTimingID;
+ int frequencyID;
+ int routeID;
+ String clinic;
+ String doctorName;
+ String route;
+ String frequency;
+ String remarks;
+ String name;
+ int days;
+ String startDate;
+ String orderDate;
+ int doseDailyQuantity;
+ int itemID;
+ Null productImage;
+ String sKU;
+ String itemDescriptionN;
+ String routeN;
+ String frequencyN;
+ String imageSRCUrl;
+ String imageThumbUrl;
+
+ PrescriptionReportINP(
+ {this.patientID,
+ this.patientName,
+ this.patientAge,
+ this.patientGender,
+ this.address,
+ this.phoneOffice,
+ this.itemDescription,
+ this.doseTimingID,
+ this.frequencyID,
+ this.routeID,
+ this.clinic,
+ this.doctorName,
+ this.route,
+ this.frequency,
+ this.remarks,
+ this.name,
+ this.days,
+ this.startDate,
+ this.orderDate,
+ this.doseDailyQuantity,
+ this.itemID,
+ this.productImage,
+ this.sKU,
+ this.itemDescriptionN,
+ this.routeN,
+ this.frequencyN,
+ this.imageSRCUrl,
+ this.imageThumbUrl});
+
+ PrescriptionReportINP.fromJson(Map json) {
+ patientID = json['PatientID'];
+ patientName = json['PatientName'];
+ patientAge = json['PatientAge'];
+ patientGender = json['PatientGender'];
+ address = json['Address'];
+ phoneOffice = json['PhoneOffice'];
+ itemDescription = json['ItemDescription'];
+ doseTimingID = json['DoseTimingID'];
+ frequencyID = json['FrequencyID'];
+ routeID = json['RouteID'];
+ clinic = json['Clinic'];
+ doctorName = json['DoctorName'];
+ route = json['Route'];
+ frequency = json['Frequency'];
+ remarks = json['Remarks'];
+ name = json['Name'];
+ days = json['Days'];
+ startDate = json['StartDate'];
+ orderDate = json['OrderDate'];
+ doseDailyQuantity = json['DoseDailyQuantity'];
+ itemID = json['ItemID'];
+ productImage = json['ProductImage'];
+ sKU = json['SKU'];
+ itemDescriptionN = json['ItemDescriptionN'];
+ routeN = json['RouteN'];
+ frequencyN = json['FrequencyN'];
+ imageSRCUrl = json['ImageSRCUrl'];
+ imageThumbUrl = json['ImageThumbUrl'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['PatientID'] = this.patientID;
+ data['PatientName'] = this.patientName;
+ data['PatientAge'] = this.patientAge;
+ data['PatientGender'] = this.patientGender;
+ data['Address'] = this.address;
+ data['PhoneOffice'] = this.phoneOffice;
+ data['ItemDescription'] = this.itemDescription;
+ data['DoseTimingID'] = this.doseTimingID;
+ data['FrequencyID'] = this.frequencyID;
+ data['RouteID'] = this.routeID;
+ data['Clinic'] = this.clinic;
+ data['DoctorName'] = this.doctorName;
+ data['Route'] = this.route;
+ data['Frequency'] = this.frequency;
+ data['Remarks'] = this.remarks;
+ data['Name'] = this.name;
+ data['Days'] = this.days;
+ data['StartDate'] = this.startDate;
+ data['OrderDate'] = this.orderDate;
+ data['DoseDailyQuantity'] = this.doseDailyQuantity;
+ data['ItemID'] = this.itemID;
+ data['ProductImage'] = this.productImage;
+ data['SKU'] = this.sKU;
+ data['ItemDescriptionN'] = this.itemDescriptionN;
+ data['RouteN'] = this.routeN;
+ data['FrequencyN'] = this.frequencyN;
+ data['ImageSRCUrl'] = this.imageSRCUrl;
+ data['ImageThumbUrl'] = this.imageThumbUrl;
+ return data;
+ }
+}
diff --git a/lib/core/model/prescriptions/request_send_prescription_email.dart b/lib/core/model/prescriptions/request_send_prescription_email.dart
index 2d1f3aa3..ecd0f36d 100644
--- a/lib/core/model/prescriptions/request_send_prescription_email.dart
+++ b/lib/core/model/prescriptions/request_send_prescription_email.dart
@@ -23,6 +23,7 @@ class RequestSendPrescriptionEmail {
String setupID;
String clinicName;
String doctorName;
+ int doctorID;
int projectID;
List listPrescriptions;
@@ -49,7 +50,8 @@ class RequestSendPrescriptionEmail {
this.setupID,
this.clinicName,
this.doctorName,
- this.projectID});
+ this.projectID,
+ this.doctorID});
RequestSendPrescriptionEmail.fromJson(Map json) {
appointmentDate = json['AppointmentDate'];
@@ -75,6 +77,7 @@ class RequestSendPrescriptionEmail {
clinicName = json['ClinicName'];
doctorName = json['DoctorName'];
projectID = json['ProjectID'];
+ doctorID = json['DoctorID'];
}
Map toJson() {
@@ -106,7 +109,7 @@ class RequestSendPrescriptionEmail {
data['ClinicName'] = this.clinicName;
data['DoctorName'] = this.doctorName;
data['ProjectID'] = this.projectID;
-
+ data['DoctorID'] = this.doctorID;
return data;
}
}
diff --git a/lib/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart b/lib/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart
index b59eadac..4b38ef65 100644
--- a/lib/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart
+++ b/lib/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart
@@ -2,24 +2,29 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/ClinicCategory.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart';
+import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_by_time_model.dart';
+import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_by_time_request_model.dart';
+import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_list_calcolation_model.dart';
+import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_list_calcolation_request_model.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
+import 'package:flutter/cupertino.dart';
class BariatricsService extends BaseService {
List clinicCategoryList = [];
List diseasesList = [];
+ List doctorList = [];
+ List doctorListByTime = [];
Future getClinicCategory() async {
hasError = false;
Map body = Map();
- var languageID =
- await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
+ var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
body['ClinicID'] = 108; // hint: it is static depend on IONIC project
body['isDentalAllowedBackend'] = false;
body['LanguageID'] = languageID == 'ar' ? 1 : 2;
- await baseAppClient.post(GET_CLINIC_CATEGORY,
- onSuccess: (dynamic response, int statusCode) {
+ await baseAppClient.post(GET_CLINIC_CATEGORY, onSuccess: (dynamic response, int statusCode) {
clinicCategoryList.clear();
if (response['ClinicCategoryList'] != null)
response['ClinicCategoryList'].forEach((city) {
@@ -36,8 +41,7 @@ class BariatricsService extends BaseService {
Map body = Map();
body['ClinicID'] = 108; // hint: it is static depend on IONIC project
- await baseAppClient.post(GET_DISEASE_BY_CLINIC_ID,
- onSuccess: (dynamic response, int statusCode) {
+ await baseAppClient.post(GET_DISEASE_BY_CLINIC_ID, onSuccess: (dynamic response, int statusCode) {
diseasesList.clear();
if (response['DiseasesByClinicList'] != null)
response['DiseasesByClinicList'].forEach((city) {
@@ -51,8 +55,7 @@ class BariatricsService extends BaseService {
Future searchDoctorsByTime(DiseasesByClinic disease) async {
hasError = false;
- var languageID =
- await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
+ var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Map body = Map();
body['ClinicID'] = 108; // hint: it is static depend on IONIC project
@@ -66,8 +69,38 @@ class BariatricsService extends BaseService {
body['Longitude'] = 0;
body['isDentalAllowedBackend'] = false;
- await baseAppClient.post(SEARCH_DOCTOR_BY_TIME,
- onSuccess: (dynamic response, int statusCode) {
+ await baseAppClient.post(SEARCH_DOCTOR_BY_TIME, onSuccess: (dynamic response, int statusCode) {},
+ onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: body);
+ }
+
+ Future getDoctorList({@required DiseasesByClinic disease}) async {
+ hasError = false;
+ var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
+
+ Map body = Map();
+ body['ClinicID'] = 108; // hint: it is static depend on IONIC project
+ body['ContinueDentalPlan'] = false;
+ body['IsGetNearAppointment'] = false;
+ body['IsSearchAppointmnetByClinicID'] = true;
+ body['LanguageID'] = languageID == 'ar' ? 1 : 2;
+ body['Latitude'] = 0;
+ body['License'] = true;
+ body['Longitude'] = 0;
+ body['PatientID'] = 0;
+ body['isDentalAllowedBackend'] = false;
+
+ if(disease != null)
+ body['DiseaseID'] = disease.diseasesID;
+
+ await baseAppClient.post(GET_DOCTOR_LIST_BY_TIME, onSuccess: (dynamic response, int statusCode) {
+ doctorListByTime.clear();
+ if (response['DoctorList'] != null)
+ response['DoctorList'].forEach((city) {
+ doctorListByTime.add(DoctorListByTimeModel.fromJson(city));
+ });
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart
index f12ef3da..43c39fec 100644
--- a/lib/core/service/client/base_app_client.dart
+++ b/lib/core/service/client/base_app_client.dart
@@ -29,8 +29,7 @@ AppSharedPreferences sharedPref = new AppSharedPreferences();
/// onFailure: (String error, int statusCode) {},
/// body: Map();
///
-AuthenticatedUserObject authenticatedUserObject =
- locator();
+AuthenticatedUserObject authenticatedUserObject = locator();
VitalSignService _vitalSignService = locator();
class BaseAppClient {
@@ -50,14 +49,10 @@ class BaseAppClient {
//Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
var pharmacyToken = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN);
var user = await sharedPref.getObject(USER_PROFILE);
- Map headers = {
- 'Content-Type': 'application/json',
- 'Accept': 'application/json'
- };
+ Map headers = {'Content-Type': 'application/json', 'Accept': 'application/json'};
if (!isExternal) {
String token = await sharedPref.getString(TOKEN);
- var languageID =
- await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
+ var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
if (body.containsKey('SetupID')) {
body['SetupID'] = body.containsKey('SetupID')
? body['SetupID'] != null
@@ -68,23 +63,17 @@ class BaseAppClient {
body['VersionID'] = VERSION_ID;
body['Channel'] = CHANNEL;
- body['LanguageID'] = languageID == 'ar' ? 1 : 2;
+ body['LanguageID'] = (languageID == 'ar' ? 1 : 2);
body['IPAdress'] = IP_ADDRESS;
body['generalid'] = GENERAL_ID;
- body['PatientOutSA'] = body.containsKey('PatientOutSA')
- ? body['PatientOutSA'] != null
- ? body['PatientOutSA']
- : PATIENT_OUT_SA
- : PATIENT_OUT_SA;
if (body.containsKey('isDentalAllowedBackend')) {
- body['isDentalAllowedBackend'] =
- body.containsKey('isDentalAllowedBackend')
- ? body['isDentalAllowedBackend'] != null
- ? body['isDentalAllowedBackend']
- : IS_DENTAL_ALLOWED_BACKEND
- : IS_DENTAL_ALLOWED_BACKEND;
+ body['isDentalAllowedBackend'] = body.containsKey('isDentalAllowedBackend')
+ ? body['isDentalAllowedBackend'] != null
+ ? body['isDentalAllowedBackend']
+ : IS_DENTAL_ALLOWED_BACKEND
+ : IS_DENTAL_ALLOWED_BACKEND;
}
body['DeviceTypeID'] = Platform.isAndroid ? 1 : 2;
@@ -107,19 +96,20 @@ class BaseAppClient {
: PATIENT_TYPE_ID;
if (user != null) {
body['TokenID'] = token;
- body['PatientID'] = body['PatientID'] != null
- ? body['PatientID']
- : user['PatientID'];
+ body['PatientID'] = body['PatientID'] != null ? body['PatientID'] : user['PatientID'];
body['PatientOutSA'] = user['OutSA'];
+ body['PatientOutSA'] = body.containsKey('PatientOutSA')
+ ? body['PatientOutSA'] != null
+ ? body['PatientOutSA']
+ : PATIENT_OUT_SA
+ : PATIENT_OUT_SA;
body['SessionID'] = SESSION_ID; //getSe
+
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': pharmacyToken,
- 'Mobilenumber': user != null
- ? Utils.getPhoneNumberWithoutZero(
- user['MobileNumber'].toString())
- : "",
+ 'Mobilenumber': user != null ? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString()) : "",
'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
'Username': user['PatientID'].toString(),
};
@@ -131,8 +121,7 @@ class BaseAppClient {
print("Body : ${json.encode(body)}");
if (await Utils.checkConnection()) {
- final response = await http.post(url.trim(),
- body: json.encode(body), headers: headers);
+ final response = await http.post(url.trim(), body: json.encode(body), headers: headers);
final int statusCode = response.statusCode;
print("statusCode :$statusCode");
if (statusCode < 200 || statusCode >= 400 || json == null) {
@@ -144,8 +133,7 @@ class BaseAppClient {
onSuccess(parsed, statusCode);
} else {
if (parsed['ErrorType'] == 4) {
- navigateToAppUpdate(
- AppGlobal.context, parsed['ErrorEndUserMessage']);
+ navigateToAppUpdate(AppGlobal.context, parsed['ErrorEndUserMessage']);
}
if (isAllowAny) {
onSuccess(parsed, statusCode);
@@ -160,34 +148,24 @@ class BaseAppClient {
if (parsed != null) {
onSuccess(parsed, statusCode);
} else {
- onFailure(
- parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
- statusCode);
+ onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
logout();
}
}
- } else if (parsed['MessageStatus'] == 1 ||
- parsed['SMSLoginRequired'] == true) {
+ } else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) {
onSuccess(parsed, statusCode);
- } else if (parsed['MessageStatus'] == 2 &&
- parsed['IsAuthenticated']) {
+ } else if (parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']) {
if (parsed['SameClinicApptList'] != null) {
onSuccess(parsed, statusCode);
} else {
- if (parsed['message'] == null &&
- parsed['ErrorEndUserMessage'] == null) {
+ if (parsed['message'] == null && parsed['ErrorEndUserMessage'] == null) {
if (parsed['ErrorSearchMsg'] == null) {
- onFailure("Server Error found with no available message",
- statusCode);
+ onFailure("Server Error found with no available message", statusCode);
} else {
onFailure(parsed['ErrorSearchMsg'], statusCode);
}
} else {
- onFailure(
- parsed['message'] ??
- parsed['ErrorEndUserMessage'] ??
- parsed['ErrorMessage'],
- statusCode);
+ onFailure(parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
}
}
} else if (!parsed['IsAuthenticated']) {
@@ -201,9 +179,7 @@ class BaseAppClient {
if (parsed['message'] != null) {
onFailure(parsed['message'] ?? parsed['message'], statusCode);
} else {
- onFailure(
- parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
- statusCode);
+ onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
}
}
}
@@ -240,16 +216,13 @@ class BaseAppClient {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': token ?? '',
- 'Mobilenumber': user != null
- ? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString())
- : "",
+ 'Mobilenumber': user != null ? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString()) : "",
'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
'Username': user != null ? user['PatientID'].toString() : "",
};
if (!isExternal) {
String token = await sharedPref.getString(TOKEN);
- var languageID =
- await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
+ var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
if (body.containsKey('SetupID')) {
body['SetupID'] = body.containsKey('SetupID')
? body['SetupID'] != null
@@ -271,12 +244,11 @@ class BaseAppClient {
: PATIENT_OUT_SA;
if (body.containsKey('isDentalAllowedBackend')) {
- body['isDentalAllowedBackend'] =
- body.containsKey('isDentalAllowedBackend')
- ? body['isDentalAllowedBackend'] != null
- ? body['isDentalAllowedBackend']
- : IS_DENTAL_ALLOWED_BACKEND
- : IS_DENTAL_ALLOWED_BACKEND;
+ body['isDentalAllowedBackend'] = body.containsKey('isDentalAllowedBackend')
+ ? body['isDentalAllowedBackend'] != null
+ ? body['isDentalAllowedBackend']
+ : IS_DENTAL_ALLOWED_BACKEND
+ : IS_DENTAL_ALLOWED_BACKEND;
}
body['DeviceTypeID'] = Platform.isAndroid ? 1 : 2;
@@ -299,9 +271,7 @@ class BaseAppClient {
: PATIENT_TYPE_ID;
if (user != null) {
body['TokenID'] = token;
- body['PatientID'] = body['PatientID'] != null
- ? body['PatientID']
- : user['PatientID'];
+ body['PatientID'] = body['PatientID'] != null ? body['PatientID'] : user['PatientID'];
body['PatientOutSA'] = user['OutSA'];
body['SessionID'] = SESSION_ID; //getSe
headers = {
@@ -320,8 +290,7 @@ class BaseAppClient {
print("Body : ${json.encode(body)}");
if (await Utils.checkConnection()) {
- final response = await http.post(url.trim(),
- body: json.encode(body), headers: headers);
+ final response = await http.post(url.trim(), body: json.encode(body), headers: headers);
final int statusCode = response.statusCode;
print("statusCode :$statusCode");
if (statusCode < 200 || statusCode >= 400 || json == null) {
@@ -333,8 +302,7 @@ class BaseAppClient {
onSuccess(parsed, statusCode);
} else {
if (parsed['ErrorType'] == 4) {
- navigateToAppUpdate(
- AppGlobal.context, parsed['ErrorEndUserMessage']);
+ navigateToAppUpdate(AppGlobal.context, parsed['ErrorEndUserMessage']);
}
if (isAllowAny) {
onSuccess(parsed, statusCode);
@@ -349,34 +317,24 @@ class BaseAppClient {
if (parsed != null) {
onSuccess(parsed, statusCode);
} else {
- onFailure(
- parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
- statusCode);
+ onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
logout();
}
}
- } else if (parsed['MessageStatus'] == 1 ||
- parsed['SMSLoginRequired'] == true) {
+ } else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) {
onSuccess(parsed, statusCode);
- } else if (parsed['MessageStatus'] == 2 &&
- parsed['IsAuthenticated']) {
+ } else if (parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']) {
if (parsed['SameClinicApptList'] != null) {
onSuccess(parsed, statusCode);
} else {
- if (parsed['message'] == null &&
- parsed['ErrorEndUserMessage'] == null) {
+ if (parsed['message'] == null && parsed['ErrorEndUserMessage'] == null) {
if (parsed['ErrorSearchMsg'] == null) {
- onFailure("Server Error found with no available message",
- statusCode);
+ onFailure("Server Error found with no available message", statusCode);
} else {
onFailure(parsed['ErrorSearchMsg'], statusCode);
}
} else {
- onFailure(
- parsed['message'] ??
- parsed['ErrorEndUserMessage'] ??
- parsed['ErrorMessage'],
- statusCode);
+ onFailure(parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
}
}
} else if (!parsed['IsAuthenticated']) {
@@ -390,9 +348,7 @@ class BaseAppClient {
if (parsed['message'] != null) {
onFailure(parsed['message'] ?? parsed['message'], statusCode);
} else {
- onFailure(
- parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
- statusCode);
+ onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
}
}
}
@@ -408,8 +364,7 @@ class BaseAppClient {
}
Future navigateToAppUpdate(context, String text) async {
- Navigator.pushReplacement(
- context, FadePage(page: AppUpdatePage(appUpdateText: text)));
+ Navigator.pushReplacement(context, FadePage(page: AppUpdatePage(appUpdateText: text)));
}
get(String endPoint,
@@ -433,10 +388,7 @@ class BaseAppClient {
if (await Utils.checkConnection()) {
final response = await http.get(
url.trim(),
- headers: {
- 'Content-Type': 'application/json',
- 'Accept': 'application/json'
- },
+ headers: {'Content-Type': 'application/json', 'Accept': 'application/json'},
);
final int statusCode = response.statusCode;
print("statusCode :$statusCode");
@@ -480,9 +432,7 @@ class BaseAppClient {
'Content-Type': 'text/html; charset=utf-8',
'Accept': 'application/json',
'Authorization': token ?? '',
- 'Mobilenumber': user != null
- ? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString())
- : "",
+ 'Mobilenumber': user != null ? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString()) : "",
'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
'Username': user != null ? user['PatientID'].toString() : "",
});
@@ -491,8 +441,7 @@ class BaseAppClient {
if (statusCode < 200 || statusCode >= 400 || json == null) {
if (statusCode == 401) {
- AppToast.showErrorToast(
- message: TranslationBase.of(AppGlobal.context).pharmacyRelogin);
+ AppToast.showErrorToast(message: TranslationBase.of(AppGlobal.context).pharmacyRelogin);
Navigator.of(AppGlobal.context).pushNamed(HOME);
} else {
onFailure('Error While Fetching data', statusCode);
@@ -520,10 +469,7 @@ class BaseAppClient {
final response = await http.post(
url.trim(),
body: json.encode(body),
- headers: {
- 'Content-Type': 'application/json',
- 'Accept': 'application/json'
- },
+ headers: {'Content-Type': 'application/json', 'Accept': 'application/json'},
);
final int statusCode = response.statusCode;
@@ -556,10 +502,7 @@ class BaseAppClient {
if (await Utils.checkConnection()) {
final response = await http.get(
url.trim(),
- headers: {
- 'Content-Type': 'application/json',
- 'Accept': 'application/json'
- },
+ headers: {'Content-Type': 'application/json', 'Accept': 'application/json'},
);
final int statusCode = response.statusCode;
@@ -586,10 +529,7 @@ class BaseAppClient {
final response = await http.put(
url.trim(),
body: json.encode(body),
- headers: {
- 'Content-Type': 'application/json',
- 'Accept': 'application/json'
- },
+ headers: {'Content-Type': 'application/json', 'Accept': 'application/json'},
);
final int statusCode = response.statusCode;
@@ -622,10 +562,7 @@ class BaseAppClient {
if (await Utils.checkConnection()) {
final response = await http.delete(
url.trim(),
- headers: {
- 'Content-Type': 'application/json',
- 'Accept': 'application/json'
- },
+ headers: {'Content-Type': 'application/json', 'Accept': 'application/json'},
);
final int statusCode = response.statusCode;
@@ -645,10 +582,8 @@ class BaseAppClient {
await sharedPref.remove(LOGIN_TOKEN_ID);
await sharedPref.remove(PHARMACY_CUSTOMER_ID);
await authenticatedUserObject.getUser();
- Provider.of(AppGlobal.context, listen: false).isLogin =
- false;
- var model =
- Provider.of(AppGlobal.context, listen: false);
+ Provider.of(AppGlobal.context, listen: false).isLogin = false;
+ var model = Provider.of(AppGlobal.context, listen: false);
_vitalSignService.weightKg = "";
_vitalSignService.heightCm = "";
model.setState(0, false);
@@ -662,8 +597,7 @@ class BaseAppClient {
static defaultHttpParameters() async {
String token = await sharedPref.getString(TOKEN);
- var languageID =
- await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
+ var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
var user = await sharedPref.getObject(USER_PROFILE);
var params = {};
if (user != null) {
@@ -699,8 +633,7 @@ class BaseAppClient {
try {
if (isExternal) {
String token = await sharedPref.getString(TOKEN);
- var languageID =
- await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
+ var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
var user = await sharedPref.getObject(USER_PROFILE);
if (body.containsKey('SetupID')) {
body['SetupID'] = body.containsKey('SetupID')
@@ -723,12 +656,11 @@ class BaseAppClient {
: PATIENT_OUT_SA;
if (body.containsKey('isDentalAllowedBackend')) {
- body['isDentalAllowedBackend'] =
- body.containsKey('isDentalAllowedBackend')
- ? body['isDentalAllowedBackend'] != null
- ? body['isDentalAllowedBackend']
- : IS_DENTAL_ALLOWED_BACKEND
- : IS_DENTAL_ALLOWED_BACKEND;
+ body['isDentalAllowedBackend'] = body.containsKey('isDentalAllowedBackend')
+ ? body['isDentalAllowedBackend'] != null
+ ? body['isDentalAllowedBackend']
+ : IS_DENTAL_ALLOWED_BACKEND
+ : IS_DENTAL_ALLOWED_BACKEND;
}
body['DeviceTypeID'] = Platform.isAndroid ? 1 : 2;
@@ -751,9 +683,7 @@ class BaseAppClient {
: PATIENT_TYPE_ID;
if (user != null) {
body['TokenID'] = token;
- body['PatientID'] = body['PatientID'] != null
- ? body['PatientID']
- : user['PatientID'];
+ body['PatientID'] = body['PatientID'] != null ? body['PatientID'] : user['PatientID'];
body['PatientOutSA'] = user['OutSA'];
body['SessionID'] = SESSION_ID; //getSessionId(token);
}
@@ -765,17 +695,14 @@ class BaseAppClient {
var ss = json.encode(body);
if (await Utils.checkConnection()) {
- final response =
- await http.post(url.trim(), body: json.encode(body), headers: {
+ final response = await http.post(url.trim(), body: json.encode(body), headers: {
// 'Content-Type': 'application/json',
// 'Accept': 'application/json',
// 'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': token ?? '',
- 'Mobilenumber': user != null
- ? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString())
- : "",
+ 'Mobilenumber': user != null ? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString()) : "",
'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
'Username': user != null ? user['PatientID'].toString() : "",
});
@@ -790,8 +717,7 @@ class BaseAppClient {
onSuccess(parsed, statusCode);
} else {
if (parsed['ErrorType'] == 4) {
- navigateToAppUpdate(
- AppGlobal.context, parsed['ErrorEndUserMessage']);
+ navigateToAppUpdate(AppGlobal.context, parsed['ErrorEndUserMessage']);
}
if (isAllowAny) {
onSuccess(parsed, statusCode);
@@ -806,31 +732,21 @@ class BaseAppClient {
if (parsed != null) {
onSuccess(parsed, statusCode);
} else {
- onFailure(
- parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
- statusCode);
+ onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
logout();
}
}
- } else if (parsed['MessageStatus'] == 1 ||
- parsed['SMSLoginRequired'] == true) {
+ } else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) {
onSuccess(parsed, statusCode);
- } else if (parsed['MessageStatus'] == 2 &&
- parsed['IsAuthenticated']) {
- if (parsed['message'] == null &&
- parsed['ErrorEndUserMessage'] == null) {
+ } else if (parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']) {
+ if (parsed['message'] == null && parsed['ErrorEndUserMessage'] == null) {
if (parsed['ErrorSearchMsg'] == null) {
- onFailure("Server Error found with no available message",
- statusCode);
+ onFailure("Server Error found with no available message", statusCode);
} else {
onFailure(parsed['ErrorSearchMsg'], statusCode);
}
} else {
- onFailure(
- parsed['message'] ??
- parsed['ErrorEndUserMessage'] ??
- parsed['ErrorMessage'],
- statusCode);
+ onFailure(parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
}
} else if (!parsed['IsAuthenticated']) {
await logout();
@@ -843,9 +759,7 @@ class BaseAppClient {
if (parsed['message'] != null) {
onFailure(parsed['message'] ?? parsed['message'], statusCode);
} else {
- onFailure(
- parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
- statusCode);
+ onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
}
}
}
diff --git a/lib/core/service/feedback/feedback_service.dart b/lib/core/service/feedback/feedback_service.dart
index 9df5b0a6..9355daf0 100644
--- a/lib/core/service/feedback/feedback_service.dart
+++ b/lib/core/service/feedback/feedback_service.dart
@@ -6,6 +6,7 @@ import 'package:diplomaticquarterapp/core/model/feedback/request_insert_coc_item
import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
+import 'package:diplomaticquarterapp/uitl/utils.dart';
class FeedbackService extends BaseService {
List cOCItemList = List();
@@ -26,7 +27,7 @@ class FeedbackService extends BaseService {
_requestInsertCOCItem.details = details;
_requestInsertCOCItem.cOCTypeName = cOCTypeName;
_requestInsertCOCItem.formTypeID = cOCTypeName;
- _requestInsertCOCItem.mobileNo = user.mobileNumber;
+ _requestInsertCOCItem.mobileNo = "966" + Utils.getPhoneNumberWithoutZero(user.mobileNumber);
_requestInsertCOCItem.isUserLoggedIn = true;
_requestInsertCOCItem.projectID = user.projectID;
_requestInsertCOCItem.patientName = user.firstName + " " + user.lastName;
@@ -64,7 +65,7 @@ class FeedbackService extends BaseService {
hasError = false;
Map body = new Map();
body['IdentificationNo'] = user.patientIdentificationNo;
- body['MobileNo'] = user.mobileNumber;
+ body['MobileNo'] = "966" + Utils.getPhoneNumberWithoutZero(user.mobileNumber);
body['Searching_type'] = '1';
await baseAppClient.post(GET_STATUS_FOR_COCO,
diff --git a/lib/core/service/insurance_service.dart b/lib/core/service/insurance_service.dart
index 0b626342..6eb1f415 100644
--- a/lib/core/service/insurance_service.dart
+++ b/lib/core/service/insurance_service.dart
@@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/insurance/Insurance_card_details.dart';
+import 'package:diplomaticquarterapp/core/model/insurance/ReauestInsuranceApprovalModel.dart';
import 'package:diplomaticquarterapp/core/model/insurance/insurance_approval.dart';
import 'package:diplomaticquarterapp/core/model/insurance/insurance_card.dart';
import 'package:diplomaticquarterapp/core/model/insurance/insurance_card_update_model.dart';
@@ -25,8 +26,7 @@ class InsuranceCardService extends BaseService {
List insuranceCardDetailsList = List();
bool isHaveInsuranceCard = false;
- GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse =
- GetAllSharedRecordsByStatusResponse();
+ GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse();
clearInsuranceCard() {
_cardList.clear();
@@ -36,19 +36,12 @@ class InsuranceCardService extends BaseService {
_cardUpdated.clear();
}
-
- InsuranceApprovalModel _insuranceApprovalModel = InsuranceApprovalModel(
- isDentalAllowedBackend: false,
- patientTypeID: 1,
- patientType: 1,
- eXuldAPPNO: 0,
- projectID: 0);
+ RequestInsuranceApprovalModel _requestInsuranceApprovalModel = RequestInsuranceApprovalModel(isDentalAllowedBackend: false, patientTypeID: 1, patientType: 1, eXuldAPPNO: 0, projectID: 0);
Future getInsurance() async {
hasError = false;
_cardList.clear();
- await baseAppClient.post(GET_PAtIENTS_INSURANCE,
- onSuccess: (dynamic response, int statusCode) {
+ await baseAppClient.post(GET_PAtIENTS_INSURANCE, onSuccess: (dynamic response, int statusCode) {
response['List_PatientInsuranceCard'].forEach((item) {
_cardList.add(InsuranceCardModel.fromJson(item));
});
@@ -60,10 +53,9 @@ class InsuranceCardService extends BaseService {
Future getInsuranceUpdate() async {
hasError = false;
- _cardList.clear();
- await baseAppClient.post(GET_PAtIENTS_INSURANCE_UPDATED,
- onSuccess: (dynamic response, int statusCode) {
- _cardUpdated.clear();
+ _cardList.clear();
+ await baseAppClient.post(GET_PAtIENTS_INSURANCE_UPDATED, onSuccess: (dynamic response, int statusCode) {
+ _cardUpdated.clear();
response['List_PatientInsuranceCardHistory'].forEach((item) {
_cardUpdated.add(InsuranceUpdateModel.fromJson(item));
});
@@ -77,17 +69,16 @@ class InsuranceCardService extends BaseService {
hasError = false;
// _cardList.clear();
if (appointmentNo != null) {
- _insuranceApprovalModel.appointmentNo = appointmentNo;
- _insuranceApprovalModel.eXuldAPPNO = null;
- _insuranceApprovalModel.projectID = null;
+ // _requestInsuranceApprovalModel.appointmentNo = appointmentNo;
+ _requestInsuranceApprovalModel.eXuldAPPNO = null;
+ _requestInsuranceApprovalModel.projectID = null;
} else {
- _insuranceApprovalModel.appointmentNo = null;
- _insuranceApprovalModel.eXuldAPPNO = 0;
- _insuranceApprovalModel.projectID = 0;
+ // _requestInsuranceApprovalModel.appointmentNo = null;
+ _requestInsuranceApprovalModel.eXuldAPPNO = 0;
+ _requestInsuranceApprovalModel.projectID = 0;
}
- await baseAppClient.post(GET_PAtIENTS_INSURANCE_APPROVALS,
- onSuccess: (dynamic response, int statusCode) {
+ await baseAppClient.post(GET_PAtIENTS_INSURANCE_APPROVALS, onSuccess: (dynamic response, int statusCode) {
print(response['HIS_Approval_List'].length);
_insuranceApproval.clear();
_insuranceApproval.length = 0;
@@ -97,14 +88,13 @@ class InsuranceCardService extends BaseService {
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
- }, body: _insuranceApprovalModel.toJson());
+ }, body: _requestInsuranceApprovalModel.toJson());
}
Future getFamilyFiles() async {
var myFamily = await sharedPref.getObject(FAMILY_FILE);
if (myFamily != null) {
- getAllSharedRecordsByStatusResponse =
- GetAllSharedRecordsByStatusResponse.fromJson(myFamily);
+ getAllSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse.fromJson(myFamily);
} else {
getSharedRecordByStatus();
}
@@ -115,68 +105,75 @@ class InsuranceCardService extends BaseService {
dynamic localRes;
var request = GetAllSharedRecordsByStatusReq();
request.status = 0;
- await baseAppClient.post(GET_SHARED_RECORD_BY_STATUS,
- onSuccess: (dynamic response, int statusCode) {
+ await baseAppClient.post(GET_SHARED_RECORD_BY_STATUS, onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
AppToast.showErrorToast(message: error);
throw error;
}, body: request.toJson());
sharedPref.setObject(FAMILY_FILE, localRes);
- getAllSharedRecordsByStatusResponse =
- GetAllSharedRecordsByStatusResponse.fromJson(localRes);
+ getAllSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse.fromJson(localRes);
} catch (error) {
print(error);
throw error;
}
}
- Future getInsuranceDetails(data) async{
+
+ Future getInsuranceDetails(data) async {
dynamic localRes;
- await baseAppClient.post(INSURANCE_DETAILS,
- onSuccess: (dynamic response, int statusCode) {
- localRes = response['List_InsuranceCheckList'];
- }, onFailure: (String error, int statusCode) {
- hasError = true;
- super.error = error;
- }, body:{'CompanyID': data.companyID,'SubCategoryID':data.subCategoryID },);
+ await baseAppClient.post(
+ INSURANCE_DETAILS,
+ onSuccess: (dynamic response, int statusCode) {
+ localRes = response['List_InsuranceCheckList'];
+ },
+ onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ },
+ body: {'CompanyID': data.companyID, 'SubCategoryID': data.subCategoryID},
+ );
return Future.value(localRes);
}
- Future getPatientInsuranceDetails({String setupID, int projectID, String patientIdentificationID,int patientID}) async{
+ Future getPatientInsuranceDetails({String setupID, int projectID, String patientIdentificationID, int patientID}) async {
error = "";
hasError = false;
insuranceCardDetails = null;
isHaveInsuranceCard = false;
- await baseAppClient.post(GET_PATIENT_INSURANCE_DETAILS,
- onSuccess: (dynamic response, int statusCode) {
- insuranceCardDetailsList.clear();
- isHaveInsuranceCard = true;
- response['List_PatientInsuranceDetails'].forEach((item) {
- insuranceCardDetailsList.add(InsuranceCardDetailsModel.fromJson(item));
- });
- }, onFailure: (String error, int statusCode) {
- hasError = true;
- super.error = error;
- }, body:{'SetupID': setupID,'ProjectID':projectID,'PatientIdentificationID':patientIdentificationID ,'isDentalAllowedBackend':false,'PatientID':patientID},);
-
+ await baseAppClient.post(
+ GET_PATIENT_INSURANCE_DETAILS,
+ onSuccess: (dynamic response, int statusCode) {
+ insuranceCardDetailsList.clear();
+ isHaveInsuranceCard = true;
+ response['List_PatientInsuranceDetails'].forEach((item) {
+ insuranceCardDetailsList.add(InsuranceCardDetailsModel.fromJson(item));
+ });
+ },
+ onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ },
+ body: {'SetupID': setupID, 'ProjectID': projectID, 'PatientIdentificationID': patientIdentificationID, 'isDentalAllowedBackend': false, 'PatientID': patientID},
+ );
}
- Future uploadInsuranceCard({ String patientIdentificationID,int patientID,String image=""}) async{
+ Future uploadInsuranceCard({String patientIdentificationID, int patientID, String image = ""}) async {
error = "";
- Map body = Map();
- body['PatientID']=patientID;
- body['PatientType']=user.patientType;
- body['MobileNo']=user.mobileNumber;
- body['PatientIdentificationID']=patientIdentificationID;
- body['InsuranceCardImage']= image;
-
- await baseAppClient.post(UPLOAD_INSURANCE_CARD,
- onSuccess: (dynamic response, int statusCode) {
-
- }, onFailure: (String error, int statusCode) {
- hasError = true;
- super.error = error;
- }, body:body,);
-
+ Map body = Map();
+ body['PatientID'] = patientID;
+ body['PatientType'] = user.patientType;
+ body['MobileNo'] = user.mobileNumber;
+ body['PatientIdentificationID'] = patientIdentificationID;
+ body['InsuranceCardImage'] = image;
+
+ await baseAppClient.post(
+ UPLOAD_INSURANCE_CARD,
+ onSuccess: (dynamic response, int statusCode) {},
+ onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ },
+ body: body,
+ );
}
}
diff --git a/lib/core/service/medical/BloodPressureService.dart b/lib/core/service/medical/BloodPressureService.dart
index 82130750..7a849808 100644
--- a/lib/core/service/medical/BloodPressureService.dart
+++ b/lib/core/service/medical/BloodPressureService.dart
@@ -73,7 +73,7 @@ class BloodPressureService extends BaseService {
super.error = "";
Map body = Map();
body['isDentalAllowedBackend'] = false;
- body['to'] = user.emailAddress;
+ body['To'] = user.emailAddress;
await baseAppClient.post(SEND_AVERAGE_BLOOD_PRESSURE_REPORT,
onSuccess: (response, statusCode) async {},
onFailure: (String error, int statusCode) {
diff --git a/lib/core/service/medical/BloodSugarService.dart b/lib/core/service/medical/BloodSugarService.dart
index e8e2fabf..4de444ea 100644
--- a/lib/core/service/medical/BloodSugarService.dart
+++ b/lib/core/service/medical/BloodSugarService.dart
@@ -114,7 +114,7 @@ class BloodSugarService extends BaseService {
super.error = "";
Map body = Map();
body['isDentalAllowedBackend'] = false;
- body['to'] = user.emailAddress;
+ body['To'] = user.emailAddress;
await baseAppClient.post(SEND_AVERAGE_BLOOD_SUGAR_REPORT,
onSuccess: (response, statusCode) async {},
onFailure: (String error, int statusCode) {
diff --git a/lib/core/service/medical/WeightPressureService.dart b/lib/core/service/medical/WeightPressureService.dart
index b48c4795..6d150c28 100644
--- a/lib/core/service/medical/WeightPressureService.dart
+++ b/lib/core/service/medical/WeightPressureService.dart
@@ -7,12 +7,9 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart';
class WeightService extends BaseService {
///Average
- List
- monthWeightMeasurementResultAverage = List();
- List weekWeightMeasurementResultAverage =
- List();
- List yearWeightMeasurementResultAverage =
- List();
+ List monthWeightMeasurementResultAverage = List();
+ List weekWeightMeasurementResultAverage = List();
+ List yearWeightMeasurementResultAverage = List();
///Result
List monthWeightMeasurementResult = List();
@@ -23,24 +20,20 @@ class WeightService extends BaseService {
hasError = false;
Map body = Map();
body['isDentalAllowedBackend'] = false;
- await baseAppClient.post(GET_WEIGHT_PRESSURE_RESULT_AVERAGE,
- onSuccess: (dynamic response, int statusCode) {
+ await baseAppClient.post(GET_WEIGHT_PRESSURE_RESULT_AVERAGE, onSuccess: (dynamic response, int statusCode) {
monthWeightMeasurementResultAverage.clear();
weekWeightMeasurementResultAverage.clear();
yearWeightMeasurementResultAverage.clear();
response['List_MonthWeightMeasurementResultAverage'].forEach((item) {
- monthWeightMeasurementResultAverage
- .add(MonthWeightMeasurementResultAverage.fromJson(item));
+ monthWeightMeasurementResultAverage.add(MonthWeightMeasurementResultAverage.fromJson(item));
});
response['List_WeekWeightMeasurementResultAverage'].forEach((item) {
- weekWeightMeasurementResultAverage
- .add(WeekWeightMeasurementResultAverage.fromJson(item));
+ weekWeightMeasurementResultAverage.add(WeekWeightMeasurementResultAverage.fromJson(item));
});
response['List_YearWeightMeasurementResultAverage'].forEach((item) {
- yearWeightMeasurementResultAverage
- .add(YearWeightMeasurementResultAverage.fromJson(item));
+ yearWeightMeasurementResultAverage.add(YearWeightMeasurementResultAverage.fromJson(item));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
@@ -50,8 +43,7 @@ class WeightService extends BaseService {
Future getWeightMeasurementResult() async {
hasError = false;
- await baseAppClient.post(GET_WEIGHT_PRESSURE_RESULT,
- onSuccess: (dynamic response, int statusCode) {
+ await baseAppClient.post(GET_WEIGHT_PRESSURE_RESULT, onSuccess: (dynamic response, int statusCode) {
monthWeightMeasurementResult.clear();
weekWeightMeasurementResult.clear();
yearWeightMeasurementResult.clear();
@@ -61,8 +53,7 @@ class WeightService extends BaseService {
});
response['List_MonthWeightMeasurementResult'].forEach((item) {
- monthWeightMeasurementResult
- .add(WeightMeasurementResult.fromJson(item));
+ monthWeightMeasurementResult.add(WeightMeasurementResult.fromJson(item));
});
response['List_YearWeightMeasurementResult'].forEach((item) {
@@ -74,8 +65,7 @@ class WeightService extends BaseService {
}, body: Map());
}
- addWeightResult(
- {String weightDate, String weightMeasured, int weightUnit}) async {
+ addWeightResult({String weightDate, String weightMeasured, int weightUnit}) async {
hasError = false;
super.error = "";
@@ -85,15 +75,14 @@ class WeightService extends BaseService {
body['weightUnit'] = weightUnit;
body['isDentalAllowedBackend'] = false;
- await baseAppClient.post(ADD_WEIGHT_PRESSURE_RESULT,
- onSuccess: (response, statusCode) async {},
+ await baseAppClient.post(ADD_WEIGHT_PRESSURE_RESULT, onSuccess: (response, statusCode) async {},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
- updateWeightResult({int lineItemNo, int weightUnit,String weightMeasured,String weightDate}) async {
+ updateWeightResult({int lineItemNo, int weightUnit, String weightMeasured, String weightDate}) async {
hasError = false;
super.error = "";
Map body = Map();
@@ -103,36 +92,36 @@ class WeightService extends BaseService {
body['WeightDate'] = weightDate;
body['isDentalAllowedBackend'] = false;
- await baseAppClient.post(UPDATE_WEIGHT_PRESSURE_RESULT,
- onSuccess: (response, statusCode) async {},
+ await baseAppClient.post(UPDATE_WEIGHT_PRESSURE_RESULT, onSuccess: (response, statusCode) async {},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
+
Future sendReportByEmail() async {
hasError = false;
super.error = "";
Map body = Map();
body['isDentalAllowedBackend'] = false;
body['to'] = user.emailAddress;
- await baseAppClient.post(SEND_AVERAGE_BLOOD_WEIGHT_REPORT,
- onSuccess: (response, statusCode) async {},
+ await baseAppClient.post(SEND_AVERAGE_BLOOD_WEIGHT_REPORT, onSuccess: (response, statusCode) async {},
onFailure: (String error, int statusCode) {
- hasError = true;
- super.error = error;
- }, body: body);
+ hasError = true;
+ super.error = error;
+ }, body: body);
}
- deleteWeightResult({int lineItemNo, }) async {
+ deleteWeightResult({
+ int lineItemNo,
+ }) async {
hasError = false;
super.error = "";
Map body = Map();
body['LineItemNo'] = lineItemNo;
body['isDentalAllowedBackend'] = false;
- await baseAppClient.post(DEACTIVATE_WEIGHT_PRESSURE_RESULT,
- onSuccess: (response, statusCode) async {},
+ await baseAppClient.post(DEACTIVATE_WEIGHT_PRESSURE_RESULT, onSuccess: (response, statusCode) async {},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
diff --git a/lib/core/service/medical/prescriptions_service.dart b/lib/core/service/medical/prescriptions_service.dart
index e9741a7f..af34f2ba 100644
--- a/lib/core/service/medical/prescriptions_service.dart
+++ b/lib/core/service/medical/prescriptions_service.dart
@@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/perscription_pharmacy.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart';
+import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_inp.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_enh.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/request_get_list_pharmacy_for_prescriptions.dart';
@@ -15,7 +16,7 @@ import 'package:flutter/cupertino.dart';
class PrescriptionsService extends BaseService {
List prescriptionsList = List();
-
+ List prescriptionReportListINP = List();
List prescriptionsOrderList = List();
Future getPrescriptions() async {
@@ -56,32 +57,40 @@ class PrescriptionsService extends BaseService {
appointmentNo: 0, isDentalAllowedBackend: false);
List prescriptionReportList = List();
- Future getPrescriptionReport(
- {Prescriptions prescriptions}) async {
+ Future getPrescriptionReport({Prescriptions prescriptions}) async {
hasError = false;
- _requestPrescriptionReport.dischargeNo = prescriptions.dischargeNo;
+ if (prescriptions.isInOutPatient == false) {
+ _requestPrescriptionReport.dischargeNo = prescriptions.dischargeNo;
+ } else {
+ _requestPrescriptionReport.dischargeNo = 0;
+ }
_requestPrescriptionReport.projectID = prescriptions.projectID;
_requestPrescriptionReport.clinicID = prescriptions.clinicID;
_requestPrescriptionReport.setupID = prescriptions.setupID;
_requestPrescriptionReport.episodeID = prescriptions.episodeID;
_requestPrescriptionReport.appointmentNo = prescriptions.appointmentNo;
- await baseAppClient.post(prescriptions.isInOutPatient? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT,
+ await baseAppClient.post(
+ prescriptions.isInOutPatient
+ ? GET_PRESCRIPTION_REPORT_ENH
+ : GET_PRESCRIPTION_REPORT,
onSuccess: (dynamic response, int statusCode) {
prescriptionReportList.clear();
prescriptionReportEnhList.clear();
- if(prescriptions.isInOutPatient){
+ if (prescriptions.isInOutPatient) {
response['ListPRM'].forEach((prescriptions) {
- prescriptionReportList.add(PrescriptionReport.fromJson(prescriptions));
- prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(prescriptions));
+ prescriptionReportList
+ .add(PrescriptionReport.fromJson(prescriptions));
+ prescriptionReportEnhList
+ .add(PrescriptionReportEnh.fromJson(prescriptions));
});
- }else{
+ } else {
+ prescriptionReportListINP.clear();
response['INP_GetPrescriptionReport_List'].forEach((prescriptions) {
- prescriptionReportList.add(PrescriptionReport.fromJson(prescriptions));
+ prescriptionReportListINP
+ .add(PrescriptionReportINP.fromJson(prescriptions));
});
}
-
-
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
@@ -90,35 +99,42 @@ class PrescriptionsService extends BaseService {
RequestSendPrescriptionEmail _requestSendPrescriptionEmail =
RequestSendPrescriptionEmail(
- isDentalAllowedBackend: false,);
+ isDentalAllowedBackend: false,
+ );
Future sendPrescriptionEmail(String appointmentDate, int patientID,
- String clinicName, String doctorName, int projectID) async {
+ String clinicName, String doctorName, int doctorID, int projectID) async {
_requestSendPrescriptionEmail.listPrescriptions = prescriptionReportList;
_requestSendPrescriptionEmail.appointmentDate = appointmentDate;
_requestSendPrescriptionEmail.patientID = patientID;
_requestSendPrescriptionEmail.clinicName = clinicName;
_requestSendPrescriptionEmail.doctorName = doctorName;
_requestSendPrescriptionEmail.projectID = projectID;
- _requestSendPrescriptionEmail.to = user.emailAddress;
- _requestSendPrescriptionEmail.dateofBirth = user.dateofBirth;
- _requestSendPrescriptionEmail.patientIditificationNum = user.patientIdentificationNo;
- _requestSendPrescriptionEmail.patientMobileNumber = user.mobileNumber;
- _requestSendPrescriptionEmail.patientName = user.firstName +" "+ user.lastName;
- _requestSendPrescriptionEmail.setupID = user.setupID;
+ _requestSendPrescriptionEmail.to = user.emailAddress;
+ _requestSendPrescriptionEmail.dateofBirth = user.dateofBirth;
+ _requestSendPrescriptionEmail.patientIditificationNum =
+ user.patientIdentificationNo;
+ _requestSendPrescriptionEmail.patientMobileNumber = user.mobileNumber;
+ _requestSendPrescriptionEmail.doctorID = doctorID;
+ _requestSendPrescriptionEmail.patientName =
+ user.firstName + " " + user.lastName;
+ _requestSendPrescriptionEmail.setupID = user.setupID;
+ _requestSendPrescriptionEmail.to = user.emailAddress;
hasError = false;
- await baseAppClient.post(SEND_PRESCRIPTION_EMAIL, onSuccess: (response, statusCode) {},
+ await baseAppClient
+ .post(SEND_PRESCRIPTION_EMAIL, onSuccess: (response, statusCode) {},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _requestSendPrescriptionEmail.toJson());
}
- RequestGetListPharmacyForPrescriptions requestGetListPharmacyForPrescriptions = RequestGetListPharmacyForPrescriptions(
+ RequestGetListPharmacyForPrescriptions
+ requestGetListPharmacyForPrescriptions =
+ RequestGetListPharmacyForPrescriptions(
latitude: 0,
longitude: 0,
isDentalAllowedBackend: false,
-
);
List pharmacyPrescriptionsList = List();
@@ -139,18 +155,19 @@ class PrescriptionsService extends BaseService {
}
RequestPrescriptionReportEnh _requestPrescriptionReportEnh =
- RequestPrescriptionReportEnh(isDentalAllowedBackend: false,);
+ RequestPrescriptionReportEnh(
+ isDentalAllowedBackend: false,
+ );
List prescriptionReportEnhList = List();
- Future getPrescriptionReportEnh({PrescriptionsOrder prescriptionsOrder}) async {
-
+ Future getPrescriptionReportEnh(
+ {PrescriptionsOrder prescriptionsOrder}) async {
///This logic copy from the old app from class [order-history.component.ts] in line 45
bool isInPatient = false;
prescriptionsList.forEach((element) {
if (prescriptionsOrder.appointmentNo == "0") {
if (element.dischargeNo == int.parse(prescriptionsOrder.dischargeID)) {
-
_requestPrescriptionReportEnh.appointmentNo = element.appointmentNo;
_requestPrescriptionReportEnh.clinicID = element.clinicID;
_requestPrescriptionReportEnh.projectID = element.projectID;
@@ -160,46 +177,45 @@ class PrescriptionsService extends BaseService {
isInPatient = element.isInOutPatient;
}
} else {
- if (int.parse(prescriptionsOrder.appointmentNo) == element.appointmentNo) {
+ if (int.parse(prescriptionsOrder.appointmentNo) ==
+ element.appointmentNo) {
_requestPrescriptionReportEnh.appointmentNo = element.appointmentNo;
_requestPrescriptionReportEnh.clinicID = element.clinicID;
_requestPrescriptionReportEnh.projectID = element.projectID;
_requestPrescriptionReportEnh.episodeID = element.episodeID;
_requestPrescriptionReportEnh.setupID = element.setupID;
_requestPrescriptionReportEnh.dischargeNo = element.dischargeNo;
- isInPatient = element.isInOutPatient;///call inpGetPrescriptionReport
+ isInPatient = element.isInOutPatient;
+
+ ///call inpGetPrescriptionReport
}
}
});
hasError = false;
- await baseAppClient.post(isInPatient? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT,
+ await baseAppClient.post(
+ isInPatient ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT,
onSuccess: (dynamic response, int statusCode) {
prescriptionReportEnhList.clear();
- if(isInPatient){
+ if (isInPatient) {
response['ListPRM'].forEach((prescriptions) {
- prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(prescriptions));
+ prescriptionReportEnhList
+ .add(PrescriptionReportEnh.fromJson(prescriptions));
});
- }else{
+ } else {
response['INP_GetPrescriptionReport_List'].forEach((prescriptions) {
-
- PrescriptionReportEnh reportEnh = PrescriptionReportEnh.fromJson(prescriptions);
- reportEnh.itemDescription = prescriptions['ItemDescriptionN'];
+ PrescriptionReportEnh reportEnh =
+ PrescriptionReportEnh.fromJson(prescriptions);
+ reportEnh.itemDescription = prescriptions['ItemDescriptionN'];
prescriptionReportEnhList.add(reportEnh);
-
});
-
}
-
-
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _requestPrescriptionReportEnh.toJson());
-
-
}
Future updatePressOrder({@required int presOrderID}) async {
@@ -211,12 +227,10 @@ class PrescriptionsService extends BaseService {
body['PresOrderStatus'] = 4;
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(UPDATE_PRESS_ORDER,
- onSuccess: (dynamic response, int statusCode) {
-
- }, onFailure: (String error, int statusCode) {
- hasError = true;
- super.error = error;
- }, body: body);
+ onSuccess: (dynamic response, int statusCode) {},
+ onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body: body);
}
-
}
diff --git a/lib/core/viewModels/AlHabibMedicalService/H2O_view_model.dart b/lib/core/viewModels/AlHabibMedicalService/H2O_view_model.dart
index a89ec799..9d163a27 100644
--- a/lib/core/viewModels/AlHabibMedicalService/H2O_view_model.dart
+++ b/lib/core/viewModels/AlHabibMedicalService/H2O_view_model.dart
@@ -9,6 +9,7 @@ import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:charts_flutter/flutter.dart' as charts;
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import '../../../locator.dart';
+import 'dart:math' as math;
class H2OViewModel extends BaseViewModel {
H2OService _h2OService = locator();
@@ -91,11 +92,21 @@ class H2OViewModel extends BaseViewModel {
_h2OService.userProgressForWeekDataList.forEach((UserProgressForWeekDataModel data) {
globalData.add(new ChartSeries(data.dayName, data.percentageConsumed));
});
+ Iterable minMaxList = globalData.map((e) => e.x).toList();
+ int maxValue = minMaxList.isEmpty ? 0 : minMaxList.reduce(math.max);
+ int minValue = minMaxList.isEmpty ? 0 : minMaxList.reduce(math.min);
+
+ if (maxValue == 0 && minValue == 0) {
+ maxValue = 1;
+ minValue = -1;
+ }
return [
new charts.Series(
id: 'Global Revenue',
domainFn: (ChartSeries sales, _) => sales.y,
measureFn: (ChartSeries sales, _) => sales.x,
+ measureLowerBoundFn: (ChartSeries sales, _) => minValue,
+ measureUpperBoundFn: (ChartSeries sales, _) => maxValue,
data: globalData,
),
];
diff --git a/lib/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart b/lib/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart
index 5853cc8f..53b39025 100644
--- a/lib/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart
+++ b/lib/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart
@@ -2,8 +2,11 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/ClinicCategory.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/ClinicCategory.dart';
+import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_by_time_model.dart';
+import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_list_calcolation_model.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
+import 'package:flutter/cupertino.dart';
import '../../../../locator.dart';
@@ -13,6 +16,9 @@ class BariatricsViewModel extends BaseViewModel {
List get clinicCategoryList => _service.clinicCategoryList;
List get diseasesList => _service.diseasesList;
+ List get doctorList => _service.doctorList;
+ List get doctorListByTime => _service.doctorListByTime;
+ List doctorLists = List();
void getClinicCategory() async {
setState(ViewState.Busy);
@@ -46,4 +52,27 @@ class BariatricsViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
}
+
+ void getDoctorList({@required DiseasesByClinic disease}) async {
+ setState(ViewState.Busy);
+ await _service.getDoctorList(disease:disease);
+ if (_service.hasError) {
+ error = _service.error;
+ setState(ViewState.Error);
+ } else {
+ {
+ _service.doctorListByTime.forEach((element) {
+ List patientLabOrdersClinic =
+ doctorLists.where((elementClinic) => elementClinic.filterName == element.projectName).toList();
+
+ if (patientLabOrdersClinic.length != 0) {
+ doctorLists[doctorLists.indexOf(patientLabOrdersClinic[0])].doctorsByTimeList.add(element);
+ } else {
+ doctorLists.add(DoctorsListTime(filterName: element.projectName, doctor: element));
+ }
+ });
+ setState(ViewState.Idle);
+ }
+ }
+ }
}
diff --git a/lib/core/viewModels/er/rrt-view-model.dart b/lib/core/viewModels/er/rrt-view-model.dart
new file mode 100644
index 00000000..a0ce7d07
--- /dev/null
+++ b/lib/core/viewModels/er/rrt-view-model.dart
@@ -0,0 +1,48 @@
+
+import 'package:diplomaticquarterapp/core/service/base_service.dart';
+
+import '../base_view_model.dart';
+
+
+class RRTService extends BaseService{
+
+}
+
+
+class RRTViewModel extends BaseViewModel{
+ var _service = RRTService();
+
+ Future createRequest(){
+
+ return null;
+ }
+
+
+ Future getAllRequest(){
+
+ return null;
+ }
+
+
+ Future getRequestDetails(){
+
+ return null;
+ }
+
+
+ Future getAllQuestions(){
+
+ return null;
+ }
+
+
+ Future getCancelReasons(){
+
+ return null;
+ }
+
+ Future cancelRequest(){
+
+ return null;
+ }
+}
\ No newline at end of file
diff --git a/lib/core/viewModels/medical/blood_pressure_view_model.dart b/lib/core/viewModels/medical/blood_pressure_view_model.dart
index ae3abbcb..16a43a6f 100644
--- a/lib/core/viewModels/medical/blood_pressure_view_model.dart
+++ b/lib/core/viewModels/medical/blood_pressure_view_model.dart
@@ -9,14 +9,11 @@ import '../../../core/viewModels/base_view_model.dart';
class BloodPressureViewMode extends BaseViewModel {
BloodPressureService bloodPressureService = locator();
- List get monthDiabtecPatientResult =>
- bloodPressureService.monthDiabtecPatientResult;
+ List get monthDiabtecPatientResult => bloodPressureService.monthDiabtecPatientResult;
- List get weekDiabtecPatientResult =>
- bloodPressureService.weekDiabtecPatientResult;
+ List get weekDiabtecPatientResult => bloodPressureService.weekDiabtecPatientResult;
- List get yearDiabtecPatientResult =>
- bloodPressureService.yearDiabtecPatientResult;
+ List get yearDiabtecPatientResult => bloodPressureService.yearDiabtecPatientResult;
List weightWeekTimeSeriesDataTop = [];
List weightWeekTimeSeriesDataLow = [];
@@ -37,35 +34,36 @@ class BloodPressureViewMode extends BaseViewModel {
} else {
clearDate();
bloodPressureService.weekDiabtectResultAverageList.forEach((element) {
- weightWeekTimeSeriesDataTop.add(TimeSeriesSales2(
- element.bloodPressureDate,
- element.dailyDiastolicPressureAverageResult.toDouble()));
- weightWeekTimeSeriesDataLow.add(TimeSeriesSales2(
- element.bloodPressureDate,
- element.dailySystolicePressureAverageResult.toDouble()));
+ weightWeekTimeSeriesDataTop
+ .add(TimeSeriesSales2(element.bloodPressureDate, element.dailyDiastolicPressureAverageResult.toDouble()));
+ weightWeekTimeSeriesDataLow
+ .add(TimeSeriesSales2(element.bloodPressureDate, element.dailySystolicePressureAverageResult.toDouble()));
for (int index = 0; index < bloodPressureService.monthDiabtectResultAverageList.length; index++) {
-
- weighMonthTimeSeriesDataTop.add(TimeSeriesSales3(index, bloodPressureService.monthDiabtectResultAverageList[index].weekDiastolicPressureAverageResult.toDouble()));
-
- weighMonthTimeSeriesDataLow.add(TimeSeriesSales3(index, bloodPressureService.monthDiabtectResultAverageList[index].weekSystolicePressureAverageResult.toDouble()));
+ weighMonthTimeSeriesDataTop.add(TimeSeriesSales3(
+ index,
+ bloodPressureService.monthDiabtectResultAverageList[index].weekDiastolicPressureAverageResult
+ .toDouble()));
+
+ weighMonthTimeSeriesDataLow.add(TimeSeriesSales3(
+ index,
+ bloodPressureService.monthDiabtectResultAverageList[index].weekSystolicePressureAverageResult
+ .toDouble()));
}
bloodPressureService.yearDiabtecResultAverageList.forEach((element) {
- weightYearTimeSeriesDataTop.add(TimeSeriesSales2(element.date,
- element.monthSystolicePressureAverageResult.toDouble()));
+ weightYearTimeSeriesDataTop
+ .add(TimeSeriesSales2(element.date, element.monthSystolicePressureAverageResult.toDouble()));
- weightYearTimeSeriesDataLow.add(TimeSeriesSales2(element.date,
- element.monthDiastolicPressureAverageResult.toDouble()));
+ weightYearTimeSeriesDataLow
+ .add(TimeSeriesSales2(element.date, element.monthDiastolicPressureAverageResult.toDouble()));
});
-
});
setState(ViewState.Idle);
}
}
-
- void clearDate(){
+ void clearDate() {
weightWeekTimeSeriesDataTop.clear();
weightWeekTimeSeriesDataLow.clear();
weighMonthTimeSeriesDataTop.clear();
@@ -86,24 +84,25 @@ class BloodPressureViewMode extends BaseViewModel {
}
}
- Future addORUpdateDiabtecResult(
+ Future addORUpdateDiabtecResult(
{String bloodPressureDate,
String diastolicPressure,
String systolicePressure,
- int measuredArm,bool isUpdate = false}) async {
+ int measuredArm,
+ bool isUpdate = false}) async {
setState(ViewState.BusyLocal);
- if(!isUpdate)
- await bloodPressureService.addDiabtecResult(
- bloodPressureDate: bloodPressureDate,
- diastolicPressure: diastolicPressure,
- systolicePressure: systolicePressure,
- measuredArm: measuredArm);
+ if (!isUpdate)
+ await bloodPressureService.addDiabtecResult(
+ bloodPressureDate: bloodPressureDate,
+ diastolicPressure: diastolicPressure,
+ systolicePressure: systolicePressure,
+ measuredArm: measuredArm);
else
await bloodPressureService.updateDiabtecResult(
- bloodPressureDate: bloodPressureDate,
- diastolicPressure: diastolicPressure,
- systolicePressure: systolicePressure,
- measuredArm: measuredArm);
+ bloodPressureDate: bloodPressureDate,
+ diastolicPressure: diastolicPressure,
+ systolicePressure: systolicePressure,
+ measuredArm: measuredArm);
if (bloodPressureService.hasError) {
error = bloodPressureService.error;
setState(ViewState.ErrorLocal);
@@ -113,7 +112,6 @@ class BloodPressureViewMode extends BaseViewModel {
}
}
-
Future deactivateDiabeticStatus({int lineItemNo}) async {
setState(ViewState.BusyLocal);
diff --git a/lib/core/viewModels/medical/blood_sugar_view_model.dart b/lib/core/viewModels/medical/blood_sugar_view_model.dart
index 8a513992..28292311 100644
--- a/lib/core/viewModels/medical/blood_sugar_view_model.dart
+++ b/lib/core/viewModels/medical/blood_sugar_view_model.dart
@@ -39,6 +39,9 @@ class BloodSugarViewMode extends BaseViewModel {
element.dailyAverageResult.toDouble(),
));
});
+ if (bloodWeekTimeSeriesData.isEmpty) {
+ bloodWeekTimeSeriesData.add(TimeSeriesSales2(DateTime.now(), 0));
+ }
for (int index = 0;
index < bloodSugarService.monthDiabtectResultAverageList.length;
diff --git a/lib/core/viewModels/medical/labs_view_model.dart b/lib/core/viewModels/medical/labs_view_model.dart
index 9e3f09e5..f75abe88 100644
--- a/lib/core/viewModels/medical/labs_view_model.dart
+++ b/lib/core/viewModels/medical/labs_view_model.dart
@@ -16,14 +16,11 @@ class LabsViewModel extends BaseViewModel {
List get labOrdersResultsList => _labsService.labOrdersResultsList;
-
List _patientLabOrdersListClinic = List();
List _patientLabOrdersListHospital = List();
List get patientLabOrdersList =>
- filterType == FilterType.Clinic
- ? _patientLabOrdersListClinic
- : _patientLabOrdersListHospital;
+ filterType == FilterType.Clinic ? _patientLabOrdersListClinic : _patientLabOrdersListHospital;
void getLabs() async {
if (authenticatedUserObject.isLogin) {
@@ -34,41 +31,33 @@ class LabsViewModel extends BaseViewModel {
setState(ViewState.Error);
} else {
_labsService.patientLabOrdersList.forEach((element) {
- List patientLabOrdersClinic =
- _patientLabOrdersListClinic
- .where((elementClinic) =>
- elementClinic.filterName == element.clinicDescription)
- .toList();
+ List patientLabOrdersClinic = _patientLabOrdersListClinic
+ .where((elementClinic) => elementClinic.filterName == element.clinicDescription)
+ .toList();
if (patientLabOrdersClinic.length != 0) {
- _patientLabOrdersListClinic[_patientLabOrdersListClinic
- .indexOf(patientLabOrdersClinic[0])]
+ _patientLabOrdersListClinic[_patientLabOrdersListClinic.indexOf(patientLabOrdersClinic[0])]
.patientLabOrdersList
.add(element);
} else {
- _patientLabOrdersListClinic.add(PatientLabOrdersList(
- filterName: element.clinicDescription,
- patientDoctorAppointment: element));
+ _patientLabOrdersListClinic
+ .add(PatientLabOrdersList(filterName: element.clinicDescription, patientDoctorAppointment: element));
}
// doctor list sort via project
- List patientLabOrdersHospital =
- _patientLabOrdersListHospital
- .where(
- (elementClinic) =>
- elementClinic.filterName == element.projectName,
- )
- .toList();
+ List patientLabOrdersHospital = _patientLabOrdersListHospital
+ .where(
+ (elementClinic) => elementClinic.filterName == element.projectName,
+ )
+ .toList();
if (patientLabOrdersHospital.length != 0) {
- _patientLabOrdersListHospital[_patientLabOrdersListHospital
- .indexOf(patientLabOrdersHospital[0])]
+ _patientLabOrdersListHospital[_patientLabOrdersListHospital.indexOf(patientLabOrdersHospital[0])]
.patientLabOrdersList
.add(element);
} else {
- _patientLabOrdersListHospital.add(PatientLabOrdersList(
- filterName: element.projectName,
- patientDoctorAppointment: element));
+ _patientLabOrdersListHospital
+ .add(PatientLabOrdersList(filterName: element.projectName, patientDoctorAppointment: element));
}
});
@@ -82,24 +71,16 @@ class LabsViewModel extends BaseViewModel {
notifyListeners();
}
- List get patientLabSpecialResult =>
- _labsService.patientLabSpecialResult;
+ List get patientLabSpecialResult => _labsService.patientLabSpecialResult;
List get labResultList => _labsService.labResultList;
List labResultLists = List();
- getLaboratoryResult(
- {String projectID,
- int clinicID,
- String invoiceNo,
- String orderNo}) async {
+ getLaboratoryResult({String projectID, int clinicID, String invoiceNo, String orderNo}) async {
setState(ViewState.Busy);
await _labsService.getLaboratoryResult(
- invoiceNo: invoiceNo,
- orderNo: orderNo,
- projectID: projectID,
- clinicID: clinicID);
+ invoiceNo: invoiceNo, orderNo: orderNo, projectID: projectID, clinicID: clinicID);
if (_labsService.hasError) {
error = _labsService.error;
setState(ViewState.Error);
@@ -116,14 +97,16 @@ class LabsViewModel extends BaseViewModel {
setState(ViewState.Error);
} else {
_labsService.labResultList.forEach((element) {
- List patientLabOrdersClinic = labResultLists.where((elementClinic) => elementClinic.filterName == element.testCode).toList();
+ List patientLabOrdersClinic =
+ labResultLists.where((elementClinic) => elementClinic.filterName == element.testCode).toList();
if (patientLabOrdersClinic.length != 0) {
-
- var value= labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])].patientLabResultList
- .where((e) => e.sampleCollectedOn== element.sampleCollectedOn && e.resultValue ==element.resultValue ).toList();
- if(value.isEmpty)
- labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])].patientLabResultList.add(element);
+ var value = labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])]
+ .patientLabResultList
+ .where((e) => e.sampleCollectedOn == element.sampleCollectedOn && e.resultValue == element.resultValue)
+ .toList();
+ if (value.isEmpty)
+ labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])].patientLabResultList.add(element);
} else {
labResultLists.add(LabResultList(filterName: element.testCode, lab: element));
}
@@ -132,32 +115,33 @@ class LabsViewModel extends BaseViewModel {
}
}
-
- getPatientLabOrdersResults({PatientLabOrders patientLabOrder,String procedure}) async {
+ getPatientLabOrdersResults({PatientLabOrders patientLabOrder, String procedure}) async {
setState(ViewState.Busy);
- await _labsService.getPatientLabOrdersResults(patientLabOrder: patientLabOrder,procedure: procedure);
+ await _labsService.getPatientLabOrdersResults(patientLabOrder: patientLabOrder, procedure: procedure);
if (_labsService.hasError) {
error = _labsService.error;
setState(ViewState.Error);
} else {
- bool isShouldClear = false;
- if(_labsService.labOrdersResultsList.length==1)
- {
- labOrdersResultsList.forEach((element) {
- if(element.resultValue.contains('/') ||element.resultValue.contains('*' )|| element.resultValue.isEmpty )
- isShouldClear = true;
- });}
- if(isShouldClear)
- _labsService.labOrdersResultsList.clear();
+ /// commented out based on PAP-304
+ // bool isShouldClear = false;
+ // if (_labsService.labOrdersResultsList.length == 1) {
+ // labOrdersResultsList.forEach((element) {
+ // if (element.resultValue.contains('/') || element.resultValue.contains('*') || element.resultValue.isEmpty)
+ // isShouldClear = true;
+ // });
+ // }
+ // if (isShouldClear)
+ //
+ // _labsService.labOrdersResultsList.clear();
setState(ViewState.Idle);
}
}
- sendLabReportEmail({PatientLabOrders patientLabOrder,String mes}) async {
+ sendLabReportEmail({PatientLabOrders patientLabOrder, String mes}) async {
await _labsService.sendLabReportEmail(patientLabOrder: patientLabOrder);
if (_labsService.hasError) {
error = _labsService.error;
- }else
+ } else
AppToast.showSuccessToast(message: mes);
}
}
diff --git a/lib/core/viewModels/medical/prescriptions_view_model.dart b/lib/core/viewModels/medical/prescriptions_view_model.dart
index 2c32a081..3ad9df99 100644
--- a/lib/core/viewModels/medical/prescriptions_view_model.dart
+++ b/lib/core/viewModels/medical/prescriptions_view_model.dart
@@ -4,7 +4,7 @@ import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_repor
import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:flutter/cupertino.dart';
-
+import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_inp.dart';
import '../../../core/enum/filter_type.dart';
import '../../../core/enum/viewstate.dart';
import '../../../core/model/prescriptions/Prescriptions.dart';
@@ -19,17 +19,20 @@ class PrescriptionsViewModel extends BaseViewModel {
List _prescriptionsOrderListClinic = List();
List _prescriptionsOrderListHospital = List();
-
List get prescriptionReportList =>
_prescriptionsService.prescriptionReportList;
+ List get prescriptionReportListINP =>
+ _prescriptionsService.prescriptionReportListINP;
+
List get prescriptionsList =>
_prescriptionsService.prescriptionsList;
- List get prescriptionsHistory => _prescriptionsService.prescriptionsOrderList;
-
- List get pharmacyPrescriptionsList => _prescriptionsService.pharmacyPrescriptionsList ;
+ List get prescriptionsHistory =>
+ _prescriptionsService.prescriptionsOrderList;
+ List get pharmacyPrescriptionsList =>
+ _prescriptionsService.pharmacyPrescriptionsList;
List get prescriptionsOrderList =>
filterType == FilterType.Clinic
@@ -105,7 +108,8 @@ class PrescriptionsViewModel extends BaseViewModel {
getPrescriptionReport({Prescriptions prescriptions}) async {
setState(ViewState.Busy);
- await _prescriptionsService.getPrescriptionReport(prescriptions: prescriptions);
+ await _prescriptionsService.getPrescriptionReport(
+ prescriptions: prescriptions);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.ErrorLocal);
@@ -119,11 +123,12 @@ class PrescriptionsViewModel extends BaseViewModel {
int patientID,
String clinicName,
String doctorName,
- String mes,
+ int doctorID,
+ String mes,
int projectID}) async {
setState(ViewState.BusyLocal);
- await _prescriptionsService.sendPrescriptionEmail(
- appointmentDate, patientID, clinicName, doctorName, projectID);
+ await _prescriptionsService.sendPrescriptionEmail(appointmentDate,
+ patientID, clinicName, doctorName, doctorID, projectID);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.ErrorLocal);
@@ -145,12 +150,13 @@ class PrescriptionsViewModel extends BaseViewModel {
}
}
-
- List get prescriptionReportEnhList => _prescriptionsService.prescriptionReportEnhList;
+ List get prescriptionReportEnhList =>
+ _prescriptionsService.prescriptionReportEnhList;
getPrescriptionReportEnh({PrescriptionsOrder prescriptionsOrder}) async {
setState(ViewState.Busy);
- await _prescriptionsService.getPrescriptionReportEnh(prescriptionsOrder: prescriptionsOrder);
+ await _prescriptionsService.getPrescriptionReportEnh(
+ prescriptionsOrder: prescriptionsOrder);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.Error);
@@ -159,16 +165,14 @@ class PrescriptionsViewModel extends BaseViewModel {
}
}
-
- Future updatePressOrder({@required int presOrderID}) async {
+ Future updatePressOrder({@required int presOrderID}) async {
setState(ViewState.Busy);
await _prescriptionsService.updatePressOrder(presOrderID: presOrderID);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.Error);
} else {
- await getPrescriptions();
+ await getPrescriptions();
}
}
-
}
diff --git a/lib/core/viewModels/medical/reports_monthly_view_model.dart b/lib/core/viewModels/medical/reports_monthly_view_model.dart
index adb7223e..15ac9219 100644
--- a/lib/core/viewModels/medical/reports_monthly_view_model.dart
+++ b/lib/core/viewModels/medical/reports_monthly_view_model.dart
@@ -14,6 +14,10 @@ class ReportsMonthlyViewModel extends BaseViewModel {
ReportsService _reportsService = locator();
String get userAgreementContent => _reportsService.userAgreementContent;
+ bool get receiveHealthSummaryReport => _reportsService?.user?.receiveHealthSummaryReport ?? false;
+ set receiveHealthSummaryReport(bool val) {
+ _reportsService?.user?.receiveHealthSummaryReport = val;
+ }
getUserTermsAndConditions() async {
setState(ViewState.Busy);
@@ -26,14 +30,9 @@ class ReportsMonthlyViewModel extends BaseViewModel {
}
}
- updatePatientHealthSummaryReport(
- {String message,
- bool isSummary,
- bool isUpdateEmail = false,
- String email}) async {
+ updatePatientHealthSummaryReport({String message, bool isSummary, bool isUpdateEmail = false, String email}) async {
setState(ViewState.BusyLocal);
- await _reportsService.updatePatientHealthSummaryReport(
- isSummary: isSummary);
+ await _reportsService.updatePatientHealthSummaryReport(isSummary: isSummary);
if (_reportsService.hasError) {
error = _reportsService.error;
AppToast.showErrorToast(message: error);
diff --git a/lib/core/viewModels/medical/weight_pressure_view_model.dart b/lib/core/viewModels/medical/weight_pressure_view_model.dart
index 42db0a58..4a01bd3b 100644
--- a/lib/core/viewModels/medical/weight_pressure_view_model.dart
+++ b/lib/core/viewModels/medical/weight_pressure_view_model.dart
@@ -16,14 +16,11 @@ import '../../../core/viewModels/base_view_model.dart';
class WeightPressureViewModel extends BaseViewModel {
WeightService weightService = locator();
- List get monthWeightMeasurementResult =>
- weightService.monthWeightMeasurementResult;
+ List get monthWeightMeasurementResult => weightService.monthWeightMeasurementResult;
- List get weekWeightMeasurementResult =>
- weightService.weekWeightMeasurementResult;
+ List get weekWeightMeasurementResult => weightService.weekWeightMeasurementResult;
- List get yearWeightMeasurementResult =>
- weightService.yearWeightMeasurementResult;
+ List get yearWeightMeasurementResult => weightService.yearWeightMeasurementResult;
List weightWeekTimeSeriesData = [];
List weighMonthTimeSeriesData = [];
@@ -35,7 +32,7 @@ class WeightPressureViewModel extends BaseViewModel {
await weightService.getWeightMeasurementResult();
if (weightService.hasError) {
error = weightService.error;
- setState(ViewState.Error);
+ setState(ViewState.ErrorLocal);
} else {
weightService.weekWeightMeasurementResultAverage.forEach((element) {
weightWeekTimeSeriesData.add(TimeSeriesSales2(
@@ -44,14 +41,10 @@ class WeightPressureViewModel extends BaseViewModel {
));
});
- for (int index = 0;
- index < weightService.monthWeightMeasurementResultAverage.length;
- index++) {
+ for (int index = 0; index < weightService.monthWeightMeasurementResultAverage.length; index++) {
weighMonthTimeSeriesData.add(TimeSeriesSales3(
index,
- weightService
- .monthWeightMeasurementResultAverage[index].weekAverageResult
- .toDouble(),
+ weightService.monthWeightMeasurementResultAverage[index].weekAverageResult.toDouble(),
));
}
@@ -66,8 +59,7 @@ class WeightPressureViewModel extends BaseViewModel {
}
}
- addWeightResult(
- {String weightDate, String weightMeasured, int weightUnit}) async {
+ addWeightResult({String weightDate, String weightMeasured, int weightUnit}) async {
setState(ViewState.BusyLocal);
await weightService.addWeightResult(
weightDate: weightDate,
@@ -82,6 +74,7 @@ class WeightPressureViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
}
+
Future sendReportByEmail() async {
setState(ViewState.BusyLocal);
@@ -94,14 +87,10 @@ class WeightPressureViewModel extends BaseViewModel {
}
}
- updateWeightResult({int lineItemNo, int weightUnit, String weightMeasured,String weightDate}) async {
+ updateWeightResult({int lineItemNo, int weightUnit, String weightMeasured, String weightDate}) async {
setState(ViewState.BusyLocal);
await weightService.updateWeightResult(
- lineItemNo: lineItemNo,
- weightMeasured: weightMeasured,
- weightUnit: weightUnit,
- weightDate: weightDate
- );
+ lineItemNo: lineItemNo, weightMeasured: weightMeasured, weightUnit: weightUnit, weightDate: weightDate);
if (weightService.hasError) {
error = weightService.error;
setState(ViewState.Error);
@@ -111,7 +100,9 @@ class WeightPressureViewModel extends BaseViewModel {
}
}
- deleteWeightResult({int lineItemNo, }) async {
+ deleteWeightResult({
+ int lineItemNo,
+ }) async {
setState(ViewState.BusyLocal);
await weightService.deleteWeightResult(
lineItemNo: lineItemNo,
diff --git a/lib/core/viewModels/vaccine_view_model.dart b/lib/core/viewModels/vaccine_view_model.dart
index 9f8dfecf..37b57da4 100644
--- a/lib/core/viewModels/vaccine_view_model.dart
+++ b/lib/core/viewModels/vaccine_view_model.dart
@@ -22,7 +22,7 @@ class VaccineViewModel extends BaseViewModel {
await _vaccineService.getMyVaccine();
if (_vaccineService.hasError) {
error = _vaccineService.error;
- setState(ViewState.ErrorLocal);
+ setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
diff --git a/lib/locator.dart b/lib/locator.dart
index 1acaf1af..bc8996b5 100644
--- a/lib/locator.dart
+++ b/lib/locator.dart
@@ -125,6 +125,7 @@ import 'core/viewModels/pharmacyModule/product_detail_view_model.dart';
import 'core/viewModels/pharmacyModule/review_view_model.dart';
import 'core/viewModels/pharmacyModule/wishlist_view_model.dart';
import 'core/viewModels/qr_view_model.dart';
+import 'core/viewModels/er/rrt-view-model.dart';
import 'core/viewModels/vaccine_view_model.dart';
import 'core/service/vaccine_service.dart';
import 'core/viewModels/weather/weather_view_model.dart';
@@ -250,6 +251,7 @@ void setupLocator() {
locator.registerFactory(() => QrViewModel());
locator.registerFactory(() => ReportsMonthlyViewModel());
locator.registerFactory(() => NearHospitalViewModel());
+ locator.registerFactory(() => RRTViewModel());
locator.registerFactory(() => AmRequestViewModel());
locator.registerFactory(() => PatientSickLeaveViewMode());
locator.registerFactory(() => MyBalanceViewModel());
@@ -304,6 +306,7 @@ void setupLocator() {
locator.registerFactory(() => OfferCategoriesViewModel()); // Categories View Model
locator.registerFactory(() => PackagesViewModel()); // Products View Model
+
//pharmacy
// locator.registerFactory(() => PharmacyCategoriseViewModel());
// locator.registerFactory(() => OffersCategoriseViewModel());
diff --git a/lib/main.dart b/lib/main.dart
index 45fa4c6d..defe0995 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -1,30 +1,30 @@
+import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/theme/theme_notifier.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart';
import 'package:diplomaticquarterapp/theme/theme_value.dart';
-import 'package:diplomaticquarterapp/uitl/HMG_Geofence.dart';
import 'package:diplomaticquarterapp/uitl/LocalNotification.dart';
import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart';
-import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
+import 'package:firebase_analytics/firebase_analytics.dart';
+import 'package:firebase_analytics/observer.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
-import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
-
-import 'Constants.dart';
-import 'config/shared_pref_kay.dart';
import 'config/size_config.dart';
-import 'core/model/geofencing/requests/GeoZonesRequestModel.dart';
-import 'core/service/geofencing/GeofencingServices.dart';
import 'core/viewModels/project_view_model.dart';
import 'locator.dart';
import 'pages/pharmacies/compare-list.dart';
+import 'package:firebase_core/firebase_core.dart';
+
void main() async {
+ WidgetsFlutterBinding.ensureInitialized();
+ FirebaseApp defaultApp = await Firebase.initializeApp();
+
setupLocator();
runApp(MyApp());
}
@@ -35,6 +35,7 @@ class MyApp extends StatefulWidget {
}
class _MyApp extends State {
+
@override
void initState() {
// ProjectViewModel projectProvider;
@@ -51,6 +52,8 @@ class _MyApp extends State {
LocalNotification.getInstance()
.showNow(title: "Payload", subtitle: payload, payload: payload);
});
+
+
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown,
@@ -85,6 +88,9 @@ class _MyApp extends State {
],
child: Consumer(
builder: (context, projectProvider, child) => MaterialApp(
+ navigatorObservers: [
+ GAnalytics.shared.navObserver()
+ ],
showSemanticsDebugger: false,
title: 'Diplomatic Quarter App',
locale: projectProvider.appLocal,
diff --git a/lib/models/Authentication/authenticated_user.dart b/lib/models/Authentication/authenticated_user.dart
index 4c7974a3..eacba6a5 100644
--- a/lib/models/Authentication/authenticated_user.dart
+++ b/lib/models/Authentication/authenticated_user.dart
@@ -61,71 +61,72 @@ class AuthenticatedUser {
dynamic tempAddress;
dynamic zipCode;
dynamic isFamily;
+ dynamic cRSVerificationStatus;
// dynamic patientPayType;
// dynamic patientType;
// dynamic status;
- AuthenticatedUser({
- this.setupID,
- this.patientType,
- this.patientID,
- this.firstName,
- this.middleName,
- this.lastName,
- this.firstNameN,
- this.middleNameN,
- this.lastNameN,
- this.relationshipID,
- this.gender,
- this.dateofBirth,
- this.dateofBirthN,
- this.nationalityID,
- this.phoneResi,
- this.phoneOffice,
- this.mobileNumber,
- this.faxNumber,
- this.emailAddress,
- this.bloodGroup,
- this.rHFactor,
- this.isEmailAlertRequired,
- this.isSMSAlertRequired,
- this.preferredLanguage,
- this.isPrivilegedMember,
- this.memberID,
- this.expiryDate,
- this.isHmgEmployee,
- this.employeeID,
- this.emergencyContactName,
- this.emergencyContactNo,
- this.patientPayType,
- this.dHCCPatientRefID,
- this.isPatientDummy,
- this.status,
- this.isStatusCleared,
- this.patientIdentificationType,
- this.patientIdentificationNo,
- this.projectID,
- this.infoSourceID,
- this.address,
- this.age,
- this.ageDesc,
- this.areaID,
- this.createdBy,
- this.genderDescription,
- this.iR,
- this.iSOCityID,
- this.iSOCountryID,
- this.listPrivilege,
- this.marital,
- this.outSA,
- this.pOBox,
- this.receiveHealthSummaryReport,
- this.sourceType,
- this.strDateofBirth,
- this.tempAddress,
- this.zipCode,
- this.isFamily
- });
+ AuthenticatedUser(
+ {this.setupID,
+ this.patientType,
+ this.patientID,
+ this.firstName,
+ this.middleName,
+ this.lastName,
+ this.firstNameN,
+ this.middleNameN,
+ this.lastNameN,
+ this.relationshipID,
+ this.gender,
+ this.dateofBirth,
+ this.dateofBirthN,
+ this.nationalityID,
+ this.phoneResi,
+ this.phoneOffice,
+ this.mobileNumber,
+ this.faxNumber,
+ this.emailAddress,
+ this.bloodGroup,
+ this.rHFactor,
+ this.isEmailAlertRequired,
+ this.isSMSAlertRequired,
+ this.preferredLanguage,
+ this.isPrivilegedMember,
+ this.memberID,
+ this.expiryDate,
+ this.isHmgEmployee,
+ this.employeeID,
+ this.emergencyContactName,
+ this.emergencyContactNo,
+ this.patientPayType,
+ this.dHCCPatientRefID,
+ this.isPatientDummy,
+ this.status,
+ this.isStatusCleared,
+ this.patientIdentificationType,
+ this.patientIdentificationNo,
+ this.projectID,
+ this.infoSourceID,
+ this.address,
+ this.age,
+ this.ageDesc,
+ this.areaID,
+ this.createdBy,
+ this.genderDescription,
+ this.iR,
+ this.iSOCityID,
+ this.iSOCountryID,
+ this.listPrivilege,
+ this.marital,
+ this.outSA,
+ this.pOBox,
+ this.receiveHealthSummaryReport,
+ this.sourceType,
+ this.strDateofBirth,
+ this.tempAddress,
+ this.zipCode,
+ this.isFamily,
+ this.cRSVerificationStatus});
AuthenticatedUser.fromJson(Map json) {
setupID = json['SetupID'];
@@ -193,6 +194,7 @@ class AuthenticatedUser {
tempAddress = json['TempAddress'];
zipCode = json['ZipCode'];
isFamily = json['IsFamily'];
+ cRSVerificationStatus = json['CRSVerificationStatus'];
}
Map toJson() {
@@ -259,6 +261,7 @@ class AuthenticatedUser {
data['TempAddress'] = this.tempAddress;
data['ZipCode'] = this.zipCode;
data['IsFamily'] = this.isFamily;
+ data['CRSVerificationStatus'] = this.cRSVerificationStatus;
return data;
}
}
diff --git a/lib/models/CovidDriveThru/CovidTestProceduresResponse.dart b/lib/models/CovidDriveThru/CovidTestProceduresResponse.dart
new file mode 100644
index 00000000..c104a1fc
--- /dev/null
+++ b/lib/models/CovidDriveThru/CovidTestProceduresResponse.dart
@@ -0,0 +1,32 @@
+class CovidTestProceduresResponse {
+ String procedureID;
+ String procedureName;
+ String procedureNameN;
+ int projectID;
+ String setupID;
+
+ CovidTestProceduresResponse(
+ {this.procedureID,
+ this.procedureName,
+ this.procedureNameN,
+ this.projectID,
+ this.setupID});
+
+ CovidTestProceduresResponse.fromJson(Map json) {
+ procedureID = json['ProcedureID'];
+ procedureName = json['ProcedureName'];
+ procedureNameN = json['ProcedureNameN'];
+ projectID = json['ProjectID'];
+ setupID = json['SetupID'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['ProcedureID'] = this.procedureID;
+ data['ProcedureName'] = this.procedureName;
+ data['ProcedureNameN'] = this.procedureNameN;
+ data['ProjectID'] = this.projectID;
+ data['SetupID'] = this.setupID;
+ return data;
+ }
+}
diff --git a/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_one_page.dart b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_one_page.dart
index b6cddf18..5a3271f2 100644
--- a/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_one_page.dart
+++ b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_one_page.dart
@@ -292,7 +292,9 @@ class MobileNumberTextFiled extends StatelessWidget {
padding: EdgeInsets.all(5),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15), color: Colors.white),
- child: Row(children: [
+ child: Row(
+ textDirection: TextDirection.ltr,
+ children: [
Expanded(
flex: 1,
child: Icon(
diff --git a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart
index 7a9cd016..4d472a61 100644
--- a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart
+++ b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart
@@ -17,6 +17,7 @@ import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart';
import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
+import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart';
import 'package:diplomaticquarterapp/pages/symptom-checker/info.dart';
@@ -263,13 +264,12 @@ class _AllHabibMedicalServiceState extends State {
title: TranslationBase.of(context).childVaccine,
),
ServicesContainer(
- onTap: () => Navigator.push(
- context,
- FadePage(
- page: ToDo(isShowAppBar: true),
- ),
- ),
- imageLocation: 'assets/images/new-design/upcoming_icon_bottom_bar.png',
+ onTap: (){
+ Navigator.pop(context);
+ LandingPage.shared.switchToDoFromHMGServices();
+ },
+ imageLocation:
+ 'assets/images/new-design/upcoming_icon_bottom_bar.png',
title: TranslationBase.of(context).todoList,
),
if (projectViewModel.havePrivilege(42))
diff --git a/lib/pages/AlHabibMedicalService/h2o/h20_setting.dart b/lib/pages/AlHabibMedicalService/h2o/h20_setting.dart
index 4295558a..b8be6539 100644
--- a/lib/pages/AlHabibMedicalService/h2o/h20_setting.dart
+++ b/lib/pages/AlHabibMedicalService/h2o/h20_setting.dart
@@ -1,3 +1,4 @@
+import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_detail_model.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/H2O_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
@@ -13,6 +14,8 @@ import 'package:flutter/material.dart';
import 'package:flutter/painting.dart';
import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';
+import 'package:manage_calendar_events/manage_calendar_events.dart';
+import 'package:shared_preferences/shared_preferences.dart';
import 'Dialog/setting_page_radio_button_list_dialog.dart';
@@ -31,7 +34,7 @@ class _H2oSettingState extends State {
TextEditingController _nameController = TextEditingController();
TextEditingController _heightController = TextEditingController();
TextEditingController _weightController = TextEditingController();
- bool _isUnitML = false;
+ bool _isUnitML = true;
bool _isGenderMale = false;
bool _isHeightCM = false;
bool _isWeightKG = false;
@@ -51,16 +54,25 @@ class _H2oSettingState extends State {
void initState() {
super.initState();
_userDetailModel = widget.userDetailModel;
- _heightValue = _userDetailModel.height;
- _weightValue = _userDetailModel.weight;
+ _heightValue = _userDetailModel?.height ?? 100;
+ _weightValue = _userDetailModel?.weight ?? 50;
_heightController.text = _heightValue.toStringAsFixed(0);
_weightController.text = _weightValue.toStringAsFixed(0);
_nameController.text = _userDetailModel.firstName;
- _isWeightKG = _userDetailModel.isWeightInKG;
- _isHeightCM = _userDetailModel.isHeightInCM;
- _isGenderMale = _userDetailModel.gender == "M" ? true : false;
+ _isWeightKG = _userDetailModel?.isWeightInKG ?? true;
+ _isHeightCM = _userDetailModel?.isHeightInCM ?? true;
+ _isGenderMale = (_userDetailModel?.gender ?? "M") == "M" ? true : false;
_dobDate = DateUtil.convertStringToDate(_userDetailModel.dOB);
_selectedActiveLevel = _userDetailModel.activityID ?? 1;
+ readPrefs();
+ }
+
+ SharedPreferences prefs;
+ void readPrefs() async {
+ prefs = await SharedPreferences.getInstance();
+ _isUnitML = (prefs.getString(H2O_UNIT) ?? "ml") == "ml" ? true : false;
+ _selectedRemindedTime = prefs.getInt(H2O_REMINDER) ?? 0;
+ setState(() {});
}
@override
@@ -68,19 +80,9 @@ class _H2oSettingState extends State {
// TODO: implement didChangeDependencies
super.didChangeDependencies();
- _activityLevelListEng = [
- TranslationBase.of(context).notActive,
- TranslationBase.of(context).lightActive,
- TranslationBase.of(context).modActive,
- TranslationBase.of(context).active
- ];
+ _activityLevelListEng = [TranslationBase.of(context).notActive, TranslationBase.of(context).lightActive, TranslationBase.of(context).modActive, TranslationBase.of(context).active];
- _remindedTimeListEng = [
- "1 ${TranslationBase.of(context).time}",
- "2 ${TranslationBase.of(context).times}",
- "3 ${TranslationBase.of(context).times}",
- "4 ${TranslationBase.of(context).times}"
- ];
+ _remindedTimeListEng = ["1 ${TranslationBase.of(context).time}", "2 ${TranslationBase.of(context).times}", "3 ${TranslationBase.of(context).times}", "4 ${TranslationBase.of(context).times}"];
}
@override
@@ -339,8 +341,7 @@ class _H2oSettingState extends State {
]);
}
- Widget _commonSlidersRow(
- _controller, double _minValue, double _maxValue, double _valueOrg, Function(String) onTextValueChange, Function(double) onValueChange) {
+ Widget _commonSlidersRow(_controller, double _minValue, double _maxValue, double _valueOrg, Function(String) onTextValueChange, Function(double) onValueChange) {
return Container(
margin: EdgeInsets.only(top: 6),
padding: EdgeInsets.all(6),
@@ -451,13 +452,35 @@ class _H2oSettingState extends State {
_userDetailModel.dOB = tempDate;
_userDetailModel.activityID = _selectedActiveLevel;
GifLoaderDialogUtils.showMyDialog(context);
- await widget.viewModel.updateUserDetail(_userDetailModel, (tag) {
+ await widget.viewModel.updateUserDetail(_userDetailModel, (tag) async {
if (tag) {
AppToast.showSuccessToast(message: TranslationBase.of(context).success);
+ await prefs.setString(H2O_UNIT, _isUnitML ? "ml" : "l");
+ int _tempRemindTime = prefs.getInt(H2O_REMINDER) ?? _selectedRemindedTime;
+ if (_tempRemindTime != _selectedRemindedTime) {
+ await prefs.setInt(H2O_REMINDER, _selectedRemindedTime);
+ _addReminderToCalender(_selectedRemindedTime);
+ }
}
GifLoaderDialogUtils.hideDialog(context);
});
Navigator.pop(context);
}
+
+ final CalendarPlugin _myPlugin = CalendarPlugin();
+ void _addReminderToCalender(int _selectedRemindedTime) async {
+ bool _calendarPermission = await _myPlugin.hasPermissions();
+ if (_calendarPermission) {
+ } else {
+ await _myPlugin.requestPermissions();
+ }
+ _myPlugin.hasPermissions().then((value) {
+ if (!value) {
+ _myPlugin.requestPermissions();
+ } else {
+ _myPlugin.getCalendars().then((value) => {print(value.length)});
+ }
+ });
+ }
}
diff --git a/lib/pages/AlHabibMedicalService/h2o/h2o_page.dart b/lib/pages/AlHabibMedicalService/h2o/h2o_page.dart
index b4d39682..b847190f 100644
--- a/lib/pages/AlHabibMedicalService/h2o/h2o_page.dart
+++ b/lib/pages/AlHabibMedicalService/h2o/h2o_page.dart
@@ -1,12 +1,18 @@
import 'dart:ui';
+import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/h20_setting.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/month_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/today_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/week_page.dart';
+import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart';
+import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
+import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
+import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
+import 'package:diplomaticquarterapp/widgets/bottom_navigation/bottom_nav_bar.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@@ -18,14 +24,16 @@ class H2OPage extends StatefulWidget {
_H2OPageState createState() => _H2OPageState();
}
-class _H2OPageState extends State
- with SingleTickerProviderStateMixin {
+class _H2OPageState extends State with SingleTickerProviderStateMixin {
TabController _tabController;
@override
void initState() {
super.initState();
- _tabController = TabController(length: 3, vsync: this,);
+ _tabController = TabController(
+ length: 3,
+ vsync: this,
+ );
}
@override
@@ -43,6 +51,7 @@ class _H2OPageState extends State
appBarTitle: TranslationBase.of(context).waterTracker,
showHomeAppBarIcon: false,
baseViewModel: model,
+ isHelp: true,
appBarIcons: [
IconButton(
icon: Image.asset("assets/images/new-design/setting_gear_icon.png"),
@@ -129,6 +138,39 @@ class _H2OPageState extends State
)
],
),
+ bottomNavigationBar: BottomNavBar(
+ changeIndex: (index) {
+ if (index == 0) {
+ IS_VOICE_COMMAND_CLOSED = false;
+ } else if (index == 1) {
+ Navigator.push(
+ context,
+ FadePage(
+ page: AppScaffold(
+ appBarTitle: TranslationBase.of(context).medicalProfile,
+ isShowAppBar: true,
+ showHomeAppBarIcon: false,
+ appBarIcons: [
+ IconButton(
+ icon: Image.asset("assets/images/new-design/setting_gear_icon.png"),
+ color: Colors.white,
+ onPressed: () => Navigator.of(context).pushNamed(
+ SETTINGS,
+ ),
+ ),
+ ],
+ body: MedicalProfilePage())));
+ } else if (index == 2) {
+ Navigator.of(context).pushNamedAndRemoveUntil(HOME, (Route route) => false);
+ } else if (index == 3) {
+ Navigator.of(context).pushNamed(MY_FAMILIY);
+ } else if (index == 4) {
+ Navigator.push(context, FadePage(page: ToDo(isShowAppBar: false)));
+ }
+ },
+ showHomeIcon: true,
+ index: 0,
+ ),
),
),
);
diff --git a/lib/pages/AlHabibMedicalService/h2o/month_page.dart b/lib/pages/AlHabibMedicalService/h2o/month_page.dart
index e0118495..8867fb77 100644
--- a/lib/pages/AlHabibMedicalService/h2o/month_page.dart
+++ b/lib/pages/AlHabibMedicalService/h2o/month_page.dart
@@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
+import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/charts/app_bar_chart.dart';
@@ -8,15 +9,17 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
+import 'package:provider/provider.dart';
class MonthPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
+ ProjectViewModel projectViewModel = Provider.of(context);
return BaseView(
onModelReady: (model) => model.getUserProgressForMonthData(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: false,
- appBarTitle: TranslationBase.of(context).h2o,
+ appBarTitle: TranslationBase.of(context).h2o,
baseViewModel: model,
body: Padding(
padding: EdgeInsets.all(8.0),
@@ -46,7 +49,7 @@ class MonthPage extends StatelessWidget {
],
),
// SizedBox(height: 8),
- AppBarChart(seriesList: model.userProgressForMonthDataSeries),
+ AppBarChart(seriesList: model.userProgressForMonthDataSeries, isArabic: projectViewModel.isArabic),
],
),
),
diff --git a/lib/pages/AlHabibMedicalService/h2o/today_page.dart b/lib/pages/AlHabibMedicalService/h2o/today_page.dart
index 33383287..03d11f50 100644
--- a/lib/pages/AlHabibMedicalService/h2o/today_page.dart
+++ b/lib/pages/AlHabibMedicalService/h2o/today_page.dart
@@ -1,3 +1,4 @@
+import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/widgets/h20_floating_action_button.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
@@ -7,8 +8,14 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:percent_indicator/circular_percent_indicator.dart';
+import 'package:shared_preferences/shared_preferences.dart';
class TodayPage extends StatelessWidget {
+ Future readPrefs() async {
+ SharedPreferences prefs = await SharedPreferences.getInstance();
+ return (prefs.getString(H2O_UNIT) ?? "ml") == "ml" ? true : false;
+ }
+
@override
Widget build(BuildContext context) {
return BaseView(
@@ -34,55 +41,75 @@ class TodayPage extends StatelessWidget {
: (model.userProgressData.percentageConsumed / 100) >= 1
? 1
: (model.userProgressData.percentageConsumed / 100),
- //,
center: Center(
- child: Column(
- mainAxisSize: MainAxisSize.min,
- children: [
- // SizedBox(
- // height: 40,
- // ),
- Text(
- TranslationBase.of(context).consumed,
- style: TextStyle(fontSize: 16.0),
- ),
- SizedBox(
- height: 4,
- ),
- Text(
- model.userProgressData == null
- ? "0.0"
- : model.userProgressData.quantityConsumed.toString() + TranslationBase.of(context).ml,
- style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14.0, color: HexColor("#60BCF9")),
- ),
- SizedBox(
- height: 4,
- ),
- SizedBox(
- height: 5,
- width: 50,
- child: Container(),
- ),
- SizedBox(
- height: 4,
- ),
- Text(
- TranslationBase.of(context).remaining,
- style: TextStyle(fontSize: 16.0),
- ),
- SizedBox(
- height: 4,
- ),
- Text(
- model.userProgressData == null
- ? "0.0"
- : (model.userProgressData.quantityLimit - model.userProgressData.quantityConsumed) < 0
- ? "0 ${TranslationBase.of(context).ml}"
- : (model.userProgressData.quantityLimit - model.userProgressData.quantityConsumed).toString() +
- ' ${TranslationBase.of(context).ml}',
- style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14.0),
- ),
- ],
+ child: FutureBuilder(
+ future: readPrefs(),
+ builder: (context, data) {
+ var isUnitML = true;
+ String unit;
+ if (data.connectionState == ConnectionState.done) {
+ isUnitML = data.data;
+ }
+ if (isUnitML) {
+ unit = TranslationBase.of(context).ml;
+ } else {
+ unit = TranslationBase.of(context).l;
+ }
+ unit = unit.toLowerCase();
+ var totalH2O = model?.userProgressData?.quantityLimit ?? 0.0;
+ var consumedH2O = model?.userProgressData?.quantityConsumed ?? 0.0;
+ if (!isUnitML) {
+ totalH2O = totalH2O / 1000;
+ consumedH2O = consumedH2O / 1000;
+ }
+ var remainingH2O = totalH2O - consumedH2O;
+
+ return Column(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ // SizedBox(
+ // height: 40,
+ // ),
+ Text(
+ TranslationBase.of(context).consumed,
+ style: TextStyle(fontSize: 16.0),
+ ),
+ SizedBox(
+ height: 4,
+ ),
+ Text(
+ model.userProgressData == null ? "0.0" : "$consumedH2O $unit",
+ style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14.0, color: HexColor("#60BCF9")),
+ ),
+ SizedBox(
+ height: 4,
+ ),
+ SizedBox(
+ height: 5,
+ width: 50,
+ child: Container(),
+ ),
+ SizedBox(
+ height: 4,
+ ),
+ Text(
+ TranslationBase.of(context).remaining,
+ style: TextStyle(fontSize: 16.0),
+ ),
+ SizedBox(
+ height: 4,
+ ),
+ Text(
+ model.userProgressData == null
+ ? "0.0"
+ : (remainingH2O) < 0
+ ? "0 $unit"
+ : '$remainingH2O $unit',
+ style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14.0),
+ ),
+ ],
+ );
+ },
),
),
circularStrokeCap: CircularStrokeCap.butt,
diff --git a/lib/pages/AlHabibMedicalService/h2o/week_page.dart b/lib/pages/AlHabibMedicalService/h2o/week_page.dart
index 34e365e6..6f4423b2 100644
--- a/lib/pages/AlHabibMedicalService/h2o/week_page.dart
+++ b/lib/pages/AlHabibMedicalService/h2o/week_page.dart
@@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
+import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/charts/app_bar_chart.dart';
@@ -8,10 +9,12 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
+import 'package:provider/provider.dart';
class WeekPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
+ ProjectViewModel projectViewModel = Provider.of(context);
return BaseView(
onModelReady: (model) => model.getUserProgressForWeekData(),
builder: (_, model, widget) => AppScaffold(
@@ -46,7 +49,7 @@ class WeekPage extends StatelessWidget {
],
),
// SizedBox(height: 8),
- AppBarChart(seriesList: model.userProgressForWeekDataSeries),
+ AppBarChart(seriesList: model.userProgressForWeekDataSeries,isArabic: projectViewModel.isArabic),
],
),
),
diff --git a/lib/pages/AlHabibMedicalService/h2o/widgets/h20_buttom_navigation_bar.dart b/lib/pages/AlHabibMedicalService/h2o/widgets/h20_buttom_navigation_bar.dart
new file mode 100644
index 00000000..1948e1c8
--- /dev/null
+++ b/lib/pages/AlHabibMedicalService/h2o/widgets/h20_buttom_navigation_bar.dart
@@ -0,0 +1,58 @@
+import 'package:diplomaticquarterapp/pages/landing/home_page.dart';
+import 'package:diplomaticquarterapp/widgets/bottom_navigation/bottom_nav_bar.dart';
+import 'package:diplomaticquarterapp/widgets/buttons/floatingActionButton.dart';
+import 'package:flutter/material.dart';
+import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
+import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart';
+import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart';
+import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
+
+class H20BottomNavigationBar extends StatelessWidget {
+ H20BottomNavigationBar({Key key}) : super(key: key);
+
+ PageController pageController = PageController(keepPage: true);
+ int currentTab = 0;
+
+ @override
+ Widget build(BuildContext context) {
+ // TODO: implement build
+ return Scaffold(
+ body: PageView(
+ physics: NeverScrollableScrollPhysics(),
+ controller: pageController,
+ children: [
+ HomePage(
+ goToMyProfile: () {
+ _changeCurrentTab(1);
+ },
+ ),
+ MedicalProfilePage(),
+ BookingOptions(),
+ MyFamily(isAppbarVisible: false),
+ ToDo(isShowAppBar: false),
+ ], // Please do not remove the BookingOptions from this array
+ ),
+ bottomNavigationBar: BottomNavBar(
+ changeIndex: _changeCurrentTab,
+ index: currentTab,
+ ),
+ floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
+ floatingActionButton: FloatingButton(
+ elevation: true,
+ onTap: () {
+ _changeCurrentTab(2);
+ }),
+ );
+ }
+
+ _changeCurrentTab(int tab) {
+ // setState(() {
+ currentTab = tab;
+ if (tab != 0)
+ pageController.jumpToPage(tab);
+ else {
+ pageController.jumpToPage(tab);
+ }
+ // });
+ }
+}
diff --git a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bariatrics-screen.dart b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bariatrics-screen.dart
index d9665aa4..c71a0c87 100644
--- a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bariatrics-screen.dart
+++ b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bariatrics-screen.dart
@@ -3,12 +3,14 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
+import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/doctor_list.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
+import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
@@ -33,122 +35,99 @@ class _BariatricsPageState extends State {
return BaseView(
onModelReady: (model) => model.getClinicCategory(),
- builder: (_, model, w) =>
- AppScaffold(
- isShowAppBar: true,
- appBarTitle: "${TranslationBase
- .of(context)
- .bariatrics}",
- baseViewModel: model,
- body: Column(
- children: [
- Container(
- margin: EdgeInsets.all(8.0),
- child: Center(
- child: Texts(TranslationBase
- .of(context)
- .bariatricsHeaderMsg),
- ),
- ),
- Expanded(
- child: Container(
- margin: EdgeInsets.symmetric(
- horizontal: 16.0, vertical: 8.0),
- child: Row(
- children: [
- Expanded(
- child: SingleChildScrollView(
- child: Column(
- children: [
- ...model.diseasesList
- .map((item) =>
- RadioListTile(
+ builder: (_, model, w) => AppScaffold(
+ isShowDecPage: false,
+ isShowAppBar: true,
+ appBarTitle: "${TranslationBase.of(context).bariatrics}",
+ baseViewModel: model,
+ body: Column(
+ children: [
+ Container(
+ margin: EdgeInsets.all(8.0),
+ child: Center(
+ child: Texts(TranslationBase.of(context).bariatricsHeaderMsg),
+ ),
+ ),
+ Expanded(
+ child: Container(
+ margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0),
+ child: Row(
+ children: [
+ Expanded(
+ child: SingleChildScrollView(
+ child: Column(
+ children: [
+ ...model.diseasesList
+ .map((item) => RadioListTile(
title: Texts("${item.diseases}"),
activeColor: Colors.blue.shade700,
value: item.diseasesID,
- groupValue: _selectedDisease != null
- ? _selectedDisease.diseasesID
- : -1,
- selected: _selectedDisease != null ? item
- .diseasesID ==
- _selectedDisease.diseasesID : false,
+ groupValue: _selectedDisease != null ? _selectedDisease.diseasesID : -1,
+ selected: _selectedDisease != null
+ ? item.diseasesID == _selectedDisease.diseasesID
+ : false,
onChanged: (val) {
setState(() {
_selectedDisease = item;
});
},
))
- .toList()
- ],
- ),
- ),
+ .toList()
+ ],
),
- Image.asset(
- _getImageName(widget.gender, widget.obeseResult,
- projectProvider.isArabic),
- fit: BoxFit.cover,
- ),
- ],
+ ),
),
- ),
- ),
- Container(
- margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
- child: BorderedButton(
- TranslationBase
- .of(context)
- .continues,
- fontSize: SizeConfig.textMultiplier * 2.1,
- textColor: Colors.white,
- vPadding: 8,
- hPadding: 8,
- backgroundColor: Theme
- .of(context)
- .primaryColor,
- radius: 8,
- fontWeight: FontWeight.bold,
- handler: () async {
- await model.searchDoctorsByTime(_selectedDisease);
- if(model.state == ViewState.ErrorLocal){
- AppToast.showErrorToast(message: model.error);
- }
- // Navigator.push(
- // context,
- // MaterialPageRoute(builder: (context) => BariatricsPage()),
- // );
- },
- ),
- ),
- Container(
- margin: EdgeInsets.only(bottom: 16.0, left: 16, right: 16),
- child: BorderedButton(
- TranslationBase
- .of(context)
- .skip,
- fontSize: SizeConfig.textMultiplier * 2.1,
- textColor: Colors.blue,
- vPadding: 8,
- hPadding: 8,
- backgroundColor: Color(0x00000000),
- radius: 8,
- hasBorder: true,
- borderColor: Color(0x00000000),
- fontWeight: FontWeight.bold,
- handler: () async {
- await model.searchDoctorsByTime(_selectedDisease);
- if(model.state == ViewState.ErrorLocal){
- AppToast.showErrorToast(message: model.error);
- }
- // Navigator.push(
- // context,
- // MaterialPageRoute(builder: (context) => BariatricsPage()),
- // );
- },
- ),
+ Image.asset(
+ _getImageName(widget.gender, widget.obeseResult, projectProvider.isArabic),
+ fit: BoxFit.cover,
+ ),
+ ],
),
- ],
+ ),
+ ),
+ Container(
+ margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
+ child: BorderedButton(
+ TranslationBase.of(context).continues,
+ fontSize: SizeConfig.textMultiplier * 2.1,
+ textColor: Colors.white,
+ vPadding: 8,
+ hPadding: 8,
+ backgroundColor: Theme.of(context).primaryColor,
+ radius: 8,
+ fontWeight: FontWeight.bold,
+ handler: () async {
+ Navigator.push(
+ context,
+ FadePage(page: DoctorList(diseaseByClinic: _selectedDisease,)),
+ );
+ },
+ ),
+ ),
+ Container(
+ margin: EdgeInsets.only(bottom: 16.0, left: 16, right: 16),
+ child: BorderedButton(
+ TranslationBase.of(context).skip,
+ fontSize: SizeConfig.textMultiplier * 2.1,
+ textColor: Colors.blue,
+ vPadding: 8,
+ hPadding: 8,
+ backgroundColor: Color(0x00000000),
+ radius: 8,
+ hasBorder: true,
+ borderColor: Color(0x00000000),
+ fontWeight: FontWeight.bold,
+ handler: () async {
+ Navigator.push(
+ context,
+ FadePage(page: DoctorList()),
+ );
+ },
+ ),
),
- ),
+ ],
+ ),
+ ),
);
}
diff --git a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bmi_calculator.dart b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bmi_calculator.dart
index 2282472b..ec7074c2 100644
--- a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bmi_calculator.dart
+++ b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bmi_calculator.dart
@@ -6,8 +6,10 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
+import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'dart:math';
+import '../health_calc_desc.dart';
import 'result_page.dart';
const activeCardColor = Color(0xff70777A);
@@ -121,6 +123,23 @@ class _BMICalculatorState extends State {
return AppScaffold(
isShowAppBar: true,
isShowDecPage: false,
+ showHomeAppBarIcon: false,
+ appBarIcons: [
+ IconButton(
+ icon: Icon(Icons.info_outline),
+ color: Colors.white,
+ onPressed: () {
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => HealthDescPage(
+ "${TranslationBase.of(context).bmi} ${TranslationBase.of(context).calcHealth}",
+ TranslationBase.of(context).bmiCalcDesc,
+ "assets/images/AlHabibMedicalService/health_calculator/bmi.png")),
+ );
+ },
+ )
+ ],
appBarTitle:
"${TranslationBase.of(context).bmi} ${TranslationBase.of(context).calcHealth}",
body: SingleChildScrollView(
diff --git a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/result_page.dart
index a541b3ce..9b0ee417 100644
--- a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/result_page.dart
+++ b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/result_page.dart
@@ -50,9 +50,9 @@ class ResultPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return AppScaffold(
+ isShowDecPage: false,
isShowAppBar: true,
- appBarTitle:
- "${TranslationBase.of(context).bmi} ${TranslationBase.of(context).calcHealth}",
+ appBarTitle: "${TranslationBase.of(context).bmi} ${TranslationBase.of(context).calcHealth}",
body: Column(
children: [
Expanded(
@@ -112,11 +112,10 @@ class ResultPage extends StatelessWidget {
backgroundColor: Theme.of(context).primaryColor,
radius: 8,
fontWeight: FontWeight.bold,
- handler: (){
+ handler: () {
Navigator.push(
context,
- FadePage(
- page: BariatricsPage(1, 1, finalResult)),
+ FadePage(page: BariatricsPage(1, 1, finalResult)),
);
},
),
diff --git a/lib/pages/AlHabibMedicalService/health_calculator/bmr_calculator/bmr_result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/bmr_calculator/bmr_result_page.dart
index a3fdb5f7..6e7d6279 100644
--- a/lib/pages/AlHabibMedicalService/health_calculator/bmr_calculator/bmr_result_page.dart
+++ b/lib/pages/AlHabibMedicalService/health_calculator/bmr_calculator/bmr_result_page.dart
@@ -1,6 +1,8 @@
+import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/doctor_list.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
+import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:percent_indicator/circular_percent_indicator.dart';
@@ -12,6 +14,7 @@ class BmrResultPage extends StatelessWidget {
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
+ isShowDecPage: false,
appBarTitle: 'BMR Calculator',
body: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
@@ -55,8 +58,13 @@ class BmrResultPage extends StatelessWidget {
Container(
width: 350,
child: Button(
- label: 'See List Of Doctors',
- ),
+ label: 'See List Of Doctors',
+ onTap: () {
+ Navigator.push(
+ context,
+ FadePage(page: DoctorList()),
+ );
+ }),
),
],
),
diff --git a/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart b/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart
index 1530d0ee..0ce34e42 100644
--- a/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart
+++ b/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart
@@ -148,18 +148,10 @@ class _BodyFatState extends State {
void calculateBodyFat() {
if (isMale == true) {
- bodyFat = 495 /
- (1.0324 -
- 0.19077 * (log(waist - neck) / ln10) +
- 0.15456 * (log(heightCm) / ln10)) -
- 450;
+ bodyFat = 495 / (1.0324 - 0.19077 * (log(waist - neck) / ln10) + 0.15456 * (log(heightCm) / ln10)) - 450;
fat = (bodyFat * 10) / 10.round();
} else if (isMale == false) {
- bodyFat = 495 /
- (1.29579 -
- 0.35004 * (log(waist + hip - neck) / ln10) +
- 0.22100 * (log(heightCm) / ln10)) -
- 450;
+ bodyFat = 495 / (1.29579 - 0.35004 * (log(waist + hip - neck) / ln10) + 0.22100 * (log(heightCm) / ln10)) - 450;
fat = (bodyFat * 10) / 10.round();
}
if (fat <= 0) {
@@ -180,11 +172,9 @@ class _BodyFatState extends State {
} else if (bodyFat > 31 && bodyFat <= 60) {
textResult = 'The category falls under obese';
} else if (bodyFat > 60) {
- textResult =
- 'Please check the value you have entered, since the body fat percentage has crosed the limits.';
+ textResult = 'Please check the value you have entered, since the body fat percentage has crosed the limits.';
} else if (bodyFat <= 9) {
- textResult =
- 'Please check the value you have entered, since the body fat percentage cannot be this low.';
+ textResult = 'Please check the value you have entered, since the body fat percentage cannot be this low.';
}
} else {
if (bodyFat > 5 && fat <= 13) {
@@ -196,11 +186,9 @@ class _BodyFatState extends State {
} else if (bodyFat > 24 && bodyFat <= 45) {
textResult = 'The category falls under obese';
} else if (bodyFat > 45) {
- textResult =
- 'Please check the value you have entered, since the body fat percentage has crosed the limits.';
+ textResult = 'Please check the value you have entered, since the body fat percentage has crosed the limits.';
} else if (bodyFat <= 5) {
- textResult =
- 'Please check the value you have entered, since the body fat percentage cannot be this low.';
+ textResult = 'Please check the value you have entered, since the body fat percentage cannot be this low.';
}
}
}
@@ -229,8 +217,7 @@ class _BodyFatState extends State {
children: [
Padding(
padding: EdgeInsets.all(10.0),
- child:
- Texts('Estimates the total body fat based on\n the size'),
+ child: Texts('Estimates the total body fat based on\n the size'),
),
Divider(
thickness: 2.0,
@@ -308,14 +295,12 @@ class _BodyFatState extends State {
child: Row(
children: [
Padding(
- padding: EdgeInsets.symmetric(
- vertical: 10.0, horizontal: 8.0),
+ padding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 8.0),
child: Center(
child: Container(
width: 60.0,
foregroundDecoration: BoxDecoration(
- borderRadius:
- BorderRadius.circular(5.0),
+ borderRadius: BorderRadius.circular(5.0),
border: Border.all(
color: Colors.blueGrey,
width: 2.0,
@@ -331,10 +316,8 @@ class _BodyFatState extends State {
Container(
height: 38.0,
child: Column(
- crossAxisAlignment:
- CrossAxisAlignment.center,
- mainAxisAlignment:
- MainAxisAlignment.center,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
decoration: BoxDecoration(
@@ -351,8 +334,7 @@ class _BodyFatState extends State {
),
onTap: () {
setState(() {
- if (heightCm < 250)
- heightCm++;
+ if (heightCm < 250) heightCm++;
});
},
),
@@ -364,8 +346,7 @@ class _BodyFatState extends State {
),
onTap: () {
setState(() {
- if (heightCm > 0)
- heightCm--;
+ if (heightCm > 0) heightCm--;
});
},
),
@@ -420,16 +401,14 @@ class _BodyFatState extends State {
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
- offset: Offset(
- 0, 3), // changes position of shadow
+ offset: Offset(0, 3), // changes position of shadow
),
],
color: cmCard,
borderRadius: BorderRadius.circular(3.0),
),
child: Padding(
- padding: const EdgeInsets.symmetric(
- vertical: 0.0, horizontal: 18.0),
+ padding: const EdgeInsets.symmetric(vertical: 0.0, horizontal: 18.0),
child: Center(child: Texts('CM')),
),
),
@@ -452,14 +431,12 @@ class _BodyFatState extends State {
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
- offset: Offset(
- 0, 3), // changes position of shadow
+ offset: Offset(0, 3), // changes position of shadow
),
],
),
child: Padding(
- padding:
- const EdgeInsets.symmetric(horizontal: 16.0),
+ padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Center(child: Texts('Ft')),
),
),
@@ -484,14 +461,12 @@ class _BodyFatState extends State {
child: Row(
children: [
Padding(
- padding: EdgeInsets.symmetric(
- vertical: 10.0, horizontal: 8.0),
+ padding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 8.0),
child: Center(
child: Container(
width: 60.0,
foregroundDecoration: BoxDecoration(
- borderRadius:
- BorderRadius.circular(5.0),
+ borderRadius: BorderRadius.circular(5.0),
border: Border.all(
color: Colors.blueGrey,
width: 2.0,
@@ -507,10 +482,8 @@ class _BodyFatState extends State {
Container(
height: 38.0,
child: Column(
- crossAxisAlignment:
- CrossAxisAlignment.center,
- mainAxisAlignment:
- MainAxisAlignment.center,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
decoration: BoxDecoration(
@@ -594,16 +567,14 @@ class _BodyFatState extends State {
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
- offset: Offset(
- 0, 3), // changes position of shadow
+ offset: Offset(0, 3), // changes position of shadow
),
],
color: neckCmCard,
borderRadius: BorderRadius.circular(3.0),
),
child: Padding(
- padding: const EdgeInsets.symmetric(
- vertical: 0.0, horizontal: 18.0),
+ padding: const EdgeInsets.symmetric(vertical: 0.0, horizontal: 18.0),
child: Center(child: Texts('CM')),
),
),
@@ -626,14 +597,12 @@ class _BodyFatState extends State {
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
- offset: Offset(
- 0, 3), // changes position of shadow
+ offset: Offset(0, 3), // changes position of shadow
),
],
),
child: Padding(
- padding:
- const EdgeInsets.symmetric(horizontal: 16.0),
+ padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Center(child: Texts('Ft')),
),
),
@@ -658,14 +627,12 @@ class _BodyFatState extends State {
child: Row(
children: [
Padding(
- padding: EdgeInsets.symmetric(
- vertical: 10.0, horizontal: 8.0),
+ padding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 8.0),
child: Center(
child: Container(
width: 60.0,
foregroundDecoration: BoxDecoration(
- borderRadius:
- BorderRadius.circular(5.0),
+ borderRadius: BorderRadius.circular(5.0),
border: Border.all(
color: Colors.blueGrey,
width: 2.0,
@@ -681,10 +648,8 @@ class _BodyFatState extends State {
Container(
height: 38.0,
child: Column(
- crossAxisAlignment:
- CrossAxisAlignment.center,
- mainAxisAlignment:
- MainAxisAlignment.center,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
decoration: BoxDecoration(
@@ -701,8 +666,7 @@ class _BodyFatState extends State {
),
onTap: () {
setState(() {
- if (waist < 200)
- waist++;
+ if (waist < 200) waist++;
});
},
),
@@ -769,16 +733,14 @@ class _BodyFatState extends State {
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
- offset: Offset(
- 0, 3), // changes position of shadow
+ offset: Offset(0, 3), // changes position of shadow
),
],
color: waistCmCard,
borderRadius: BorderRadius.circular(3.0),
),
child: Padding(
- padding: const EdgeInsets.symmetric(
- vertical: 0.0, horizontal: 18.0),
+ padding: const EdgeInsets.symmetric(vertical: 0.0, horizontal: 18.0),
child: Center(child: Texts('CM')),
),
),
@@ -801,14 +763,12 @@ class _BodyFatState extends State {
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
- offset: Offset(
- 0, 3), // changes position of shadow
+ offset: Offset(0, 3), // changes position of shadow
),
],
),
child: Padding(
- padding:
- const EdgeInsets.symmetric(horizontal: 16.0),
+ padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Center(child: Texts('Ft')),
),
),
@@ -833,14 +793,12 @@ class _BodyFatState extends State {
child: Row(
children: [
Padding(
- padding: EdgeInsets.symmetric(
- vertical: 10.0, horizontal: 8.0),
+ padding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 8.0),
child: Center(
child: Container(
width: 60.0,
foregroundDecoration: BoxDecoration(
- borderRadius:
- BorderRadius.circular(5.0),
+ borderRadius: BorderRadius.circular(5.0),
border: Border.all(
color: Colors.blueGrey,
width: 2.0,
@@ -856,10 +814,8 @@ class _BodyFatState extends State {
Container(
height: 38.0,
child: Column(
- crossAxisAlignment:
- CrossAxisAlignment.center,
- mainAxisAlignment:
- MainAxisAlignment.center,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
decoration: BoxDecoration(
@@ -943,16 +899,14 @@ class _BodyFatState extends State {
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
- offset: Offset(
- 0, 3), // changes position of shadow
+ offset: Offset(0, 3), // changes position of shadow
),
],
color: hipCmCard,
borderRadius: BorderRadius.circular(3.0),
),
child: Padding(
- padding: const EdgeInsets.symmetric(
- vertical: 0.0, horizontal: 18.0),
+ padding: const EdgeInsets.symmetric(vertical: 0.0, horizontal: 18.0),
child: Center(child: Texts('CM')),
),
),
@@ -975,14 +929,12 @@ class _BodyFatState extends State {
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
- offset: Offset(
- 0, 3), // changes position of shadow
+ offset: Offset(0, 3), // changes position of shadow
),
],
),
child: Padding(
- padding:
- const EdgeInsets.symmetric(horizontal: 16.0),
+ padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Center(child: Texts('Ft')),
),
),
@@ -995,7 +947,7 @@ class _BodyFatState extends State {
],
),
Container(
- height: 100.0,
+ height: MediaQuery.of(context).size.height * 0.084,
width: 350.0,
child: SecondaryButton(
label: 'CALCULATE',
diff --git a/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat_result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat_result_page.dart
index c8c5476e..f41f9598 100644
--- a/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat_result_page.dart
+++ b/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat_result_page.dart
@@ -1,6 +1,8 @@
+import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/doctor_list.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
+import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:percent_indicator/circular_percent_indicator.dart';
@@ -68,6 +70,12 @@ class FatResult extends StatelessWidget {
width: 350,
child: Button(
label: 'See List Of Doctors',
+ onTap: () {
+ Navigator.push(
+ context,
+ FadePage(page: DoctorList()),
+ );
+ },
),
),
],
diff --git a/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_result_page.dart
index 110b2afc..ed3dd8f8 100644
--- a/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_result_page.dart
+++ b/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_result_page.dart
@@ -1,7 +1,9 @@
+import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/doctor_list.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
+import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:percent_indicator/circular_percent_indicator.dart';
@@ -45,13 +47,18 @@ class CalorieResultPage extends StatelessWidget {
),
),
Container(
- child:
- Texts('Daily intake is ${calorie.toStringAsFixed(1)} calories'),
+ child: Texts('Daily intake is ${calorie.toStringAsFixed(1)} calories'),
),
Container(
width: 350,
child: Button(
label: 'See List Of Doctors',
+ onTap: () {
+ Navigator.push(
+ context,
+ FadePage(page: DoctorList()),
+ );
+ },
),
),
],
diff --git a/lib/pages/AlHabibMedicalService/health_calculator/carbs/carbs_result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/carbs/carbs_result_page.dart
index f8d0815a..474b8613 100644
--- a/lib/pages/AlHabibMedicalService/health_calculator/carbs/carbs_result_page.dart
+++ b/lib/pages/AlHabibMedicalService/health_calculator/carbs/carbs_result_page.dart
@@ -1,6 +1,8 @@
+import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/doctor_list.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
+import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'dart:math';
@@ -156,6 +158,12 @@ class CarbsResult extends StatelessWidget {
width: 350,
child: Button(
label: 'See List Of Doctors',
+ onTap: () {
+ Navigator.push(
+ context,
+ FadePage(page: DoctorList()),
+ );
+ },
),
),
],
diff --git a/lib/pages/AlHabibMedicalService/health_calculator/delivery_due/delivery_due.dart b/lib/pages/AlHabibMedicalService/health_calculator/delivery_due/delivery_due.dart
index d19c6017..db5a585c 100644
--- a/lib/pages/AlHabibMedicalService/health_calculator/delivery_due/delivery_due.dart
+++ b/lib/pages/AlHabibMedicalService/health_calculator/delivery_due/delivery_due.dart
@@ -70,9 +70,7 @@ class _DeliveryDueState extends State {
onConfirm: (date) {
print('confirm $date');
setState(() {
- bloodSugarDate == date
- ? null
- : bloodSugarDate = DateTime.now();
+ bloodSugarDate = date;
dateFrom = date.add(Duration(days: 10));
dateTo = date.add(Duration(days: 20));
@@ -90,9 +88,7 @@ class _DeliveryDueState extends State {
padding: EdgeInsets.all(12),
width: double.infinity,
height: 65,
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(12),
- color: Colors.white),
+ decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@@ -124,14 +120,14 @@ class _DeliveryDueState extends State {
context,
FadePage(
page: DeliveryDueResult(
- conceivedDate: conceivedDate,
- dateFrom: dateFrom,
- dateTo: dateTo,
- deliveryDue: deliveryDue,
- firstTrimester: firstTrimester,
- secondTrimester: secondTrimester,
- thirdTrimester: thirdTrimester,
- )),
+ conceivedDate: conceivedDate,
+ dateFrom: dateFrom,
+ dateTo: dateTo,
+ deliveryDue: deliveryDue,
+ firstTrimester: firstTrimester,
+ secondTrimester: secondTrimester,
+ thirdTrimester: thirdTrimester,
+ )),
);
}
});
diff --git a/lib/pages/AlHabibMedicalService/health_calculator/delivery_due/delivery_due_result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/delivery_due/delivery_due_result_page.dart
index fc53b044..e03e5fce 100644
--- a/lib/pages/AlHabibMedicalService/health_calculator/delivery_due/delivery_due_result_page.dart
+++ b/lib/pages/AlHabibMedicalService/health_calculator/delivery_due/delivery_due_result_page.dart
@@ -1,6 +1,8 @@
+import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/doctor_list.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
+import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
@@ -43,17 +45,13 @@ class DeliveryDueResult extends StatelessWidget {
fontWeight: FontWeight.w400,
),
Texts(DateFormat.yMMMEd().format(dateFrom),
- fontWeight: FontWeight.w800,
- fontSize: 21.0,
- color: Color(0xffC5272D)),
+ fontWeight: FontWeight.w800, fontSize: 21.0, color: Color(0xffC5272D)),
Texts(
'To:',
fontWeight: FontWeight.w400,
),
Texts(DateFormat.yMMMEd().format(dateTo),
- fontWeight: FontWeight.w800,
- fontSize: 21.0,
- color: Color(0xffC5272D)),
+ fontWeight: FontWeight.w800, fontSize: 21.0, color: Color(0xffC5272D)),
Texts(
'You have conceived on:',
fontWeight: FontWeight.w400,
@@ -94,6 +92,12 @@ class DeliveryDueResult extends StatelessWidget {
width: 350,
child: Button(
label: 'See List Of Doctors',
+ onTap: () {
+ Navigator.push(
+ context,
+ FadePage(page: DoctorList()),
+ );
+ },
),
),
],
diff --git a/lib/pages/AlHabibMedicalService/health_calculator/doctor_list.dart b/lib/pages/AlHabibMedicalService/health_calculator/doctor_list.dart
new file mode 100644
index 00000000..ba906ca4
--- /dev/null
+++ b/lib/pages/AlHabibMedicalService/health_calculator/doctor_list.dart
@@ -0,0 +1,116 @@
+import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart';
+import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart';
+import 'package:diplomaticquarterapp/pages/base/base_view.dart';
+import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
+import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
+import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:rating_bar/rating_bar.dart';
+
+class DoctorList extends StatelessWidget {
+ DiseasesByClinic diseaseByClinic;
+ DoctorList({Key key, this.diseaseByClinic}) : super(key: key);
+
+ @override
+ Widget build(BuildContext context) {
+ return BaseView(
+ allowAny: true,
+ onModelReady: (model) => model.getDoctorList(disease: diseaseByClinic),
+ builder: (BuildContext context, BariatricsViewModel model, Widget child) => AppScaffold(
+ isShowDecPage: false,
+ isShowAppBar: true,
+ baseViewModel: model,
+ appBarTitle: "Doctors List",
+ description: TranslationBase.of(context).infoApprovals,
+ infoList: TranslationBase.of(context).infoApprovalPoints,
+ body: ListView.builder(
+ itemCount: model.doctorLists.length,
+ itemBuilder: (BuildContext context, int index) {
+ return Padding(
+ padding: EdgeInsets.symmetric(horizontal: 16.0, vertical: 10.0),
+ child: Container(
+ //height: MediaQuery.of(context).size.height * 0.09,
+ decoration: BoxDecoration(color: Colors.white),
+
+ child: ExpansionTile(
+ title: Padding(
+ padding: EdgeInsets.all(21.0),
+ child: Texts(model.doctorLists[index].filterName),
+ ),
+ children: model.doctorLists[index].doctorsByTimeList
+ .map((doctor) => Card(
+ margin: EdgeInsets.fromLTRB(10.0, 16.0, 10.0, 8.0),
+ color: Colors.white,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(10),
+ ),
+ child: Container(
+ decoration: BoxDecoration(),
+ padding: EdgeInsets.all(7.0),
+ width: MediaQuery.of(context).size.width,
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Expanded(
+ flex: 1,
+ child: ClipRRect(
+ borderRadius: BorderRadius.circular(100.0),
+ child: Image.network(doctor.doctorImageURL,
+ fit: BoxFit.fill, height: 60.0, width: 60.0),
+ ),
+ ),
+ Expanded(
+ flex: 4,
+ child: Container(
+ width: MediaQuery.of(context).size.width * 0.55,
+ margin: EdgeInsets.fromLTRB(20.0, 10.0, 10.0, 0.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ if (doctor.doctorTitle != null)
+ Text(doctor.doctorTitle + " " + doctor.name, style: TextStyle(fontSize: 14.0, color: Colors.grey[700], letterSpacing: 1.0)),
+ Container(
+ margin: EdgeInsets.only(top: 3.0),
+ child: Text(doctor.clinicName != null ? doctor.clinicName : "", style: TextStyle(fontSize: 12.0, color: Colors.grey[600], letterSpacing: 1.0)),
+ ),
+ Container(
+ margin: EdgeInsets.only(top: 3.0),
+ child: Text(doctor.projectName, style: TextStyle(fontSize: 12.0, color: Colors.grey[600], letterSpacing: 1.0)),
+ ),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ mainAxisSize: MainAxisSize.max,
+ children: [
+ RatingBar.readOnly(
+ initialRating: doctor.actualDoctorRate.toDouble(),
+ size: 20.0,
+ filledColor: Colors.yellow[700],
+ emptyColor: Colors.grey[500],
+ isHalfAllowed: true,
+ halfFilledIcon: Icons.star_half,
+ filledIcon: Icons.star,
+ emptyIcon: Icons.star,
+ ),
+ Container(
+ child: Image.network(doctor.nationalityFlagURL,
+ width: 25.0, height: 25.0),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ))
+ .toList(),
+ ),
+ ),
+ );
+ }),
+ ));
+ }
+}
diff --git a/lib/pages/AlHabibMedicalService/health_calculator/health_calc_desc.dart b/lib/pages/AlHabibMedicalService/health_calculator/health_calc_desc.dart
new file mode 100644
index 00000000..19f8e986
--- /dev/null
+++ b/lib/pages/AlHabibMedicalService/health_calculator/health_calc_desc.dart
@@ -0,0 +1,40 @@
+import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
+import 'package:flutter/material.dart';
+
+class HealthDescPage extends StatelessWidget {
+ final String title;
+ final String desc;
+ final String icon;
+
+ HealthDescPage(this.title, this.desc, this.icon);
+
+ @override
+ Widget build(BuildContext context) {
+ return AppScaffold(
+ isShowAppBar: true,
+ isShowDecPage: false,
+ appBarTitle: title,
+ body: Container(
+ margin: EdgeInsets.all(8.0),
+ child: Row(
+ children: [
+ Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 8),
+ child: Image.asset(
+ icon,
+ fit: BoxFit.cover,
+ height: 80,
+ ),
+ ),
+ Expanded(
+ child: Text(
+ desc,
+ style: TextStyle(fontSize: 18.0),
+ ),
+ )
+ ],
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/pages/AlHabibMedicalService/health_calculator/ideal_body/ideal_body_result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/ideal_body/ideal_body_result_page.dart
index 605e499a..24fc768f 100644
--- a/lib/pages/AlHabibMedicalService/health_calculator/ideal_body/ideal_body_result_page.dart
+++ b/lib/pages/AlHabibMedicalService/health_calculator/ideal_body/ideal_body_result_page.dart
@@ -1,6 +1,8 @@
+import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/doctor_list.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
+import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'dart:math';
@@ -11,12 +13,7 @@ class IdealBodyResult extends StatelessWidget {
final double overWeightBy;
final String textResult;
- IdealBodyResult(
- {this.idealBodyWeight,
- this.minRange,
- this.mixRange,
- this.overWeightBy,
- this.textResult});
+ IdealBodyResult({this.idealBodyWeight, this.minRange, this.mixRange, this.overWeightBy, this.textResult});
@override
Widget build(BuildContext context) {
return AppScaffold(
@@ -82,8 +79,7 @@ class IdealBodyResult extends StatelessWidget {
: overWeightBy > 10 && overWeightBy < 17
? Column(
children: [
- Texts(
- 'This means that the weight is a little bit more than ideal weight by'),
+ Texts('This means that the weight is a little bit more than ideal weight by'),
Texts(overWeightBy.toStringAsFixed(1)),
Texts(
'May wish to consult with the doctor for medical help. Click to view our list of Doctors'),
@@ -161,6 +157,12 @@ class IdealBodyResult extends StatelessWidget {
width: 350,
child: Button(
label: 'See List Of Doctors',
+ onTap: () {
+ Navigator.push(
+ context,
+ FadePage(page: DoctorList()),
+ );
+ },
),
),
],
diff --git a/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_result_page.dart
index 6669bf75..6ced14b2 100644
--- a/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_result_page.dart
+++ b/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_result_page.dart
@@ -1,6 +1,8 @@
+import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/doctor_list.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
+import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
@@ -9,8 +11,7 @@ class OvulationResult extends StatelessWidget {
var dateTo;
var conceivedDate;
var deliveryDue;
- OvulationResult(
- {this.dateFrom, this.dateTo, this.deliveryDue, this.conceivedDate});
+ OvulationResult({this.dateFrom, this.dateTo, this.deliveryDue, this.conceivedDate});
//var newFormat = DateFormat("yy-MM-dd");
@override
@@ -84,6 +85,12 @@ class OvulationResult extends StatelessWidget {
width: 350,
child: Button(
label: 'See List Of Doctors',
+ onTap: () {
+ Navigator.push(
+ context,
+ FadePage(page: DoctorList()),
+ );
+ },
),
),
],
diff --git a/lib/pages/AlHabibMedicalService/health_converter/blood_sugar.dart b/lib/pages/AlHabibMedicalService/health_converter/blood_sugar.dart
index cf230466..e429418d 100644
--- a/lib/pages/AlHabibMedicalService/health_converter/blood_sugar.dart
+++ b/lib/pages/AlHabibMedicalService/health_converter/blood_sugar.dart
@@ -42,6 +42,7 @@ class _BloodSugarState extends State {
}
void calculateBloodSugar() {
+ if (textController.text.isEmpty) return;
if (cardMGColor == activeCardColor) {
inputValue = double.parse(textController.text);
inputValue = inputValue / 15;
@@ -60,10 +61,18 @@ class _BloodSugarState extends State {
double inputValue = 0;
String unit;
+ @override
+ void initState() {
+ updateColor(1);
+ unit = 'mmol/l';
+ super.initState();
+ }
+
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
+ isShowDecPage: false,
appBarTitle: TranslationBase.of(context).bloodSugarConversion,
body: Padding(
padding: const EdgeInsets.all(16.0),
@@ -112,9 +121,11 @@ class _BloodSugarState extends State {
onTap: () {
setState(() {
updateColor(1);
- inputValue =
- double.parse(textController.text);
- inputValue = inputValue / 15;
+ if (textController.text.isNotEmpty) {
+ inputValue =
+ double.parse(textController.text);
+ inputValue = inputValue / 15;
+ }
unit = 'mmol/l';
});
},
@@ -145,9 +156,11 @@ class _BloodSugarState extends State {
onTap: () {
setState(() {
updateColor(2);
- inputValue =
- double.parse(textController.text);
- inputValue = inputValue * 18;
+ if (textController.text.isNotEmpty) {
+ inputValue =
+ double.parse(textController.text);
+ inputValue = inputValue / 18;
+ }
unit = 'mg/dlt';
});
},
@@ -170,7 +183,7 @@ class _BloodSugarState extends State {
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 16.0),
- child: Texts('MG/DLt TO\n MMOL/L'),
+ child: Texts('\nMMOL/L TO MG/DLt '),
),
),
),
diff --git a/lib/pages/AlHabibMedicalService/my_web_view.dart b/lib/pages/AlHabibMedicalService/my_web_view.dart
index 59163c15..c4841a24 100644
--- a/lib/pages/AlHabibMedicalService/my_web_view.dart
+++ b/lib/pages/AlHabibMedicalService/my_web_view.dart
@@ -8,8 +8,7 @@ class MyWebView extends StatelessWidget {
final String title;
final String selectedUrl;
- final Completer _controller =
- Completer();
+ final Completer _controller = Completer();
MyWebView({
@required this.title,
@@ -21,17 +20,12 @@ class MyWebView extends StatelessWidget {
return AppScaffold(
isShowAppBar: true,
appBarTitle: title,
-
- body:
- WebView(
+ body: WebView(
initialUrl: selectedUrl,
javascriptMode: JavascriptMode.unrestricted,
onWebViewCreated: (WebViewController webViewController) {
_controller.complete(webViewController);
},
- )
-
-
- );
+ ));
}
-}
\ No newline at end of file
+}
diff --git a/lib/pages/AlHabibMedicalService/parking_page.dart b/lib/pages/AlHabibMedicalService/parking_page.dart
index 82c390ea..19f06a56 100644
--- a/lib/pages/AlHabibMedicalService/parking_page.dart
+++ b/lib/pages/AlHabibMedicalService/parking_page.dart
@@ -8,7 +8,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:maps_launcher/maps_launcher.dart';
-
+import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import '../../d_q_icons_icons.dart';
class ParkingPage extends StatelessWidget {
@@ -19,6 +19,13 @@ class ParkingPage extends StatelessWidget {
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).parking,
+ description: TranslationBase.of(context).parkingDescription,
+ imagesInfo: [
+ ImagesInfo(
+ imageAr: 'assets/images/bc_parking.png',
+ imageEn: 'assets/images/bc_parking.png',
+ isAsset: true)
+ ],
body: SingleChildScrollView(
padding: EdgeInsets.all(12),
child: !model.isSavePark
diff --git a/lib/pages/AlHabibMedicalService/ health_calculators.dart b/lib/pages/AlHabibMedicalService/ health_calculators.dart
index dbd8939c..fab4eb6d 100644
--- a/lib/pages/AlHabibMedicalService/ health_calculators.dart
+++ b/lib/pages/AlHabibMedicalService/ health_calculators.dart
@@ -9,7 +9,6 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
-
import 'health_calculator/bmi_calculator/bmi_calculator.dart';
import 'health_calculator/bmr_calculator/bmr_calculator.dart';
import 'health_calculator/calorie_calculator/calorie_calculator.dart';
@@ -21,8 +20,7 @@ class HealthCalculators extends StatefulWidget {
_HealthCalculatorsState createState() => _HealthCalculatorsState();
}
-class _HealthCalculatorsState extends State
- with SingleTickerProviderStateMixin {
+class _HealthCalculatorsState extends State with SingleTickerProviderStateMixin {
TabController _tabController;
void initState() {
super.initState();
@@ -67,22 +65,19 @@ class _HealthCalculatorsState extends State
indicatorWeight: 4.0,
indicatorColor: Colors.red,
labelColor: Theme.of(context).buttonColor,
- labelPadding:
- EdgeInsets.symmetric(horizontal: 13.0, vertical: 2.0),
+ labelPadding: EdgeInsets.symmetric(horizontal: 13.0, vertical: 2.0),
unselectedLabelColor: Colors.grey,
tabs: [
Container(
width: MediaQuery.of(context).size.width * 0.35,
child: Center(
- child: Texts(
- TranslationBase.of(context).generalHealth),
+ child: Texts(TranslationBase.of(context).generalHealth),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.35,
child: Center(
- child:
- Texts(TranslationBase.of(context).womanHealth),
+ child: Texts(TranslationBase.of(context).womanHealth),
),
),
],
@@ -121,8 +116,7 @@ class _HealthCalculatorsState extends State
child: MedicalProfileItem(
title: TranslationBase.of(context).bmi,
imagePath: 'bmi_health_calculator.png',
- subTitle:
- TranslationBase.of(context).calcHealth,
+ subTitle: TranslationBase.of(context).calcHealth,
),
),
),
@@ -140,8 +134,7 @@ class _HealthCalculatorsState extends State
child: MedicalProfileItem(
title: TranslationBase.of(context).calories,
imagePath: 'calories-calculator.png',
- subTitle:
- TranslationBase.of(context).calcHealth,
+ subTitle: TranslationBase.of(context).calcHealth,
),
),
),
@@ -163,8 +156,7 @@ class _HealthCalculatorsState extends State
child: MedicalProfileItem(
title: TranslationBase.of(context).bmr,
imagePath: 'BMR_calculator.png',
- subTitle:
- TranslationBase.of(context).calcHealth,
+ subTitle: TranslationBase.of(context).calcHealth,
),
),
),
@@ -220,11 +212,9 @@ class _HealthCalculatorsState extends State
);
},
child: MedicalProfileItem(
- title:
- TranslationBase.of(context).carbohydrate,
+ title: TranslationBase.of(context).carbohydrate,
imagePath: 'carb_protein.png',
- subTitle:
- TranslationBase.of(context).proteinFat,
+ subTitle: TranslationBase.of(context).proteinFat,
),
),
),
diff --git a/lib/pages/Blood/blood_donation.dart b/lib/pages/Blood/blood_donation.dart
index adff790c..ce6ab8ee 100644
--- a/lib/pages/Blood/blood_donation.dart
+++ b/lib/pages/Blood/blood_donation.dart
@@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
+import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/model/blooddonation/blood_groub_details.dart';
import 'package:diplomaticquarterapp/core/model/blooddonation/get_all_cities.dart';
@@ -60,7 +61,7 @@ class _BloodDonationPageState extends State {
AppSharedPreferences sharedPref = AppSharedPreferences();
AuthenticatedUser authUser;
var checkedValue = false;
-
+ List imagesInfo = List();
@override
void initState() {
super.initState();
@@ -69,6 +70,13 @@ class _BloodDonationPageState extends State {
@override
Widget build(BuildContext context) {
+ imagesInfo.add(
+ ImagesInfo(
+ imageEn:
+ 'https://hmgwebservices.com/Images/MobileApp/images-info-home/blood/en/0.png',
+ imageAr:
+ 'https://hmgwebservices.com/Images/MobileApp/images-info-home/blood/ar/0.png'),
+ );
ProjectViewModel projectProvider = Provider.of(context);
return BaseView(
@@ -76,6 +84,8 @@ class _BloodDonationPageState extends State {
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
baseViewModel: model,
+ imagesInfo: imagesInfo,
+ description: TranslationBase.of(context).bloodDonationInfo,
appBarTitle: TranslationBase.of(context).bloodD,
body: SingleChildScrollView(
physics: ScrollPhysics(),
diff --git a/lib/pages/BookAppointment/QRCode.dart b/lib/pages/BookAppointment/QRCode.dart
index 00fb2fc8..ff7224be 100644
--- a/lib/pages/BookAppointment/QRCode.dart
+++ b/lib/pages/BookAppointment/QRCode.dart
@@ -13,8 +13,10 @@ 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/widgets/dialogs/confirm_dialog.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:nfc_in_flutter/nfc_in_flutter.dart';
class QRCode extends StatefulWidget {
PatientShareResponse patientShareResponse;
@@ -30,17 +32,27 @@ class QRCode extends StatefulWidget {
class _QRCodeState extends State {
Uint8List _bytes;
+ bool _supportsNFC = false;
+ BuildContext _context;
@override
void initState() {
// TODO: implement initState
+
_bytes = base64.decode(widget.appoQR.split(',').last);
widget.authUser = new AuthenticatedUser();
+ NFC.isNDEFSupported.then((supported) {
+ setState(() {
+ print("nfc supprted");
+ _supportsNFC = true;
+ });
+ });
super.initState();
}
@override
Widget build(BuildContext context) {
+ _context = context;
return AppScaffold(
appBarTitle: TranslationBase.of(context).attendRegisterCode,
isShowAppBar: true,
@@ -51,9 +63,56 @@ class _QRCodeState extends State {
mainAxisSize: MainAxisSize.max,
children: [
Container(
- margin: EdgeInsets.only(top: 30.0),
- alignment: Alignment.center,
- child: Image.memory(_bytes, scale: 0.5),
+ width: double.infinity,
+ height: MediaQuery.of(context).size.width / 3,
+ child: Row(
+ children: [
+ _supportsNFC
+ ? Expanded(
+ flex: 1,
+ child: Row(
+ crossAxisAlignment: CrossAxisAlignment.center,
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ InkWell(
+ child: Container(
+ margin: EdgeInsets.only(top: 30.0),
+ alignment: Alignment.center,
+ padding: EdgeInsets.all(8),
+ decoration: BoxDecoration(
+ border: Border.all(color: Colors.black),
+ borderRadius: BorderRadius.circular(10),
+ ),
+ child: Image.asset(
+ "assets/images/nfc/ic_nfc.png"),
+ ),
+ onTap: () {
+ showNfcReader(context,
+ onNcfScan: (String nfcId) {
+ Future.delayed(
+ const Duration(milliseconds: 100),
+ () {
+ sendNfcCheckInRequest(nfcId);
+ });
+ });
+ },
+ ),
+ ],
+ ),
+ )
+ : Container(),
+ Expanded(
+ flex: 1,
+ child: Container(
+ margin: EdgeInsets.only(top: 30.0),
+ alignment: Alignment.center,
+ child: Image.memory(
+ _bytes,
+ ),
+ ),
+ ),
+ ],
+ ),
),
Container(
margin: EdgeInsets.only(top: 20.0, left: 20.0, right: 20.0),
@@ -70,18 +129,20 @@ class _QRCodeState extends State {
EdgeInsets.only(top: 10.0, left: 40.0, bottom: 10.0),
child: Image.asset(
"assets/images/new-design/device_icon.png",
- width: 120.0,
- height: 120.0),
+ width: MediaQuery.of(context).size.width / 3.4,
+ height: MediaQuery.of(context).size.width / 3.4),
),
- Container(
- width: MediaQuery.of(context).size.width * 0.5,
- margin: EdgeInsets.only(
- top: 15.0, bottom: 10.0, left: 20.0, right: 20.0),
- child: Text(TranslationBase.of(context).scanQRHospital,
- style: TextStyle(
- color: Colors.red[700],
- fontSize: 20.0,
- fontWeight: FontWeight.bold)),
+ 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(
+ color: Colors.red[700],
+ fontSize: 18.0,
+ fontWeight: FontWeight.bold)),
+ ),
),
],
),
@@ -300,4 +361,51 @@ class _QRCodeState extends State {
}
return docSpeciality;
}
+
+ sendNfcCheckInRequest(String nfcId) {
+ GifLoaderDialogUtils.showMyDialog(context);
+
+ DoctorsListService service = new DoctorsListService();
+
+ service
+ .sendCheckinNfcRequest(widget.patientShareResponse.appointmentNo, nfcId,
+ widget.patientShareResponse.projectID, 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 _showMyDialog(String message, BuildContext context) async {
+ return showDialog(
+ context: context,
+ barrierDismissible: true, // user must tap button!
+ builder: (BuildContext context) {
+ return AlertDialog(
+ title: const Text('Alert'),
+ content: SingleChildScrollView(
+ child: ListBody(
+ children: [
+ Text(message),
+ ],
+ ),
+ ),
+ actions: [
+ TextButton(
+ child: const Text('OK'),
+ onPressed: () {
+ Navigator.of(context).pop();
+ },
+ ),
+ ],
+ );
+ },
+ );
+ }
}
diff --git a/lib/pages/BookAppointment/components/SearchByDoctor.dart b/lib/pages/BookAppointment/components/SearchByDoctor.dart
index a1ecb7a0..5b4f6dc3 100644
--- a/lib/pages/BookAppointment/components/SearchByDoctor.dart
+++ b/lib/pages/BookAppointment/components/SearchByDoctor.dart
@@ -93,6 +93,7 @@ class _SearchByDoctorState extends State {
service
.getDoctorsListByName(doctorNameController.text, context)
.then((res) {
+ GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {
if (res['DoctorList'].length != 0) {
@@ -129,9 +130,12 @@ class _SearchByDoctorState extends State {
navigateToSearchResults(
context, doctorsList, _patientDoctorAppointmentListHospital);
} else {
+ GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
+ GifLoaderDialogUtils.hideDialog(context);
+ AppToast.showErrorToast(message: err);
print(err);
});
}
diff --git a/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart b/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart
index 04a7178f..c12dd877 100644
--- a/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart
+++ b/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart
@@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart
import 'package:diplomaticquarterapp/models/Appointments/FreeSlot.dart';
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
import 'package:diplomaticquarterapp/models/Appointments/timeSlot.dart';
+import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidTestProceduresResponse.dart';
import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-payment-alert.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.dart';
@@ -27,6 +28,7 @@ class CovidTimeSlots extends StatefulWidget {
static DateTime selectedAppoDateTime;
static String selectedDate;
static String selectedTime;
+ CovidTestProceduresResponse selectedProcedure;
int selectedClinicID;
int selectedDoctorID;
@@ -35,7 +37,7 @@ class CovidTimeSlots extends StatefulWidget {
PatientShareResponse patientShareResponse;
- CovidTimeSlots({@required this.projectID});
+ CovidTimeSlots({@required this.projectID, @required this.selectedProcedure});
@override
_CovidTimeSlotsState createState() => _CovidTimeSlotsState();
@@ -94,10 +96,12 @@ class _CovidTimeSlotsState extends State
super.dispose();
}
- void _onDaySelected(DateTime day, List events, ProjectViewModel projectViewModel) {
+ void _onDaySelected(
+ DateTime day, List events, ProjectViewModel projectViewModel) {
final DateFormat formatter = DateFormat('yyyy-MM-dd');
setState(() {
- this.selectedDate = DateUtil.getWeekDayMonthDayYearDateFormatted(day, projectViewModel.isArabic ? "ar" : "en");
+ this.selectedDate = DateUtil.getWeekDayMonthDayYearDateFormatted(
+ day, projectViewModel.isArabic ? "ar" : "en");
openTimeSlotsPickerForDate(day, docFreeSlots);
CovidTimeSlots.selectedDate = formatter.format(day);
print(CovidTimeSlots.selectedDate);
@@ -260,7 +264,8 @@ class _CovidTimeSlotsState extends State
onPressed: () {
bookCovidTestAppointment();
},
- child: Text(TranslationBase.of(context).bookNow, style: TextStyle(fontSize: 18.0)),
+ child: Text(TranslationBase.of(context).bookNow,
+ style: TextStyle(fontSize: 18.0)),
),
),
),
@@ -355,11 +360,7 @@ class _CovidTimeSlotsState extends State
},
),
onDaySelected: (date, event, _) {
- _onDaySelected(
- date,
- event,
- projectViewModel
- );
+ _onDaySelected(date, event, projectViewModel);
_animationController.forward(from: 0.0);
},
onVisibleDaysChanged: _onVisibleDaysChanged,
@@ -494,7 +495,8 @@ class _CovidTimeSlotsState extends State
docObject.projectID,
CovidTimeSlots.selectedTime,
CovidTimeSlots.selectedDate,
- context)
+ context,
+ widget.selectedProcedure.procedureID)
.then((res) {
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: "Appointment Booked Successfully");
diff --git a/lib/pages/Covid-DriveThru/covid-drivethru-location.dart b/lib/pages/Covid-DriveThru/covid-drivethru-location.dart
index a8cb5048..9bccd300 100644
--- a/lib/pages/Covid-DriveThru/covid-drivethru-location.dart
+++ b/lib/pages/Covid-DriveThru/covid-drivethru-location.dart
@@ -1,5 +1,7 @@
+import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidPaymentInfoResponse.dart';
+import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidTestProceduresResponse.dart';
import 'package:diplomaticquarterapp/models/CovidDriveThru/DriveThroughTestingCenterModel.dart';
import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-payment-details.dart';
import 'package:diplomaticquarterapp/routes.dart';
@@ -21,6 +23,7 @@ class CovidDrivethruLocation extends StatefulWidget {
class _CovidDrivethruLocationState extends State {
String projectDropdownValue;
List projectsList = [];
+ List proceduresList = [];
bool isLocationSelected = false;
String projectLat = "";
String projectLong = "";
@@ -29,23 +32,36 @@ class _CovidDrivethruLocationState extends State